Should legacy fstat (via __fxstat) and fstat@GLIBC_2.33 call the same syscall?

Adhemerval Zanella adhemerval.zanella@linaro.org
Thu Jan 14 12:29:26 GMT 2021



On 14/01/2021 09:00, Florian Weimer via Libc-alpha wrote:
> Currently, __fxstat may get mapped to the fstat system call, while fstat
> goes to fstatat.  This makes sandboxing issues less obvious to debug:
> 
>   <https://bugs.chromium.org/p/chromium/issues/detail?id=1164975>
> 
> Should we change this before the release?  And if yes, in what
> direction?

Implementing fstat/lstat/stat through fstatat does really simplify
the code at *lot* for some architectures. And on others and on some
ABI (32-bit with 64-bit time_t), it would require to use the same
syscall anyway (statx).

I don't really see any gain in adding back this complexity back on
stat calls, specially with y2038 support requirement.  


More information about the Libc-alpha mailing list