Mesa (master): radv: fix radv secure compile feature breaks compilation on armhf EABI and aarch64
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 12 00:47:35 UTC 2019
Module: Mesa
Branch: master
Commit: 0cb5c96a83e3da2986fc8219b10671a7caea9ee5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0cb5c96a83e3da2986fc8219b10671a7caea9ee5
Author: Luis Mendes <luis.p.mendes at gmail.com>
Date: Sat Nov 9 23:21:05 2019 +0000
radv: fix radv secure compile feature breaks compilation on armhf EABI and aarch64
__NR_select is not defined the same way across architectures, sometimes is
not even defined, like in armhf EABI and aarch64.
Signed-off-by: Luis Mendes <luis.p.mendes at gmail.com>
Acked-by: Timothy Arceri <tarceri at itsqueeze.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2042
---
src/amd/vulkan/radv_device.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 93763c4ae4c..a608c39c5e5 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -2006,8 +2006,16 @@ static int install_seccomp_filter() {
BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, AUDIT_ARCH_X86_64, 0, 12),
/* Futex is required for mutex locks */
+ #if defined __NR__newselect
+ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, (offsetof(struct seccomp_data, nr))),
+ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, __NR__newselect, 11, 0),
+ #elif defined __NR_select
BPF_STMT(BPF_LD + BPF_W + BPF_ABS, (offsetof(struct seccomp_data, nr))),
BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, __NR_select, 11, 0),
+ #else
+ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, (offsetof(struct seccomp_data, nr))),
+ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, __NR_pselect6, 11, 0),
+ #endif
/* Allow system exit calls for the forked process */
BPF_STMT(BPF_LD + BPF_W + BPF_ABS, (offsetof(struct seccomp_data, nr))),
More information about the mesa-commit
mailing list