Repository navigation
Conversation
|
Hi, gentle ping on this PR. Is there anything that needs to be adjusted? Thanks! |
|
Well, first thing is that there is a moratorium on adding new hardware platforms because I have no time for adding syscalls every kernel release. This was announced on the mail list a couple years ago: https://lore.kernel.org/linux-audit/4855993.31r3eYUQgx@x2/T/#u See item 6.MIPS was let in because they promised to update the tables. |
|
Thanks for the explanation, Steve. I understand the maintenance burden concern. loongarch64 is an actively deployed architecture in production, and I'm willing to commit to keeping syscall-names.list and Would that be acceptable? Or would you prefer me to resubmit this after the moratorium is lifted? |
|
I'm considering it. I want to double check with new maintainers what their opinion is. |
|
I'm not sure this will eventually get merged but here are some things that would probably need fixing either way. Missing syscall. The table ends at 471 (
|
Add LoongArch64 (EM_LOONGARCH 258) support to the audit library, following the pattern used by aarch64 and riscv. The LoongArch64 architecture uses the generic syscall ABI (same as riscv64), so the syscall table is derived from the riscv64 table minus RISC-V-specific syscalls. This includes: - configure.ac: --with-loongarch64 option and WITH_LOONGARCH64 define - lib/libaudit.h: MACH_LOONGARCH64 in machine_t enum - lib/libaudit.c: machine determination for loongarch64 (64-bit only) - lib/lookup_table.c: elf table entry and s2i/i2s dispatch - lib/machinetab.h: machine name mapping - lib/Makefile.am: build rules for loongarch64_tables.h - lib/test/lookup_test.c: table validation test - lib/syscall-update.txt: syscall source documentation - lib/loongarch64_table.h: 327 syscall entries (new file) - auparse/interpret.c: extend the unknown-machine bound to MACH_LOONGARCH64 - tools/ausyscall/ausyscall.c: disabled-arch message for loongarch64 Signed-off-by: YuPeng <yupeng@kylinos.cn>
b0f5b92 to
7921ba4
Compare
|
Thanks for the thorough review, Attila! I've addressed all three points (amended into the single commit):
Verified locally on x86_64 with both configurations:
The updated branch is force-pushed. I also retitled the commit to |
| _S(163, "getrlimit") | ||
| _S(164, "setrlimit") |
There was a problem hiding this comment.
getrlimit and setrlimit are not real syscalls on loongarch64. In the kernel's generic table these slots are opt-in: scripts/syscall.tbl tags 163/164 with the rlimit abi, and arch/loongarch/kernel/Makefile.syscalls selects only memfd_secret on top of the common/64 defaults. RISC-V opted into rlimit (which is why the riscv64 table legitimately has these entries), but LoongArch never did, in any kernel version. Slots 163/164 are sys_ni_syscall holes there. Our own riscv32_table.h already omits them for exactly this reason.
Could you drop these two entries? The table then matches the kernel's loongarch64 set exactly (325 entries).
| _S(163, "getrlimit") | |
| _S(164, "setrlimit") |
Add LoongArch64 (loongarch64) processor support to libaudit, following the same pattern as RISCV64 and
AARCH64.
Tested on x86_64 host with loongarch64 cross-compiler (GCC 15.1.0):
autoreconf, configure, make, lookup_test all pass.
Closes: #88