This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: V2 [PATCH 04/12] x86/CET: Extend arch_prctl syscall for CET control
On Tue, 24 Jul 2018, H.J. Lu wrote:
> Note: sysdeps/unix/sysv/linux/x86/bits/prctl-internal.h should be
> renamed to sysdeps/unix/sysv/linux/x86/bits/prctl.h after the CET
> kernel interface has been committed into the public kernel.
bits/ should not be used for any internal headers; it's purely a naming
convention for public headers. So there should be no
bits/prctl-internal.h header.
I don't think there should be bits/prctl.h at all either. Not with this
patch (because there isn't anything for it to do), and not once the
interface is in the kernel (because existing practice is that we rely on
the include of <linux/prctl.h> from <sys/prctl.h> to provide the values to
users of glibc).
Rather, for the uses of these constants within glibc, to avoid relying on
new kernel headers, provide an x86 include/sys/prctl.h that does
#include_next <sys/prctl.h> and then defines these constants if not
already defined. And make sure that header gets a prominent comment
naming the upstream kernel version with the constants (once they are
upstream), so it's obvious at what point we can remove that header.
--
Joseph S. Myers
joseph@codesourcery.com