[PATCH v6 1/6] arm64: kprobe: add checks for ARMv8.3-PAuth combined instructions
Amit Kachhap
amit.kachhap at arm.com
Mon Sep 14 04:42:00 EDT 2020
On 9/11/20 7:25 PM, Will Deacon wrote:
> On Tue, Sep 08, 2020 at 11:51:08AM +0100, Dave Martin wrote:
>> On Mon, Sep 07, 2020 at 10:45:51PM +0100, Will Deacon wrote:
>>> On Fri, Sep 04, 2020 at 04:12:04PM +0530, Amit Daniel Kachhap wrote:
>>>> diff --git a/arch/arm64/include/asm/insn.h b/arch/arm64/include/asm/insn.h
>>>> index 0bc46149e491..324234068fee 100644
>>>> --- a/arch/arm64/include/asm/insn.h
>>>> +++ b/arch/arm64/include/asm/insn.h
>>>> @@ -359,9 +359,21 @@ __AARCH64_INSN_FUNCS(brk, 0xFFE0001F, 0xD4200000)
>>>> __AARCH64_INSN_FUNCS(exception, 0xFF000000, 0xD4000000)
>>>> __AARCH64_INSN_FUNCS(hint, 0xFFFFF01F, 0xD503201F)
>>>> __AARCH64_INSN_FUNCS(br, 0xFFFFFC1F, 0xD61F0000)
>>>> +__AARCH64_INSN_FUNCS(braaz, 0xFFFFFC1F, 0xD61F081F)
>>>> +__AARCH64_INSN_FUNCS(brabz, 0xFFFFFC1F, 0xD61F0C1F)
>>>> +__AARCH64_INSN_FUNCS(braa, 0xFFFFFC00, 0xD71F0800)
>>>> +__AARCH64_INSN_FUNCS(brab, 0xFFFFFC00, 0xD71F0C00)
>>>
>>> When do we need to distinguish these variants? Can we modify the mask/value
>>> pair so that we catch bra* in one go? That would match how they are
>>> documented in the Arm ARM.
>>>
>>>> __AARCH64_INSN_FUNCS(blr, 0xFFFFFC1F, 0xD63F0000)
>>>> +__AARCH64_INSN_FUNCS(blraaz, 0xFFFFFC1F, 0xD63F081F)
>>>> +__AARCH64_INSN_FUNCS(blrabz, 0xFFFFFC1F, 0xD63F0C1F)
>>>> +__AARCH64_INSN_FUNCS(blraa, 0xFFFFFC00, 0xD73F0800)
>>>> +__AARCH64_INSN_FUNCS(blrab, 0xFFFFFC00, 0xD73F0C00)
>>>
>>> Same here for blra*
>>>
>>>> __AARCH64_INSN_FUNCS(ret, 0xFFFFFC1F, 0xD65F0000)
>>>> +__AARCH64_INSN_FUNCS(retaa, 0xFFFFFFFF, 0xD65F0BFF)
>>>> +__AARCH64_INSN_FUNCS(retab, 0xFFFFFFFF, 0xD65F0FFF)
>>>> __AARCH64_INSN_FUNCS(eret, 0xFFFFFFFF, 0xD69F03E0)
>>>> +__AARCH64_INSN_FUNCS(eretaa, 0xFFFFFFFF, 0xD69F0BFF)
>>>> +__AARCH64_INSN_FUNCS(eretab, 0xFFFFFFFF, 0xD69F0FFF)
>>>
>>> ... and here for ereta*.
>>
>> From my side:
>>
>> I thought about this myself, but I thought that this may be easier to
>> maintain if we avoid lumping instructions together.
>
> Maybe, but I'm just suggesting to lump them together in the same way as the
> Arm ARM, which I think helps readability because it lines up directly with
> the text.
>
>> I guess I'm happy either way.
>
> Ok, thanks. Amit -- can you repost the series with that change, please, and
> I'll queue the lot for 5.10?
My v8 revision posted just now has this clubbing of instructions.
Thanks,
Amit
>
> Thanks,
>
> Will
>
More information about the linux-arm-kernel
mailing list