# Re: \[PATCH v5\] arm64: Expose FAR\_EL1 tag bits in sigcontext

- From: Catalin Marinas \<catalin.marinas@arm.com\>
- Date: 2020-05-12 16:25:35 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2020/05/8794080
- Thread: https://ratatoskr.run/linux-arm-kernel/2020/03/8792002/t.md

```text
On Thu, May 07, 2020 at 07:01:06PM -0700, Peter Collingbourne wrote:
> The kernel currently clears the tag bits (i.e. bits 56-63) in the fault
> address exposed via siginfo.si_addr and sigcontext.fault_address. However,
> the tag bits may be needed by tools in order to accurately diagnose
> memory errors, such as HWASan [1] or future tools based on the Memory
> Tagging Extension (MTE).
> 
> We should not stop clearing these bits in the existing fault address fields,
> because there may be existing userspace applications that are expecting the tag
> bits to be cleared. Instead, create a fault_addr_top_byte_context in sigcontext
> (similar to the existing esr_context), and store the tag bits of FAR_EL1 there.
> 
> [1] http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
> 
> Signed-off-by: Peter Collingbourne <redacted>

It looks alright to me.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
