64-bit stat (or not) in 32-bit Fedora binaries

Florian Weimer fweimer at redhat.com
Wed Apr 3 08:49:03 UTC 2013


On 02/19/2013 12:15 AM, Eric Sandeen wrote:
> On 2/18/13 5:11 PM, John Reiser wrote:
>> It would be useful to have a "backward compatibility" LD_PRELOAD shared
>> library which intercepts the caller of stat32, and sets .st_ino to 0,
>> without generating EOVERFLOW, whenever the actual inode number exceeds
>> 32 bits.  This would allow the *option* of continued operation
>> (postponing the work of portability enhancements) for the vast majority
>> of packages which do use stat() but do not inspect .st_ino.
>
> Yep, that would make some sense as a workaround.  FWIW, here's a systemtap
> script which intercepts ext4 stat & bumps the inode nr past 2^32
> (line numbers work on F18/kernel 3.7-8-ish at least)

Do you have something similar for readdir?  Do you know what the kernel 
does in this case?

It would be quite annoying if the result was a truncated or incomplete 
directory listing.

-- 
Florian Weimer / Red Hat Product Security Team


More information about the devel mailing list