glibc/sysdeps/unix/sysv/linux/x86
Florian Weimer 446d22e91d Linux: Implement interfaces for memory protection keys
This adds system call wrappers for pkey_alloc, pkey_free, pkey_mprotect,
and x86-64 implementations of pkey_get and pkey_set, which abstract over
the PKRU CPU register and hide the actual number of memory protection
keys supported by the CPU.  pkey_mprotect with a -1 key is implemented
using mprotect, so it will work even if the kernel does not support the
pkey_mprotect system call.

The system call wrapers use unsigned int instead of unsigned long for
parameters, so that no special treatment for x32 is needed.  The flags
argument is currently unused, and the access rights bit mask is limited
to two bits by the current PKRU register layout anyway.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2017-12-05 15:20:35 +01:00
..
bits
sys Fix mcontext_t sigcontext namespace (bug 21457). 2017-08-30 22:02:04 +00:00
arch-pkey.h Linux: Implement interfaces for memory protection keys 2017-12-05 15:20:35 +01:00
dl-sysdep.c tunables: Add IFUNC selection and cache sizes 2017-06-20 08:37:28 -07:00
elision-conf.c
elision-conf.h
elision-lock.c
elision-timed.c
elision-trylock.c
elision-unlock.c
force-elision.h
gettimeofday.c
hle.h
Implies
jmp_buf-ssp.sym x86: Make a space in jmpbuf for shadow stack pointer 2017-11-30 04:58:01 -08:00
libc-vdso.h x86: Mark VDSO_SYMBOL(getcpu) with attribute_hidden [BZ #18822] 2017-08-21 05:40:45 -07:00
Makefile x86: Make a space in jmpbuf for shadow stack pointer 2017-11-30 04:58:01 -08:00
pkey_get.c Linux: Implement interfaces for memory protection keys 2017-12-05 15:20:35 +01:00
pkey_set.c Linux: Implement interfaces for memory protection keys 2017-12-05 15:20:35 +01:00
pthread_mutex_cond_lock.c
pthread_mutex_lock.c
pthread_mutex_timedlock.c
pthread_mutex_trylock.c
setjmpP.h x86: Make a space in jmpbuf for shadow stack pointer 2017-11-30 04:58:01 -08:00
sysconf.c
time.c
tst-saved_mask-1.c x86: Make a space in jmpbuf for shadow stack pointer 2017-11-30 04:58:01 -08:00