From: "Thomas Weißschuh" <linux@weissschuh.net> To: linux-audit@redhat.com, bpf@vger.kernel.org Subject: AUDIT_ARCH_ and __NR_syscall constants for seccomp filters Date: Mon, 28 Jun 2021 09:31:53 +0200 [thread overview] Message-ID: <0b926f59-464d-4b67-8f32-329cf9695cf7@t-8ch.de> (raw) 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
next reply other threads:[~2021-06-28 7:32 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-28 7:31 Thomas Weißschuh [this message] 2021-06-28 16:59 ` Paul Moore 2021-06-28 17:13 ` Thomas Weißschuh 2021-06-28 17:34 ` Paul Moore 2021-06-28 17:58 ` Thomas Weißschuh 2021-06-28 22:43 ` Paul Moore 2021-06-29 10:40 ` Thomas Weißschuh 2021-06-29 23:41 ` Paul Moore
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=0b926f59-464d-4b67-8f32-329cf9695cf7@t-8ch.de \ --to=linux@weissschuh.net \ --cc=bpf@vger.kernel.org \ --cc=linux-audit@redhat.com \ --subject='Re: AUDIT_ARCH_ and __NR_syscall constants for seccomp filters' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).