[PATCH] Use statfs64() in shm_open() and posix_getpt().
Joseph S. Myers
joseph@codesourcery.com
Mon Aug 4 15:51:00 GMT 2014
On Sat, 2 Aug 2014, Mike Frysinger wrote:
> right, posix_openpt is part of libc, but shm_open is part of librt. so the
> former should use __statfs64 to avoid the PLT while the latter should use
> statfs64.
No, both should use __statfs64 as statfs64 is not part of the POSIX
namespace but shm_open is. As previously discussed, PLT avoidance and
being namespace-clean are separate issues.
That does of course mean __statfs64 needs to be exported from libc.so.
Although you could use a GLIBC_PRIVATE export (and that's the conservative
approach at this development stage), eventually we'll want such exports at
public symbol versions as part of a fix for bug 14106. (statfs isn't part
of a standard, so the need for such a public export is a bit less clear,
but it still seems appropriate given that you can use <sys/statfs.h>
without _LARGEFILE64_SOURCE being defined, and in that case it seems
reasonable to consider statfs64 part of the user's namespace.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list