mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthias Neugschwandtner <matthias.neugschwandtner@oracle.com>
To: Aruna Ramakrishna <aruna.ramakrishna@oracle.com>,
	Dave Hansen <dave.hansen@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	Eric Sedlar <eric.sedlar@oracle.com>,
	Andrew Brownsword <andrew.brownsword@oracle.com>,
	Craig Schelp <craig.schelp@oracle.com>
Subject: Re: [RFC PATCH] x86/pkeys: update PKRU to enable pkey 0 before XSAVE
Date: Mon, 18 Mar 2024 18:32:16 +0100	[thread overview]
Message-ID: <426cc161-a419-42bb-9860-5b628b0821ab@oracle.com> (raw)
In-Reply-To: <67F8113C-8E0F-4560-8967-FFF9ABF4FBEF@oracle.com>

On 3/15/24 05:47, Aruna Ramakrishna wrote:

> It’s not about the man page - it's just that, my understanding of this flow and this use case stems from there. I think we assumed that we can turn off pkey 0 and still be able to set up the alt sig stack (and have the kernel reset it to init_pkru anyway) - and when that didn’t work, it seemed like a bug. :)
> 
>> In other words, you're not going to spur me into action my thwapping me
>> with the manpage that I wrote.  You've got to convince me that your new
>> use case is valid, this is the best way to support your new use case,
>> and that your implementation of the new feature is sane.
>>
>>
> 
> Matthias/Eric,
> Can you please talk about the use case in greater detail?

Sure. The core use case we are trying to handle is inspired by the seminal 
ERIM paper [1] on using protection keys for in-process isolation. We want to
protect the memory regions of an application from corruption by a component 
that co-resides in the same address space.
Since all memory allocated by the main application is tagged with pkey 0 by 
default, we remove access to it when entering the component. If a signal is 
triggered at that time, the kernel subsequently fails to set up the signal 
handling stack.

Thank you,
Matthias

[1] 
https://www.usenix.org/conference/usenixsecurity19/presentation/vahldiek-oberwagner


  reply	other threads:[~2024-03-18 17:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14 17:29 Aruna Ramakrishna
2024-03-14 17:54 ` Dave Hansen
2024-03-14 18:14   ` Aruna Ramakrishna
2024-03-14 18:30     ` Dave Hansen
2024-03-15  4:47       ` Aruna Ramakrishna
2024-03-18 17:32         ` Matthias Neugschwandtner [this message]
2024-03-15 17:36     ` Thomas Gleixner
2024-03-15 18:06       ` Aruna Ramakrishna
2024-03-15 18:43       ` Aruna Ramakrishna
2024-03-15 23:05         ` Thomas Gleixner
2024-03-18 17:25           ` Aruna Ramakrishna

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=426cc161-a419-42bb-9860-5b628b0821ab@oracle.com \
    --to=matthias.neugschwandtner@oracle.com \
    --cc=andrew.brownsword@oracle.com \
    --cc=aruna.ramakrishna@oracle.com \
    --cc=craig.schelp@oracle.com \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=eric.sedlar@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®