> On 6 Aug 2025, at 18:43, Jessica Clarke <jrt...@freebsd.org> wrote:
> 
> On 6 Aug 2025, at 18:38, Andrew Turner <and...@freebsd.org 
> <mailto:and...@freebsd.org>> wrote:
>> 
>> The branch main has been updated by andrew:
>> 
>> URL: 
>> https://cgit.FreeBSD.org/src/commit/?id=81f07332c03fd2ac6efa8e15b1659a573d250329
>> 
>> commit 81f07332c03fd2ac6efa8e15b1659a573d250329
>> Author:     Harry Moulton <harry.moul...@arm.com>
>> AuthorDate: 2025-07-31 14:10:57 +0000
>> Commit:     Andrew Turner <and...@freebsd.org>
>> CommitDate: 2025-07-31 14:27:06 +0000
>> 
>>   arm64: tidy up Top-Byte-Ignore (TBI) in the kernel
>> 
>>   In preparation for TBI to be enabled for processes from 15.0 we need
>>   to clean up copying data between userspace and the kernel. These
>>   functions will check the address is within the valid userspace range,
>>   however as the userspace and kernel ranges may overlap when TBI is
>>   enabled we need to mask off the top 8 bits.
>> 
>>   Processes not using TBI are unaffected as the hardware will still
>>   check all bits in the address, however this will happen at the first
>>   load/store instruction.
> 
> I thought Linux’s ABI was that addresses passed to the kernel must be
> canonical. Is that false, or is there a reason we’re diverging from
> that design choice?

On Linux there is a flag to enable passing tagged pointers to the kernel. It’s 
needed for HWASAN to work as any pointers may be tagged, and I expect it will 
also be needed for MTE.

I don’t know of a strong reason to not allow tagged pointers in the kernel.

Andrew

Reply via email to