lkml.org 
[lkml]   [2018]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arm64/bpf: use movn/movk/movk sequence to generate kernel addresses
Hi Ard,

On Fri, Nov 23, 2018 at 06:29:02PM +0100, Ard Biesheuvel wrote:
> On arm64, all executable code is guaranteed to reside in the vmalloc
> space (or the module space), and so jump targets will only use 48
> bits at most, and the remaining bits are guaranteed to be 0x1.
>
> This means we can generate an immediate jump address using a sequence
> of one MOVN (move wide negated) and two MOVK instructions, where the
> first one sets the lower 16 bits but also sets all top bits to 0x1.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---

Acked-by: Will Deacon <will.deacon@arm.com>

Denial, Alexei, shall I take this via arm64, or would you rather take
it via davem?

Cheers,

Will

\
 
 \ /
  Last update: 2018-11-27 19:22    [W:0.380 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site