[libc-commits] [libc] [libc] Swap order of syscall on chmod (PR #138427)
Mikhail R. Gadelha via libc-commits
libc-commits at lists.llvm.org
Mon May 5 14:46:36 PDT 2025
mikhailramalho wrote:
Yeah, maybe it's a weird kernel shipped for the bpi-f3?
```
mgadelha at archlinux include $ uname -a
Linux archlinux 6.1.15-legacy-k1 #9 SMP PREEMPT Mon Aug 12 15:06:24 UTC 2024 riscv64 GNU/Linux
mgadelha at archlinux include $ pwd
/usr/include
mgadelha at archlinux include $ grep -r fchmodat2 *
asm/unistd_32.h:#define __NR_fchmodat2 452
asm/unistd_64.h:#define __NR_fchmodat2 452
asm-generic/unistd.h:#define __NR_fchmodat2 452
asm-generic/unistd.h:__SYSCALL(__NR_fchmodat2, sys_fchmodat2)
bits/syscall.h:#ifdef __NR_fchmodat2
bits/syscall.h:# define SYS_fchmodat2 __NR_fchmodat2
seccomp-syscalls.h:#define __SNR_fchmodat2 __NR_fchmodat2
valgrind/vki/vki-scnums-mips32-linux.h:#define __NR_fchmodat2 (__NR_Linux + 452)
valgrind/vki/vki-scnums-shared-linux.h:#define __NR_fchmodat2 452
```
The defines are there, and we crash when trying to do the syscall.
https://github.com/llvm/llvm-project/pull/138427
More information about the libc-commits
mailing list