Skip to content

qemu-user syscall 439 (faccessat2) not implemented - loongarch64

Host environment

  • Operating system: Linux
  • OS/kernel version: 5.18.16
  • Architecture: x86_64
  • QEMU flavor: qemu-loongarch64
  • QEMU version: 7.1.50 (v7.1.0-177-gfd28528e-dirty)
  • QEMU command line:
    /bin/qemu-loongarch64 -strace /bin/bash test.sh

Emulated/Virtualized environment

  • Operating system: Linux
  • OS/kernel version: (same as host)
  • Architecture: LoongArch64

Description of problem

On LoongArch64 architecture faccessat syscall is missing and only faccessat2 is present, but it is not handled in linux-user/syscall

Steps to reproduce

  1. Launch a simple bash test script (call it test.sh): if [[ -r test.sh ]] ; then echo OK ; else echo ERROR ; fi
  2. The result is "ERROR" even if the file "test.sh" exists and it is readeable
  3. The correct result should be "OK"

Additional information

test.sh:

if [[ -r test.sh ]] ; then echo OK ; else echo ERROR ; fi

qemu-loongarch -strace log:

[...]
12579 statx(255,"",AT_EMPTY_PATH|AT_NO_AUTOMOUNT,STATX_BASIC_STATS,0x0000004000802a50) = 0
12579 lseek(255,0,SEEK_CUR) = 0
12579 read(255,0x2016d490,56) = 56
12579 Unknown syscall 439
12579 write(1,0x20172010,6) = 6
12579 read(255,0x2016d490,56) = 0
12579 rt_sigprocmask(SIG_BLOCK,0x0000004000802b60,0x0000004000802be0) = 0
12579 rt_sigprocmask(SIG_SETMASK,0x0000004000802be0,NULL) = 0
12579 exit_group(0)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information