Thread (5 messages) 5 messages, 3 authors, 2021-01-13

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

flat view

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2021-01-13 15:47:48
Also in: linux-api

On Wed, Jan 13, 2021 at 03:51:42PM +0100, Andrey Konovalov wrote:
On Fri, Nov 20, 2020 at 9:34 PM Peter Collingbourne [off-list ref] wrote:
quoted
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 <redacted>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help