linux-next/arch/s390
Vasily Gorbik 45c9f2b856 s390/entry: Mark IRQ entries to fix stack depot warnings
The stack depot filters out everything outside of the top interrupt
context as an uninteresting or irrelevant part of the stack traces. This
helps with stack trace de-duplication, avoiding an explosion of saved
stack traces that share the same IRQ context code path but originate
from different randomly interrupted points, eventually exhausting the
stack depot.

Filtering uses in_irqentry_text() to identify functions within the
.irqentry.text and .softirqentry.text sections, which then become the
last stack trace entries being saved.

While __do_softirq() is placed into the .softirqentry.text section by
common code, populating .irqentry.text is architecture-specific.

Currently, the .irqentry.text section on s390 is empty, which prevents
stack depot filtering and de-duplication and could result in warnings
like:

Stack depot reached limit capacity
WARNING: CPU: 0 PID: 286113 at lib/stackdepot.c:252 depot_alloc_stack+0x39a/0x3c8

with PREEMPT and KASAN enabled.

Fix this by moving the IO/EXT interrupt handlers from .kprobes.text into
the .irqentry.text section and updating the kprobes blacklist to include
the .irqentry.text section.

This is done only for asynchronous interrupts and explicitly not for
program checks, which are synchronous and where the context beyond the
program check is important to preserve. Despite machine checks being
somewhat in between, they are extremely rare, and preserving context
when possible is also of value.

SVCs and Restart Interrupts are not relevant, one being always at the
boundary to user space and the other being a one-time thing.

IRQ entries filtering is also optionally used in ftrace function graph,
where the same logic applies.

Cc: stable@vger.kernel.org # 5.15+
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2024-11-21 12:44:07 +01:00
..
appldata sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
boot s390/boot/physmem: Convert to use flag output macros 2024-11-13 14:31:33 +01:00
configs s390 updates for 6.13 merge window 2024-11-18 17:45:41 -08:00
crypto s390/crypto: Add hardware acceleration for full AES-XTS mode 2024-10-29 11:17:19 +01:00
hypfs [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
include s390/mm: Remove bogus comment in __tlb_flush_mm() 2024-11-21 12:44:06 +01:00
kernel s390/entry: Mark IRQ entries to fix stack depot warnings 2024-11-21 12:44:07 +01:00
kvm s390 updates for 6.13 merge window 2024-11-18 17:45:41 -08:00
lib s390/string: Convert to use flag output macros 2024-11-13 14:31:33 +01:00
mm s390/extmem: Convert to use flag output macros 2024-11-13 14:31:33 +01:00
net s390/bpf: Implement exceptions 2024-07-08 16:39:35 +02:00
pci s390 updates for 6.13 merge window 2024-11-18 17:45:41 -08:00
purgatory s390: Fix various typos 2024-10-25 16:03:23 +02:00
tools s390 updates for 6.12 merge window 2024-09-21 09:02:54 -07:00
Kbuild - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
Kconfig s390 updates for 6.13 merge window 2024-11-18 17:45:41 -08:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390: use a larger stack for KMSAN 2024-07-03 19:30:24 -07:00
Makefile.postlink s390/build: Avoid relocation information in final vmlinux 2024-08-27 20:16:48 +02:00