This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use statfs64() in shm_open() and posix_getpt().
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: <libc-alpha at sourceware dot org>, Andreas Schwab <schwab at linux-m68k dot org>, OndÅej BÃlka <neleai at seznam dot cz>, Peter TB Brett <peter at peter-b dot co dot uk>
- Date: Mon, 4 Aug 2014 15:51:15 +0000
- Subject: Re: [PATCH] Use statfs64() in shm_open() and posix_getpt().
- Authentication-results: sourceware.org; auth=none
- References: <1397373978-17449-1-git-send-email-peter at peter-b dot co dot uk> <20140413111541 dot GA13260 at domone dot podge> <87wqetkviy dot fsf at igel dot home> <2909521 dot DgPZ84h5ca at vapier>
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