Skip to content

Commit f945a40

Browse files
MaxKellermannhdeller
authored andcommitted
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 7d134b2 ("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 8858ac8 ("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>
1 parent 250f540 commit f945a40

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/parisc/include/asm/kprobes.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
#ifndef _PARISC_KPROBES_H
1111
#define _PARISC_KPROBES_H
1212

13+
#include <asm-generic/kprobes.h>
14+
1315
#ifdef CONFIG_KPROBES
1416

15-
#include <asm-generic/kprobes.h>
1617
#include <linux/types.h>
1718
#include <linux/ptrace.h>
1819
#include <linux/notifier.h>

0 commit comments

Comments
 (0)