On Fri, May 29, 2020 at 12:54:56PM -0500, Josh Poimboeuf wrote: > On Thu, May 28, 2020 at 11:06:32PM -0700, Kees Cook wrote: > > diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan > > index 929211039bac..27bcc2568c95 100644 > > --- a/lib/Kconfig.ubsan > > +++ b/lib/Kconfig.ubsan > > @@ -63,7 +63,7 @@ config UBSAN_SANITIZE_ALL > > config UBSAN_ALIGNMENT > > bool "Enable checks for pointers alignment" > > default !HAVE_EFFICIENT_UNALIGNED_ACCESS > > - depends on !X86 || !COMPILE_TEST > > + depends on !UBSAN_TRAP > > help > > This option enables the check of unaligned memory accesses. > > Enabling this option on architectures that support unaligned > > > > How about that? > > But I thought you said the alignment traps might be useful on other > arches? Should it be > > depends on !X86 || !UBSAN_TRAP > > ?
I was just trying to avoid objtool there, but really, UBSAN_TRAP is likely insane for unaligned access checks entirely. If anyone ever needs it, they can adjust. :) -- Kees Cook