[PATCH] arm64/kprobes: Tidy up sign-extension usage

Will Deacon will.deacon at arm.com
Thu Oct 20 07:31:05 PDT 2016


On Tue, Oct 18, 2016 at 01:46:27PM +0100, Robin Murphy wrote:
> Kprobes does not need its own homebrewed (and frankly inscrutable) sign
> extension macro; just use the standard kernel functions instead. Since
> the compiler actually recognises the sign-extension idiom of the latter,
> we also get the small bonus of some nicer codegen, as each displacement
> calculation helper then compiles to a single optimal SBFX instruction.
> 
> Signed-off-by: Robin Murphy <robin.murphy at arm.com>
> ---
>  arch/arm64/kernel/probes/simulate-insn.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)

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

Will



More information about the linux-arm-kernel mailing list