linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Will Deacon <will@kernel.org>,
	Android Kernel Team <kernel-team@android.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Steve Capper <steve.capper@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	kvmarm <kvmarm@lists.cs.columbia.edu>,
	Quentin Perret <qperret@google.com>
Subject: Re: [PATCH] arm64: kvm: handle 52-bit VA regions correctly under nVHE
Date: Tue, 30 Mar 2021 15:24:12 +0100	[thread overview]
Message-ID: <87czvgra7n.wl-maz@kernel.org> (raw)
In-Reply-To: <CAMj1kXHNHV8aoKykjE1mcsCLc9jfnZ5z1RLS0xdF8pM9XFFpZQ@mail.gmail.com>

On Tue, 30 Mar 2021 14:58:39 +0100,
Ard Biesheuvel <ardb@kernel.org> wrote:
> 
> On Tue, 30 Mar 2021 at 15:56, Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Tue, 30 Mar 2021 14:15:19 +0100,
> > Ard Biesheuvel <ardb@kernel.org> wrote:

[...]

> > > It seems to me that the only way to solve this is to permit the idmap
> > > and the hyp linear region to overlap, and use the 2^47 byte window at
> > > the top of the address space for the hyp private mappings instead of
> > > the one at the bottom.
> >
> > But that's the hard problem I want to avoid thinking of.
> >
> > We need to ensure that there is no EL1 VA that is congruent with the
> > idmap over the kern_hyp_va() transformation. It means imposing
> > restrictions over the EL1 linear map, and prevent any allocation that
> > would result in this overlap (and that is including text).
> >
> > How do we do that?
> >
> 
> A phys to virt offset of 0x0 is perfectly acceptable, no? The only
> difference is that the idmapped bits are in another part of the VA
> space.

What do we lose by doing that? If that's acceptable for LVA, why don't
we do it across the board? It feels like KASLR and EL2 randomisation
are in the way...

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2021-03-30 14:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30 11:21 [PATCH] arm64: kvm: handle 52-bit VA regions correctly under nVHE Ard Biesheuvel
2021-03-30 12:44 ` Marc Zyngier
2021-03-30 12:49   ` Ard Biesheuvel
2021-03-30 13:04     ` Marc Zyngier
2021-03-30 13:15       ` Ard Biesheuvel
2021-03-30 13:56         ` Marc Zyngier
2021-03-30 13:58           ` Ard Biesheuvel
2021-03-30 14:24             ` Marc Zyngier [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=87czvgra7n.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=anshuman.khandual@arm.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=qperret@google.com \
    --cc=steve.capper@arm.com \
    --cc=will@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;
as well as URLs for NNTP newsgroup(s).