[LTP] [PATCH] pkey: remove the ltp_ prefix from pkey functions

Petr Vorel pvorel@suse.cz
Tue Aug 6 11:21:51 CEST 2024


> On Tue, Aug 6, 2024 at 3:37 PM Li Wang <liwang@redhat.com> wrote:

> > Hi Petr

> > On Tue, Aug 6, 2024 at 2:19 PM Petr Vorel <pvorel@suse.cz> wrote:

> >> Hi Li,

> >> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> >> Thanks!

> >> Other thing which should follow is to use .test_variants.


> > As I pointed out in the last email, mseal() is too new to libc, there is
> > no wrapper in Glibc so far.
> > Should we add .test_variants now?

> Anyway, I boldly pushed the patches and added a TODO in the comments.
> @Petr, I would be happy to review if you plan to write more to cover libc
> wrapper.

I'm sorry this was meant only for functions in lapi/pkey.h, which have
their fallback variants guarded by #ifndef HAVE_PKEY_MPROTECT.
I'll send a patch for it.

Also, once mseal() gets to any libc, it might need to be guarded (depending if
we load header where will be added).

Kind regards,
Petr

> --- a/testcases/kernel/syscalls/mseal/mseal01.c
> +++ b/testcases/kernel/syscalls/mseal/mseal01.c
> @@ -19,12 +19,15 @@
>   *   when users don’t have write permission to the memory
>   *
>   * Any of the described actions is recognized via EPERM errno.
> + *
> + * TODO: support both raw syscall and libc wrapper via .test_variants.
>   */


More information about the ltp mailing list