[LTP] [PATCH] lib: tst_fd: Add kernel version check to memfd_secret
nobuhiro1.iwamatsu@toshiba.co.jp
nobuhiro1.iwamatsu@toshiba.co.jp
Fri Jun 28 10:40:28 CEST 2024
Hi Petr,
> -----Original Message-----
> From: Petr Vorel <pvorel@suse.cz>
> Sent: Friday, June 21, 2024 8:09 PM
> To: iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OST)
> <nobuhiro1.iwamatsu@toshiba.co.jp>
> Cc: ltp@lists.linux.it; Cyril Hrubis <chrubis@suse.cz>
> Subject: Re: [LTP] [PATCH] lib: tst_fd: Add kernel version check to
> memfd_secret
>
> Hi Nobuhiro,
>
> > memfd_secret is a syscall added since 5.14. On earlier kernels, tests
> > such as accept03, readahead01 and splice07 that use memfd_secret fail.
> > This adds a kernel version check to the tst_fd library when running
> > tests using memfd_secret.
>
> Cyril's suggestion to add fallback definitions sounds to me as a good idea:
>
> https://lore.kernel.org/ltp/ZnVCcU6jOU98DYek@yuki/
>
> I guess that the best fix is to add fallback definitions for
> memfd_secret into include/lapi/syscalls/*.in files. That way we
> should
> get -1 and EINVAL properly even when kernel does not support the
> syscall.
>
> Could you please try that first?
OK, I will create a v2 patch based on that suggestion.
>
> Kind regards,
> Petr
Best regards,
Nobuhiro
More information about the ltp
mailing list