diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-11-13 09:27:53 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-11-13 09:27:53 +0100 |
commit | 92c0512d10960d9920e0342cb5afbeecced50390 (patch) | |
tree | 1b6dd1694ee94c72f19739dad9ff32686d425bc5 /src/basic/missing_syscall.h | |
parent | b6015ad21060c42dcd2d0616033b0f2957facb99 (diff) |
basic/missing: add numbers for pkey_mprotect
Follow-up for b835eeb4ec1dd122b6feff2b70881265c529fcdd.
Diffstat (limited to 'src/basic/missing_syscall.h')
-rw-r--r-- | src/basic/missing_syscall.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h index b0ce5725e..424dbff1a 100644 --- a/src/basic/missing_syscall.h +++ b/src/basic/missing_syscall.h @@ -321,6 +321,8 @@ static inline ssize_t copy_file_range(int fd_in, loff_t *off_in, } #endif +/* ======================================================================= */ + #if !HAVE_BPF # ifndef __NR_bpf # if defined __i386__ @@ -350,3 +352,31 @@ static inline int bpf(int cmd, union bpf_attr *attr, size_t size) { } #endif + +/* ======================================================================= */ + +#ifndef __IGNORE_pkey_mprotect +# ifndef __NR_pkey_mprotect +# if defined __i386__ +# define __NR_pkey_mprotect 380 +# elif defined __x86_64__ +# define __NR_pkey_mprotect 329 +# elif defined __arm__ +# define __NR_pkey_mprotect 394 +# elif defined __aarch64__ +# define __NR_pkey_mprotect 394 +# elif defined _MIPS_SIM +# if _MIPS_SIM == _MIPS_SIM_ABI32 +# define __NR_pkey_mprotect 4363 +# endif +# if _MIPS_SIM == _MIPS_SIM_NABI32 +# define __NR_pkey_mprotect 6327 +# endif +# if _MIPS_SIM == _MIPS_SIM_ABI64 +# define __NR_pkey_mprotect 5323 +# endif +# elif ! defined(__IGNORE_pkey_mprotect) +# warning "__NR_pkey_mprotect not defined for your architecture" +# endif +# endif +#endif |