kprobes: port blacklist kprobes to linker table
kprobe makes use of two sections, the one dealing with the actual
kprobes was recently ported using the standard section range API.
The blacklist functionality of kprobes is still using a custom
section and declaring its custom section using the linker script
as follows:
type Linux-section custom section name begin end
table .init.data _kprobe_blacklist __start_kprobe_blacklist __stop_kprobe_blacklist
This ports the _kprobe_blacklist custom section to the standard
Linux linker table API allowing us remove all the custom blacklist
kprobe section declarations from the linker script.
This has been tested by trying to register a kprobe on a blacklisted
symbol (these are declared with NOKPROBE_SYMBOL()), and confirms that
this fails to work as expected. This was tested with:
# insmod samples/kprobes/kprobe_example.ko symbol="get_kprobe"
This fails to load as expected with:
insmod: ERROR: could not insert module samples/kprobes/kprobe_example.ko: Invalid parameters
v3: this patch was introduced in this series
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
4 files changed