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: <6ada635e-973d-4e32-ab47-1fda12ee7ce7@efficios.com>
Date: Fri, 21 Feb 2025 14:38:30 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Dave Hansen <dave.hansen@...el.com>, Dmitry Vyukov <dvyukov@...gle.com>,
 peterz@...radead.org, boqun.feng@...il.com, tglx@...utronix.de,
 mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
 aruna.ramakrishna@...cle.com, elver@...gle.com
Cc: "Paul E. McKenney" <paulmck@...nel.org>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] rseq: Make rseq work with protection keys

On 2025-02-21 12:17, Dave Hansen wrote:
> On 2/17/25 03:07, Dmitry Vyukov wrote:
[...]
> This code flow is a bit hard to follow with the retry and all.
> 
> I think the assumption here is that overwriting the pkey register is too
> slow for the fast path. Instead, in the slow error path, there is a
> one-time operation to make the register permissive and retry.
> 
> I guess it's your rseq code. But I'd probably just put the
> switch_to_permissive_pkey_reg()/write_pkey_reg() in the fast/common path
> for simplicity unless I knew it was causing a measurable performance
> problem.

I agree that switching to permissive key in the fast path would be
simpler. AFAIU, the switch_to_permissive_pkey_reg() is only a pkey
read when the key is already permissive.

I'd favor the simpler approach unless performance end up being an
issue.

Thanks,

Mathieu


-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ