linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "broonie@kernel.org" <broonie@kernel.org>,
	"debug@rivosinc.com" <debug@rivosinc.com>
Cc: "dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"brauner@kernel.org" <brauner@kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"mgorman@suse.de" <mgorman@suse.de>,
	"Szabolcs.Nagy@arm.com" <Szabolcs.Nagy@arm.com>,
	"fweimer@redhat.com" <fweimer@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hjl.tools@gmail.com" <hjl.tools@gmail.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
	"vschneid@redhat.com" <vschneid@redhat.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
	"bristot@redhat.com" <bristot@redhat.com>,
	"will@kernel.org" <will@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"jannh@google.com" <jannh@google.com>,
	"bp@alien8.de" <bp@alien8.de>,
	"bsegall@google.com" <bsegall@google.com>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"juri.lelli@redhat.com" <juri.lelli@redhat.com>
Subject: Re: [PATCH RFC RFT 2/5] fork: Add shadow stack support to clone3()
Date: Thu, 26 Oct 2023 23:32:51 +0000	[thread overview]
Message-ID: <22bbdd904da3673797fe8593cf47f7cd8ff54ea2.camel@intel.com> (raw)
In-Reply-To: <ZTrOw97NFjUpANMg@debug.ba.rivosinc.com>

On Thu, 2023-10-26 at 13:40 -0700, Deepak Gupta wrote:
> 
> FWIW, from arch specific perspective, RISC-V shadow stack extension
> has
> `ssamoswap` to perform this token exchange. But I understand x86 has
> this
> limitation (not sure about arm GCS).
> 
>  From security perspective:--
> Someone having ability to execute clone3 with control on input,
> probably
> already achieved some level of control flow bending because they need
> to
> corrupt memory and then carefully control registers input to clone3.
> Although if it is purely a data oriented gadget, I think it is
> possible.

struct clone_args should be data somewhere, at least temporarily.

> 
> Since this RFC is mostly concerned about `size` of shadow stack. I
> think
> we should limit it to size only.

Seems reasonable to me. It still leaves open the option of adding an
shadow stack address field later AFAICT.

  reply	other threads:[~2023-10-26 23:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 13:20 [PATCH RFC RFT 0/5] fork: Support shadow stacks in clone3() Mark Brown
2023-10-23 13:20 ` [PATCH RFC RFT 1/5] mm: Introduce ARCH_HAS_USER_SHADOW_STACK Mark Brown
2023-10-23 13:20 ` [PATCH RFC RFT 2/5] fork: Add shadow stack support to clone3() Mark Brown
2023-10-23 16:32   ` Edgecombe, Rick P
2023-10-23 18:32     ` Mark Brown
2023-10-26 17:10       ` Edgecombe, Rick P
2023-10-26 17:53         ` Mark Brown
2023-10-26 20:40           ` Deepak Gupta
2023-10-26 23:32             ` Edgecombe, Rick P [this message]
2023-10-27 11:49             ` Szabolcs.Nagy
2023-10-27 23:24               ` Deepak Gupta
2023-10-30 11:39                 ` Szabolcs.Nagy
2023-10-30 18:20                   ` Deepak Gupta
2023-10-26 23:31           ` Edgecombe, Rick P
2023-10-23 13:20 ` [PATCH RFC RFT 3/5] selftests/clone3: Factor more of main loop into test_clone3() Mark Brown
2023-10-23 13:20 ` [PATCH RFC RFT 4/5] selftests/clone3: Allow tests to flag if -E2BIG is a valid error code Mark Brown
2023-10-23 13:20 ` [PATCH RFC RFT 5/5] kselftest/clone3: Test shadow stack support Mark Brown

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=22bbdd904da3673797fe8593cf47f7cd8ff54ea2.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=bp@alien8.de \
    --cc=brauner@kernel.org \
    --cc=bristot@redhat.com \
    --cc=broonie@kernel.org \
    --cc=bsegall@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=debug@rivosinc.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jannh@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=will@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;
as well as URLs for NNTP newsgroup(s).