From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] arm64: kaslr: Set TCR_EL1.NFD1 when CONFIG_RANDOMIZE_BASE=y
Date: Mon, 5 Mar 2018 10:26:56 +0000 [thread overview]
Message-ID: <20180305102656.GC8571@arm.com> (raw)
In-Reply-To: <CAKv+Gu_k6Dat=5oo3gYLR0E19YfDSjTFYs2vfzqBdx55rm4oFA@mail.gmail.com>
On Mon, Mar 05, 2018 at 10:15:29AM +0000, Ard Biesheuvel wrote:
> On 5 March 2018 at 10:08, Will Deacon <will.deacon@arm.com> wrote:
> > TCR_EL1.NFD1 was allocated by SVE and ensures that fault-surpressing SVE
> > memory accesses (e.g. speculative accesses from a first-fault gather load)
> > which translate via TTBR1_EL1 result in a translation fault if they
> > miss in the TLB when executed from EL0. This mitigates some timing attacks
> > against KASLR, where the kernel address space could otherwise be probed
> > efficiently using the FFR in conjunction with suppressed faults on SVE
> > loads.
> >
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Cc: Dave Martin <Dave.Martin@arm.com>
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
> > ---
> >
> > Sending as RFC because this doesn't make any difference if kpti is enabled,
> > which is the default with KASLR. It helps if kpti=off is being passed and
> > shouldn't have an impact on performance.
> >
>
> This just makes it harder/slower to probe the kernel address space
> using SVE instructions, right?
Yeah, basically, but given that kpti should make any walks via ttbr1 from
EL0 timing invariant, it doesn't make a whole lot of difference in
conjunction with that.
Will
next prev parent reply other threads:[~2018-03-05 10:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-05 10:08 [RFC PATCH] arm64: kaslr: Set TCR_EL1.NFD1 when CONFIG_RANDOMIZE_BASE=y Will Deacon
2018-03-05 10:15 ` Ard Biesheuvel
2018-03-05 10:26 ` Will Deacon [this message]
2018-03-05 17:08 ` Ard Biesheuvel
2018-03-08 11:59 ` Dave Martin
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=20180305102656.GC8571@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).