[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <F12A9E98-41F5-4A81-8B04-C96B0CDEC406@gmail.com>
Date: Fri, 8 Sep 2023 11:43:34 -0400
From: Robert Kueffner <r.m.kueffner@...il.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Kyle Huey <me@...ehuey.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: Memory protection keys: Signal handlers crash if pkey0 is
write-disabled
> There are tons of complicated ways to fix this. But the easiest way is
> just to say that you need to keep PKRU set so that the signal frame can
> be written at any time.
Just for completeness sake, the signal frame was actually written successfully since I moved the stack pointer to pkey-1 associated memory before any exceptions, details in unix.stackexchange I <https://unix.stackexchange.com/questions/755160/memory-protection-keys-exception-handler-crashes-if-pkey0-is-write-disabled> posted in the beginning.
And it’s probably that the kernel wants to write something else into pkey-0 associated memory.
I understand that there is no easy solution, so my idea of isolating a user from corrupting pkey-0 memory is probably moot.
Thanks Dave, that helped me a lot to understand the problem
Powered by blists - more mailing lists