This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: GCC plugin to find encrypted function pointer calls in glibc
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: libc-alpha at sourceware dot org, Florian Weimer <fweimer at redhat dot com>
- Date: Mon, 2 May 2016 15:36:24 -0700 (PDT)
- Subject: Re: RFC: GCC plugin to find encrypted function pointer calls in glibc
- Authentication-results: sourceware.org; auth=none
- References: <57233606 dot 7050205 at redhat dot com>
The only reason we have asm in those macros is because it's optimal.
The best thing would be if we could express the bit swizzling in C in
a fashion that (new enough) GCC could be relied upon to implement with
the same optimal instruction sequence.
Using an inline with __attribute__ ((always_inline, aldys_new_magic))
should be acceptable in libc-internal sources. But it would be better
if you have us ways to do it with less magic rather than more.