Commit bf40f4b8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'probes-fixes-v6.17-rc7' of...

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
parents d0ca0df1 456c32e3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -428,8 +428,9 @@ static int fprobe_addr_list_add(struct fprobe_addr_list *alist, unsigned long ad
{
	unsigned long *addrs;

	if (alist->index >= alist->size)
		return -ENOMEM;
	/* Previously we failed to expand the list. */
	if (alist->index == alist->size)
		return -ENOSPC;

	alist->addrs[alist->index++] = addr;
	if (alist->index < alist->size)
@@ -489,7 +490,7 @@ static int fprobe_module_callback(struct notifier_block *nb,
	for (i = 0; i < FPROBE_IP_TABLE_SIZE; i++)
		fprobe_remove_node_in_module(mod, &fprobe_ip_table[i], &alist);

	if (alist.index < alist.size && alist.index > 0)
	if (alist.index > 0)
		ftrace_set_filter_ips(&fprobe_graph_ops.ops,
				      alist.addrs, alist.index, 1, 0);
	mutex_unlock(&fprobe_mutex);
+4 −0
Original line number Diff line number Diff line
@@ -230,6 +230,10 @@ static int dyn_event_open(struct inode *inode, struct file *file)
{
	int ret;

	ret = security_locked_down(LOCKDOWN_TRACEFS);
	if (ret)
		return ret;

	ret = tracing_check_open_get_tr(NULL);
	if (ret)
		return ret;