You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
, firejail uses AUDIT_ARCH_AARCH64, however this symbol is only defined starting linux version 3.17: torvalds/linux@875cbf3 (see the Github tag views)
Steps to Reproduce
Try to build the latest version of firejail / seccomp on a platform with a kernel version of 3.10, see that it fails with:
../include/seccomp.h:114:25: error: 'AUDIT_ARCH_AARCH64' undeclared (first use in this function); did you mean 'AUDIT_ARCH_SPARC64'?
114 | # define ARCH_NR AUDIT_ARCH_AARCH64
| ^~~~~~~~~~~~~~~~~~
../include/seccomp.h:198:38: note: in expansion of macro 'ARCH_NR'
198 | BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ARCH_NR, 1, 0), \
| ^~~~~~~
sbox.c:113:25: note: in expansion of macro 'VALIDATE_ARCHITECTURE'
113 | VALIDATE_ARCHITECTURE,
| ^~~~~~~~~~~~~~~~~~~~~
../include/seccomp.h:114:25: note: each undeclared identifier is reported only once for each function it appears in
114 | # define ARCH_NR AUDIT_ARCH_AARCH64
| ^~~~~~~~~~~~~~~~~~
../include/seccomp.h:198:38: note: in expansion of macro 'ARCH_NR'
198 | BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ARCH_NR, 1, 0), \
| ^~~~~~~
sbox.c:113:25: note: in expansion of macro 'VALIDATE_ARCHITECTURE'
113 | VALIDATE_ARCHITECTURE,
| ^~~~~~~~~~~~~~~~~~~~~
Additional context
This is probably not a showstopper for us, I am slightly concerned though that we need to use newer kernel header versions when targeting an older kernel version
Environment
Name/version/arch of the Linux kernel (e.g. the output of uname -srm) Kernel version 3.10
Name/version of the Linux distribution (e.g. "Ubuntu 20.04" or "Arch Linux") Centos 7
Name/version of the C compiler (e.g. "gcc 14.1.1-1") gcc-13
Name/version of the libc (e.g. "glibc 2.40-1") glibc 2.17
Version of the Linux API headers (e.g. "linux-api-headers 6.10-1" on Arch Linux) 3.10
Version of the source code being built (e.g. the output of git rev-parse HEAD) 0.9.72
The text was updated successfully, but these errors were encountered:
snakethatlovesstaticlibs
changed the title
build: Usage of AUDIT_ARCH_AARCH64 prevents building from source on versions lower than 3.17
build: Usage of AUDIT_ARCH_AARCH64 prevents building from source on versions lower than Linux 3.17
Aug 20, 2024
kmk3
changed the title
build: Usage of AUDIT_ARCH_AARCH64 prevents building from source on versions lower than Linux 3.17
build: error: 'AUDIT_ARCH_AARCH64' undeclared on Linux <3.17
Aug 20, 2024
It apparently only exists since Linux kernel version 3.17 (in
linux/audit.h)[1].
Partial build log:
../include/seccomp.h:114:25: error: 'AUDIT_ARCH_AARCH64' undeclared (first use in this function); did you mean 'AUDIT_ARCH_SPARC64'?
114 | # define ARCH_NR AUDIT_ARCH_AARCH64
| ^~~~~~~~~~~~~~~~~~
../include/seccomp.h:198:38: note: in expansion of macro 'ARCH_NR'
198 | BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ARCH_NR, 1, 0), \
| ^~~~~~~
sbox.c:113:25: note: in expansion of macro 'VALIDATE_ARCHITECTURE'
113 | VALIDATE_ARCHITECTURE,
| ^~~~~~~~~~~~~~~~~~~~~
../include/seccomp.h:114:25: note: each undeclared identifier is reported only once for each function it appears in
114 | # define ARCH_NR AUDIT_ARCH_AARCH64
| ^~~~~~~~~~~~~~~~~~
../include/seccomp.h:198:38: note: in expansion of macro 'ARCH_NR'
198 | BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ARCH_NR, 1, 0), \
| ^~~~~~~
sbox.c:113:25: note: in expansion of macro 'VALIDATE_ARCHITECTURE'
113 | VALIDATE_ARCHITECTURE,
| ^~~~~~~~~~~~~~~~~~~~~
Environment: Linux kernel/headers 3.10 / CentOS 7 / arm64.
Fixesnetblue30#6440.
[1] torvalds/linux@875cbf3
Reported-by: @snakethatlovesstaticlibs
Description
On
firejail/src/include/seccomp.h
Line 115 in e8b693c
AUDIT_ARCH_AARCH64
, however this symbol is only defined starting linux version 3.17: torvalds/linux@875cbf3 (see the Github tag views)Steps to Reproduce
Try to build the latest version of firejail / seccomp on a platform with a kernel version of 3.10, see that it fails with:
Additional context
Environment
uname -srm
) Kernel version 3.10git rev-parse HEAD
) 0.9.72The text was updated successfully, but these errors were encountered: