From: Dave Hansen <dave.hansen@intel.com>
To: Bijan Tabatabai <bijan311@gmail.com>,
tglx@kernel.org, dave.hansen@linux.intel.com,
mgorman@techsingularity.net, linux-kernel@vger.kernel.org
Cc: mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com,
sgsu.park@samsung.com, akpm@linux-foundation.org,
Bijan Tabatabai <btabatabai@wisc.edu>
Subject: Re: [PATCH] x86/pkeys: Fix pkey_alloc return value when pkeys are not supported
Date: Thu, 16 Jul 2026 15:37:51 -0700 [thread overview]
Message-ID: <560795c3-8587-4e08-984b-b0ab26fc6f9e@intel.com> (raw)
In-Reply-To: <20260716220604.26452-1-bijan311@gmail.com>
On 7/16/26 15:06, Bijan Tabatabai wrote:
> Change mm_pkey_alloc() to directly check if OSPKE is enabled, and
> return -1 if it is not, which causes pkey_alloc() to return -ENOSPC. The
> arm64 and powerpc implementations of mm_pkey_alloc() already do this
> check.
Thanks for the patch! I made one tweak which was to use
arch_pkeys_enabled() instead of the cpu_feature_enabled() check. That
makes the code darn close to a perfect copy of the ARM code at least.
It would be really nice if someone could go consolidate all the copying
and pasting between the architectures there some day.
next prev parent reply other threads:[~2026-07-16 22:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 22:06 Bijan Tabatabai
2026-07-16 22:37 ` Dave Hansen [this message]
2026-08-13 17:24 ` [tip: x86/mm] x86/pkeys: Fix pkey_alloc() " tip-bot2 for Bijan Tabatabai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=560795c3-8587-4e08-984b-b0ab26fc6f9e@intel.com \
--to=dave.hansen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=bijan311@gmail.com \
--cc=bp@alien8.de \
--cc=btabatabai@wisc.edu \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mingo@redhat.com \
--cc=sgsu.park@samsung.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®