Re: [PATCH v21 2/2] arm64: expose FAR_EL1 tag bits in siginfo

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

 



On Wed, Jan 13, 2021 at 03:51:42PM +0100, Andrey Konovalov wrote:
> On Fri, Nov 20, 2020 at 9:34 PM Peter Collingbourne <pcc@xxxxxxxxxx> 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).
> >
> > Expose these bits via the arch_untagged_si_addr mechanism, so that
> > they are only exposed to signal handlers with the SA_EXPOSE_TAGBITS
> > flag set.
> >
> > [1] http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
> >
> > Signed-off-by: Peter Collingbourne <pcc@xxxxxxxxxx>
> > Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> > Link: https://linux-review.googlesource.com/id/Ia8876bad8c798e0a32df7c2ce1256c4771c81446
[...]
> Not sure if it's expected, but this patch changes the way in-kernel
> MTE faults are reported. The address of any in-kernel fault now gets
> its top byte zeroed out, even though it was set to 0xf. However I
> guess it's related to the fact that MTE always uses pointer tags in
> 0x0_ format.

Is this for _any_ faults or just MTE tag check faults? I tried the
former and seems fine. Do you have a concrete example to make sure I
understand the issue?

-- 
Catalin



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux