Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'probes-fixes-v6.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull probes fixes from Masami Hiramatsu:

- fprobe: Even if there is a memory allocation failure, try to remove
the addresses recorded until then from the filter. Previously we just
skipped it.

- tracing: dynevent: Add a missing lockdown check on dynevent. This
dynevent is the interface for all probe events. Thus if there is no
check, any probe events can be added after lock down the tracefs.

* tag 'probes-fixes-v6.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tracing: dynevent: Add a missing lockdown check on dynevent
tracing: fprobe: Fix to remove recorded module addresses from filter

+8 -3
+4 -3
kernel/trace/fprobe.c
··· 428 428 { 429 429 unsigned long *addrs; 430 430 431 - if (alist->index >= alist->size) 432 - return -ENOMEM; 431 + /* Previously we failed to expand the list. */ 432 + if (alist->index == alist->size) 433 + return -ENOSPC; 433 434 434 435 alist->addrs[alist->index++] = addr; 435 436 if (alist->index < alist->size) ··· 490 489 for (i = 0; i < FPROBE_IP_TABLE_SIZE; i++) 491 490 fprobe_remove_node_in_module(mod, &fprobe_ip_table[i], &alist); 492 491 493 - if (alist.index < alist.size && alist.index > 0) 492 + if (alist.index > 0) 494 493 ftrace_set_filter_ips(&fprobe_graph_ops.ops, 495 494 alist.addrs, alist.index, 1, 0); 496 495 mutex_unlock(&fprobe_mutex);
+4
kernel/trace/trace_dynevent.c
··· 230 230 { 231 231 int ret; 232 232 233 + ret = security_locked_down(LOCKDOWN_TRACEFS); 234 + if (ret) 235 + return ret; 236 + 233 237 ret = tracing_check_open_get_tr(NULL); 234 238 if (ret) 235 239 return ret;