HEADS-UP new statfs structure

Robert Watson rwatson at freebsd.org
Fri Nov 14 14:28:52 PST 2003

On Fri, 14 Nov 2003, Munish Chopra wrote:

> On 2003-11-14 21:50 +0000, Matt Smith wrote:
> > 
> > The only thing I've found a problem with so far is postfix as I've 
> > mentioned.
> While attempting a portupgrade of postfix, I realized ruby core dumps
> after the statfs stuff too (even after I rebuilt it). I'm a bit puzzled,
> anyone else seeing this or is it a pilot error? 

What's going on is the following: while we have a compatibility system
call in place, it only affects applications linked against non-current
libc.  As soon as you recompile libc, applications expecting the old
statfs() ABI get the new statfs(), and depending on where their smaller
struct statfs is located, may stomp on memory they're using for something
else (like critical data structures).  This means that any application
using statfs() and linked against libc.so.5 may start having problems. 
Not only that, but as you begin to compile new programs, they start
expecting the new statfs() API, so if you keep the old libc, they'll start
expecting to see extended struct statfs information in a structure that's
too small.  This is almost certainly a less harmful failure mode than the
former.  However, it turns out statfs() is used in a fair number of
applications (and libraries)...

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org      Network Associates Laboratories

More information about the freebsd-current mailing list