On 02/18/2013 10:33 PM, Eric Sandeen wrote:
XFS recently defaulted to allowing > 32 bit inode numbers, and
btrfs can let inode numbers creep past 2^32 as well.
While most applications don't care one bit about st_ino returned from a stat() call,
the sad fact is that you'll get EOVERFLOW from stat32 if the inode number is too big
to fit in 32 bits, even if you just wanted to get the file size.
I have a script (
http://sandeen.net/misc/summarise_stat.pl) which Greg Banks wrote; it
can check a path or list of filenames for binaries which contain non-64bit-safe stat
calls. A quick look over my F18 install finds the situation to be only slightly in favor
of executables using 64-bit variants:
I ran a search for '__xstat', '__lxstat', '__fxstat' against
current
Fedora 18 (using
https://github.com/fweimer/symboldb/) and found the
attached list of packages.
There are 2179 packages which reference the 32-bit interfaces, 1375
which reference the 64-bit interfaces, and 186 packages reference both.
If we add -DFILE_OFFSET_BITS=64 to the default CFLAGS, this comes pretty
close to an ABI bump. But considering the numbers, I wonder if it's the
right thing to do if we need to cope with 64-bit inode numbers.
--
Florian Weimer / Red Hat Product Security Team