qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 22/27] target/arm: Implement pauth_addpac


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 22/27] target/arm: Implement pauth_addpac
Date: Tue, 8 Jan 2019 14:48:37 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

On 1/7/19 11:31 PM, Peter Maydell wrote:
>> +    /* Preserve the determination between upper and lower at bit 55,
>> +     * and insert pointer authentication code.
>> +     */
>> +    if (param.tbi) {
>> +        ptr &= ~MAKE_64BIT_MASK(bot_bit, 55 - bot_bit + 1);
>> +        pac &= MAKE_64BIT_MASK(bot_bit, 54 - bot_bit + 1);
>> +    } else {
>> +        ptr &= MAKE_64BIT_MASK(0, bot_bit);
>> +        pac &= ~(MAKE_64BIT_MASK(55, 1) | MAKE_64BIT_MASK(0, bot_bit));
>> +    }
>> +    ext &= MAKE_64BIT_MASK(55, 1);
> 
> I found this a bit confusing to disentangle and compare with
> the pseudocode: the difference between the tbi and
> not-tbi cases is only "what are bits 63:56 in the result",
> but the implementation of how we put together bits 55:0 is
> different in the two code paths here.

Yes.  I found the pseudocode itself to be confusing.
Perhaps I went away from it too far.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]