All of lore.kernel.org
 help / color / mirror / Atom feed
From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 6/8] arm64: module-plts: Extend veneer to address 52-bit VAs
Date: Mon, 14 May 2018 12:31:19 +0200	[thread overview]
Message-ID: <CAKv+Gu9sEY86sN6N2q51FNTs6C3xXuOwszjwracj1Gn_CydO4Q@mail.gmail.com> (raw)
In-Reply-To: <20180511101104.6cv5mvqc6juh2mgt@capper-debian.cambridge.arm.com>

On 11 May 2018 at 12:11, Steve Capper <steve.capper@arm.com> wrote:
> On Fri, May 11, 2018 at 12:01:05AM +0200, Ard Biesheuvel wrote:
>> On 10 May 2018 at 18:23, Steve Capper <steve.capper@arm.com> wrote:
>> > From: Ard Bieusheuval <ard.biesheuvel@linaro.org>
>> >
>> > In preparation for 52-bit VA support in the Linux kernel, we extend the
>> > plts veneer to support 52-bit addresses via an extra movk instruction.
>> >
>> > [Steve: code from Ard off-list, changed the #ifdef logic to inequality]
>> > Signed-off-by: Steve Capper <steve.capper@arm.com>
>> >
>> > ---
>> >
>> > New in V3 of the series.
>> >
>> > I'm not sure if this is strictly necessary as the VAs of the module
>> > space will fit within 48-bits of addressing even when a 52-bit VA space
>> > is enabled.
>>
>> What about the kernel text itself? Is that also guaranteed to have
>> bits [51:48] of its VAs equal 0xf, even under randomization?
>>
>> If so, I agree we don't need the patch.
>>
>
> Hi Ard,
> The kernel modules and text are guaranteed to have addresses greater
> than or equal to KASAN_SHADOW_END (same for both 48, 52-bit VAs) or
> _VA_START(VA_BITS_MIN) (same for both 48, 52-bit VAs). Also, IIUC, the
> KASLR displacemnt is always non-negative?
>

Correct.

> So I think we're safe in that modules and kernel text will be 48-bit
> addressable in 52-bit configurations.
>
> I'll have a think about a BUILD_BUG to capture any change to the above.
>

Yes please

  reply	other threads:[~2018-05-14 10:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 16:23 [PATCH V3 0/8] 52-bit kernel VAs for arm64 Steve Capper
2018-05-10 16:23 ` [PATCH v3 1/8] arm/arm64: KVM: Formalise end of direct linear map Steve Capper
2018-05-10 17:11   ` Marc Zyngier
2018-05-11  9:46     ` Steve Capper
2018-05-11 10:00       ` Steve Capper
2018-05-10 16:23 ` [PATCH v3 2/8] arm64: mm: Flip kernel VA space Steve Capper
2018-05-10 16:23 ` [PATCH v3 3/8] arm64: kasan: Switch to using KASAN_SHADOW_OFFSET Steve Capper
2018-05-10 16:23 ` [PATCH v3 4/8] arm64: mm: Replace fixed map BUILD_BUG_ON's with BUG_ON's Steve Capper
2018-05-10 16:23 ` [PATCH v3 5/8] arm64: dump: Make kernel page table dumper dynamic again Steve Capper
2018-05-10 16:23 ` [PATCH v3 6/8] arm64: module-plts: Extend veneer to address 52-bit VAs Steve Capper
2018-05-10 22:01   ` Ard Biesheuvel
2018-05-11 10:11     ` Steve Capper
2018-05-14 10:31       ` Ard Biesheuvel [this message]
2018-05-10 16:23 ` [PATCH v3 7/8] arm64: mm: Make VA space size variable Steve Capper
2018-05-10 16:23 ` [PATCH v3 8/8] arm64: mm: Add 48/52-bit kernel VA support Steve Capper
2018-09-07  6:25 ` [PATCH V3 0/8] 52-bit kernel VAs for arm64 Jon Masters
2018-09-07 14:13   ` Steve Capper
2018-09-07 19:45     ` Jon Masters

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=CAKv+Gu9sEY86sN6N2q51FNTs6C3xXuOwszjwracj1Gn_CydO4Q@mail.gmail.com \
    --to=ard.biesheuvel@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.