[LTP] [PATCH] lapi/userfaultfd: Handle ENOSYS in SAFE_USERFAULTFD
Andrea Cervesato
andrea.cervesato@suse.com
Wed Apr 29 11:22:03 CEST 2026
> I encountered this issue during Android GKI (Generic Kernel Image) and
> VTS (Vendor Test Suite) testing on various device targets (e.g., Pixel
> 6, virtual devices). In our testing environment, we run the same test
> suite against a wide variety of kernel versions and configurations.
>
> Specifically, on some kernels where CONFIG_USERFAULTFD is disabled,
> the userfaultfd() syscall returns ENOSYS. While you mentioned
> tst_syscall() handles it, in the version/configuration we are using,
> tst_syscall() returns -1 and sets errno to ENOSYS. This is then passed
> to safe_userfaultfd(), which currently only checks for EPERM to skip
> (TCONF) and falls back to TBROK for any other error, including ENOSYS.
I'm a bit puzzled because according to the tst_syscall() implementation
this should not happen. If syscall returns -1 with errno == ENOSYS,
the tst_syscall() implementation will always TCONF. This is visible
in include/lapi/syscalls.h generated by the build system before
compiling.
Please provide the exact test that is failing, as well as the logs
you have seen having this issue.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list