From: Robert Kueffner <r.m.kueffner@gmail.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Kyle Huey <me@kylehuey.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: Memory protection keys: Signal handlers crash if pkey0 is write-disabled
Date: Fri, 8 Sep 2023 11:43:34 -0400 [thread overview]
Message-ID: <F12A9E98-41F5-4A81-8B04-C96B0CDEC406@gmail.com> (raw)
In-Reply-To: <4c49c85a-2b2e-e408-534d-586f06a8e485@intel.com>
> 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
prev parent reply other threads:[~2023-09-08 15:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 21:22 Memory protection keys: Signal handlers crash if pkey0 is write-disabled Robert Kueffner
2023-09-07 21:31 ` Dave Hansen
2023-09-07 23:07 ` Robert Kueffner
2023-09-08 15:14 ` Dave Hansen
2023-09-08 15:43 ` Robert Kueffner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F12A9E98-41F5-4A81-8B04-C96B0CDEC406@gmail.com \
--to=r.m.kueffner@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=me@kylehuey.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox