[PATCH v3 2/3] arm64: cpufeature: Modify address authentication cpufeature to exact

Amit Daniel Kachhap amit.kachhap at arm.com
Wed Jun 24 07:55:28 EDT 2020


Hi,

On 6/24/20 1:19 PM, Will Deacon wrote:
> On Wed, Jun 24, 2020 at 12:43:20PM +0530, Amit Daniel Kachhap wrote:
>> On 6/23/20 8:17 PM, Dave Martin wrote:
>>> On Tue, Jun 23, 2020 at 06:47:02PM +0530, Amit Daniel Kachhap wrote:
>>>> On 6/22/20 8:05 PM, Dave Martin wrote:
>>>>> On Thu, Jun 18, 2020 at 10:40:28AM +0530, Amit Daniel Kachhap wrote:
>>>>>> This patch modifies the address authentication cpufeature type to EXACT
>>>>> >from earlier LOWER_SAFE as the different configurations added for Armv8.6
>>>>>> enhanced PAC have different behaviour and there is no tunable to enable the
>>>>>> lower safe versions.
> 
> $ git grep 'This patch' Documentation/process/submitting-patches.rst

ok sure. I will update.

> 
>>>>> Does a corresponding patch need to go to stable?  As things stand, I
>>>>> think older kernels that support pointer auth will go wrong on v8.7+
>>>>> hardware that has these features.
>>
>> Yes It makes to add this patch to the stable version.
>>
>> @Catalin, @Will - Shall I send this one with a fix subject line? Please let
>> me know your suggestion.
> 
> What exactly goes wrong? As far as I can tell, we will taint and probably
> (?) crash shortly afterwards if you run an old kernel on hardware with
> mismatched pointer auth.

Yes you are right that 8.6+ hardware will crash with older kernel if
ptrauth cpu variation occurs. Basically EnhancedPAC2(with extra xor) and
old pac algorithm may not be compatible and may crash when thread
migration happens in between paciasp and autiasp [1].

[1]: 
https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/arm-architecture-developments-armv8-6-a

> If that's the case, I don't think this warrants
> stable (especially since this file has seen enough churn that the backports
> are likely risky).

ok. I was seeking mere opinion :).

> 
> Can you confirm that things only go wrong if we have a mismatched system,
> and ideally provide an example of what the crash looks like (you should
> be able to get a fast model to emulate this setup)?

It is difficult to emulate this as fast model only provides cluster
level pac config option and not at cpu level. I will check on it further.

Thanks,
Amit Daniel

> 
> Cheers,
> 
> Will
> 



More information about the linux-arm-kernel mailing list