[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c88e73b2-69cf-4f74-2776-3644f48edfe5@intel.com>
Date: Thu, 16 Jun 2022 12:31:02 -0700
From: Sohil Mehta <sohil.mehta@...el.com>
To: <ira.weiny@...el.com>, <linux-api@...r.kernel.org>
CC: <ahaas@...omium.org>, <clemensb@...omium.org>,
<gdeepti@...omium.org>, <jkummerow@...omium.org>,
<manoskouk@...omium.org>, <thibaudm@...omium.org>,
Florian Weimer <fweimer@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
<x86@...nel.org>, <linuxppc-dev@...ts.ozlabs.org>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<linux-kselftest@...r.kernel.org>
Subject: Re: [RFC PATCH 4/6] pkeys: Lift pkey hardware check for pkey_alloc()
> 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;
Powered by blists - more mailing lists