* [PATCH v2 00/22] alpha: catch up on architecture Kconfig options
@ 2026-09-05 19:29 Matt Turner
2026-09-05 19:29 ` [PATCH v2 01/22] alpha: enter hardirq context before looking up the irq descriptor Matt Turner
` (22 more replies)
0 siblings, 23 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
This is v2 of "alpha: catch up on architecture Kconfig options"
(https://lore.kernel.org/linux-alpha/CAEdQ38FoUPzftf9vDcJK8L38j+cDzTyxdL+Fj-3oAQHmmOxaOA@mail.gmail.com/T/#t),
addressing Magnus Lindholm's review and rebased onto v7.3-rc1 plus his
GENERIC_ENTRY v5
(https://lore.kernel.org/linux-alpha/20260902184058.198679-1-linmag7@gmail.com/T/#t),
per his request.
Changes since v1:
- Dropped "fix arch_irqs_disabled_flags() to treat any raised IPL as
disabled". Magnus's objection was right: per the Architecture
Reference Manual an intermediate IPL only masks interrupts at or
below that level, and do_entInt() already drives PS.IPL to IPL_MAX
itself before reporting hardirq state to lockdep, so the original
arch_irqs_disabled_flags() was correct as it stood.
- Dropped "add TRACE_IRQFLAGS_SUPPORT". It conflicted with
GENERIC_ENTRY exactly where Magnus expected: the entInt, entSys, and
restore_all instrumentation it added is now redundant with the
hardirq-state transitions GENERIC_ENTRY performs on those paths
itself. I want to work out separately, and with real testing,
whether the remaining synchronous-exception entry points need
anything at all here, rather than resend a patch I can't fully
justify.
- Fixed "add ARCH_SUPPORTS_PAGE_TABLE_CHECK support", which no longer
built against v7.3-rc1: commit cf8771ca4cdb ("mm/page_table_check:
Pass mm_struct to pxx_user_accessible_page()") changed the callback
signature, and Alpha's copy is now updated to match.
- Added the Signed-off-by that was missing from "select SPARSE_IRQ".
- Folded the corresponding arch-support.txt updates into "select
ARCH_HAS_GCOV_PROFILE_ALL", "select HAVE_DEBUG_KMEMLEAK", "add
ARCH_HAS_PTE_SPECIAL support", and "select ARCH_HAS_DEBUG_VM_PGTABLE",
and added ALPHA to the memtest= parameter list in
kernel-parameters.txt.
- Did not touch "add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP
support" beyond rebasing it. Magnus found real gaps there
(tools/perf has no Alpha register mask, and regs->usp isn't
snapshotted on the interrupt path), so I've left the corresponding
feature matrices alone rather than claim it's done.
- Picked up Tested-by/Reviewed-by from Magnus on the patches he gave
them for.
Not yet addressed: whether do_entInt() should own hardirq context for
both interrupt paths and drop the irq_enter()/irq_exit() pair from
handle_irq(), which Magnus asked about on "enter hardirq context before
looking up the irq descriptor". No code change there yet; I'll follow up
on that thread separately.
Tested by cross-building with alpha-unknown-linux-gnu-gcc against
defconfig and, for the page-table-check fix, against a config with
CONFIG_PAGE_TABLE_CHECK=y. Boot tested on an AlphaServer ES47.
Also available at:
git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha.git arch-kconfig-options-v2
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
Matt Turner (22):
alpha: enter hardirq context before looking up the irq descriptor
alpha: select ARCH_HAS_UBSAN
alpha: select ARCH_HAS_GCOV_PROFILE_ALL
alpha: select HAVE_DEBUG_KMEMLEAK
alpha: select EDAC_SUPPORT
alpha: select ARCH_SUPPORTS_ATOMIC_RMW
alpha: select ARCH_HAS_FAST_MULTIPLIER
alpha: select ARCH_SUPPORTS_INT128
alpha: select HAVE_ARCH_COMPILER_H
alpha: select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support
alpha: add ARCH_HAS_PTE_SPECIAL support
alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support
alpha: select ARCH_HAS_DEBUG_VM_PGTABLE
alpha: select HAVE_GUP_FAST
alpha: select ARCH_USE_MEMTEST
alpha: select SYSCTL_EXCEPTION_TRACE
alpha: discard .eh_frame and the relocation sections
alpha: select ARCH_WANT_LD_ORPHAN_WARN
alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support
alpha: select SPARSE_IRQ
Documentation/admin-guide/kernel-parameters.txt | 2 +-
.../debug/debug-vm-pgtable/arch-support.txt | 2 +-
.../debug/gcov-profile-all/arch-support.txt | 2 +-
.../features/debug/kmemleak/arch-support.txt | 2 +-
.../features/vm/pte_special/arch-support.txt | 2 +-
arch/alpha/Kconfig | 21 ++++++
arch/alpha/include/asm/perf_regs.h | 7 ++
arch/alpha/include/asm/pgtable.h | 24 +++++-
arch/alpha/include/asm/processor.h | 7 ++
arch/alpha/include/uapi/asm/perf_regs.h | 34 +++++++++
arch/alpha/kernel/Makefile | 1 +
arch/alpha/kernel/irq.c | 9 ++-
arch/alpha/kernel/irq_alpha.c | 13 ++++
arch/alpha/kernel/perf_regs.c | 86 ++++++++++++++++++++++
arch/alpha/kernel/vmlinux.lds.S | 11 +++
arch/alpha/mm/fault.c | 29 ++++++++
arch/alpha/mm/init.c | 5 ++
17 files changed, 248 insertions(+), 9 deletions(-)
---
base-commit: f321329c1b70835e6b0807fddac6d4117e5604fc
change-id: 20260904-arch-kconfig-options-v2-8efa959ffcbd
Best regards,
--
Matt Turner <mattst88@gmail.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 01/22] alpha: enter hardirq context before looking up the irq descriptor
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-06 8:53 ` Magnus Lindholm
2026-09-05 19:29 ` [PATCH v2 02/22] alpha: select ARCH_HAS_UBSAN Matt Turner
` (21 subsequent siblings)
22 siblings, 1 reply; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
handle_irq() called irq_to_desc() before irq_enter(), so that lookup ran
with the preempt count still saying task context and with RCU not yet
watching. Generic code called from an interrupt handler should see
hardirq context, and irq_to_desc() is more than an array index once
SPARSE_IRQ is in use.
Move irq_enter() to the top of the function and add the matching
irq_exit() to the invalid interrupt path.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
arch/alpha/kernel/irq.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index 4a6a8b1d5a8b..5867a1655045 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -107,18 +107,21 @@ handle_irq(int irq)
* handled by some other CPU. (or is disabled)
*/
static unsigned int illegal_count=0;
- struct irq_desc *desc = irq_to_desc(irq);
-
+ struct irq_desc *desc;
+
+ irq_enter();
+
+ desc = irq_to_desc(irq);
if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS &&
illegal_count < MAX_ILLEGAL_IRQS)) {
irq_err_count++;
illegal_count++;
printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n",
irq);
+ irq_exit();
return;
}
- irq_enter();
generic_handle_irq_desc(desc);
irq_exit();
}
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 02/22] alpha: select ARCH_HAS_UBSAN
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
2026-09-05 19:29 ` [PATCH v2 01/22] alpha: enter hardirq context before looking up the irq descriptor Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 03/22] alpha: select ARCH_HAS_GCOV_PROFILE_ALL Matt Turner
` (20 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
GCC's undefined behavior sanitizer has no architecture-specific runtime
requirements. Enable it for Alpha to allow UBSAN instrumentation of the
kernel.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 51a7391869dd..713a0c1cc930 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -7,6 +7,7 @@ config ALPHA
select ARCH_32BIT_USTAT_F_TINODE
select ARCH_HAS_CURRENT_STACK_POINTER
select ARCH_HAS_DMA_OPS if PCI
+ select ARCH_HAS_UBSAN
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
select ARCH_MODULE_NEEDS_WEAK_PER_CPU if SMP
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 03/22] alpha: select ARCH_HAS_GCOV_PROFILE_ALL
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
2026-09-05 19:29 ` [PATCH v2 01/22] alpha: enter hardirq context before looking up the irq descriptor Matt Turner
2026-09-05 19:29 ` [PATCH v2 02/22] alpha: select ARCH_HAS_UBSAN Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 04/22] alpha: select HAVE_DEBUG_KMEMLEAK Matt Turner
` (19 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
GCC's gcov instrumentation (-fprofile-arcs -ftest-coverage) has no
architecture-specific runtime requirements. Enable GCOV_PROFILE_ALL
support for Alpha to allow whole-kernel code coverage analysis.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Also mark Alpha as "ok" in the gcov-profile-all feature matrix.
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
Documentation/features/debug/gcov-profile-all/arch-support.txt | 2 +-
arch/alpha/Kconfig | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/features/debug/gcov-profile-all/arch-support.txt b/Documentation/features/debug/gcov-profile-all/arch-support.txt
index 63494bddc263..4701209b869d 100644
--- a/Documentation/features/debug/gcov-profile-all/arch-support.txt
+++ b/Documentation/features/debug/gcov-profile-all/arch-support.txt
@@ -6,7 +6,7 @@
-----------------------
| arch |status|
-----------------------
- | alpha: | TODO |
+ | alpha: | ok |
| arc: | TODO |
| arm: | ok |
| arm64: | ok |
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 713a0c1cc930..c4da16971652 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -7,6 +7,7 @@ config ALPHA
select ARCH_32BIT_USTAT_F_TINODE
select ARCH_HAS_CURRENT_STACK_POINTER
select ARCH_HAS_DMA_OPS if PCI
+ select ARCH_HAS_GCOV_PROFILE_ALL
select ARCH_HAS_UBSAN
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 04/22] alpha: select HAVE_DEBUG_KMEMLEAK
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (2 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 03/22] alpha: select ARCH_HAS_GCOV_PROFILE_ALL Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 05/22] alpha: select EDAC_SUPPORT Matt Turner
` (18 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Kmemleak needs no architecture support beyond the standard linker script
symbols for the data and bss sections, which Alpha already provides, and
a scan of the kernel stacks, which is done generically.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Also mark Alpha as "ok" in the kmemleak feature matrix.
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
Documentation/features/debug/kmemleak/arch-support.txt | 2 +-
arch/alpha/Kconfig | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/features/debug/kmemleak/arch-support.txt b/Documentation/features/debug/kmemleak/arch-support.txt
index f45149cfa313..b65b3f8c0e89 100644
--- a/Documentation/features/debug/kmemleak/arch-support.txt
+++ b/Documentation/features/debug/kmemleak/arch-support.txt
@@ -6,7 +6,7 @@
-----------------------
| arch |status|
-----------------------
- | alpha: | TODO |
+ | alpha: | ok |
| arc: | ok |
| arm: | ok |
| arm64: | ok |
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index c4da16971652..f6d1d2469677 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -19,6 +19,7 @@ config ALPHA
select PCI_DOMAINS if PCI
select PCI_SYSCALL if PCI
select HAVE_ASM_MODVERSIONS
+ select HAVE_DEBUG_KMEMLEAK
select HAVE_PAGE_SIZE_8KB
select HAVE_PCSPKR_PLATFORM
select HAVE_PERF_EVENTS
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 05/22] alpha: select EDAC_SUPPORT
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (3 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 04/22] alpha: select HAVE_DEBUG_KMEMLEAK Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 06/22] alpha: select ARCH_SUPPORTS_ATOMIC_RMW Matt Turner
` (17 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
The EDAC core builds and works on Alpha; it only needs the architecture
to declare support. There is no Alpha memory controller driver yet, but
the core is what a future driver, or the existing machine check error
decoding in err_ev6.c and err_ev7.c, would report through.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index f6d1d2469677..032c23f979c4 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -32,6 +32,7 @@ config ALPHA
select ARCH_WANT_IPC_PARSE_VERSION
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select AUDIT_ARCH
+ select EDAC_SUPPORT
select GENERIC_CPU_VULNERABILITIES
select GENERIC_SMP_IDLE_THREAD
select HAS_IOPORT
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 06/22] alpha: select ARCH_SUPPORTS_ATOMIC_RMW
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (4 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 05/22] alpha: select EDAC_SUPPORT Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 07/22] alpha: select ARCH_HAS_FAST_MULTIPLIER Matt Turner
` (16 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Alpha has native LL/SC instructions (LDL_L/STL_C, LDQ_L/STQ_C) that
provide atomic read-modify-write capability, and already selects
ARCH_HAVE_NMI_SAFE_CMPXCHG.
Selecting ARCH_SUPPORTS_ATOMIC_RMW enables MUTEX_SPIN_ON_OWNER and
RWSEM_SPIN_ON_OWNER on SMP, allowing optimistic spinning on contended
locks rather than immediately sleeping.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 032c23f979c4..d039b7135d18 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -14,6 +14,7 @@ config ALPHA
select ARCH_MODULE_NEEDS_WEAK_PER_CPU if SMP
select ARCH_NO_PREEMPT
select ARCH_NO_SG_CHAIN
+ select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_USE_CMPXCHG_LOCKREF
select FORCE_PCI
select PCI_DOMAINS if PCI
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 07/22] alpha: select ARCH_HAS_FAST_MULTIPLIER
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (5 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 06/22] alpha: select ARCH_SUPPORTS_ATOMIC_RMW Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 08/22] alpha: select ARCH_SUPPORTS_INT128 Matt Turner
` (15 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
All Alpha CPUs have hardware integer multiply (MULL/MULQ). EV4 and EV5
implement it in microcode; EV56 and later have fast single-cycle
multiply. Since no EV4 system is likely to run a modern kernel, select
this unconditionally to enable multiply-based fast paths in hweight and
string routines.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index d039b7135d18..2672971b83f3 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -7,6 +7,7 @@ config ALPHA
select ARCH_32BIT_USTAT_F_TINODE
select ARCH_HAS_CURRENT_STACK_POINTER
select ARCH_HAS_DMA_OPS if PCI
+ select ARCH_HAS_FAST_MULTIPLIER
select ARCH_HAS_GCOV_PROFILE_ALL
select ARCH_HAS_UBSAN
select ARCH_MIGHT_HAVE_PC_PARPORT
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 08/22] alpha: select ARCH_SUPPORTS_INT128
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (6 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 07/22] alpha: select ARCH_HAS_FAST_MULTIPLIER Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 09/22] alpha: select HAVE_ARCH_COMPILER_H Matt Turner
` (14 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
gcc supports __int128 on Alpha, and the 64x64 to 128-bit multiply that
the users in the scheduler and in lib/ care about maps onto mulq/umulh
rather than an out-of-line libgcc helper.
Gate the select on CC_HAS_INT128 as the other 64-bit architectures do.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 2672971b83f3..bed3f1c8d9d2 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -16,6 +16,7 @@ config ALPHA
select ARCH_NO_PREEMPT
select ARCH_NO_SG_CHAIN
select ARCH_SUPPORTS_ATOMIC_RMW
+ select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select ARCH_USE_CMPXCHG_LOCKREF
select FORCE_PCI
select PCI_DOMAINS if PCI
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 09/22] alpha: select HAVE_ARCH_COMPILER_H
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (7 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 08/22] alpha: select ARCH_SUPPORTS_INT128 Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 10/22] alpha: select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE Matt Turner
` (13 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Alpha already provides asm/compiler.h (wrapping uapi/asm/compiler.h)
which defines architecture-specific compiler intrinsics like
__kernel_cmpbge, __kernel_cttz, __kernel_ctlz, and __kernel_ctpop.
Selecting HAVE_ARCH_COMPILER_H causes linux/compiler_types.h to include
asm/compiler.h, making these definitions available consistently.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index bed3f1c8d9d2..237ef0c214dd 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -21,6 +21,7 @@ config ALPHA
select FORCE_PCI
select PCI_DOMAINS if PCI
select PCI_SYSCALL if PCI
+ select HAVE_ARCH_COMPILER_H
select HAVE_ASM_MODVERSIONS
select HAVE_DEBUG_KMEMLEAK
select HAVE_PAGE_SIZE_8KB
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 10/22] alpha: select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (8 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 09/22] alpha: select HAVE_ARCH_COMPILER_H Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 11/22] alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support Matt Turner
` (12 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Alpha has a clean split between user and kernel address spaces: user
space occupies 0x0000000000000000-0x000003ffffffffff (TASK_SIZE), while
kernel space uses KSEG and vmalloc regions near the top of the 64-bit
address space. These are strictly non-overlapping.
This enables optimizations in BPF and tracing that can skip address
range checks when user and kernel pointers are distinguishable by
address alone.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 237ef0c214dd..8f97d6e22b28 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -9,6 +9,7 @@ config ALPHA
select ARCH_HAS_DMA_OPS if PCI
select ARCH_HAS_FAST_MULTIPLIER
select ARCH_HAS_GCOV_PROFILE_ALL
+ select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
select ARCH_HAS_UBSAN
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 11/22] alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (9 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 10/22] alpha: select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 12/22] alpha: add ARCH_HAS_PTE_SPECIAL support Matt Turner
` (11 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Alpha's thread_struct is empty (all per-thread state lives in
thread_info), so the whitelist is trivially empty. This is more
explicit than the generic fallback, which computes the full
thread_struct size as copyable.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
arch/alpha/include/asm/processor.h | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 8f97d6e22b28..cc69f94a1c5b 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -44,6 +44,7 @@ config ALPHA
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_SECCOMP
select HAVE_ARCH_SECCOMP_FILTER
+ select HAVE_ARCH_THREAD_STRUCT_WHITELIST
select HAVE_ARCH_TRACEHOOK
select HAVE_MOD_ARCH_SPECIFIC
select LOCK_MM_AND_FIND_VMA
diff --git a/arch/alpha/include/asm/processor.h b/arch/alpha/include/asm/processor.h
index 5dce5518a211..c461a26d47b3 100644
--- a/arch/alpha/include/asm/processor.h
+++ b/arch/alpha/include/asm/processor.h
@@ -26,6 +26,13 @@
struct thread_struct { };
#define INIT_THREAD { }
+static inline void arch_thread_struct_whitelist(unsigned long *offset,
+ unsigned long *size)
+{
+ *offset = 0;
+ *size = 0;
+}
+
/* Do necessary setup to start up a newly executed thread. */
struct pt_regs;
extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 12/22] alpha: add ARCH_HAS_PTE_SPECIAL support
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (10 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 11/22] alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 13/22] alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support Matt Turner
` (10 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Add _PAGE_SPECIAL using bit 19 (0x80000), which is unused in the Alpha
PTE layout. This enables pte_special()/pte_mkspecial() for marking PTEs
that are not backed by struct page (VDSO mappings, zero page,
io_remap_pfn_range, etc.).
Include _PAGE_SPECIAL in _PAGE_CHG_MASK so it is preserved across
pte_modify() calls.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Also mark Alpha as "ok" in the pte_special feature matrix.
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
Documentation/features/vm/pte_special/arch-support.txt | 2 +-
arch/alpha/Kconfig | 1 +
arch/alpha/include/asm/pgtable.h | 5 ++++-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/features/vm/pte_special/arch-support.txt b/Documentation/features/vm/pte_special/arch-support.txt
index 3f777f8b67d5..1485bb7c73eb 100644
--- a/Documentation/features/vm/pte_special/arch-support.txt
+++ b/Documentation/features/vm/pte_special/arch-support.txt
@@ -6,7 +6,7 @@
-----------------------
| arch |status|
-----------------------
- | alpha: | TODO |
+ | alpha: | ok |
| arc: | ok |
| arm: | ok |
| arm64: | ok |
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index cc69f94a1c5b..1d28fa8d3b66 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -10,6 +10,7 @@ config ALPHA
select ARCH_HAS_FAST_MULTIPLIER
select ARCH_HAS_GCOV_PROFILE_ALL
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
+ select ARCH_HAS_PTE_SPECIAL
select ARCH_HAS_UBSAN
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
index 8e00cf9dc39d..bdff33b505bc 100644
--- a/arch/alpha/include/asm/pgtable.h
+++ b/arch/alpha/include/asm/pgtable.h
@@ -73,6 +73,7 @@ struct vm_area_struct;
/* .. and these are ours ... */
#define _PAGE_DIRTY 0x20000
#define _PAGE_ACCESSED 0x40000
+#define _PAGE_SPECIAL 0x80000
/* We borrow bit 39 to store the exclusive marker in swap PTEs. */
#define _PAGE_SWP_EXCLUSIVE 0x8000000000UL
@@ -94,7 +95,7 @@ struct vm_area_struct;
#define _PFN_MASK 0xFFFFFFFF00000000UL
#define _PAGE_TABLE (_PAGE_VALID | __DIRTY_BITS | __ACCESS_BITS)
-#define _PAGE_CHG_MASK (_PFN_MASK | __DIRTY_BITS | __ACCESS_BITS)
+#define _PAGE_CHG_MASK (_PFN_MASK | __DIRTY_BITS | __ACCESS_BITS | _PAGE_SPECIAL)
/*
* All the normal masks have the "page accessed" bits on, as any time they are used,
@@ -238,6 +239,8 @@ extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~(__ACCESS_BITS); ret
extern inline pte_t pte_mkwrite_novma(pte_t pte){ pte_val(pte) &= ~_PAGE_FOW; return pte; }
extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= __DIRTY_BITS; return pte; }
extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; return pte; }
+extern inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; }
+extern inline pte_t pte_mkspecial(pte_t pte) { pte_val(pte) |= _PAGE_SPECIAL; return pte; }
/*
* The smp_rmb() in the following functions are required to order the load of
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 13/22] alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (11 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 12/22] alpha: add ARCH_HAS_PTE_SPECIAL support Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-06 19:53 ` Magnus Lindholm
2026-09-05 19:29 ` [PATCH v2 14/22] alpha: select ARCH_HAS_DEBUG_VM_PGTABLE Matt Turner
` (9 subsequent siblings)
22 siblings, 1 reply; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Add the page table check helpers needed for CONFIG_PAGE_TABLE_CHECK
and select ARCH_SUPPORTS_PAGE_TABLE_CHECK in Kconfig.
Alpha does not support huge pages, so pmd_user_accessible_page() and
pud_user_accessible_page() always return false. pte_user_accessible_page()
checks for present PTEs with user read access (_PAGE_URE).
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Update the helpers to the three-argument pxx_user_accessible_page(mm,
addr, pxx) signature introduced by commit cf8771ca4cdb ("mm/page_table_check:
Pass mm_struct to pxx_user_accessible_page()"), matching the other
architectures.
---
arch/alpha/Kconfig | 1 +
arch/alpha/include/asm/pgtable.h | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 1d28fa8d3b66..da4ec8399517 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -19,6 +19,7 @@ config ALPHA
select ARCH_NO_SG_CHAIN
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
+ select ARCH_SUPPORTS_PAGE_TABLE_CHECK
select ARCH_USE_CMPXCHG_LOCKREF
select FORCE_PCI
select PCI_DOMAINS if PCI
diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
index bdff33b505bc..6ebdd90f3035 100644
--- a/arch/alpha/include/asm/pgtable.h
+++ b/arch/alpha/include/asm/pgtable.h
@@ -232,6 +232,25 @@ extern inline void pud_clear(pud_t * pudp) { pud_val(*pudp) = 0; }
extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); }
extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
+extern inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_URE; }
+
+static inline bool pte_user_accessible_page(struct mm_struct *mm,
+ unsigned long addr, pte_t pte)
+{
+ return pte_present(pte) && pte_user(pte);
+}
+
+static inline bool pmd_user_accessible_page(struct mm_struct *mm,
+ unsigned long addr, pmd_t pmd)
+{
+ return false;
+}
+
+static inline bool pud_user_accessible_page(struct mm_struct *mm,
+ unsigned long addr, pud_t pud)
+{
+ return false;
+}
extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; }
extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~(__DIRTY_BITS); return pte; }
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 14/22] alpha: select ARCH_HAS_DEBUG_VM_PGTABLE
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (12 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 13/22] alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 15/22] alpha: select HAVE_GUP_FAST Matt Turner
` (8 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
CONFIG_DEBUG_VM_PGTABLE runs a boot-time self test over the page table
helpers: the protection bit accessors, pte_modify(), the swap entry
encoding including the exclusive marker, and, where the architecture
supports them, the huge page helpers. Alpha implements everything the
test needs for a three-level page table without huge page support.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Also mark Alpha as "ok" in the debug-vm-pgtable feature matrix.
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
Documentation/features/debug/debug-vm-pgtable/arch-support.txt | 2 +-
arch/alpha/Kconfig | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/features/debug/debug-vm-pgtable/arch-support.txt b/Documentation/features/debug/debug-vm-pgtable/arch-support.txt
index 156687a7436d..b4e2374fe201 100644
--- a/Documentation/features/debug/debug-vm-pgtable/arch-support.txt
+++ b/Documentation/features/debug/debug-vm-pgtable/arch-support.txt
@@ -6,7 +6,7 @@
-----------------------
| arch |status|
-----------------------
- | alpha: | TODO |
+ | alpha: | ok |
| arc: | ok |
| arm: | TODO |
| arm64: | ok |
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index da4ec8399517..4bd5e913baaf 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -6,6 +6,7 @@ config ALPHA
select HAVE_SYSCALL_TRACEPOINTS
select ARCH_32BIT_USTAT_F_TINODE
select ARCH_HAS_CURRENT_STACK_POINTER
+ select ARCH_HAS_DEBUG_VM_PGTABLE
select ARCH_HAS_DMA_OPS if PCI
select ARCH_HAS_FAST_MULTIPLIER
select ARCH_HAS_GCOV_PROFILE_ALL
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 15/22] alpha: select HAVE_GUP_FAST
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (13 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 14/22] alpha: select ARCH_HAS_DEBUG_VM_PGTABLE Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 16/22] alpha: select ARCH_USE_MEMTEST Matt Turner
` (7 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
The lockless GUP fast path needs the architecture to distinguish PTEs
with no struct page behind them and to keep page table pages alive while
a walker holds no lock. Alpha now has ARCH_HAS_PTE_SPECIAL, and it has
selected MMU_GATHER_RCU_TABLE_FREE for a long time, so both requirements
are met.
PTEs are a single 64-bit word on Alpha, so the lockless reads that the
generic walker performs cannot tear, and no arch-specific
gup_fast_permitted() or ptep_get_lockless() is needed.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 4bd5e913baaf..1ba262812212 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -28,6 +28,7 @@ config ALPHA
select HAVE_ARCH_COMPILER_H
select HAVE_ASM_MODVERSIONS
select HAVE_DEBUG_KMEMLEAK
+ select HAVE_GUP_FAST
select HAVE_PAGE_SIZE_8KB
select HAVE_PCSPKR_PLATFORM
select HAVE_PERF_EVENTS
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 16/22] alpha: select ARCH_USE_MEMTEST
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (14 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 15/22] alpha: select HAVE_GUP_FAST Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 17/22] alpha: select SYSCTL_EXCEPTION_TRACE Matt Turner
` (6 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Wire up the generic early memtest from arch_mm_preinit(), which runs
after parse_early_param() has picked up the memtest= command line option
and before memblock_free_all() hands the memory to the buddy allocator.
paging_init() would be the natural place, but Alpha calls it from
setup_arch(), before the option is parsed, so the test would never run.
The test range starts at the first DRAM address rather than physical zero
because low memory on Alpha is owned by the console and PALcode.
Tested under QEMU with memtest=4: all four patterns pass over the free
memblock ranges, with no bad memory reserved.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Also add ALPHA to the memtest= parameter's architecture list.
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
Documentation/admin-guide/kernel-parameters.txt | 2 +-
arch/alpha/Kconfig | 1 +
arch/alpha/mm/init.c | 5 +++++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 68647ff4bdd2..58d057a678db 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4030,7 +4030,7 @@ Kernel parameters
poison checking when freeing elements back to the
pool. Useful for debugging mempool corruption.
- memtest= [KNL,X86,ARM,M68K,PPC,RISCV,EARLY] Enable memtest
+ memtest= [KNL,ALPHA,X86,ARM,M68K,PPC,RISCV,EARLY] Enable memtest
Format: <integer>
default : 0 <disable>
Specifies the number of memtest passes to be
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 1ba262812212..f2a5b8c8688a 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -22,6 +22,7 @@ config ALPHA
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select ARCH_SUPPORTS_PAGE_TABLE_CHECK
select ARCH_USE_CMPXCHG_LOCKREF
+ select ARCH_USE_MEMTEST
select FORCE_PCI
select PCI_DOMAINS if PCI
select PCI_SYSCALL if PCI
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index f4d65a60c869..6c28947d6e2d 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -226,6 +226,11 @@ void __init paging_init(void)
memset(absolute_pointer(ZERO_PGE), 0, PAGE_SIZE);
}
+void __init arch_mm_preinit(void)
+{
+ early_memtest(memblock_start_of_DRAM(), PFN_PHYS(max_low_pfn));
+}
+
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
void
srm_paging_stop (void)
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 17/22] alpha: select SYSCTL_EXCEPTION_TRACE
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (15 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 16/22] alpha: select ARCH_USE_MEMTEST Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 18/22] alpha: discard .eh_frame and the relocation sections Matt Turner
` (5 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Report unhandled user faults the way other architectures do, and hook up
the debug.exception-trace sysctl that controls the reporting.
The message gives the faulting address, the PC and the user stack
pointer, and is rate limited.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
arch/alpha/mm/fault.c | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index f2a5b8c8688a..b9ff67370877 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -61,6 +61,7 @@ config ALPHA
select MMU_GATHER_NO_RANGE
select MMU_GATHER_RCU_TABLE_FREE
select SPARSEMEM_EXTREME if SPARSEMEM
+ select SYSCTL_EXCEPTION_TRACE
select ZONE_DMA
select TRACE_IRQFLAGS_SUPPORT
select ARCH_WANT_FRAME_POINTERS
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index a9816bbc9f34..dfe427d93072 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -27,8 +27,32 @@
#include <linux/uaccess.h>
#include <linux/perf_event.h>
+#include <asm/pal.h>
+
extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *);
+int show_unhandled_signals = 1;
+
+static void
+show_signal_msg(struct pt_regs *regs, unsigned long address, int signo,
+ const char *desc)
+{
+ const char *level;
+
+ if (!show_unhandled_signals || !unhandled_signal(current, signo))
+ return;
+ if (!printk_ratelimit())
+ return;
+
+ /* Losing init is fatal, so shout about it. */
+ level = task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG;
+
+ printk("%s%s[%d]: %s at %016lx pc %016lx sp %016lx\n",
+ level, current->comm, task_pid_nr(current), desc,
+ address, regs->pc, rdusp());
+ print_vma_addr(KERN_CONT " in ", regs->pc);
+ printk(KERN_CONT "\n");
+}
/*
* Force a new ASN for a task.
@@ -217,12 +241,17 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
mmap_read_unlock(mm);
/* Send a sigbus, regardless of whether we were in kernel
or user mode. */
+ if (user_mode(regs))
+ show_signal_msg(regs, address, SIGBUS, "bus error");
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *) address);
if (!user_mode(regs))
goto no_context;
return;
do_sigsegv:
+ show_signal_msg(regs, address, SIGSEGV,
+ si_code == SEGV_MAPERR ? "unmapped access"
+ : "access violation");
force_sig_fault(SIGSEGV, si_code, (void __user *) address);
return;
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 18/22] alpha: discard .eh_frame and the relocation sections
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (16 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 17/22] alpha: select SYSCTL_EXCEPTION_TRACE Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 19/22] alpha: select ARCH_WANT_LD_ORPHAN_WARN Matt Turner
` (4 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
gcc emits .eh_frame for Alpha even though the kernel builds with
-fno-asynchronous-unwind-tables, and nothing in the kernel consumes it:
the stack trace code scans the stack for text addresses rather than
unwinding DWARF. It was allocated in the loaded image, so dropping it
shrinks vmlinux by about 1.1MB for a Marvel SMP configuration.
The .rela* sections are equally useless, as the kernel image is not
relocatable. The linker was already dropping their contents.
Both were being placed as orphan sections, which is what drew attention
to them.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/kernel/vmlinux.lds.S | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 95704e64b6a6..c44941d3b874 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -76,5 +76,16 @@ SECTIONS
MODINFO
ELF_DETAILS
+ /*
+ * gcc emits .eh_frame for Alpha even with
+ * -fno-asynchronous-unwind-tables, and the kernel has no DWARF
+ * unwinder to consume it. The relocation sections are likewise
+ * useless as the kernel image is not relocatable.
+ */
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.rela .rela*)
+ }
+
DISCARDS
}
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 19/22] alpha: select ARCH_WANT_LD_ORPHAN_WARN
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (17 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 18/22] alpha: discard .eh_frame and the relocation sections Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 20/22] alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM Matt Turner
` (3 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
With .eh_frame and the relocation sections now placed explicitly, an
Alpha kernel links with no orphan sections left, so ask the linker to
warn if new ones appear.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index b9ff67370877..33b51bef5139 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -40,6 +40,7 @@ config ALPHA
select AUTO_IRQ_AFFINITY if SMP
select GENERIC_IRQ_SHOW
select ARCH_WANT_IPC_PARSE_VERSION
+ select ARCH_WANT_LD_ORPHAN_WARN
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select AUDIT_ARCH
select EDAC_SUPPORT
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 20/22] alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (18 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 19/22] alpha: select ARCH_WANT_LD_ORPHAN_WARN Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 21/22] alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support Matt Turner
` (2 subsequent siblings)
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
activate_mm() on Alpha calls __load_new_mm_context() which assigns a
new ASID and invokes PALcode swpctx. On SMP, an interrupt arriving
between the ASID update and the page table switch could see
inconsistent state. Ensure activate_mm() is called with interrupts
disabled during exec.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 33b51bef5139..e5611766b6d6 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -39,6 +39,7 @@ config ALPHA
select GENERIC_PCI_IOMAP
select AUTO_IRQ_AFFINITY if SMP
select GENERIC_IRQ_SHOW
+ select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
select ARCH_WANT_IPC_PARSE_VERSION
select ARCH_WANT_LD_ORPHAN_WARN
select ARCH_HAVE_NMI_SAFE_CMPXCHG
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 21/22] alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (19 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 20/22] alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-06 20:44 ` Magnus Lindholm
2026-09-05 19:29 ` [PATCH v2 22/22] alpha: select SPARSE_IRQ Matt Turner
2026-09-06 21:18 ` [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Magnus Lindholm
22 siblings, 1 reply; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
Implement the perf register sampling interface for Alpha. This enables
perf to capture register state and user stack dumps with samples,
supporting --call-graph dwarf.
The perf_regs enum exposes the registers available in pt_regs: r0-r8,
r16-r28, gp, pc, and ps. Registers r9-r15 are callee-saved and live
in switch_stack, not pt_regs, so they are not included.
A switch statement maps perf register indices to pt_regs fields since
Alpha's pt_regs layout is non-contiguous (unlike architectures where
direct array indexing works).
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
arch/alpha/Kconfig | 2 +
arch/alpha/include/asm/perf_regs.h | 7 +++
arch/alpha/include/uapi/asm/perf_regs.h | 34 +++++++++++++
arch/alpha/kernel/Makefile | 1 +
arch/alpha/kernel/perf_regs.c | 86 +++++++++++++++++++++++++++++++++
5 files changed, 130 insertions(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index e5611766b6d6..96b38d320eb8 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -33,6 +33,8 @@ config ALPHA
select HAVE_PAGE_SIZE_8KB
select HAVE_PCSPKR_PLATFORM
select HAVE_PERF_EVENTS
+ select HAVE_PERF_REGS
+ select HAVE_PERF_USER_STACK_DUMP
select NEED_DMA_MAP_STATE
select NEED_SG_DMA_LENGTH
select GENERIC_IRQ_PROBE
diff --git a/arch/alpha/include/asm/perf_regs.h b/arch/alpha/include/asm/perf_regs.h
new file mode 100644
index 000000000000..6045da1a2a4f
--- /dev/null
+++ b/arch/alpha/include/asm/perf_regs.h
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_ALPHA_PERF_REGS_H
+#define _ASM_ALPHA_PERF_REGS_H
+
+#include <uapi/asm/perf_regs.h>
+
+#endif /* _ASM_ALPHA_PERF_REGS_H */
diff --git a/arch/alpha/include/uapi/asm/perf_regs.h b/arch/alpha/include/uapi/asm/perf_regs.h
new file mode 100644
index 000000000000..afeb6a1584cd
--- /dev/null
+++ b/arch/alpha/include/uapi/asm/perf_regs.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _UAPI_ASM_ALPHA_PERF_REGS_H
+#define _UAPI_ASM_ALPHA_PERF_REGS_H
+
+enum perf_event_alpha_regs {
+ PERF_REG_ALPHA_R0,
+ PERF_REG_ALPHA_R1,
+ PERF_REG_ALPHA_R2,
+ PERF_REG_ALPHA_R3,
+ PERF_REG_ALPHA_R4,
+ PERF_REG_ALPHA_R5,
+ PERF_REG_ALPHA_R6,
+ PERF_REG_ALPHA_R7,
+ PERF_REG_ALPHA_R8,
+ PERF_REG_ALPHA_R16,
+ PERF_REG_ALPHA_R17,
+ PERF_REG_ALPHA_R18,
+ PERF_REG_ALPHA_R19,
+ PERF_REG_ALPHA_R20,
+ PERF_REG_ALPHA_R21,
+ PERF_REG_ALPHA_R22,
+ PERF_REG_ALPHA_R23,
+ PERF_REG_ALPHA_R24,
+ PERF_REG_ALPHA_R25,
+ PERF_REG_ALPHA_R26,
+ PERF_REG_ALPHA_R27,
+ PERF_REG_ALPHA_R28,
+ PERF_REG_ALPHA_GP,
+ PERF_REG_ALPHA_PC,
+ PERF_REG_ALPHA_PS,
+ PERF_REG_ALPHA_MAX,
+};
+
+#endif /* _UAPI_ASM_ALPHA_PERF_REGS_H */
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index 4ea5c189e60e..0c04b89676ed 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -18,6 +18,7 @@ obj-$(CONFIG_PCI) += pci.o pci_iommu.o pci-sysfs.o
obj-$(CONFIG_SRM_ENV) += srm_env.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_PERF_EVENTS) += perf_event.o
+obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o
obj-$(CONFIG_RTC_DRV_ALPHA) += rtc.o
obj-$(CONFIG_AUDIT) += audit.o
diff --git a/arch/alpha/kernel/perf_regs.c b/arch/alpha/kernel/perf_regs.c
new file mode 100644
index 000000000000..e15081ac95e0
--- /dev/null
+++ b/arch/alpha/kernel/perf_regs.c
@@ -0,0 +1,86 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/perf_event.h>
+#include <asm/perf_regs.h>
+#include <asm/ptrace.h>
+
+u64 perf_reg_value(struct pt_regs *regs, int idx)
+{
+ switch (idx) {
+ case PERF_REG_ALPHA_R0:
+ return regs->r0;
+ case PERF_REG_ALPHA_R1:
+ return regs->r1;
+ case PERF_REG_ALPHA_R2:
+ return regs->r2;
+ case PERF_REG_ALPHA_R3:
+ return regs->r3;
+ case PERF_REG_ALPHA_R4:
+ return regs->r4;
+ case PERF_REG_ALPHA_R5:
+ return regs->r5;
+ case PERF_REG_ALPHA_R6:
+ return regs->r6;
+ case PERF_REG_ALPHA_R7:
+ return regs->r7;
+ case PERF_REG_ALPHA_R8:
+ return regs->r8;
+ case PERF_REG_ALPHA_R16:
+ return regs->r16;
+ case PERF_REG_ALPHA_R17:
+ return regs->r17;
+ case PERF_REG_ALPHA_R18:
+ return regs->r18;
+ case PERF_REG_ALPHA_R19:
+ return regs->r19;
+ case PERF_REG_ALPHA_R20:
+ return regs->r20;
+ case PERF_REG_ALPHA_R21:
+ return regs->r21;
+ case PERF_REG_ALPHA_R22:
+ return regs->r22;
+ case PERF_REG_ALPHA_R23:
+ return regs->r23;
+ case PERF_REG_ALPHA_R24:
+ return regs->r24;
+ case PERF_REG_ALPHA_R25:
+ return regs->r25;
+ case PERF_REG_ALPHA_R26:
+ return regs->r26;
+ case PERF_REG_ALPHA_R27:
+ return regs->r27;
+ case PERF_REG_ALPHA_R28:
+ return regs->r28;
+ case PERF_REG_ALPHA_GP:
+ return regs->gp;
+ case PERF_REG_ALPHA_PC:
+ return regs->pc;
+ case PERF_REG_ALPHA_PS:
+ return regs->ps;
+ default:
+ WARN_ON_ONCE(1);
+ return 0;
+ }
+}
+
+#define REG_RESERVED (~((1ULL << PERF_REG_ALPHA_MAX) - 1))
+
+int perf_reg_validate(u64 mask)
+{
+ if (!mask || mask & REG_RESERVED)
+ return -EINVAL;
+
+ return 0;
+}
+
+u64 perf_reg_abi(struct task_struct *task)
+{
+ return PERF_SAMPLE_REGS_ABI_64;
+}
+
+void perf_get_regs_user(struct perf_regs *regs_user,
+ struct pt_regs *regs)
+{
+ regs_user->regs = task_pt_regs(current);
+ regs_user->abi = perf_reg_abi(current);
+}
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v2 22/22] alpha: select SPARSE_IRQ
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (20 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 21/22] alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support Matt Turner
@ 2026-09-05 19:29 ` Matt Turner
2026-09-06 21:18 ` [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Magnus Lindholm
22 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-05 19:29 UTC (permalink / raw)
To: Richard Henderson, Magnus Lindholm, Kees Cook, Marco Elver,
Andrey Konovalov, Andrey Ryabinin, Jonathan Corbet, Shuah Khan,
Randy Dunlap
Cc: linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc,
Matt Turner
NR_IRQS on Alpha is sized for the largest configuration each platform
supports, and for Marvel that is 32 PIDs, or 32784 interrupts. Without
SPARSE_IRQ that becomes a static irq_desc[] array of 12.6 MB in .data,
carried by every Marvel and every generic kernel regardless of how many
interrupts the machine actually has. A real ES47 uses 87 of them.
That is not just wasted memory, it constrains where the kernel can be
loaded. The image links at a fixed 0xfffffc0001010000, just above the
console's low memory reservation, and with memory striping enabled the
console leaves only about 16 MB of usable low memory before the rest is
relocated to an interleaved aperture. A 12.6 MB array of mostly unused
interrupt descriptors is the difference between fitting and not.
Alpha already goes through irq_to_desc() rather than indexing irq_desc[]
directly, so nothing stands in the way. The platforms do wire up their
interrupts by number, though, which needs the descriptors to exist by
then, so provide arch_probe_nr_irqs() returning the machine vector's
count instead of taking the NR_IRQS_LEGACY default. Without it every
interrupt above 15 would have no descriptor and the handler setup would
be silently dropped.
Tested on an ES47 (Marvel, 2 EV7z): boots with all device interrupts
working, and .data drops by 12.6 MB, from 15.7 MB to 3.1 MB.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/Kconfig | 1 +
arch/alpha/kernel/irq_alpha.c | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 96b38d320eb8..8efb2da3246f 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -64,6 +64,7 @@ config ALPHA
select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
select MMU_GATHER_NO_RANGE
select MMU_GATHER_RCU_TABLE_FREE
+ select SPARSE_IRQ
select SPARSEMEM_EXTREME if SPARSEMEM
select SYSCTL_EXCEPTION_TRACE
select ZONE_DMA
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c
index f90ff898a71a..8366d6de439d 100644
--- a/arch/alpha/kernel/irq_alpha.c
+++ b/arch/alpha/kernel/irq_alpha.c
@@ -152,6 +152,19 @@ common_init_isa_dma(void)
outb(0, DMA2_CLR_MASK_REG);
}
+/*
+ * The platforms wire up their interrupts by calling into the generic irq
+ * code with fixed interrupt numbers, so the descriptors have to exist by
+ * then. Preallocate the machine's full complement rather than take the
+ * NR_IRQS_LEGACY default, which would leave everything above IRQ 15
+ * without a descriptor and silently drop the handler setup.
+ */
+int __init
+arch_probe_nr_irqs(void)
+{
+ return alpha_mv.nr_irqs;
+}
+
void __init
init_IRQ(void)
{
--
2.54.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 01/22] alpha: enter hardirq context before looking up the irq descriptor
2026-09-05 19:29 ` [PATCH v2 01/22] alpha: enter hardirq context before looking up the irq descriptor Matt Turner
@ 2026-09-06 8:53 ` Magnus Lindholm
0 siblings, 0 replies; 28+ messages in thread
From: Magnus Lindholm @ 2026-09-06 8:53 UTC (permalink / raw)
To: Matt Turner
Cc: Richard Henderson, Kees Cook, Marco Elver, Andrey Konovalov,
Andrey Ryabinin, Jonathan Corbet, Shuah Khan, Randy Dunlap,
linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc
Hi Matt,
On Sat, Sep 5, 2026 at 9:29 PM Matt Turner <mattst88@gmail.com> wrote:
>
> handle_irq() called irq_to_desc() before irq_enter(), so that lookup ran
> with the preempt count still saying task context and with RCU not yet
> watching. Generic code called from an interrupt handler should see
> hardirq context, and irq_to_desc() is more than an array index once
> SPARSE_IRQ is in use.
>
> Move irq_enter() to the top of the function and add the matching
> irq_exit() to the invalid interrupt path.
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Matt Turner <mattst88@gmail.com>
> ---
> arch/alpha/kernel/irq.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
> index 4a6a8b1d5a8b..5867a1655045 100644
> --- a/arch/alpha/kernel/irq.c
> +++ b/arch/alpha/kernel/irq.c
> @@ -107,18 +107,21 @@ handle_irq(int irq)
> * handled by some other CPU. (or is disabled)
> */
> static unsigned int illegal_count=0;
> - struct irq_desc *desc = irq_to_desc(irq);
> -
> + struct irq_desc *desc;
> +
> + irq_enter();
> +
> + desc = irq_to_desc(irq);
> if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS &&
> illegal_count < MAX_ILLEGAL_IRQS)) {
> irq_err_count++;
> illegal_count++;
> printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n",
> irq);
> + irq_exit();
> return;
> }
>
> - irq_enter();
> generic_handle_irq_desc(desc);
> irq_exit();
> }
>
Since this patch is unchanged in v2, and we agreed to handle the
hardirq-context consolidation as a follow-up, my tags from reviewing
and testing the current change are:
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Regards,
Magnus
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 13/22] alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support
2026-09-05 19:29 ` [PATCH v2 13/22] alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support Matt Turner
@ 2026-09-06 19:53 ` Magnus Lindholm
0 siblings, 0 replies; 28+ messages in thread
From: Magnus Lindholm @ 2026-09-06 19:53 UTC (permalink / raw)
To: Matt Turner
Cc: Richard Henderson, Kees Cook, Marco Elver, Andrey Konovalov,
Andrey Ryabinin, Jonathan Corbet, Shuah Khan, Randy Dunlap,
linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc
Hi Matt,
On Sat, Sep 5, 2026 at 9:29 PM Matt Turner <mattst88@gmail.com> wrote:
>
> Add the page table check helpers needed for CONFIG_PAGE_TABLE_CHECK
> and select ARCH_SUPPORTS_PAGE_TABLE_CHECK in Kconfig.
>
> Alpha does not support huge pages, so pmd_user_accessible_page() and
> pud_user_accessible_page() always return false. pte_user_accessible_page()
> checks for present PTEs with user read access (_PAGE_URE).
>
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Matt Turner <mattst88@gmail.com>
>
> Update the helpers to the three-argument pxx_user_accessible_page(mm,
> addr, pxx) signature introduced by commit cf8771ca4cdb ("mm/page_table_check:
> Pass mm_struct to pxx_user_accessible_page()"), matching the other
> architectures.
> ---
> arch/alpha/Kconfig | 1 +
> arch/alpha/include/asm/pgtable.h | 19 +++++++++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> index 1d28fa8d3b66..da4ec8399517 100644
> --- a/arch/alpha/Kconfig
> +++ b/arch/alpha/Kconfig
> @@ -19,6 +19,7 @@ config ALPHA
> select ARCH_NO_SG_CHAIN
> select ARCH_SUPPORTS_ATOMIC_RMW
> select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
> + select ARCH_SUPPORTS_PAGE_TABLE_CHECK
> select ARCH_USE_CMPXCHG_LOCKREF
> select FORCE_PCI
> select PCI_DOMAINS if PCI
> diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
> index bdff33b505bc..6ebdd90f3035 100644
> --- a/arch/alpha/include/asm/pgtable.h
> +++ b/arch/alpha/include/asm/pgtable.h
> @@ -232,6 +232,25 @@ extern inline void pud_clear(pud_t * pudp) { pud_val(*pudp) = 0; }
> extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); }
> extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
> extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
> +extern inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_URE; }
> +
> +static inline bool pte_user_accessible_page(struct mm_struct *mm,
> + unsigned long addr, pte_t pte)
> +{
> + return pte_present(pte) && pte_user(pte);
> +}
> +
> +static inline bool pmd_user_accessible_page(struct mm_struct *mm,
> + unsigned long addr, pmd_t pmd)
> +{
> + return false;
> +}
> +
> +static inline bool pud_user_accessible_page(struct mm_struct *mm,
> + unsigned long addr, pud_t pud)
> +{
> + return false;
> +}
>
> extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; }
> extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~(__DIRTY_BITS); return pte; }
>
Hi Matt,
I tested this on a two-CPU UP2000 with PAGE_TABLE_CHECK enabled and
enforced. A userspace test exercised anonymous, private file-backed,
and shared mappings, together with fork/COW, mprotect(), madvise(),
PTE teardown, and refault.
Single-process and concurrent CPU-pinned runs completed successfully,
with no page-table-check warnings, BUGs, or oopses.
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Regards,
Magnus
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 21/22] alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support
2026-09-05 19:29 ` [PATCH v2 21/22] alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support Matt Turner
@ 2026-09-06 20:44 ` Magnus Lindholm
2026-09-06 20:48 ` Matt Turner
0 siblings, 1 reply; 28+ messages in thread
From: Magnus Lindholm @ 2026-09-06 20:44 UTC (permalink / raw)
To: Matt Turner
Cc: Richard Henderson, Kees Cook, Marco Elver, Andrey Konovalov,
Andrey Ryabinin, Jonathan Corbet, Shuah Khan, Randy Dunlap,
linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc
Hi Matt,
On Sat, Sep 5, 2026 at 9:30 PM Matt Turner <mattst88@gmail.com> wrote:
>
> Implement the perf register sampling interface for Alpha. This enables
> perf to capture register state and user stack dumps with samples,
> supporting --call-graph dwarf.
>
> The perf_regs enum exposes the registers available in pt_regs: r0-r8,
> r16-r28, gp, pc, and ps. Registers r9-r15 are callee-saved and live
> in switch_stack, not pt_regs, so they are not included.
>
> A switch statement maps perf register indices to pt_regs fields since
> Alpha's pt_regs layout is non-contiguous (unlike architectures where
> direct array indexing works).
>
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Matt Turner <mattst88@gmail.com>
I think this patch still needs kernel-side work in addition to the
matching tools/perf support.
HAVE_PERF_USER_STACK_DUMP makes the generic perf code obtain the user
stack pointer through user_stack_pointer(regs), which on Alpha returns
regs->usp. However, the interrupt SAVE_ALL path does not initialize
that field, and do_entInt() does not snapshot USP. A profiling
interrupt taken from user mode may therefore attempt to copy the stack
from a stale or uninitialized address.
The proposed perf register ABI also does not include SP. A DWARF
unwinder needs both the sampled stack contents and the corresponding
stack pointer, so this cannot be completed solely by a later
tools/perf patch.
Would it make sense to drop this patch from the current series and
submit the perf support separately, including USP capture on interrupt
entry, SP in the kernel perf register ABI, and the matching tools/perf
support? That would allow the rest of this series to proceed without
waiting for the perf interface to be completed.
Regards,
Magnus
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 21/22] alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support
2026-09-06 20:44 ` Magnus Lindholm
@ 2026-09-06 20:48 ` Matt Turner
0 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2026-09-06 20:48 UTC (permalink / raw)
To: Magnus Lindholm
Cc: Richard Henderson, Kees Cook, Marco Elver, Andrey Konovalov,
Andrey Ryabinin, Jonathan Corbet, Shuah Khan, Randy Dunlap,
linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc
On Sun, Sep 6, 2026 at 4:44 PM Magnus Lindholm <linmag7@gmail.com> wrote:
>
> Hi Matt,
>
> On Sat, Sep 5, 2026 at 9:30 PM Matt Turner <mattst88@gmail.com> wrote:
> >
> > Implement the perf register sampling interface for Alpha. This enables
> > perf to capture register state and user stack dumps with samples,
> > supporting --call-graph dwarf.
> >
> > The perf_regs enum exposes the registers available in pt_regs: r0-r8,
> > r16-r28, gp, pc, and ps. Registers r9-r15 are callee-saved and live
> > in switch_stack, not pt_regs, so they are not included.
> >
> > A switch statement maps perf register indices to pt_regs fields since
> > Alpha's pt_regs layout is non-contiguous (unlike architectures where
> > direct array indexing works).
> >
> > Assisted-by: Claude:claude-opus-4-6
> > Signed-off-by: Matt Turner <mattst88@gmail.com>
>
> I think this patch still needs kernel-side work in addition to the
> matching tools/perf support.
>
> HAVE_PERF_USER_STACK_DUMP makes the generic perf code obtain the user
> stack pointer through user_stack_pointer(regs), which on Alpha returns
> regs->usp. However, the interrupt SAVE_ALL path does not initialize
> that field, and do_entInt() does not snapshot USP. A profiling
> interrupt taken from user mode may therefore attempt to copy the stack
> from a stale or uninitialized address.
>
> The proposed perf register ABI also does not include SP. A DWARF
> unwinder needs both the sampled stack contents and the corresponding
> stack pointer, so this cannot be completed solely by a later
> tools/perf patch.
>
> Would it make sense to drop this patch from the current series and
> submit the perf support separately, including USP capture on interrupt
> entry, SP in the kernel perf register ABI, and the matching tools/perf
> support? That would allow the rest of this series to proceed without
> waiting for the perf interface to be completed.
Yes, let's drop this patch from the series.
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 00/22] alpha: catch up on architecture Kconfig options
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
` (21 preceding siblings ...)
2026-09-05 19:29 ` [PATCH v2 22/22] alpha: select SPARSE_IRQ Matt Turner
@ 2026-09-06 21:18 ` Magnus Lindholm
22 siblings, 0 replies; 28+ messages in thread
From: Magnus Lindholm @ 2026-09-06 21:18 UTC (permalink / raw)
To: Matt Turner
Cc: Richard Henderson, Kees Cook, Marco Elver, Andrey Konovalov,
Andrey Ryabinin, Jonathan Corbet, Shuah Khan, Randy Dunlap,
linux-alpha, linux-kernel, kasan-dev, linux-hardening, linux-doc
Hi Matt,
On Sat, Sep 5, 2026 at 9:29 PM Matt Turner <mattst88@gmail.com> wrote:
>
> This is v2 of "alpha: catch up on architecture Kconfig options"
> (https://lore.kernel.org/linux-alpha/CAEdQ38FoUPzftf9vDcJK8L38j+cDzTyxdL+Fj-3oAQHmmOxaOA@mail.gmail.com/T/#t),
> addressing Magnus Lindholm's review and rebased onto v7.3-rc1 plus his
> GENERIC_ENTRY v5
> (https://lore.kernel.org/linux-alpha/20260902184058.198679-1-linmag7@gmail.com/T/#t),
> per his request.
>
> Changes since v1:
>
> - Dropped "fix arch_irqs_disabled_flags() to treat any raised IPL as
> disabled". Magnus's objection was right: per the Architecture
> Reference Manual an intermediate IPL only masks interrupts at or
> below that level, and do_entInt() already drives PS.IPL to IPL_MAX
> itself before reporting hardirq state to lockdep, so the original
> arch_irqs_disabled_flags() was correct as it stood.
>
> - Dropped "add TRACE_IRQFLAGS_SUPPORT". It conflicted with
> GENERIC_ENTRY exactly where Magnus expected: the entInt, entSys, and
> restore_all instrumentation it added is now redundant with the
> hardirq-state transitions GENERIC_ENTRY performs on those paths
> itself. I want to work out separately, and with real testing,
> whether the remaining synchronous-exception entry points need
> anything at all here, rather than resend a patch I can't fully
> justify.
>
> - Fixed "add ARCH_SUPPORTS_PAGE_TABLE_CHECK support", which no longer
> built against v7.3-rc1: commit cf8771ca4cdb ("mm/page_table_check:
> Pass mm_struct to pxx_user_accessible_page()") changed the callback
> signature, and Alpha's copy is now updated to match.
>
> - Added the Signed-off-by that was missing from "select SPARSE_IRQ".
>
> - Folded the corresponding arch-support.txt updates into "select
> ARCH_HAS_GCOV_PROFILE_ALL", "select HAVE_DEBUG_KMEMLEAK", "add
> ARCH_HAS_PTE_SPECIAL support", and "select ARCH_HAS_DEBUG_VM_PGTABLE",
> and added ALPHA to the memtest= parameter list in
> kernel-parameters.txt.
>
> - Did not touch "add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP
> support" beyond rebasing it. Magnus found real gaps there
> (tools/perf has no Alpha register mask, and regs->usp isn't
> snapshotted on the interrupt path), so I've left the corresponding
> feature matrices alone rather than claim it's done.
>
> - Picked up Tested-by/Reviewed-by from Magnus on the patches he gave
> them for.
>
> Not yet addressed: whether do_entInt() should own hardirq context for
> both interrupt paths and drop the irq_enter()/irq_exit() pair from
> handle_irq(), which Magnus asked about on "enter hardirq context before
> looking up the irq descriptor". No code change there yet; I'll follow up
> on that thread separately.
>
> Tested by cross-building with alpha-unknown-linux-gnu-gcc against
> defconfig and, for the page-table-check fix, against a config with
> CONFIG_PAGE_TABLE_CHECK=y. Boot tested on an AlphaServer ES47.
>
> Also available at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha.git arch-kconfig-options-v2
>
> Signed-off-by: Matt Turner <mattst88@gmail.com>
> ---
> Matt Turner (22):
> alpha: enter hardirq context before looking up the irq descriptor
> alpha: select ARCH_HAS_UBSAN
> alpha: select ARCH_HAS_GCOV_PROFILE_ALL
> alpha: select HAVE_DEBUG_KMEMLEAK
> alpha: select EDAC_SUPPORT
> alpha: select ARCH_SUPPORTS_ATOMIC_RMW
> alpha: select ARCH_HAS_FAST_MULTIPLIER
> alpha: select ARCH_SUPPORTS_INT128
> alpha: select HAVE_ARCH_COMPILER_H
> alpha: select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
> alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support
> alpha: add ARCH_HAS_PTE_SPECIAL support
> alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support
> alpha: select ARCH_HAS_DEBUG_VM_PGTABLE
> alpha: select HAVE_GUP_FAST
> alpha: select ARCH_USE_MEMTEST
> alpha: select SYSCTL_EXCEPTION_TRACE
> alpha: discard .eh_frame and the relocation sections
> alpha: select ARCH_WANT_LD_ORPHAN_WARN
> alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
> alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support
> alpha: select SPARSE_IRQ
>
> Documentation/admin-guide/kernel-parameters.txt | 2 +-
> .../debug/debug-vm-pgtable/arch-support.txt | 2 +-
> .../debug/gcov-profile-all/arch-support.txt | 2 +-
> .../features/debug/kmemleak/arch-support.txt | 2 +-
> .../features/vm/pte_special/arch-support.txt | 2 +-
> arch/alpha/Kconfig | 21 ++++++
> arch/alpha/include/asm/perf_regs.h | 7 ++
> arch/alpha/include/asm/pgtable.h | 24 +++++-
> arch/alpha/include/asm/processor.h | 7 ++
> arch/alpha/include/uapi/asm/perf_regs.h | 34 +++++++++
> arch/alpha/kernel/Makefile | 1 +
> arch/alpha/kernel/irq.c | 9 ++-
> arch/alpha/kernel/irq_alpha.c | 13 ++++
> arch/alpha/kernel/perf_regs.c | 86 ++++++++++++++++++++++
> arch/alpha/kernel/vmlinux.lds.S | 11 +++
> arch/alpha/mm/fault.c | 29 ++++++++
> arch/alpha/mm/init.c | 5 ++
> 17 files changed, 248 insertions(+), 9 deletions(-)
> ---
> base-commit: f321329c1b70835e6b0807fddac6d4117e5604fc
> change-id: 20260904-arch-kconfig-options-v2-8efa959ffcbd
>
> Best regards,
> --
> Matt Turner <mattst88@gmail.com>
>
Overall, nice work with this series!
I noticed that patches 3, 4, 12, 13, 14, and 16 contain additional
prose between your Signed-off-by and the `---` separator. git mailinfo
includes this prose in the commit message, so it separates your
sign-off from the final trailer block.
These changes are already documented in the cover letter's
changes-since-v1 section, so I think the extra paragraphs can simply
be removed. If any are intended to remain in the permanent commit
message, they should be moved above the trailer block instead.
Regards,
Magnus
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2026-09-06 21:19 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-05 19:29 [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Matt Turner
2026-09-05 19:29 ` [PATCH v2 01/22] alpha: enter hardirq context before looking up the irq descriptor Matt Turner
2026-09-06 8:53 ` Magnus Lindholm
2026-09-05 19:29 ` [PATCH v2 02/22] alpha: select ARCH_HAS_UBSAN Matt Turner
2026-09-05 19:29 ` [PATCH v2 03/22] alpha: select ARCH_HAS_GCOV_PROFILE_ALL Matt Turner
2026-09-05 19:29 ` [PATCH v2 04/22] alpha: select HAVE_DEBUG_KMEMLEAK Matt Turner
2026-09-05 19:29 ` [PATCH v2 05/22] alpha: select EDAC_SUPPORT Matt Turner
2026-09-05 19:29 ` [PATCH v2 06/22] alpha: select ARCH_SUPPORTS_ATOMIC_RMW Matt Turner
2026-09-05 19:29 ` [PATCH v2 07/22] alpha: select ARCH_HAS_FAST_MULTIPLIER Matt Turner
2026-09-05 19:29 ` [PATCH v2 08/22] alpha: select ARCH_SUPPORTS_INT128 Matt Turner
2026-09-05 19:29 ` [PATCH v2 09/22] alpha: select HAVE_ARCH_COMPILER_H Matt Turner
2026-09-05 19:29 ` [PATCH v2 10/22] alpha: select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE Matt Turner
2026-09-05 19:29 ` [PATCH v2 11/22] alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support Matt Turner
2026-09-05 19:29 ` [PATCH v2 12/22] alpha: add ARCH_HAS_PTE_SPECIAL support Matt Turner
2026-09-05 19:29 ` [PATCH v2 13/22] alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support Matt Turner
2026-09-06 19:53 ` Magnus Lindholm
2026-09-05 19:29 ` [PATCH v2 14/22] alpha: select ARCH_HAS_DEBUG_VM_PGTABLE Matt Turner
2026-09-05 19:29 ` [PATCH v2 15/22] alpha: select HAVE_GUP_FAST Matt Turner
2026-09-05 19:29 ` [PATCH v2 16/22] alpha: select ARCH_USE_MEMTEST Matt Turner
2026-09-05 19:29 ` [PATCH v2 17/22] alpha: select SYSCTL_EXCEPTION_TRACE Matt Turner
2026-09-05 19:29 ` [PATCH v2 18/22] alpha: discard .eh_frame and the relocation sections Matt Turner
2026-09-05 19:29 ` [PATCH v2 19/22] alpha: select ARCH_WANT_LD_ORPHAN_WARN Matt Turner
2026-09-05 19:29 ` [PATCH v2 20/22] alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM Matt Turner
2026-09-05 19:29 ` [PATCH v2 21/22] alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support Matt Turner
2026-09-06 20:44 ` Magnus Lindholm
2026-09-06 20:48 ` Matt Turner
2026-09-05 19:29 ` [PATCH v2 22/22] alpha: select SPARSE_IRQ Matt Turner
2026-09-06 21:18 ` [PATCH v2 00/22] alpha: catch up on architecture Kconfig options Magnus Lindholm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox