Revision 297f9233b53a08fd457815e19f1d6f2c3389857b authored by Jessica Yu on 09 January 2018, 23:51:24 UTC, committed by Ingo Molnar on 16 February 2018, 08:12:58 UTC
Improve error handling when disarming ftrace-based kprobes. Like with arm_kprobe_ftrace(), propagate any errors from disarm_kprobe_ftrace() so that we do not disable/unregister kprobes that are still armed. In other words, unregister_kprobe() and disable_kprobe() should not report success if the kprobe could not be disarmed. disarm_all_kprobes() keeps its current behavior and attempts to disarm all kprobes. It returns the last encountered error and gives a warning if not all probes could be disarmed. This patch is based on Petr Mladek's original patchset (patches 2 and 3) back in 2015, which improved kprobes error handling, found here: https://lkml.org/lkml/2015/2/26/452 However, further work on this had been paused since then and the patches were not upstreamed. Based-on-patches-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Jessica Yu <jeyu@kernel.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Cc: David S . Miller <davem@davemloft.net> Cc: Jiri Kosina <jikos@kernel.org> Cc: Joe Lawrence <joe.lawrence@redhat.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Miroslav Benes <mbenes@suse.cz> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Petr Mladek <pmladek@suse.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/20180109235124.30886-3-jeyu@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 12310e3
File | Mode | Size |
---|---|---|
bpf | ||
cgroup | ||
configs | ||
debug | ||
events | ||
gcov | ||
irq | ||
livepatch | ||
locking | ||
power | ||
printk | ||
rcu | ||
sched | ||
time | ||
trace | ||
.gitignore | -rw-r--r-- | 69 bytes |
Kconfig.freezer | -rw-r--r-- | 52 bytes |
Kconfig.hz | -rw-r--r-- | 1.6 KB |
Kconfig.locks | -rw-r--r-- | 4.8 KB |
Kconfig.preempt | -rw-r--r-- | 2.1 KB |
Makefile | -rw-r--r-- | 4.0 KB |
acct.c | -rw-r--r-- | 15.4 KB |
async.c | -rw-r--r-- | 10.1 KB |
audit.c | -rw-r--r-- | 61.6 KB |
audit.h | -rw-r--r-- | 11.0 KB |
audit_fsnotify.c | -rw-r--r-- | 6.1 KB |
audit_tree.c | -rw-r--r-- | 23.9 KB |
audit_watch.c | -rw-r--r-- | 14.6 KB |
auditfilter.c | -rw-r--r-- | 34.3 KB |
auditsc.c | -rw-r--r-- | 66.0 KB |
backtracetest.c | -rw-r--r-- | 2.1 KB |
bounds.c | -rw-r--r-- | 739 bytes |
capability.c | -rw-r--r-- | 13.9 KB |
compat.c | -rw-r--r-- | 15.7 KB |
configs.c | -rw-r--r-- | 2.8 KB |
context_tracking.c | -rw-r--r-- | 6.3 KB |
cpu.c | -rw-r--r-- | 48.1 KB |
cpu_pm.c | -rw-r--r-- | 6.0 KB |
crash_core.c | -rw-r--r-- | 11.3 KB |
crash_dump.c | -rw-r--r-- | 1.3 KB |
cred.c | -rw-r--r-- | 21.5 KB |
delayacct.c | -rw-r--r-- | 4.6 KB |
dma.c | -rw-r--r-- | 3.6 KB |
elfcore.c | -rw-r--r-- | 432 bytes |
exec_domain.c | -rw-r--r-- | 1.4 KB |
exit.c | -rw-r--r-- | 44.3 KB |
extable.c | -rw-r--r-- | 4.8 KB |
fail_function.c | -rw-r--r-- | 7.0 KB |
fork.c | -rw-r--r-- | 60.4 KB |
freezer.c | -rw-r--r-- | 4.4 KB |
futex.c | -rw-r--r-- | 97.4 KB |
futex_compat.c | -rw-r--r-- | 4.5 KB |
groups.c | -rw-r--r-- | 4.9 KB |
hung_task.c | -rw-r--r-- | 6.2 KB |
irq_work.c | -rw-r--r-- | 4.4 KB |
jump_label.c | -rw-r--r-- | 19.3 KB |
kallsyms.c | -rw-r--r-- | 17.0 KB |
kcmp.c | -rw-r--r-- | 5.7 KB |
kcov.c | -rw-r--r-- | 10.6 KB |
kexec.c | -rw-r--r-- | 7.0 KB |
kexec_core.c | -rw-r--r-- | 30.8 KB |
kexec_file.c | -rw-r--r-- | 25.4 KB |
kexec_internal.h | -rw-r--r-- | 924 bytes |
kmod.c | -rw-r--r-- | 5.0 KB |
kprobes.c | -rw-r--r-- | 64.3 KB |
ksysfs.c | -rw-r--r-- | 6.3 KB |
kthread.c | -rw-r--r-- | 33.3 KB |
latencytop.c | -rw-r--r-- | 7.9 KB |
memremap.c | -rw-r--r-- | 14.2 KB |
module-internal.h | -rw-r--r-- | 458 bytes |
module.c | -rw-r--r-- | 111.5 KB |
module_signing.c | -rw-r--r-- | 2.2 KB |
notifier.c | -rw-r--r-- | 16.3 KB |
nsproxy.c | -rw-r--r-- | 6.5 KB |
padata.c | -rw-r--r-- | 27.1 KB |
panic.c | -rw-r--r-- | 17.0 KB |
params.c | -rw-r--r-- | 23.2 KB |
pid.c | -rw-r--r-- | 11.1 KB |
pid_namespace.c | -rw-r--r-- | 11.6 KB |
profile.c | -rw-r--r-- | 14.8 KB |
ptrace.c | -rw-r--r-- | 32.4 KB |
range.c | -rw-r--r-- | 3.0 KB |
reboot.c | -rw-r--r-- | 13.8 KB |
relay.c | -rw-r--r-- | 32.1 KB |
resource.c | -rw-r--r-- | 40.2 KB |
seccomp.c | -rw-r--r-- | 32.5 KB |
signal.c | -rw-r--r-- | 103.6 KB |
smp.c | -rw-r--r-- | 21.3 KB |
smpboot.c | -rw-r--r-- | 13.1 KB |
smpboot.h | -rw-r--r-- | 640 bytes |
softirq.c | -rw-r--r-- | 18.8 KB |
stacktrace.c | -rw-r--r-- | 1.8 KB |
stop_machine.c | -rw-r--r-- | 17.1 KB |
sys.c | -rw-r--r-- | 60.6 KB |
sys_ni.c | -rw-r--r-- | 7.3 KB |
sysctl.c | -rw-r--r-- | 73.6 KB |
sysctl_binary.c | -rw-r--r-- | 51.0 KB |
task_work.c | -rw-r--r-- | 3.1 KB |
taskstats.c | -rw-r--r-- | 15.4 KB |
test_kprobes.c | -rw-r--r-- | 7.9 KB |
torture.c | -rw-r--r-- | 21.0 KB |
tracepoint.c | -rw-r--r-- | 14.6 KB |
tsacct.c | -rw-r--r-- | 5.1 KB |
ucount.c | -rw-r--r-- | 5.7 KB |
uid16.c | -rw-r--r-- | 5.0 KB |
umh.c | -rw-r--r-- | 15.2 KB |
up.c | -rw-r--r-- | 2.0 KB |
user-return-notifier.c | -rw-r--r-- | 1.3 KB |
user.c | -rw-r--r-- | 5.4 KB |
user_namespace.c | -rw-r--r-- | 33.3 KB |
utsname.c | -rw-r--r-- | 3.6 KB |
utsname_sysctl.c | -rw-r--r-- | 3.0 KB |
watchdog.c | -rw-r--r-- | 21.7 KB |
watchdog_hld.c | -rw-r--r-- | 7.7 KB |
workqueue.c | -rw-r--r-- | 156.3 KB |
workqueue_internal.h | -rw-r--r-- | 2.3 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...