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: <81afa4ccc661a1598b659958164c7a73cf211d21.camel@intel.com>
Date: Tue, 21 May 2024 01:31:53 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "olsajiri@...il.com" <olsajiri@...il.com>, "oleg@...hat.com"
	<oleg@...hat.com>
CC: "songliubraving@...com" <songliubraving@...com>, "luto@...nel.org"
	<luto@...nel.org>, "mhiramat@...nel.org" <mhiramat@...nel.org>,
	"andrii@...nel.org" <andrii@...nel.org>, "debug@...osinc.com"
	<debug@...osinc.com>, "john.fastabend@...il.com" <john.fastabend@...il.com>,
	"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>, "rostedt@...dmis.org"
	<rostedt@...dmis.org>, "ast@...nel.org" <ast@...nel.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>, "linux-man@...r.kernel.org"
	<linux-man@...r.kernel.org>, "yhs@...com" <yhs@...com>,
	"daniel@...earbox.net" <daniel@...earbox.net>, "peterz@...radead.org"
	<peterz@...radead.org>, "linux-trace-kernel@...r.kernel.org"
	<linux-trace-kernel@...r.kernel.org>, "bp@...en8.de" <bp@...en8.de>,
	"bpf@...r.kernel.org" <bpf@...r.kernel.org>, "x86@...nel.org"
	<x86@...nel.org>
Subject: Re: [PATCHv5 bpf-next 6/8] x86/shstk: Add return uprobe support

On Mon, 2024-05-20 at 00:18 +0200, Jiri Olsa wrote:
> anyway I think we can fix that in another way by using the optimized
> trampoline,
> but returning to the user space through iret when shadow stack is detected
> (as I did in the first version, before you adjusted it to the sysret path).
> 
> we need to update the return address on stack only when returning through the
> trampoline, but we can jump to original return address directly from syscall
> through iret.. which is slower, but with shadow stack we don't care
> 
> basically the only change is adding the shstk_is_enabled check to the
> following condition in SYSCALL_DEFINE0(uretprobe):
> 
>         if (regs->sp != sp || shstk_is_enabled())
>                 return regs->ax;

On the surface it sounds reasonable. Thanks.

And then I guess if tradeoffs are seen differently in the future, and we want to
enable the fast path for shadow stack we can go with your other solution. So
this just simply fixes things functionally without much code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ