lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82be9ec6e43a018add8d9bbc6ba67feee676f32e.camel@intel.com>
Date: Tue, 20 Aug 2024 23:57:23 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "broonie@...nel.org" <broonie@...nel.org>
CC: "dietmar.eggemann@....com" <dietmar.eggemann@....com>,
	"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>, "shuah@...nel.org"
	<shuah@...nel.org>, "brauner@...nel.org" <brauner@...nel.org>,
	"jannh@...gle.com" <jannh@...gle.com>, "dave.hansen@...ux.intel.com"
	<dave.hansen@...ux.intel.com>, "debug@...osinc.com" <debug@...osinc.com>,
	"mgorman@...e.de" <mgorman@...e.de>, "Szabolcs.Nagy@....com"
	<Szabolcs.Nagy@....com>, "fweimer@...hat.com" <fweimer@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>, "hjl.tools@...il.com"
	<hjl.tools@...il.com>, "rostedt@...dmis.org" <rostedt@...dmis.org>,
	"vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>, "vschneid@...hat.com"
	<vschneid@...hat.com>, "catalin.marinas@....com" <catalin.marinas@....com>,
	"kees@...nel.org" <kees@...nel.org>, "will@...nel.org" <will@...nel.org>,
	"hpa@...or.com" <hpa@...or.com>, "peterz@...radead.org"
	<peterz@...radead.org>, "yury.khrustalev@....com" <yury.khrustalev@....com>,
	"bp@...en8.de" <bp@...en8.de>, "wilco.dijkstra@....com"
	<wilco.dijkstra@....com>, "bsegall@...gle.com" <bsegall@...gle.com>,
	"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
	"x86@...nel.org" <x86@...nel.org>, "juri.lelli@...hat.com"
	<juri.lelli@...hat.com>
Subject: Re: [PATCH RFT v9 4/8] fork: Add shadow stack support to clone3()

On Wed, 2024-08-21 at 00:34 +0100, Mark Brown wrote:
> > Why do we need both shadow_stack and shadow_stack_size? We are basically
> > asking
> > it to consume a token at a pointer and have userspace manage the shadow
> > stack
> > itself. So why does the kernel care what size it is? Couldn't we just have
> > 'shadow_stack' have that mean consume a token here.
> 
> I was doing things this way for symmetry with how we specify the normal
> stack.  That's a bit different since the kernel will actually use the
> size for the normal stack but it felt nicer to keep things looking
> consistent, it saves users wondering why they work differently.  It's
> also a bit of a help with portability given that arm64 expects to have a
> top of stack marker above the token by default while x86 doesn't support
> that.

Hmm, so then on arm the kernel would look for the token down a frame. Hmm. I
think it makes it even stranger ABI wise.

SHADOW_STACK_SET_MARKER can be optional (not on arm, but could be in the
future). Then the shadow_stack_size to token offset behavior would depend on
some historical originally supported combination of map_shadow_stack args.

BTW, just to try to reduce potential future revisions, what do you think about
the 8 byte alignment need? Did I miss the check somewhere?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ