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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e0bd1091-0342-447e-a74d-4d2ce01144fa@sirena.org.uk>
Date: Tue, 15 Apr 2025 13:56:24 +0100
From: Mark Brown <broonie@...nel.org>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
Cc: "dietmar.eggemann@....com" <dietmar.eggemann@....com>,
	"Szabolcs.Nagy@....com" <Szabolcs.Nagy@....com>,
	"brauner@...nel.org" <brauner@...nel.org>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
	"debug@...osinc.com" <debug@...osinc.com>,
	"mgorman@...e.de" <mgorman@...e.de>,
	"vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
	"fweimer@...hat.com" <fweimer@...hat.com>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"rostedt@...dmis.org" <rostedt@...dmis.org>,
	"hjl.tools@...il.com" <hjl.tools@...il.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"vschneid@...hat.com" <vschneid@...hat.com>,
	"shuah@...nel.org" <shuah@...nel.org>,
	"hpa@...or.com" <hpa@...or.com>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"bp@...en8.de" <bp@...en8.de>,
	"bsegall@...gle.com" <bsegall@...gle.com>,
	"x86@...nel.org" <x86@...nel.org>,
	"juri.lelli@...hat.com" <juri.lelli@...hat.com>,
	"yury.khrustalev@....com" <yury.khrustalev@....com>,
	"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
	"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
	"jannh@...gle.com" <jannh@...gle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"catalin.marinas@....com" <catalin.marinas@....com>,
	"will@...nel.org" <will@...nel.org>,
	"wilco.dijkstra@....com" <wilco.dijkstra@....com>,
	"kees@...nel.org" <kees@...nel.org>
Subject: Re: [PATCH RFT v15 4/8] fork: Add shadow stack support to clone3()

On Mon, Apr 14, 2025 at 06:28:14PM +0000, Edgecombe, Rick P wrote:

> First of all, sorry for not contributing on this since v9. I've had an unusual
> enormous project conflict (TDX) combined with my test HW dieing.

No worries, there doesn't seem to have been huge urgency on this one :(

> Both fixed in the diff below, but in debugging the off-by-one errors I've
> realized this implementation wastes a shadow stack frame.

I rolled your diff into the series, thanks.

> Do we want this? On arm there is SHADOW_STACK_SET_MARKER, which leaves a marker
> token. But on clone3 it will also leave behind a zero frame from the CMPXCHGed
> token. So if you use SHADOW_STACK_SET_MARKER you get two marker tokens. And on
> x86 you will get one one for clone3 but not others, until x86 implements
> SHADOW_STACK_SET_MARKER. At which point x86 has to diverge from arm (bad) or
> also have the double marker frame.

> The below fixes the x86 functionally, but what do you think of the wasted frame?
> One fix would be to change shadow_stack_pointer to shadow_stack_token, and then
> have each arch consume it in the normal HW way, leaving the new thread with:

>    SSP = clone_args->shadow_stack_token + 8

I think that's a good point with the extra frame, your suggestion is
sensible.  This didn't translate well when refactoring from specifying
the extent of the shadow stack.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ