linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [for-linus][PATCH 0/5] tracing: Fixes for v6.16
@ 2025-06-03 17:11 Steven Rostedt
  2025-06-03 17:11 ` [for-linus][PATCH 1/5] ftrace: Fix UAF when lookup kallsym after ftrace disabled Steven Rostedt
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Steven Rostedt @ 2025-06-03 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton


tracing fixes:

- Fix UAF in module unload in ftrace when there's a bug in the module

  If a module is buggy and triggers ftrace_disable which is set when
  an anomaly is detected, when it gets unloaded it doesn't free
  the hooks into kallsyms, and when a kallsyms lookup is performed
  it may access the mod->modname field and crash via UAF.

  Fix this by still freeing the mod_maps that are attached to kallsyms
  on module unload regardless if ftrace_disable is set or not.

- Do not bother allocating mod_maps for kallsyms if ftrace_disable is set

- Remove unused trace events

  When a trace event or tracepoint is created but not used, it still
  creates the code and data structures needed for that trace event.
  This just wastes memory.

  A patch is being worked on to warn when a trace event is created but
  not used: https://lore.kernel.org/linux-trace-kernel/20250529130138.544ffec4@gandalf.local.home/

  Remove the trace events that are created but not used. This does not
  remove trace events that are created but are not used due configs
  not being set. That will be handled later.

  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/fixes

Head SHA1: 2adb87c9409e11e8bc6c56f8e1e253eb25a7d6ae


Steven Rostedt (3):
      xdp: Remove unused mem_return_failed event
      genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint
      fsdax: Remove unused trace events for dax insert mapping

Ye Bin (2):
      ftrace: Fix UAF when lookup kallsym after ftrace disabled
      ftrace: Don't allocate ftrace module map if ftrace is disabled

----
 include/trace/events/fs_dax.h     | 78 ---------------------------------------
 include/trace/events/irq_matrix.h |  8 ----
 include/trace/events/xdp.h        | 26 -------------
 kernel/trace/ftrace.c             | 13 +++++--
 4 files changed, 10 insertions(+), 115 deletions(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [for-linus][PATCH 1/5] ftrace: Fix UAF when lookup kallsym after ftrace disabled
  2025-06-03 17:11 [for-linus][PATCH 0/5] tracing: Fixes for v6.16 Steven Rostedt
@ 2025-06-03 17:11 ` Steven Rostedt
  2025-06-03 17:11 ` [for-linus][PATCH 2/5] ftrace: Dont allocate ftrace module map if ftrace is disabled Steven Rostedt
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2025-06-03 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	stable, Ye Bin

From: Ye Bin <yebin10@huawei.com>

The following issue happens with a buggy module:

BUG: unable to handle page fault for address: ffffffffc05d0218
PGD 1bd66f067 P4D 1bd66f067 PUD 1bd671067 PMD 101808067 PTE 0
Oops: Oops: 0000 [#1] SMP KASAN PTI
Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
RIP: 0010:sized_strscpy+0x81/0x2f0
RSP: 0018:ffff88812d76fa08 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffffc0601010 RCX: dffffc0000000000
RDX: 0000000000000038 RSI: dffffc0000000000 RDI: ffff88812608da2d
RBP: 8080808080808080 R08: ffff88812608da2d R09: ffff88812608da68
R10: ffff88812608d82d R11: ffff88812608d810 R12: 0000000000000038
R13: ffff88812608da2d R14: ffffffffc05d0218 R15: fefefefefefefeff
FS:  00007fef552de740(0000) GS:ffff8884251c7000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffc05d0218 CR3: 00000001146f0000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ftrace_mod_get_kallsym+0x1ac/0x590
 update_iter_mod+0x239/0x5b0
 s_next+0x5b/0xa0
 seq_read_iter+0x8c9/0x1070
 seq_read+0x249/0x3b0
 proc_reg_read+0x1b0/0x280
 vfs_read+0x17f/0x920
 ksys_read+0xf3/0x1c0
 do_syscall_64+0x5f/0x2e0
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

The above issue may happen as follows:
(1) Add kprobe tracepoint;
(2) insmod test.ko;
(3)  Module triggers ftrace disabled;
(4) rmmod test.ko;
(5) cat /proc/kallsyms; --> Will trigger UAF as test.ko already removed;
ftrace_mod_get_kallsym()
...
strscpy(module_name, mod_map->mod->name, MODULE_NAME_LEN);
...

The problem is when a module triggers an issue with ftrace and
sets ftrace_disable. The ftrace_disable is set when an anomaly is
discovered and to prevent any more damage, ftrace stops all text
modification. The issue that happened was that the ftrace_disable stops
more than just the text modification.

When a module is loaded, its init functions can also be traced. Because
kallsyms deletes the init functions after a module has loaded, ftrace
saves them when the module is loaded and function tracing is enabled. This
allows the output of the function trace to show the init function names
instead of just their raw memory addresses.

When a module is removed, ftrace_release_mod() is called, and if
ftrace_disable is set, it just returns without doing anything more. The
problem here is that it leaves the mod_list still around and if kallsyms
is called, it will call into this code and access the module memory that
has already been freed as it will return:

  strscpy(module_name, mod_map->mod->name, MODULE_NAME_LEN);

Where the "mod" no longer exists and triggers a UAF bug.

Link: https://lore.kernel.org/all/20250523135452.626d8dcd@gandalf.local.home/

Cc: stable@vger.kernel.org
Fixes: aba4b5c22cba ("ftrace: Save module init functions kallsyms symbols for tracing")
Link: https://lore.kernel.org/20250529111955.2349189-2-yebin@huaweicloud.com
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 kernel/trace/ftrace.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1af952cba48d..84fd2f8263fa 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -7438,9 +7438,10 @@ void ftrace_release_mod(struct module *mod)
 
 	mutex_lock(&ftrace_lock);
 
-	if (ftrace_disabled)
-		goto out_unlock;
-
+	/*
+	 * To avoid the UAF problem after the module is unloaded, the
+	 * 'mod_map' resource needs to be released unconditionally.
+	 */
 	list_for_each_entry_safe(mod_map, n, &ftrace_mod_maps, list) {
 		if (mod_map->mod == mod) {
 			list_del_rcu(&mod_map->list);
@@ -7449,6 +7450,9 @@ void ftrace_release_mod(struct module *mod)
 		}
 	}
 
+	if (ftrace_disabled)
+		goto out_unlock;
+
 	/*
 	 * Each module has its own ftrace_pages, remove
 	 * them from the list.
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [for-linus][PATCH 2/5] ftrace: Dont allocate ftrace module map if ftrace is disabled
  2025-06-03 17:11 [for-linus][PATCH 0/5] tracing: Fixes for v6.16 Steven Rostedt
  2025-06-03 17:11 ` [for-linus][PATCH 1/5] ftrace: Fix UAF when lookup kallsym after ftrace disabled Steven Rostedt
@ 2025-06-03 17:11 ` Steven Rostedt
  2025-06-03 17:11 ` [for-linus][PATCH 3/5] xdp: Remove unused mem_return_failed event Steven Rostedt
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2025-06-03 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Ye Bin

From: Ye Bin <yebin10@huawei.com>

If ftrace is disabled, it is meaningless to allocate a module map.
Add a check in allocate_ftrace_mod_map() to not allocate if ftrace is
disabled.

Link: https://lore.kernel.org/20250529111955.2349189-3-yebin@huaweicloud.com
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 kernel/trace/ftrace.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 84fd2f8263fa..a7291685902e 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -7631,6 +7631,9 @@ allocate_ftrace_mod_map(struct module *mod,
 {
 	struct ftrace_mod_map *mod_map;
 
+	if (ftrace_disabled)
+		return NULL;
+
 	mod_map = kmalloc(sizeof(*mod_map), GFP_KERNEL);
 	if (!mod_map)
 		return NULL;
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [for-linus][PATCH 3/5] xdp: Remove unused mem_return_failed event
  2025-06-03 17:11 [for-linus][PATCH 0/5] tracing: Fixes for v6.16 Steven Rostedt
  2025-06-03 17:11 ` [for-linus][PATCH 1/5] ftrace: Fix UAF when lookup kallsym after ftrace disabled Steven Rostedt
  2025-06-03 17:11 ` [for-linus][PATCH 2/5] ftrace: Dont allocate ftrace module map if ftrace is disabled Steven Rostedt
@ 2025-06-03 17:11 ` Steven Rostedt
  2025-06-05 14:27   ` John Fastabend
  2025-06-03 17:11 ` [for-linus][PATCH 4/5] genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint Steven Rostedt
  2025-06-03 17:11 ` [for-linus][PATCH 5/5] fsdax: Remove unused trace events for dax insert mapping Steven Rostedt
  4 siblings, 1 reply; 9+ messages in thread
From: Steven Rostedt @ 2025-06-03 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	netdev, Jonathan Lemon, Jesper Dangaard Brouer, Jakub Kicinski

From: Steven Rostedt <rostedt@goodmis.org>

The change to allow page_pool to handle its own page destruction instead
of relying on XDP removed the trace_mem_return_failed() tracepoint caller,
but did not remove the mem_return_failed trace event. As trace events take
up memory when they are created regardless of if they are used or not,
having this unused event around wastes around 5K of memory.

Remove the unused event.

Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/

Cc: netdev <netdev@vger.kernel.org>
Cc: Jonathan Lemon <jonathan.lemon@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/20250529160550.1f888b15@gandalf.local.home
Fixes: c3f812cea0d7 ("page_pool: do not release pool until inflight == 0.")
Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 include/trace/events/xdp.h | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
index a7e5452b5d21..d3ef86c97ae3 100644
--- a/include/trace/events/xdp.h
+++ b/include/trace/events/xdp.h
@@ -379,32 +379,6 @@ TRACE_EVENT(mem_connect,
 	)
 );
 
-TRACE_EVENT(mem_return_failed,
-
-	TP_PROTO(const struct xdp_mem_info *mem,
-		 const struct page *page),
-
-	TP_ARGS(mem, page),
-
-	TP_STRUCT__entry(
-		__field(const struct page *,	page)
-		__field(u32,		mem_id)
-		__field(u32,		mem_type)
-	),
-
-	TP_fast_assign(
-		__entry->page		= page;
-		__entry->mem_id		= mem->id;
-		__entry->mem_type	= mem->type;
-	),
-
-	TP_printk("mem_id=%d mem_type=%s page=%p",
-		  __entry->mem_id,
-		  __print_symbolic(__entry->mem_type, __MEM_TYPE_SYM_TAB),
-		  __entry->page
-	)
-);
-
 TRACE_EVENT(bpf_xdp_link_attach_failed,
 
 	TP_PROTO(const char *msg),
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [for-linus][PATCH 4/5] genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint
  2025-06-03 17:11 [for-linus][PATCH 0/5] tracing: Fixes for v6.16 Steven Rostedt
                   ` (2 preceding siblings ...)
  2025-06-03 17:11 ` [for-linus][PATCH 3/5] xdp: Remove unused mem_return_failed event Steven Rostedt
@ 2025-06-03 17:11 ` Steven Rostedt
  2025-06-03 17:11 ` [for-linus][PATCH 5/5] fsdax: Remove unused trace events for dax insert mapping Steven Rostedt
  4 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2025-06-03 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Juergen Gross, Thomas Gleixner

From: Steven Rostedt <rostedt@goodmis.org>

The tracepoint irq_matrix_alloc_reserved was added but never used.
Remove it.

Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/

Cc: Juergen Gross <jgross@suse.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/20250529135739.26e5c075@gandalf.local.home
Fixes: ec0f7cd273dc4 ("genirq/matrix: Add tracepoints")
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 include/trace/events/irq_matrix.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/include/trace/events/irq_matrix.h b/include/trace/events/irq_matrix.h
index 267d4cbbf360..93244078b4e6 100644
--- a/include/trace/events/irq_matrix.h
+++ b/include/trace/events/irq_matrix.h
@@ -138,14 +138,6 @@ DEFINE_EVENT(irq_matrix_global_update, irq_matrix_assign_system,
 	TP_ARGS(bit, matrix)
 );
 
-DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_reserved,
-
-	TP_PROTO(int bit, unsigned int cpu,
-		 struct irq_matrix *matrix, struct cpumap *cmap),
-
-	TP_ARGS(bit, cpu, matrix, cmap)
-);
-
 DEFINE_EVENT(irq_matrix_cpu, irq_matrix_reserve_managed,
 
 	TP_PROTO(int bit, unsigned int cpu,
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [for-linus][PATCH 5/5] fsdax: Remove unused trace events for dax insert mapping
  2025-06-03 17:11 [for-linus][PATCH 0/5] tracing: Fixes for v6.16 Steven Rostedt
                   ` (3 preceding siblings ...)
  2025-06-03 17:11 ` [for-linus][PATCH 4/5] genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint Steven Rostedt
@ 2025-06-03 17:11 ` Steven Rostedt
  2025-06-03 18:13   ` Dan Williams
  4 siblings, 1 reply; 9+ messages in thread
From: Steven Rostedt @ 2025-06-03 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Dan Williams, Shiyang Ruan, Darrick J. Wong, Ross Zwisler,
	Alison Schofield

From: Steven Rostedt <rostedt@goodmis.org>

When the dax_fault_actor() helper was factored out, it removed the calls
to the dax_pmd_insert_mapping and dax_insert_mapping events but never
removed the events themselves. As each event created takes up memory
(roughly 5K each), this is a waste as it is never used.

Remove the unused dax_pmd_insert_mapping and dax_insert_mapping trace
events.

Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/

Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: Ross Zwisler <zwisler@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/20250529152211.688800c9@gandalf.local.home
Fixes: c2436190e492 ("fsdax: factor out a dax_fault_actor() helper")
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 include/trace/events/fs_dax.h | 78 -----------------------------------
 1 file changed, 78 deletions(-)

diff --git a/include/trace/events/fs_dax.h b/include/trace/events/fs_dax.h
index 86fe6aecff1e..76b56f78abb0 100644
--- a/include/trace/events/fs_dax.h
+++ b/include/trace/events/fs_dax.h
@@ -102,54 +102,6 @@ DEFINE_EVENT(dax_pmd_load_hole_class, name, \
 DEFINE_PMD_LOAD_HOLE_EVENT(dax_pmd_load_hole);
 DEFINE_PMD_LOAD_HOLE_EVENT(dax_pmd_load_hole_fallback);
 
-DECLARE_EVENT_CLASS(dax_pmd_insert_mapping_class,
-	TP_PROTO(struct inode *inode, struct vm_fault *vmf,
-		long length, pfn_t pfn, void *radix_entry),
-	TP_ARGS(inode, vmf, length, pfn, radix_entry),
-	TP_STRUCT__entry(
-		__field(unsigned long, ino)
-		__field(unsigned long, vm_flags)
-		__field(unsigned long, address)
-		__field(long, length)
-		__field(u64, pfn_val)
-		__field(void *, radix_entry)
-		__field(dev_t, dev)
-		__field(int, write)
-	),
-	TP_fast_assign(
-		__entry->dev = inode->i_sb->s_dev;
-		__entry->ino = inode->i_ino;
-		__entry->vm_flags = vmf->vma->vm_flags;
-		__entry->address = vmf->address;
-		__entry->write = vmf->flags & FAULT_FLAG_WRITE;
-		__entry->length = length;
-		__entry->pfn_val = pfn.val;
-		__entry->radix_entry = radix_entry;
-	),
-	TP_printk("dev %d:%d ino %#lx %s %s address %#lx length %#lx "
-			"pfn %#llx %s radix_entry %#lx",
-		MAJOR(__entry->dev),
-		MINOR(__entry->dev),
-		__entry->ino,
-		__entry->vm_flags & VM_SHARED ? "shared" : "private",
-		__entry->write ? "write" : "read",
-		__entry->address,
-		__entry->length,
-		__entry->pfn_val & ~PFN_FLAGS_MASK,
-		__print_flags_u64(__entry->pfn_val & PFN_FLAGS_MASK, "|",
-			PFN_FLAGS_TRACE),
-		(unsigned long)__entry->radix_entry
-	)
-)
-
-#define DEFINE_PMD_INSERT_MAPPING_EVENT(name) \
-DEFINE_EVENT(dax_pmd_insert_mapping_class, name, \
-	TP_PROTO(struct inode *inode, struct vm_fault *vmf, \
-		long length, pfn_t pfn, void *radix_entry), \
-	TP_ARGS(inode, vmf, length, pfn, radix_entry))
-
-DEFINE_PMD_INSERT_MAPPING_EVENT(dax_pmd_insert_mapping);
-
 DECLARE_EVENT_CLASS(dax_pte_fault_class,
 	TP_PROTO(struct inode *inode, struct vm_fault *vmf, int result),
 	TP_ARGS(inode, vmf, result),
@@ -194,36 +146,6 @@ DEFINE_PTE_FAULT_EVENT(dax_load_hole);
 DEFINE_PTE_FAULT_EVENT(dax_insert_pfn_mkwrite_no_entry);
 DEFINE_PTE_FAULT_EVENT(dax_insert_pfn_mkwrite);
 
-TRACE_EVENT(dax_insert_mapping,
-	TP_PROTO(struct inode *inode, struct vm_fault *vmf, void *radix_entry),
-	TP_ARGS(inode, vmf, radix_entry),
-	TP_STRUCT__entry(
-		__field(unsigned long, ino)
-		__field(unsigned long, vm_flags)
-		__field(unsigned long, address)
-		__field(void *, radix_entry)
-		__field(dev_t, dev)
-		__field(int, write)
-	),
-	TP_fast_assign(
-		__entry->dev = inode->i_sb->s_dev;
-		__entry->ino = inode->i_ino;
-		__entry->vm_flags = vmf->vma->vm_flags;
-		__entry->address = vmf->address;
-		__entry->write = vmf->flags & FAULT_FLAG_WRITE;
-		__entry->radix_entry = radix_entry;
-	),
-	TP_printk("dev %d:%d ino %#lx %s %s address %#lx radix_entry %#lx",
-		MAJOR(__entry->dev),
-		MINOR(__entry->dev),
-		__entry->ino,
-		__entry->vm_flags & VM_SHARED ? "shared" : "private",
-		__entry->write ? "write" : "read",
-		__entry->address,
-		(unsigned long)__entry->radix_entry
-	)
-)
-
 DECLARE_EVENT_CLASS(dax_writeback_range_class,
 	TP_PROTO(struct inode *inode, pgoff_t start_index, pgoff_t end_index),
 	TP_ARGS(inode, start_index, end_index),
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [for-linus][PATCH 5/5] fsdax: Remove unused trace events for dax insert mapping
  2025-06-03 17:11 ` [for-linus][PATCH 5/5] fsdax: Remove unused trace events for dax insert mapping Steven Rostedt
@ 2025-06-03 18:13   ` Dan Williams
  2025-06-03 19:19     ` Steven Rostedt
  0 siblings, 1 reply; 9+ messages in thread
From: Dan Williams @ 2025-06-03 18:13 UTC (permalink / raw)
  To: Steven Rostedt, linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Dan Williams, Shiyang Ruan, Darrick J. Wong, Ross Zwisler,
	Alison Schofield

Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
> 
> When the dax_fault_actor() helper was factored out, it removed the calls
> to the dax_pmd_insert_mapping and dax_insert_mapping events but never
> removed the events themselves. As each event created takes up memory
> (roughly 5K each), this is a waste as it is never used.
> 
> Remove the unused dax_pmd_insert_mapping and dax_insert_mapping trace
> events.
> 
> Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/
> 
> Cc: Dan Williams <dan.j.williams@intel.com>

Acked-by: Dan Williams <dan.j.williams@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [for-linus][PATCH 5/5] fsdax: Remove unused trace events for dax insert mapping
  2025-06-03 18:13   ` Dan Williams
@ 2025-06-03 19:19     ` Steven Rostedt
  0 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2025-06-03 19:19 UTC (permalink / raw)
  To: Dan Williams
  Cc: linux-kernel, Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers,
	Andrew Morton, Shiyang Ruan, Darrick J. Wong, Ross Zwisler,
	Alison Schofield

On Tue, 3 Jun 2025 11:13:58 -0700
Dan Williams <dan.j.williams@intel.com> wrote:

> Steven Rostedt wrote:
> > From: Steven Rostedt <rostedt@goodmis.org>
> > 
> > When the dax_fault_actor() helper was factored out, it removed the calls
> > to the dax_pmd_insert_mapping and dax_insert_mapping events but never
> > removed the events themselves. As each event created takes up memory
> > (roughly 5K each), this is a waste as it is never used.
> > 
> > Remove the unused dax_pmd_insert_mapping and dax_insert_mapping trace
> > events.
> > 
> > Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/
> > 
> > Cc: Dan Williams <dan.j.williams@intel.com>  
> 
> Acked-by: Dan Williams <dan.j.williams@intel.com>

Thanks!

-- Steve

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [for-linus][PATCH 3/5] xdp: Remove unused mem_return_failed event
  2025-06-03 17:11 ` [for-linus][PATCH 3/5] xdp: Remove unused mem_return_failed event Steven Rostedt
@ 2025-06-05 14:27   ` John Fastabend
  0 siblings, 0 replies; 9+ messages in thread
From: John Fastabend @ 2025-06-05 14:27 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers,
	Andrew Morton, netdev, Jonathan Lemon, Jesper Dangaard Brouer,
	Jakub Kicinski

On 2025-06-03 13:11:52, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
> 
> The change to allow page_pool to handle its own page destruction instead
> of relying on XDP removed the trace_mem_return_failed() tracepoint caller,
> but did not remove the mem_return_failed trace event. As trace events take
> up memory when they are created regardless of if they are used or not,
> having this unused event around wastes around 5K of memory.
> 
> Remove the unused event.
> 
> Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/
> 
> Cc: netdev <netdev@vger.kernel.org>
> Cc: Jonathan Lemon <jonathan.lemon@gmail.com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Link: https://lore.kernel.org/20250529160550.1f888b15@gandalf.local.home
> Fixes: c3f812cea0d7 ("page_pool: do not release pool until inflight == 0.")
> Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
> Acked-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
>  include/trace/events/xdp.h | 26 --------------------------
>  1 file changed, 26 deletions(-)

Reviewed-by: John Fastabend <john.fastabend@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-05 14:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03 17:11 [for-linus][PATCH 0/5] tracing: Fixes for v6.16 Steven Rostedt
2025-06-03 17:11 ` [for-linus][PATCH 1/5] ftrace: Fix UAF when lookup kallsym after ftrace disabled Steven Rostedt
2025-06-03 17:11 ` [for-linus][PATCH 2/5] ftrace: Dont allocate ftrace module map if ftrace is disabled Steven Rostedt
2025-06-03 17:11 ` [for-linus][PATCH 3/5] xdp: Remove unused mem_return_failed event Steven Rostedt
2025-06-05 14:27   ` John Fastabend
2025-06-03 17:11 ` [for-linus][PATCH 4/5] genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint Steven Rostedt
2025-06-03 17:11 ` [for-linus][PATCH 5/5] fsdax: Remove unused trace events for dax insert mapping Steven Rostedt
2025-06-03 18:13   ` Dan Williams
2025-06-03 19:19     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).