This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] libio: use PTR_MANGLE/PTR_DEMANGLE for FILE vtables
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Kees Cook <keescook at chromium dot org>, libc-alpha <libc-alpha at sourceware dot org>, Mike Frysinger <vapier at gentoo dot org>, Adam Conrad <adconrad at 0c3 dot net>
- Date: Thu, 1 Oct 2015 20:55:41 +0000
- Subject: Re: [PATCH v2] libio: use PTR_MANGLE/PTR_DEMANGLE for FILE vtables
- Authentication-results: sourceware.org; auth=none
- References: <20151001184048 dot GA31563 at www dot outflux dot net> <560D8108 dot 6060802 at redhat dot com> <CAGXu5jLi7iW+543YD7ySDb7Yq+_2SfGW8q3z50p4C3Usg5dC0w at mail dot gmail dot com> <560D8A2F dot 8020900 at redhat dot com>
On Thu, 1 Oct 2015, Florian Weimer wrote:
> >> At one point, someone needs to do the thankless job and unearth where
> >> the cut-over point to modern libstdc++ was, and which architectures
> >> actually need the vtable compatibility. (If there was no GCC version
> >> that could compile the relevant libstdc++ versions, then compatibility
> >> is obviously unnecessary.)
> >
> > Is there a hint about how to detect this? I don't know what I'd be looking for.
>
> libio.h is apparently an installed header, so it is still part of the
> public API. This means that this API is technically supported on all
> current architectures, even those which never saw the old libstdc++
> version. (libstdc++ switched in 2003â)
I don't think it's part of the public API; it should only ever be included
via <stdio.h>, and only the non-reserved-namespace <stdio.h> interfaces
are part of the public API. (Note that various _IO_* names may be used in
<stdio.h> macros / inlines so may be part of the public ABI that way.) By
modern glibc standards, this header, and _G_config.h, should be entirely
in bits/.
(It looks like, while it was GCC 3.4 that removed all traces of libio use,
GCC 3.0 through 3.3 didn't actually default to using it in libstdc++-v3.
I don't know if libstdc++ versions using libio actually did so in a way
that embedded dependencies on vtable contents in the libstdc++ binaries or
in executables using it.)
--
Joseph S. Myers
joseph@codesourcery.com