[PATCH] arm64: Support Clang UBSAN trap codes for better reporting

Kees Cook keescook at chromium.org
Fri Feb 3 08:32:16 PST 2023


On Fri, Feb 03, 2023 at 09:58:26AM +0000, Mark Rutland wrote:
> On Thu, Feb 02, 2023 at 10:36:57PM +0000, Kees Cook wrote:
> > On arm64, Clang encodes the UBSAN check type in the esr. Extract this
> > and actually report UBSAN traps with some specificity when building with
> > CONFIG_UBSAN_TRAP. Before:
> 
> Really minor nit, but could we mention CONFIG_UBSAN_TRAP at the start, e.g.
> change that first sentence to:
> 
> | When CONFIG_UBSAN_TRAP=y on arm64, Clang encodes the UBSAN check type into a
> | BRK immediate, which is reported in the ESR.
> 
> I was initially confused since I was aware that there are usually direct
> function calls for the reporting.

Sure, I can rearrange the commit log.

> 
> Other than that, this looks fine to me, and regardless of the above:
> 
> Acked-by: Mark Rutland <mark.rutland at arm.com>

Thanks!

-Kees

-- 
Kees Cook



More information about the linux-arm-kernel mailing list