Re: [PATCH v3] tracing: Export live module tracepoint strings in printk_formats

From: Cao Ruichuang

Date: Tue Sep 08 2026 - 01:20:12 EST


Hi Steven,

Gentle ping on this v3.

While rechecking the selftest, I found that the unload checks can miss a
failure: if the first test string remains in printk_formats but the
second is gone, the test still passes. The first negated grep returns
nonzero, but set -e does not terminate the script for a negated command.
I reproduced this with a fixture containing only the first string.

I would add explicit failure handling (|| exit_fail) to both checks.
Would you prefer a v4 with this correction?

I can also make the final rmmod failure fatal and add a comment explaining
that trace_bprintk_fmt_cnt counts permanently retained, unique formats
and therefore is not decremented on module unload.

The current test checks the exported mappings, but does not exercise the
new membership lookup through a TRACE_EVENT and the tp_printk path. I can
extend coverage there as well if you would like it included in v4.

Thanks,
Cao Ruichuang