Re: [PATCH 03/24] alpha: select ARCH_HAS_UBSAN

From: Michael Cree

Date: Sat Sep 05 2026 - 22:18:57 EST


Hi Magnus,

On Sat, Sep 05, 2026 at 01:15:18AM +0200, Magnus Lindholm wrote:
> On Fri, Sep 4, 2026 at 10:31 PM Michael Cree <mcree@xxxxxxxxxxxx> wrote:
> > On Wed, Sep 02, 2026 at 12:34:50AM +0200, Magnus Lindholm wrote:
> > > On Tue, Sep 1, 2026 at 5:50 PM Matt Turner <mattst88@xxxxxxxxx> wrote:
> > > >
> > > > GCC's undefined behavior sanitizer has no architecture-specific runtime
> > > > requirements. Enable it for Alpha to allow UBSAN instrumentation of the
> > > > kernel.
> > > >
> > > I tested this patch on top of my rebased Alpha GENERIC_ENTRY patch on an
> > > AlphaServer ES40. The kernel built and booted successfully with
> > > CONFIG_UBSAN=y, and the UBSAN instrumentation is active.
> >
> > So have I, on an XP1000 and ES45.
> >
> > > CONFIG_UBSAN_ALIGNMENT did expose a misaligned struct bucket_table
> > > allocation in lib/rhashtable.c. This appears to be a generic rhashtable
> > > allocation-alignment issue rather than an Alpha UBSAN problem.
> >
> > But in my case the kernel vomited copious misaligned access reports,
> >
> > Interestingly "kernel unaligned acc" in /proc/cpuinfo remained at
> > zero, which really makes me wonder whether these reports are all
> > false-positives.
> >
> Good question, had to dig deeper here,
>
> Not false positives - real UB, but harmless, and I tracked down why.

Thanks for taking time to find the explanation. So, technical UB
but no consequence for operation.

Cheers,
Michael.