parisc/kprobes: always include asm-generic/kprobes.h
authorMax Kellermann <max.kellermann@ionos.com>
Sun, 11 Feb 2024 23:09:45 +0000 (00:09 +0100)
committerHelge Deller <deller@gmx.de>
Fri, 16 Feb 2024 19:18:03 +0000 (20:18 +0100)
commitf945a404ed8a6eeb9907ef122a8382df56c2a714
treee579e9137668c6a3f8a6add69dc643cc7b5465c2
parent250f5402e636a5cec9e0e95df252c3d54307210f
parisc/kprobes: always include asm-generic/kprobes.h

The NOKPROBE_SYMBOL macro (and others) were moved to
asm-generic/kprobes.h in 2017 by commit 7d134b2ce639 ("kprobes: move
kprobe declarations to asm-generic/kprobes.h"), and this new header
was included by asm/kprobes.h unconditionally on all architectures.

When kprobe support was added to parisc in 2017 by commit
8858ac8e9e9b1 ("parisc: Implement kprobes"), that header was only
included when CONFIG_KPROBES was enabled.

This can lead to build failures when NOKPROBE_SYMBOL is used, but
CONFIG_KPROBES is disabled.  This mistake however was never actually
noticed because linux/kprobes.h also includes asm-generic/kprobes.h
(though I do not understand why that is, because it also includes
asm/kprobes.h).

To prevent eventual build failures, I suggest to always include
asm-generic/kprobes.h on parisc, just like all the other architectures
do.  This way, including asm/kprobes.h suffices, and nobody (outside
of arch/) ever needs to explicitly include asm-generic/kprobes.h.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/include/asm/kprobes.h