diff options
author | Paul Moore <paul@paul-moore.com> | 2019-09-29 15:55:53 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2019-10-01 02:29:09 -0400 |
commit | bf162816a6e42d7a40e54aadc18d1a98c34ca971 (patch) | |
tree | 55b83ab2f193e71159022aa7592f3564bc96cd36 /tools | |
parent | 853a24c8720d64ef1dfe0f69202f19bf916ddccb (diff) | |
download | libseccomp-bf162816a6e42d7a40e54aadc18d1a98c34ca971.tar.gz |
api: stop defining __NR_x values for syscalls that don't exist
Historically libseccomp has created a __NR_x definition for every
syscall it supports, even those that aren't valid for a given ABI.
While this seemed like a good idea at the time, it turned out to have
some unwanted and nasty side effects. This patch finally corrects
this problem.
The basic approach is quite simple: move the SCMP_SYS() macro to use
__SNR_x values instead of __NR_x values. The unfortunate side effect
of this change is that instead of just worrying about #defines for the
__PNR_x values we now have to have a __SNR_x define for *every*
syscall. The good news is that after this patch that should only be
a few new syscalls every year - a very manageable task.
Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/check-syntax | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/check-syntax b/tools/check-syntax index 4369e93..7429334 100755 --- a/tools/check-syntax +++ b/tools/check-syntax @@ -22,6 +22,7 @@ # CHK_C_LIST="include/seccomp.h.in \ + include/seccomp-syscalls.h \ src/*.c src/*.h \ tests/*.c tests/*.h \ tools/*.c tools/*.h" |