* [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit
@ 2026-05-05 6:56 Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 01/12] ARM: group is_permission_fault() with is_translation_fault() Jan Kiszka
` (13 more replies)
0 siblings, 14 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:56 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
A first attempt to backport the recently merged ARM 32-bit support of
PREEMPT-RT from 7.1 to 6.12-cip. Only lightly tested so far, first of
all looking for feedback regarding completeness.
This may also be valuable for 6.12-rt as this series should be able to
replace all patches tagged with {ARM:,arm:} in v6.12.79-rt17 - adding
Daniel.
Jan
Russell King (Oracle) (10):
ARM: group is_permission_fault() with is_translation_fault()
ARM: allow __do_kernel_fault() to report execution of memory faults
ARM: fix hash_name() fault
ARM: fix branch predictor hardening
ARM: ensure interrupts are enabled in __do_user_fault()
ARM: move vmalloc() lazy-page table population
ARM: move is_permission_fault() and is_translation_fault() to fault.h
ARM: use BIT() and GENMASK() for fault status register fields
ARM: move FSR fault status definitions before fsr_fs()
ARM: provide individual is_translation_fault() and
is_permission_fault()
Sebastian Andrzej Siewior (1):
ARM: 9463/1: Allow to enable RT
Thomas Gleixner (1):
ARM: 9459/1: Disable jump-label on PREEMPT_RT
arch/arm/Kconfig | 3 +-
arch/arm/mm/alignment.c | 6 +-
arch/arm/mm/fault.c | 222 +++++++++++++++++++++++-----------------
arch/arm/mm/fault.h | 42 ++++++--
4 files changed, 173 insertions(+), 100 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 01/12] ARM: group is_permission_fault() with is_translation_fault()
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
@ 2026-05-05 6:56 ` Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 02/12] ARM: allow __do_kernel_fault() to report execution of memory faults Jan Kiszka
` (12 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:56 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit 29ba26af9a9d43d5dbb8aa8e653adeb159d42587 ]
Group is_permission_fault() with is_translation_fault(), which is
needed to use is_permission_fault() in __do_kernel_fault(). As
this is static inline, there is no need for this to be under
CONFIG_MMU.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/fault.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index ab01b51de5590..4dca7b75ae5e4 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -128,6 +128,19 @@ static inline bool is_translation_fault(unsigned int fsr)
return false;
}
+static inline bool is_permission_fault(unsigned int fsr)
+{
+ int fs = fsr_fs(fsr);
+#ifdef CONFIG_ARM_LPAE
+ if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL)
+ return true;
+#else
+ if (fs == FS_L1_PERM || fs == FS_L2_PERM)
+ return true;
+#endif
+ return false;
+}
+
static void die_kernel_fault(const char *msg, struct mm_struct *mm,
unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
@@ -226,19 +239,6 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
}
#ifdef CONFIG_MMU
-static inline bool is_permission_fault(unsigned int fsr)
-{
- int fs = fsr_fs(fsr);
-#ifdef CONFIG_ARM_LPAE
- if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL)
- return true;
-#else
- if (fs == FS_L1_PERM || fs == FS_L2_PERM)
- return true;
-#endif
- return false;
-}
-
#ifdef CONFIG_CPU_TTBR0_PAN
static inline bool ttbr0_usermode_access_allowed(struct pt_regs *regs)
{
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 02/12] ARM: allow __do_kernel_fault() to report execution of memory faults
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 01/12] ARM: group is_permission_fault() with is_translation_fault() Jan Kiszka
@ 2026-05-05 6:56 ` Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 03/12] ARM: fix hash_name() fault Jan Kiszka
` (11 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:56 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit 40b466db1dffb41f0529035c59c5739636d0e5b8 ]
Allow __do_kernel_fault() to detect the execution of memory, so we can
provide the same fault message as do_page_fault() would do. This is
required when we split the kernel address fault handling from the
main do_page_fault() code path.
Reviewed-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Tested-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/fault.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 4dca7b75ae5e4..1d052d3c767d9 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -176,6 +176,8 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
*/
if (addr < PAGE_SIZE) {
msg = "NULL pointer dereference";
+ } else if (is_permission_fault(fsr) && fsr & FSR_LNX_PF) {
+ msg = "execution of memory";
} else {
if (is_translation_fault(fsr) &&
kfence_handle_page_fault(addr, is_write_fault(fsr), regs))
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 03/12] ARM: fix hash_name() fault
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 01/12] ARM: group is_permission_fault() with is_translation_fault() Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 02/12] ARM: allow __do_kernel_fault() to report execution of memory faults Jan Kiszka
@ 2026-05-05 6:56 ` Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 04/12] ARM: fix branch predictor hardening Jan Kiszka
` (10 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:56 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit 7733bc7d299d682f2723dc38fc7f370b9bf973e9 ]
Zizhi Wo reports:
"During the execution of hash_name()->load_unaligned_zeropad(), a
potential memory access beyond the PAGE boundary may occur. For
example, when the filename length is near the PAGE_SIZE boundary.
This triggers a page fault, which leads to a call to
do_page_fault()->mmap_read_trylock(). If we can't acquire the lock,
we have to fall back to the mmap_read_lock() path, which calls
might_sleep(). This breaks RCU semantics because path lookup occurs
under an RCU read-side critical section."
This is seen with CONFIG_DEBUG_ATOMIC_SLEEP=y and CONFIG_KFENCE=y.
Kernel addresses (with the exception of the vectors/kuser helper
page) do not have VMAs associated with them. If the vectors/kuser
helper page faults, then there are two possibilities:
1. if the fault happened while in kernel mode, then we're basically
dead, because the CPU won't be able to vector through this page
to handle the fault.
2. if the fault happened while in user mode, that means the page was
protected from user access, and we want to fault anyway.
Thus, we can handle kernel addresses from any context entirely
separately without going anywhere near the mmap lock. This gives us
an entirely non-sleeping path for all kernel mode kernel address
faults.
As we handle the kernel address faults before interrupts are enabled,
this change has the side effect of improving the branch predictor
hardening, but does not completely solve the issue.
Reported-by: Zizhi Wo <wozizhi@huaweicloud.com>
Reported-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Link: https://lore.kernel.org/r/20251126090505.3057219-1-wozizhi@huaweicloud.com
Reviewed-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Tested-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/fault.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 1d052d3c767d9..8768c70fd885b 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -262,6 +262,35 @@ static inline bool ttbr0_usermode_access_allowed(struct pt_regs *regs)
}
#endif
+static int __kprobes
+do_kernel_address_page_fault(struct mm_struct *mm, unsigned long addr,
+ unsigned int fsr, struct pt_regs *regs)
+{
+ if (user_mode(regs)) {
+ /*
+ * Fault from user mode for a kernel space address. User mode
+ * should not be faulting in kernel space, which includes the
+ * vector/khelper page. Send a SIGSEGV.
+ */
+ __do_user_fault(addr, fsr, SIGSEGV, SEGV_MAPERR, regs);
+ } else {
+ /*
+ * Fault from kernel mode. Enable interrupts if they were
+ * enabled in the parent context. Section (upper page table)
+ * translation faults are handled via do_translation_fault(),
+ * so we will only get here for a non-present kernel space
+ * PTE or PTE permission fault. This may happen in exceptional
+ * circumstances and need the fixup tables to be walked.
+ */
+ if (interrupts_enabled(regs))
+ local_irq_enable();
+
+ __do_kernel_fault(mm, addr, fsr, regs);
+ }
+
+ return 0;
+}
+
static int __kprobes
do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
@@ -275,6 +304,12 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
if (kprobe_page_fault(regs, fsr))
return 0;
+ /*
+ * Handle kernel addresses faults separately, which avoids touching
+ * the mmap lock from contexts that are not able to sleep.
+ */
+ if (addr >= TASK_SIZE)
+ return do_kernel_address_page_fault(mm, addr, fsr, regs);
/* Enable interrupts if they were enabled in the parent context. */
if (interrupts_enabled(regs))
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 04/12] ARM: fix branch predictor hardening
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (2 preceding siblings ...)
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 03/12] ARM: fix hash_name() fault Jan Kiszka
@ 2026-05-05 6:56 ` Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 05/12] ARM: 9459/1: Disable jump-label on PREEMPT_RT Jan Kiszka
` (9 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:56 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit fd2dee1c6e2256f726ba33fd3083a7be0efc80d3 ]
__do_user_fault() may be called with indeterminent interrupt enable
state, which means we may be preemptive at this point. This causes
problems when calling harden_branch_predictor(). For example, when
called from a data abort, do_alignment_fault()->do_bad_area().
Move harden_branch_predictor() out of __do_user_fault() and into the
calling contexts.
Moving it into do_kernel_address_page_fault(), we can be sure that
interrupts will be disabled here.
Converting do_translation_fault() to use do_kernel_address_page_fault()
rather than do_bad_area() means that we keep branch predictor handling
for translation faults. Interrupts will also be disabled at this call
site.
do_sect_fault() needs special handling, so detect user mode accesses
to kernel-addresses, and add an explicit call to branch predictor
hardening.
Finally, add branch predictor hardening to do_alignment() for the
faulting case (user mode accessing kernel addresses) before interrupts
are enabled.
This should cover all cases where harden_branch_predictor() is called,
ensuring that it is always has interrupts disabled, also ensuring that
it is called early in each call path.
Reviewed-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Tested-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/alignment.c | 6 +++++-
arch/arm/mm/fault.c | 39 ++++++++++++++++++++++++++-------------
2 files changed, 31 insertions(+), 14 deletions(-)
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 3c6ddb1afdc46..812380f30ae36 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -19,10 +19,11 @@
#include <linux/init.h>
#include <linux/sched/signal.h>
#include <linux/uaccess.h>
+#include <linux/unaligned.h>
#include <asm/cp15.h>
#include <asm/system_info.h>
-#include <linux/unaligned.h>
+#include <asm/system_misc.h>
#include <asm/opcodes.h>
#include "fault.h"
@@ -809,6 +810,9 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
int thumb2_32b = 0;
int fault;
+ if (addr >= TASK_SIZE && user_mode(regs))
+ harden_branch_predictor();
+
if (interrupts_enabled(regs))
local_irq_enable();
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 8768c70fd885b..16b5a7d214808 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -199,9 +199,6 @@ __do_user_fault(unsigned long addr, unsigned int fsr, unsigned int sig,
{
struct task_struct *tsk = current;
- if (addr > TASK_SIZE)
- harden_branch_predictor();
-
#ifdef CONFIG_DEBUG_USER
if (((user_debug & UDBG_SEGV) && (sig == SIGSEGV)) ||
((user_debug & UDBG_BUS) && (sig == SIGBUS))) {
@@ -270,8 +267,10 @@ do_kernel_address_page_fault(struct mm_struct *mm, unsigned long addr,
/*
* Fault from user mode for a kernel space address. User mode
* should not be faulting in kernel space, which includes the
- * vector/khelper page. Send a SIGSEGV.
+ * vector/khelper page. Handle the branch predictor hardening
+ * while interrupts are still disabled, then send a SIGSEGV.
*/
+ harden_branch_predictor();
__do_user_fault(addr, fsr, SIGSEGV, SEGV_MAPERR, regs);
} else {
/*
@@ -486,16 +485,20 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
* We enter here because the first level page table doesn't contain
* a valid entry for the address.
*
- * If the address is in kernel space (>= TASK_SIZE), then we are
- * probably faulting in the vmalloc() area.
+ * If this is a user address (addr < TASK_SIZE), we handle this as a
+ * normal page fault. This leaves the remainder of the function to handle
+ * kernel address translation faults.
*
- * If the init_task's first level page tables contains the relevant
- * entry, we copy the it to this task. If not, we send the process
- * a signal, fixup the exception, or oops the kernel.
+ * Since user mode is not permitted to access kernel addresses, pass these
+ * directly to do_kernel_address_page_fault() to handle.
*
- * NOTE! We MUST NOT take any locks for this case. We may be in an
- * interrupt or a critical region, and should only copy the information
- * from the master page table, nothing more.
+ * Otherwise, we're probably faulting in the vmalloc() area, so try to fix
+ * that up. Note that we must not take any locks or enable interrupts in
+ * this case.
+ *
+ * If vmalloc() fixup fails, that means the non-leaf page tables did not
+ * contain an entry for this address, so handle this via
+ * do_kernel_address_page_fault().
*/
#ifdef CONFIG_MMU
static int __kprobes
@@ -561,7 +564,8 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
return 0;
bad_area:
- do_bad_area(addr, fsr, regs);
+ do_kernel_address_page_fault(current->mm, addr, fsr, regs);
+
return 0;
}
#else /* CONFIG_MMU */
@@ -581,7 +585,16 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
static int
do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
+ /*
+ * If this is a kernel address, but from user mode, then userspace
+ * is trying bad stuff. Invoke the branch predictor handling.
+ * Interrupts are disabled here.
+ */
+ if (addr >= TASK_SIZE && user_mode(regs))
+ harden_branch_predictor();
+
do_bad_area(addr, fsr, regs);
+
return 0;
}
#endif /* CONFIG_ARM_LPAE */
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 05/12] ARM: 9459/1: Disable jump-label on PREEMPT_RT
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (3 preceding siblings ...)
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 04/12] ARM: fix branch predictor hardening Jan Kiszka
@ 2026-05-05 6:56 ` Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 06/12] ARM: ensure interrupts are enabled in __do_user_fault() Jan Kiszka
` (8 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:56 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Thomas Gleixner <tglx@linutronix.de>
[ Upstream commit 256d97d3587b441630c345ab3d773a9e7dcd964b ]
jump-labels are used to efficiently switch between two possible code
paths. To achieve this, stop_machine() is used to keep the CPU in a
known state while the opcode is modified. The usage of stop_machine()
here leads to large latency spikes which can be observed on PREEMPT_RT.
Jump labels may change the target during runtime and are not restricted
to debug or "configuration/ setup" part of a PREEMPT_RT system where
high latencies could be defined as acceptable.
On 64-bit Arm, it is possible to use jump labels without the
stop_machine() call, which architecturally provides a way to atomically
change one 32-bit instruction word while keeping maintaining consistency,
but this is not generally the case on 32-bit, in particular in thumb2
mode.
Disable jump-label support on a PREEMPT_RT system when SMP is enabled.
[bigeasy: Patch description.]
[arnd: add !SMP case, extend changelog]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cc8beccc4e86d..4be68e77b9594 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -79,7 +79,7 @@ config ARM
select HAS_IOPORT
select HAVE_ARCH_AUDITSYSCALL if AEABI && !OABI_COMPAT
select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
- select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU
+ select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU && (!PREEMPT_RT || !SMP)
select HAVE_ARCH_KFENCE if MMU && !XIP_KERNEL
select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU
select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 06/12] ARM: ensure interrupts are enabled in __do_user_fault()
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (4 preceding siblings ...)
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 05/12] ARM: 9459/1: Disable jump-label on PREEMPT_RT Jan Kiszka
@ 2026-05-05 6:57 ` Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 07/12] ARM: move vmalloc() lazy-page table population Jan Kiszka
` (7 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:57 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit 59e4f3b45b96a24fc9b7a89e5f8a2168b30f95af ]
__do_user_fault() may be called from fault handling paths where the
interrupts are enabled or disabled. E.g. do_page_fault() calls this
with interrupts enabled, whereas do_sect_fault()->do_bad_area()
will call this with interrupts disabled. Since this is a userspace
fault, we know that interrupts were enabled in the parent context,
so call local_irq_enable() here to give a consistent interrupt state.
This is necessary for force_sig_info() when PREEMPT_RT is enabled.
Reported-by: Yadi.hu <yadi.hu@windriver.com>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/fault.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 16b5a7d214808..dd78cbef87c85 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -191,7 +191,8 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
/*
* Something tried to access memory that isn't in our memory map..
- * User mode accesses just cause a SIGSEGV
+ * User mode accesses just cause a SIGSEGV. Ensure interrupts are enabled
+ * for preempt RT.
*/
static void
__do_user_fault(unsigned long addr, unsigned int fsr, unsigned int sig,
@@ -199,6 +200,8 @@ __do_user_fault(unsigned long addr, unsigned int fsr, unsigned int sig,
{
struct task_struct *tsk = current;
+ local_irq_enable();
+
#ifdef CONFIG_DEBUG_USER
if (((user_debug & UDBG_SEGV) && (sig == SIGSEGV)) ||
((user_debug & UDBG_BUS) && (sig == SIGBUS))) {
@@ -269,6 +272,7 @@ do_kernel_address_page_fault(struct mm_struct *mm, unsigned long addr,
* should not be faulting in kernel space, which includes the
* vector/khelper page. Handle the branch predictor hardening
* while interrupts are still disabled, then send a SIGSEGV.
+ * Note that __do_user_fault() will enable interrupts.
*/
harden_branch_predictor();
__do_user_fault(addr, fsr, SIGSEGV, SEGV_MAPERR, regs);
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 07/12] ARM: move vmalloc() lazy-page table population
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (5 preceding siblings ...)
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 06/12] ARM: ensure interrupts are enabled in __do_user_fault() Jan Kiszka
@ 2026-05-05 6:57 ` Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 08/12] ARM: move is_permission_fault() and is_translation_fault() to fault.h Jan Kiszka
` (6 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:57 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit 78900204851708bbe761c3acf641ad60f15c922f ]
Split the vmalloc() lazy-page table population from
do_translation_fault() into a new vmalloc_fault() function.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/fault.c | 126 ++++++++++++++++++++++++--------------------
1 file changed, 68 insertions(+), 58 deletions(-)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index dd78cbef87c85..fabaefa26bb1c 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -262,6 +262,70 @@ static inline bool ttbr0_usermode_access_allowed(struct pt_regs *regs)
}
#endif
+/*
+ * Handle a vmalloc fault, copying the non-leaf page table entries from
+ * init_mm.pgd. Any kernel context can trigger this, so we must not sleep
+ * or enable interrupts. Having two CPUs execute this for the same page is
+ * no problem, we'll just copy the same data twice.
+ *
+ * Returns false on failure.
+ */
+static bool __kprobes __maybe_unused vmalloc_fault(unsigned long addr)
+{
+ unsigned int index;
+ pgd_t *pgd, *pgd_k;
+ p4d_t *p4d, *p4d_k;
+ pud_t *pud, *pud_k;
+ pmd_t *pmd, *pmd_k;
+
+ index = pgd_index(addr);
+
+ pgd = cpu_get_pgd() + index;
+ pgd_k = init_mm.pgd + index;
+
+ p4d = p4d_offset(pgd, addr);
+ p4d_k = p4d_offset(pgd_k, addr);
+
+ if (p4d_none(*p4d_k))
+ return false;
+ if (!p4d_present(*p4d))
+ set_p4d(p4d, *p4d_k);
+
+ pud = pud_offset(p4d, addr);
+ pud_k = pud_offset(p4d_k, addr);
+
+ if (pud_none(*pud_k))
+ return false;
+ if (!pud_present(*pud))
+ set_pud(pud, *pud_k);
+
+ pmd = pmd_offset(pud, addr);
+ pmd_k = pmd_offset(pud_k, addr);
+
+#ifdef CONFIG_ARM_LPAE
+ /*
+ * Only one hardware entry per PMD with LPAE.
+ */
+ index = 0;
+#else
+ /*
+ * On ARM one Linux PGD entry contains two hardware entries (see page
+ * tables layout in pgtable.h). We normally guarantee that we always
+ * fill both L1 entries. But create_mapping() doesn't follow the rule.
+ * It can create inidividual L1 entries, so here we have to call
+ * pmd_none() check for the entry really corresponded to address, not
+ * for the first of pair.
+ */
+ index = (addr >> SECTION_SHIFT) & 1;
+#endif
+ if (pmd_none(pmd_k[index]))
+ return false;
+
+ copy_pmd(pmd, pmd_k);
+
+ return true;
+}
+
static int __kprobes
do_kernel_address_page_fault(struct mm_struct *mm, unsigned long addr,
unsigned int fsr, struct pt_regs *regs)
@@ -497,10 +561,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
* directly to do_kernel_address_page_fault() to handle.
*
* Otherwise, we're probably faulting in the vmalloc() area, so try to fix
- * that up. Note that we must not take any locks or enable interrupts in
- * this case.
+ * that up via vmalloc_fault().
*
- * If vmalloc() fixup fails, that means the non-leaf page tables did not
+ * If vmalloc_fault() fails, that means the non-leaf page tables did not
* contain an entry for this address, so handle this via
* do_kernel_address_page_fault().
*/
@@ -509,65 +572,12 @@ static int __kprobes
do_translation_fault(unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
- unsigned int index;
- pgd_t *pgd, *pgd_k;
- p4d_t *p4d, *p4d_k;
- pud_t *pud, *pud_k;
- pmd_t *pmd, *pmd_k;
-
if (addr < TASK_SIZE)
return do_page_fault(addr, fsr, regs);
- if (user_mode(regs))
- goto bad_area;
-
- index = pgd_index(addr);
-
- pgd = cpu_get_pgd() + index;
- pgd_k = init_mm.pgd + index;
-
- p4d = p4d_offset(pgd, addr);
- p4d_k = p4d_offset(pgd_k, addr);
-
- if (p4d_none(*p4d_k))
- goto bad_area;
- if (!p4d_present(*p4d))
- set_p4d(p4d, *p4d_k);
-
- pud = pud_offset(p4d, addr);
- pud_k = pud_offset(p4d_k, addr);
-
- if (pud_none(*pud_k))
- goto bad_area;
- if (!pud_present(*pud))
- set_pud(pud, *pud_k);
-
- pmd = pmd_offset(pud, addr);
- pmd_k = pmd_offset(pud_k, addr);
-
-#ifdef CONFIG_ARM_LPAE
- /*
- * Only one hardware entry per PMD with LPAE.
- */
- index = 0;
-#else
- /*
- * On ARM one Linux PGD entry contains two hardware entries (see page
- * tables layout in pgtable.h). We normally guarantee that we always
- * fill both L1 entries. But create_mapping() doesn't follow the rule.
- * It can create inidividual L1 entries, so here we have to call
- * pmd_none() check for the entry really corresponded to address, not
- * for the first of pair.
- */
- index = (addr >> SECTION_SHIFT) & 1;
-#endif
- if (pmd_none(pmd_k[index]))
- goto bad_area;
-
- copy_pmd(pmd, pmd_k);
- return 0;
+ if (!user_mode(regs) && vmalloc_fault(addr))
+ return 0;
-bad_area:
do_kernel_address_page_fault(current->mm, addr, fsr, regs);
return 0;
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 08/12] ARM: move is_permission_fault() and is_translation_fault() to fault.h
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (6 preceding siblings ...)
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 07/12] ARM: move vmalloc() lazy-page table population Jan Kiszka
@ 2026-05-05 6:57 ` Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 09/12] ARM: use BIT() and GENMASK() for fault status register fields Jan Kiszka
` (5 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:57 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit 9c46fcaf2efa78e814e102c5828cf5c825a133ec ]
is_permission_fault() and is_translation_fault() are both conditional
on the FSR encodings, which are dependent on LPAE. We define the
constants in fault.h. Move these inline functions to fault.h to be
near the FSR definitions.
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/fault.c | 26 --------------------------
arch/arm/mm/fault.h | 26 ++++++++++++++++++++++++++
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index fabaefa26bb1c..04c2b48e02adc 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -115,32 +115,6 @@ static inline bool is_write_fault(unsigned int fsr)
return (fsr & FSR_WRITE) && !(fsr & FSR_CM);
}
-static inline bool is_translation_fault(unsigned int fsr)
-{
- int fs = fsr_fs(fsr);
-#ifdef CONFIG_ARM_LPAE
- if ((fs & FS_MMU_NOLL_MASK) == FS_TRANS_NOLL)
- return true;
-#else
- if (fs == FS_L1_TRANS || fs == FS_L2_TRANS)
- return true;
-#endif
- return false;
-}
-
-static inline bool is_permission_fault(unsigned int fsr)
-{
- int fs = fsr_fs(fsr);
-#ifdef CONFIG_ARM_LPAE
- if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL)
- return true;
-#else
- if (fs == FS_L1_PERM || fs == FS_L2_PERM)
- return true;
-#endif
- return false;
-}
-
static void die_kernel_fault(const char *msg, struct mm_struct *mm,
unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
diff --git a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h
index e8f8c19025444..e95f44757dc96 100644
--- a/arch/arm/mm/fault.h
+++ b/arch/arm/mm/fault.h
@@ -35,6 +35,32 @@ static inline int fsr_fs(unsigned int fsr)
}
#endif
+static inline bool is_translation_fault(unsigned int fsr)
+{
+ int fs = fsr_fs(fsr);
+#ifdef CONFIG_ARM_LPAE
+ if ((fs & FS_MMU_NOLL_MASK) == FS_TRANS_NOLL)
+ return true;
+#else
+ if (fs == FS_L1_TRANS || fs == FS_L2_TRANS)
+ return true;
+#endif
+ return false;
+}
+
+static inline bool is_permission_fault(unsigned int fsr)
+{
+ int fs = fsr_fs(fsr);
+#ifdef CONFIG_ARM_LPAE
+ if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL)
+ return true;
+#else
+ if (fs == FS_L1_PERM || fs == FS_L2_PERM)
+ return true;
+#endif
+ return false;
+}
+
void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs);
void early_abt_enable(void);
asmlinkage void do_DataAbort(unsigned long addr, unsigned int fsr,
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 09/12] ARM: use BIT() and GENMASK() for fault status register fields
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (7 preceding siblings ...)
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 08/12] ARM: move is_permission_fault() and is_translation_fault() to fault.h Jan Kiszka
@ 2026-05-05 6:57 ` Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 10/12] ARM: move FSR fault status definitions before fsr_fs() Jan Kiszka
` (4 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:57 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit 5548e8a4663d9decc8215c53e4a41c704f183cbb ]
Modernise the fault status field definitions by using BIT() and
GENMASK().
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/fault.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h
index e95f44757dc96..d2bdedaefe149 100644
--- a/arch/arm/mm/fault.h
+++ b/arch/arm/mm/fault.h
@@ -5,12 +5,12 @@
/*
* Fault status register encodings. We steal bit 31 for our own purposes.
*/
-#define FSR_LNX_PF (1 << 31)
-#define FSR_CM (1 << 13)
-#define FSR_WRITE (1 << 11)
-#define FSR_FS4 (1 << 10)
-#define FSR_FS3_0 (15)
-#define FSR_FS5_0 (0x3f)
+#define FSR_LNX_PF BIT(31)
+#define FSR_CM BIT(13)
+#define FSR_WRITE BIT(11)
+#define FSR_FS4 BIT(10)
+#define FSR_FS3_0 GENMASK(3, 0)
+#define FSR_FS5_0 GENMASK(5, 0)
#ifdef CONFIG_ARM_LPAE
#define FSR_FS_AEA 17
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 10/12] ARM: move FSR fault status definitions before fsr_fs()
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (8 preceding siblings ...)
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 09/12] ARM: use BIT() and GENMASK() for fault status register fields Jan Kiszka
@ 2026-05-05 6:57 ` Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 11/12] ARM: provide individual is_translation_fault() and is_permission_fault() Jan Kiszka
` (3 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:57 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit a542de4451093f310d20e3d65d62ab4f4d38241f ]
The FSR's fault status bits depend on whether LPAE is enabled. Rather
than always exposing both LPAE and non-LPAE to all code, move them
inside the ifdef blocks dependent on LPAE to restrict their visibility.
No code other than fsr_fs() makes use of these.
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/fault.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h
index d2bdedaefe149..44c0fad29cce3 100644
--- a/arch/arm/mm/fault.h
+++ b/arch/arm/mm/fault.h
@@ -8,9 +8,6 @@
#define FSR_LNX_PF BIT(31)
#define FSR_CM BIT(13)
#define FSR_WRITE BIT(11)
-#define FSR_FS4 BIT(10)
-#define FSR_FS3_0 GENMASK(3, 0)
-#define FSR_FS5_0 GENMASK(5, 0)
#ifdef CONFIG_ARM_LPAE
#define FSR_FS_AEA 17
@@ -18,6 +15,8 @@
#define FS_PERM_NOLL 0xC
#define FS_MMU_NOLL_MASK 0x3C
+#define FSR_FS5_0 GENMASK(5, 0)
+
static inline int fsr_fs(unsigned int fsr)
{
return fsr & FSR_FS5_0;
@@ -29,6 +28,9 @@ static inline int fsr_fs(unsigned int fsr)
#define FS_L1_PERM 0xD
#define FS_L2_PERM 0xF
+#define FSR_FS4 BIT(10)
+#define FSR_FS3_0 GENMASK(3, 0)
+
static inline int fsr_fs(unsigned int fsr)
{
return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6;
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 11/12] ARM: provide individual is_translation_fault() and is_permission_fault()
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (9 preceding siblings ...)
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 10/12] ARM: move FSR fault status definitions before fsr_fs() Jan Kiszka
@ 2026-05-05 6:57 ` Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 12/12] ARM: 9463/1: Allow to enable RT Jan Kiszka
` (2 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:57 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[ Upstream commit d1fed2d600905e7f007d8c88c936b768d45c09d6 ]
Provide individual LPAE and non-LPAE definitions for both these
functions, rather than having ifdefs inside the function body. This
places the functions closer to their associated definitions.
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/mm/fault.h | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h
index 44c0fad29cce3..207f1b06941de 100644
--- a/arch/arm/mm/fault.h
+++ b/arch/arm/mm/fault.h
@@ -21,6 +21,20 @@ static inline int fsr_fs(unsigned int fsr)
{
return fsr & FSR_FS5_0;
}
+
+static inline bool is_translation_fault(unsigned int fsr)
+{
+ int fs = fsr_fs(fsr);
+
+ return (fs & FS_MMU_NOLL_MASK) == FS_TRANS_NOLL;
+}
+
+static inline bool is_permission_fault(unsigned int fsr)
+{
+ int fs = fsr_fs(fsr);
+
+ return (fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL;
+}
#else
#define FSR_FS_AEA 22
#define FS_L1_TRANS 0x5
@@ -35,33 +49,21 @@ static inline int fsr_fs(unsigned int fsr)
{
return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6;
}
-#endif
static inline bool is_translation_fault(unsigned int fsr)
{
int fs = fsr_fs(fsr);
-#ifdef CONFIG_ARM_LPAE
- if ((fs & FS_MMU_NOLL_MASK) == FS_TRANS_NOLL)
- return true;
-#else
- if (fs == FS_L1_TRANS || fs == FS_L2_TRANS)
- return true;
-#endif
- return false;
+
+ return fs == FS_L1_TRANS || fs == FS_L2_TRANS;
}
static inline bool is_permission_fault(unsigned int fsr)
{
int fs = fsr_fs(fsr);
-#ifdef CONFIG_ARM_LPAE
- if ((fs & FS_MMU_NOLL_MASK) == FS_PERM_NOLL)
- return true;
-#else
- if (fs == FS_L1_PERM || fs == FS_L2_PERM)
- return true;
-#endif
- return false;
+
+ return fs == FS_L1_PERM || fs == FS_L2_PERM;
}
+#endif
void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs);
void early_abt_enable(void);
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [RFC][PATCH 6.12.y-cip 12/12] ARM: 9463/1: Allow to enable RT
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (10 preceding siblings ...)
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 11/12] ARM: provide individual is_translation_fault() and is_permission_fault() Jan Kiszka
@ 2026-05-05 6:57 ` Jan Kiszka
2026-05-05 7:02 ` [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
2026-05-12 8:11 ` Pavel Machek
13 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 6:57 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
[ Upstream commit c6e61c06d6061750597e79c598acb5dead44c35b ]
All known issues have been adressed.
Allow to select RT.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
arch/arm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4be68e77b9594..4d09fd4bd9d41 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -40,6 +40,7 @@ config ARM
select ARCH_SUPPORTS_CFI_CLANG
select ARCH_SUPPORTS_HUGETLBFS if ARM_LPAE
select ARCH_SUPPORTS_PER_VMA_LOCK
+ select ARCH_SUPPORTS_RT
select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_USE_MEMTEST
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (11 preceding siblings ...)
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 12/12] ARM: 9463/1: Allow to enable RT Jan Kiszka
@ 2026-05-05 7:02 ` Jan Kiszka
2026-05-11 13:57 ` Sebastian Siewior
2026-05-12 8:11 ` Pavel Machek
13 siblings, 1 reply; 19+ messages in thread
From: Jan Kiszka @ 2026-05-05 7:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior,
Bryan Brattlof, Daniel Wagner
On 05.05.26 08:56, Jan Kiszka wrote:
> A first attempt to backport the recently merged ARM 32-bit support of
> PREEMPT-RT from 7.1 to 6.12-cip. Only lightly tested so far, first of
> all looking for feedback regarding completeness.
>
> This may also be valuable for 6.12-rt as this series should be able to
> replace all patches tagged with {ARM:,arm:} in v6.12.79-rt17 - adding
> Daniel.
Grrr, CC typos and misconfigurations - at least no overshooting, it seems.
Daniel, Bryan, lost you on CC for this series.
Jan
>
> Jan
>
> Russell King (Oracle) (10):
> ARM: group is_permission_fault() with is_translation_fault()
> ARM: allow __do_kernel_fault() to report execution of memory faults
> ARM: fix hash_name() fault
> ARM: fix branch predictor hardening
> ARM: ensure interrupts are enabled in __do_user_fault()
> ARM: move vmalloc() lazy-page table population
> ARM: move is_permission_fault() and is_translation_fault() to fault.h
> ARM: use BIT() and GENMASK() for fault status register fields
> ARM: move FSR fault status definitions before fsr_fs()
> ARM: provide individual is_translation_fault() and
> is_permission_fault()
>
> Sebastian Andrzej Siewior (1):
> ARM: 9463/1: Allow to enable RT
>
> Thomas Gleixner (1):
> ARM: 9459/1: Disable jump-label on PREEMPT_RT
>
> arch/arm/Kconfig | 3 +-
> arch/arm/mm/alignment.c | 6 +-
> arch/arm/mm/fault.c | 222 +++++++++++++++++++++++-----------------
> arch/arm/mm/fault.h | 42 ++++++--
> 4 files changed, 173 insertions(+), 100 deletions(-)
>
--
Siemens AG, Foundational Technologies
Linux Expert Center
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit
2026-05-05 7:02 ` [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
@ 2026-05-11 13:57 ` Sebastian Siewior
2026-05-11 16:26 ` Jan Kiszka
0 siblings, 1 reply; 19+ messages in thread
From: Sebastian Siewior @ 2026-05-11 13:57 UTC (permalink / raw)
To: Jan Kiszka
Cc: cip-dev, pavel, nobuhiro.iwamatsu.x90, Bryan Brattlof,
Daniel Wagner
On 2026-05-05 09:02:02 [+0200], Jan Kiszka wrote:
> On 05.05.26 08:56, Jan Kiszka wrote:
> > A first attempt to backport the recently merged ARM 32-bit support of
> > PREEMPT-RT from 7.1 to 6.12-cip. Only lightly tested so far, first of
> > all looking for feedback regarding completeness.
> >
> > This may also be valuable for 6.12-rt as this series should be able to
> > replace all patches tagged with {ARM:,arm:} in v6.12.79-rt17 - adding
> > Daniel.
>
> Grrr, CC typos and misconfigurations - at least no overshooting, it seems.
>
> Daniel, Bryan, lost you on CC for this series.
I made the following:
| ARM: group is_permission_fault() with is_translation_fault()
| ARM: allow __do_kernel_fault() to report execution of memory faults
| ARM: fix hash_name() fault
| ARM: fix branch predictor hardening
up to here for stable
| ARM: ensure interrupts are enabled in __do_user_fault()
| ARM: 9459/1: Disable jump-label on PREEMPT_RT
| ARM: 9463/1: Allow to enable RT
This would go to stable-rt. This does not fix anything !RT as far as I
can tell.
The four patches for stable have been sent.
> Jan
Sebastian
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit
2026-05-11 13:57 ` Sebastian Siewior
@ 2026-05-11 16:26 ` Jan Kiszka
2026-05-12 6:37 ` Sebastian Siewior
0 siblings, 1 reply; 19+ messages in thread
From: Jan Kiszka @ 2026-05-11 16:26 UTC (permalink / raw)
To: Sebastian Siewior
Cc: cip-dev, pavel, nobuhiro.iwamatsu.x90, Bryan Brattlof,
Daniel Wagner
On 11.05.26 15:57, Sebastian Siewior wrote:
> On 2026-05-05 09:02:02 [+0200], Jan Kiszka wrote:
>> On 05.05.26 08:56, Jan Kiszka wrote:
>>> A first attempt to backport the recently merged ARM 32-bit support of
>>> PREEMPT-RT from 7.1 to 6.12-cip. Only lightly tested so far, first of
>>> all looking for feedback regarding completeness.
>>>
>>> This may also be valuable for 6.12-rt as this series should be able to
>>> replace all patches tagged with {ARM:,arm:} in v6.12.79-rt17 - adding
>>> Daniel.
>>
>> Grrr, CC typos and misconfigurations - at least no overshooting, it seems.
>>
>> Daniel, Bryan, lost you on CC for this series.
>
> I made the following:
> | ARM: group is_permission_fault() with is_translation_fault()
> | ARM: allow __do_kernel_fault() to report execution of memory faults
> | ARM: fix hash_name() fault
> | ARM: fix branch predictor hardening
> up to here for stable
>
Great!
> | ARM: ensure interrupts are enabled in __do_user_fault()
> | ARM: 9459/1: Disable jump-label on PREEMPT_RT
> | ARM: 9463/1: Allow to enable RT
> This would go to stable-rt. This does not fix anything !RT as far as I
> can tell.
>
Ok, then they would be equivalently relevant for 6.12-cip
> The four patches for stable have been sent.
>
12-7 = 5. One is "Allow to enable RT", obviously needed in stable-rt and
-cip then as well. What about the other 4? Not needed in a backport?
Thanks so far already!
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit
2026-05-11 16:26 ` Jan Kiszka
@ 2026-05-12 6:37 ` Sebastian Siewior
0 siblings, 0 replies; 19+ messages in thread
From: Sebastian Siewior @ 2026-05-12 6:37 UTC (permalink / raw)
To: Jan Kiszka
Cc: cip-dev, pavel, nobuhiro.iwamatsu.x90, Bryan Brattlof,
Daniel Wagner
On 2026-05-11 18:26:18 [+0200], Jan Kiszka wrote:
> > | ARM: ensure interrupts are enabled in __do_user_fault()
> > | ARM: 9459/1: Disable jump-label on PREEMPT_RT
> > | ARM: 9463/1: Allow to enable RT
> > This would go to stable-rt. This does not fix anything !RT as far as I
> > can tell.
> >
>
> Ok, then they would be equivalently relevant for 6.12-cip
Once it goes via stable, I throw it at the stable pile to ease their
rebase on top stable.
> > The four patches for stable have been sent.
> >
>
> 12-7 = 5. One is "Allow to enable RT", obviously needed in stable-rt and
> -cip then as well. What about the other 4? Not needed in a backport?
I dropped from your queue:
| ARM: move vmalloc() lazy-page table population
| ARM: move is_permission_fault() and is_translation_fault() to fault.h
| ARM: use BIT() and GENMASK() for fault status register fields
| ARM: move FSR fault status definitions before fsr_fs()
| ARM: provide individual is_translation_fault() and is_permission_fault()
as far as I can tell, it is just shuffling code around. Not strictly
needed for the backport. The "grouping" patch that I sent stable@ is
also moving code around but the following "fix" needs the forward
declaration so it goes in as a requirement.
I don't see the need for these.
> Thanks so far already!
> Jan
Sebastian
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
` (12 preceding siblings ...)
2026-05-05 7:02 ` [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
@ 2026-05-12 8:11 ` Pavel Machek
2026-05-12 9:42 ` Jan Kiszka
13 siblings, 1 reply; 19+ messages in thread
From: Pavel Machek @ 2026-05-12 8:11 UTC (permalink / raw)
To: Jan Kiszka; +Cc: cip-dev, pavel, nobuhiro.iwamatsu.x90, Sebastian Siewior
[-- Attachment #1: Type: text/plain, Size: 511 bytes --]
Hi!
> A first attempt to backport the recently merged ARM 32-bit support of
> PREEMPT-RT from 7.1 to 6.12-cip. Only lightly tested so far, first of
> all looking for feedback regarding completeness.
>
> This may also be valuable for 6.12-rt as this series should be able to
> replace all patches tagged with {ARM:,arm:} in v6.12.79-rt17 - adding
> Daniel.
Patches look okay to me.
Reviewed-by: Pavel Machek <pavel@nabladev.com>
You may need to sign them off.
Best regards,
Pavel
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit
2026-05-12 8:11 ` Pavel Machek
@ 2026-05-12 9:42 ` Jan Kiszka
0 siblings, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2026-05-12 9:42 UTC (permalink / raw)
To: Pavel Machek; +Cc: cip-dev, nobuhiro.iwamatsu.x90, Sebastian Siewior
On 12.05.26 10:11, Pavel Machek wrote:
> Hi!
>
>> A first attempt to backport the recently merged ARM 32-bit support of
>> PREEMPT-RT from 7.1 to 6.12-cip. Only lightly tested so far, first of
>> all looking for feedback regarding completeness.
>>
>> This may also be valuable for 6.12-rt as this series should be able to
>> replace all patches tagged with {ARM:,arm:} in v6.12.79-rt17 - adding
>> Daniel.
>
> Patches look okay to me.
>
> Reviewed-by: Pavel Machek <pavel@nabladev.com>
>
> You may need to sign them off.
Let's wait for stable first. For the rest, I'm happy to sign off the
final series, of course.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2026-05-12 9:42 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 6:56 [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 01/12] ARM: group is_permission_fault() with is_translation_fault() Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 02/12] ARM: allow __do_kernel_fault() to report execution of memory faults Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 03/12] ARM: fix hash_name() fault Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 04/12] ARM: fix branch predictor hardening Jan Kiszka
2026-05-05 6:56 ` [RFC][PATCH 6.12.y-cip 05/12] ARM: 9459/1: Disable jump-label on PREEMPT_RT Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 06/12] ARM: ensure interrupts are enabled in __do_user_fault() Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 07/12] ARM: move vmalloc() lazy-page table population Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 08/12] ARM: move is_permission_fault() and is_translation_fault() to fault.h Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 09/12] ARM: use BIT() and GENMASK() for fault status register fields Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 10/12] ARM: move FSR fault status definitions before fsr_fs() Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 11/12] ARM: provide individual is_translation_fault() and is_permission_fault() Jan Kiszka
2026-05-05 6:57 ` [RFC][PATCH 6.12.y-cip 12/12] ARM: 9463/1: Allow to enable RT Jan Kiszka
2026-05-05 7:02 ` [RFC][PATCH 6.12.y-cip 00/12] Backport PREEMPT-RT support for ARM 32-bit Jan Kiszka
2026-05-11 13:57 ` Sebastian Siewior
2026-05-11 16:26 ` Jan Kiszka
2026-05-12 6:37 ` Sebastian Siewior
2026-05-12 8:11 ` Pavel Machek
2026-05-12 9:42 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox