AUDIT_ARCH_ and __NR_syscall constants for seccomp filters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

there does not seem to be a way to access the AUDIT_ARCH_ constant that matches
the currently visible syscall numbers (__NR_...) from the kernel uapi headers.

Background:

I am writing a seccomp BPF filter using the syscall constants to get the
correct syscall numbers for the target architecture.

seccomp_filter.rst tells users to always check the arch values.
But there does not seem a way to get the correct AUDIT_ARCH_ value from the
kernel headers.

Questions:

Is it really necessary to validate the arch value when syscall numbers are
already target-specific?
(If not, should this be added to the docs?)

Would it make sense to expose the audit arch matching the syscall numbers in
the uapi headers?

Link to the actual BPF code:
https://github.com/t-8ch/qmk_firmware/blob/optimize-udev/util/udev/qmk_id.c#L154

Thanks,
Thomas



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux