Re: [PATCH v17 0/3] arm64: expose FAR_EL1 tag bits in siginfo
From: Eric W. Biederman <hidden>
Date: 2020-11-17 18:22:01
Peter Collingbourne [off-list ref] writes:
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, introduce a flag in sigaction.sa_flags, SA_EXPOSE_TAGBITS, and only expose the tag bits there if the signal handler has this flag set. In order to allow userspace to determine whether SA_EXPOSE_TAGBITS is supported, we first introduce a mechanism for userspace to detect kernel support for SA_* flags. These patches need to be applied on top of: https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git signal-for-v5.11
The first two patches look good and I have applied them. While I was at it I added Link tags to the LKML postings to the entire series. I don't think anyone has merged my branch into another so it should still be safe. Eric