lkml.org 
[lkml]   [2022]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 4/6] pkeys: Lift pkey hardware check for pkey_alloc()
From

> diff --git a/mm/mprotect.c b/mm/mprotect.c
> index ba5592655ee3..56d35de33725 100644
> --- a/mm/mprotect.c
> +++ b/mm/mprotect.c
> @@ -773,6 +773,9 @@ SYSCALL_DEFINE2(pkey_alloc, unsigned long, flags, unsigned long, init_val)
> int pkey;
> int ret;
>
> + if (!arch_pkeys_enabled())
> + return -ENOSPC;
> +

See comments in patch 3/6. Since we are modifying (fixing) old behavior,
should we just return ENOSYS to make this consistent?

Sohil

> /* No flags supported yet. */
> if (flags)
> return -EINVAL;

\
 
 \ /
  Last update: 2022-06-16 21:32    [W:0.177 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site