]> git.baikalelectronics.ru Git - kernel.git/commit
add infrastructure for tagging functions as error injectable
authorJosef Bacik <jbacik@fb.com>
Mon, 11 Dec 2017 16:36:46 +0000 (11:36 -0500)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 12 Dec 2017 16:56:26 +0000 (08:56 -0800)
commitaa015fc0fbdc3b2d3199697e083b359d2a0a469e
treef228d246aabb6d72e09d97684ff9a6ac6768c50a
parentc533e9c981aac706d9cc92c6c42b7eebc1d30526
add infrastructure for tagging functions as error injectable

Using BPF we can override kprob'ed functions and return arbitrary
values.  Obviously this can be a bit unsafe, so make this feature opt-in
for functions.  Simply tag a function with KPROBE_ERROR_INJECT_SYMBOL in
order to give BPF access to that function for error injection purposes.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/asm-generic/vmlinux.lds.h
include/linux/bpf.h
include/linux/kprobes.h
include/linux/module.h
kernel/kprobes.c
kernel/module.c