linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Brendan Jackman <jackmanb@google.com>
To: "Petr Tesařík" <petr@tesarici.cz>
Cc: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
	x86@kernel.org,  Junaid Shahid <junaids@google.com>,
	Reiji Watanabe <reijiw@google.com>,
	 Patrick Bellasi <derkling@google.com>,
	Yosry Ahmed <yosryahmed@google.com>,
	 Frank van der Linden <fvdl@google.com>,
	pbonzini@redhat.com, Jim Mattson <jmattson@google.com>,
	 Paul Turner <pjt@google.com>, Ofir Weisse <oweisse@google.com>,
	alexandre.chartre@oracle.com,  rppt@linux.ibm.com,
	dave.hansen@linux.intel.com,
	 Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	luto@kernel.org,  Andrew.Cooper3@citrix.com
Subject: Re: [LSF/MM/BPF TOPIC] Address Space Isolation
Date: Tue, 12 Mar 2024 17:45:11 +0100	[thread overview]
Message-ID: <CA+i-1C0OJH8vMLLAeczLuHkwwFaTPcbnaUCRk1EAM_MJikgcsg@mail.gmail.com> (raw)
In-Reply-To: <20240312154828.0efc76a4@meshulam.tesarici.cz>

On Tue, 12 Mar 2024 at 15:48, Petr Tesařík <petr@tesarici.cz> wrote:
> > - How we’ve solved the TLB flushing issues in sensitivity tracking, and
> > how it could be done better.
>
> Hello and welcome! I ran into a similar challenge with SandBox Mode. My
> solution was to run sandbox code with CPL=3 (on x86) and control page
> access with the U/S PTE bit rather than the P bit, which allowed me to
> implement lazy TLB invalidation. The x86 folks didn't like idea...

Hmm, a similar idea might be to use protection keys. I'm not sure if
that really works though, we haven't given it any serious thought,
since not all CPUs support it. So that would be something to explore
as a later optimisation rather than a basic principle.

> For the record, SandBox Mode was designed with confidentiality in mind,
> although the initial patch series left out this part for simplicity. I
> wonder if your objective is to protect kernel data from user space, or
> if you have also considered decomposing the kernel into components that
> are isolated from each other (and then it we could potentially find
> some synergies).

Yeah that's something we've pondered. What I've presented here is
definitely about protecting the kernel from userspace/VM guest but
it's a framework where you could conceivably isolate all sorts of
things. Maybe there's a world where ASI makes unprivileged BPF a more
viable notion.

The thing is, what I'm presenting here doesn't protect against
software bugs at all - if you can get the kernel to architecturally
access data and do something bad with it, ASI will happily remap that
data and branch back to the buggy code. That probably simplifies
things quite a lot as compared to SBM.

But yes, the whole "sensitivity tracking" thing does seem to share
requirements with SandBox Mode, I will need to ponder this some more.


      reply	other threads:[~2024-03-12 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29  9:57 Brendan Jackman
2024-03-12 14:48 ` Petr Tesařík
2024-03-12 16:45   ` Brendan Jackman [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=CA+i-1C0OJH8vMLLAeczLuHkwwFaTPcbnaUCRk1EAM_MJikgcsg@mail.gmail.com \
    --to=jackmanb@google.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=alexandre.chartre@oracle.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=derkling@google.com \
    --cc=fvdl@google.com \
    --cc=jmattson@google.com \
    --cc=junaids@google.com \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=luto@kernel.org \
    --cc=oweisse@google.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=petr@tesarici.cz \
    --cc=pjt@google.com \
    --cc=reijiw@google.com \
    --cc=rppt@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yosryahmed@google.com \
    /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