[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0159d08-e69d-0329-5ca9-68fd26cab0c8@intel.com>
Date: Thu, 7 Sep 2023 14:31:13 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Robert Kueffner <r.m.kueffner@...il.com>,
Kyle Huey <me@...ehuey.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: Memory protection keys: Signal handlers crash if pkey0 is
write-disabled
On 9/7/23 14:22, Robert Kueffner wrote:
> Is there some way to make this work, or is it generally not possible
> to successfully handle exceptions if WD0=true?
It's theoretically possible, but it's in a grey area. The kernel can't
easily try to respect PKRU *and* override it for things like decoding
userspace instructions.
PKRU should get reset to a value that permits reads and writes to pkey-0
before the signal frame is created. But you're obviously tripping over
it anyway.
I assume that *something* is trying to access pkey-0-protected memory.
Any idea what that is? Which entity is doing that access and what are
they accessing? The page fault tracepoints might come in handy.
Powered by blists - more mailing lists