The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "shuah@kernel.org" <shuah@kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"bp@alien8.de" <bp@alien8.de>, "pjw@kernel.org" <pjw@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"aou@eecs.berkeley.edu" <aou@eecs.berkeley.edu>,
	"x86@kernel.org" <x86@kernel.org>,
	"palmer@dabbelt.com" <palmer@dabbelt.com>,
	"bill.roberts@arm.com" <bill.roberts@arm.com>,
	"alex@ghiti.fr" <alex@ghiti.fr>,
	"tglx@kernel.org" <tglx@kernel.org>
Cc: "linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH 1/2] x86/shstk: support via prctl
Date: Mon, 3 Aug 2026 18:14:10 +0000	[thread overview]
Message-ID: <ccdeeca8fe9c6d3e0378891953ba9249557fea2a.camel@intel.com> (raw)
In-Reply-To: <51064f94-be8d-4901-845c-9f4a5e46a337@arm.com>

On Mon, 2026-08-03 at 12:41 -0500, Bill Roberts wrote:
> > > Map the generic PR_SHADOW_STACK_ENABLE, PR_SHADOW_STACK_DISABLE, and
> > > PR_SHADOW_STACK_LOCK operations onto the underlying x86 internal CET
> > > helper
> > > routines. This allows portable userspace applications to toggle or query
> > > shadow stack states without relying on architecture-specific system calls,
> > > while maintaining backward compatibility with existing arch_prctl() calls.
> > Can you explain why not to include ARCH_SHSTK_UNLOCK?
> > https://lore.kernel.org/lkml/e1362732ba86990b7707d3f5b785358b77c5f896.camel@intel.com
>  From what I can tell, there is no analogous operation in the common 
> flow, you lock the thread features, and
> the features are locked in perpetuity for the thread. If you need fluid 
> changes to these bits, you just don't lock
> it. If in the future the generic interface gets this, then it would make 
> sense for sure.

ptrace has as special handling for arch_prctl. So to unlock for CRIU (where
unlock came from), it needs to go via arch_prctl. I wonder what the other arch's
will do for this. If we unify the ABI, it seems the generic one that is getting
implemented in this series is incomplete. Unless the API will be split always
between the two syscalls.

  reply	other threads:[~2026-08-03 18:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 15:47 [PATCH 0/2] x86: Support shstk via prctl Bill Roberts
2026-07-14 15:47 ` [PATCH 1/2] x86/shstk: support " Bill Roberts
2026-07-29 13:29   ` Edgecombe, Rick P
2026-08-03 17:41     ` Bill Roberts
2026-08-03 18:14       ` Edgecombe, Rick P [this message]
2026-08-04 18:23         ` Bill Roberts
2026-08-04 18:49           ` Edgecombe, Rick P
2026-08-04 20:43             ` Bill Roberts
2026-08-04 21:59               ` Edgecombe, Rick P
2026-08-05 17:16                 ` Bill Roberts
2026-07-14 15:47 ` [PATCH 2/2] selftests/x86: add generic prctl shadow stack test Bill Roberts
2026-07-29 13:31   ` Edgecombe, Rick P
2026-08-03 17:50     ` Bill Roberts

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=ccdeeca8fe9c6d3e0378891953ba9249557fea2a.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=bill.roberts@arm.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mingo@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=shuah@kernel.org \
    --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