aboutsummaryrefslogtreecommitdiff
path: root/arch/parisc
diff options
context:
space:
mode:
authorGravatar Helge Deller <deller@gmx.de> 2024-01-22 23:15:48 +0100
committerGravatar Helge Deller <deller@gmx.de> 2024-02-27 22:51:44 +0100
commit94a1b192290c9fdb33085ecacf82afb27bd63fa8 (patch)
tree52777647c2892cde4ce61563f869a803947c73eb /arch/parisc
parentparisc: Use irq_enter_rcu() to fix warning at kernel/context_tracking.c:367 (diff)
downloadlinux-94a1b192290c9fdb33085ecacf82afb27bd63fa8.tar.gz
linux-94a1b192290c9fdb33085ecacf82afb27bd63fa8.tar.bz2
linux-94a1b192290c9fdb33085ecacf82afb27bd63fa8.zip
parisc: Show kernel unaligned memory accesses
Warn if some kernel function triggers unaligned memory accesses. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/unaligned.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c
index c520e551a165..95a2741f26f3 100644
--- a/arch/parisc/kernel/unaligned.c
+++ b/arch/parisc/kernel/unaligned.c
@@ -399,6 +399,13 @@ void handle_unaligned(struct pt_regs *regs)
if (!unaligned_enabled)
goto force_sigbus;
+ } else {
+ static DEFINE_RATELIMIT_STATE(kernel_ratelimit, 5 * HZ, 5);
+ if (!(current->thread.flags & PARISC_UAC_NOPRINT) &&
+ __ratelimit(&kernel_ratelimit))
+ pr_warn("Kernel: unaligned access to " RFMT " in %pS "
+ "(iir " RFMT ")\n",
+ regs->ior, (void *)regs->iaoq[0], regs->iir);
}
/* handle modification - OK, it's ugly, see the instruction manual */