Conversation
…itions Align syscall argument names across architectures to ensure cross-platform policy portability: - In src/syscalls/i386_syscalls.c: rename statx ARG_4 from 'buffer' to 'statxbuf' to match amd64, aarch64, riscv64, and m68k. - In src/syscalls/m68k_syscalls.c: * Rename fsopen ARG_0 from '_fs_name' to 'fs_name'. * Rename fsconfig ARG_2 and ARG_3 from '_key' and '_value' to 'key' and 'value'. * Rename ARG_0 of setxattrat, getxattrat, listxattrat, removexattrat, open_tree_attr, file_getattr, and file_setattr from 'dirfd' to 'dfd' to match the generic Linux UAPI definitions and other architecture tables.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In Kafel, argument names are part of the policy syntax. Inconsistencies across architecture tables break cross-compilation of portable policies.
For example, the following valid policy compiles on
amd64andaarch64, but currently fails oni386andm68k:i386: fails with unknown argumentstatxbuf(table hadbuffer).m68k: fails with unknown argumentdfd(table haddirfd).Changes
Align
i386andm68ksyscall argument definitions with generic Linux UAPI (asm-generic/unistd.h) and other architecture tables insrc/syscalls/:i386(src/syscalls/i386_syscalls.c)statx:buffer->statxbuf(ARG_4)m68k(src/syscalls/m68k_syscalls.c)fsopen:_fs_name->fs_name(ARG_0)fsconfig:_key,_value->key,value(ARG_2,ARG_3)setxattrat,getxattrat,listxattrat,removexattrat,open_tree_attr,file_getattr,file_setattr:dirfd->dfd(ARG_0)Verification
include/uapi/asm-generic/unistd.h,include/uapi/linux/fs.h).