From: Michael Cree <mcree@orcon.net.nz>
To: Magnus Lindholm <linmag7@gmail.com>
Cc: Matt Turner <mattst88@gmail.com>,
linux-alpha@vger.kernel.org, richard.henderson@linaro.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 03/24] alpha: select ARCH_HAS_UBSAN
Date: Sat, 5 Sep 2026 08:31:20 +1200 [thread overview]
Message-ID: <apsqmKw1pLmOXVgg@creeky> (raw)
In-Reply-To: <CA+=Fv5TYnwcDLPvwScOcGq-7CUSs2bDMqrYEj-Lhf4XfQ=yTzA@mail.gmail.com>
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@gmail.com> 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,
so many that it took quite a few minutes to boot and I lost much of
the kernel log before disks were mounted. A few examples that
were recorded later in the boot on the ES45:
Sep 03 21:12:36 electro kernel: UBSAN: misaligned-access in net/core/dev.c:1401:2
Sep 03 21:12:36 electro kernel: member access within misaligned address (____ptrval____) for type 'struct net_device'
Sep 03 21:12:36 electro kernel: which requires 64 byte alignment
Sep 03 21:12:36 electro kernel: UBSAN: misaligned-access in kernel/signal.c:4362:4
Sep 03 21:12:36 electro kernel: member access within misaligned address 0000000058e1e939 for type 'struct task_struct'
Sep 03 21:12:36 electro kernel: which requires 64 byte alignment
Sep 03 21:13:04 electro kernel: UBSAN: misaligned-access in drivers/net/ethernet/intel/e100.c:1941:36
Sep 03 21:13:04 electro kernel: member access within misaligned address 000000001c866fa6 for type 'struct rfd'
Sep 03 21:13:04 electro kernel: which requires 4 byte alignment
Interestingly "kernel unaligned acc" in /proc/cpuinfo remained at
zero, which really makes me wonder whether these reports are all
false-positives.
This kernel was cross-compiled with: "alpha-linux-gnu-gcc (Debian
14.2.0-19)"
Cheers,
Michael.
next prev parent reply other threads:[~2026-09-04 20:50 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 15:50 [PATCH 00/24] alpha: catch up on architecture Kconfig options Matt Turner
2026-09-01 15:50 ` [PATCH 01/24] alpha: fix arch_irqs_disabled_flags() to treat any raised IPL as disabled Matt Turner
2026-09-01 23:20 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 02/24] alpha: enter hardirq context before looking up the irq descriptor Matt Turner
2026-09-03 22:07 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 03/24] alpha: select ARCH_HAS_UBSAN Matt Turner
2026-09-01 22:34 ` Magnus Lindholm
2026-09-04 20:31 ` Michael Cree [this message]
2026-09-04 23:15 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 04/24] alpha: select ARCH_HAS_GCOV_PROFILE_ALL Matt Turner
2026-09-03 22:35 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 05/24] alpha: select HAVE_DEBUG_KMEMLEAK Matt Turner
2026-09-02 6:01 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 06/24] alpha: select EDAC_SUPPORT Matt Turner
2026-09-01 23:17 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 07/24] alpha: select ARCH_SUPPORTS_ATOMIC_RMW Matt Turner
2026-09-02 6:17 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 08/24] alpha: select ARCH_HAS_FAST_MULTIPLIER Matt Turner
2026-09-02 7:49 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 09/24] alpha: select ARCH_SUPPORTS_INT128 Matt Turner
2026-09-02 8:50 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 10/24] alpha: select HAVE_ARCH_COMPILER_H Matt Turner
2026-09-02 9:11 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 11/24] alpha: select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE Matt Turner
2026-09-02 9:25 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 12/24] alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support Matt Turner
2026-09-02 9:35 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 13/24] alpha: add ARCH_HAS_PTE_SPECIAL support Matt Turner
2026-09-02 9:42 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 14/24] alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support Matt Turner
2026-09-01 22:45 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 15/24] alpha: select ARCH_HAS_DEBUG_VM_PGTABLE Matt Turner
2026-09-03 22:52 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 16/24] alpha: select HAVE_GUP_FAST Matt Turner
2026-09-02 21:09 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 17/24] alpha: select ARCH_USE_MEMTEST Matt Turner
2026-09-02 21:56 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 18/24] alpha: select SYSCTL_EXCEPTION_TRACE Matt Turner
2026-09-02 22:02 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 19/24] alpha: discard .eh_frame and the relocation sections Matt Turner
2026-09-03 5:18 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 20/24] alpha: select ARCH_WANT_LD_ORPHAN_WARN Matt Turner
2026-09-03 5:34 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 21/24] alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM Matt Turner
2026-09-03 5:42 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 22/24] alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support Matt Turner
2026-09-03 21:01 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 23/24] alpha: select SPARSE_IRQ Matt Turner
2026-09-03 21:26 ` Magnus Lindholm
2026-09-01 15:50 ` [PATCH 24/24] alpha: add TRACE_IRQFLAGS_SUPPORT Matt Turner
2026-09-03 22:58 ` Magnus Lindholm
2026-09-02 18:53 ` [PATCH 00/24] alpha: catch up on architecture Kconfig options Magnus Lindholm
2026-09-02 18:57 ` Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=apsqmKw1pLmOXVgg@creeky \
--to=mcree@orcon.net.nz \
--cc=linmag7@gmail.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox