This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] libio: use PTR_MANGLE/PTR_DEMANGLE for FILE vtables
- From: Kees Cook <keescook at chromium dot org>
- To: Kees Cook <keescook at chromium dot org>, libc-alpha <libc-alpha at sourceware dot org>, Florian Weimer <fweimer at redhat dot com>, Adam Conrad <adconrad at 0c3 dot net>, Joseph Myers <joseph at codesourcery dot com>, Yunlian Jiang <yunlian at google dot com>
- Date: Mon, 23 May 2016 13:40:14 -0700
- Subject: Re: [PATCH] libio: use PTR_MANGLE/PTR_DEMANGLE for FILE vtables
- Authentication-results: sourceware.org; auth=none
- References: <20160523200235 dot GA32189 at www dot outflux dot net> <20160523203430 dot GO26300 at vapier dot lan>
On Mon, May 23, 2016 at 1:34 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On 23 May 2016 13:02, Kees Cook wrote:
>> --- a/libio/libioP.h
>> +++ b/libio/libioP.h
>> +static inline void
>> +__mangle_vtable(const struct _IO_jump_t **vtable, const struct _IO_jump_t *table)
>
> any reason to not use a name like "_IO_mangle_vtable" ?
>
> GNU style says to put a space before the (
>
>> +{
>> + struct _IO_jump_t *ptr = (struct _IO_jump_t *)table;
>> +#ifndef USE_COMPAT_LIBIO
>> + PTR_MANGLE (ptr);
>> +#endif
>> + *vtable = ptr;
>> +}
>
> GNU style says indent with 2 spaces rather than 4
Should I fix these up and resend, or are those trivial enough to get
fixed up during commit?
> otherwise, lgtm
Yay! :)
-Kees
--
Kees Cook
Chrome OS & Brillo Security