On Wed, 23 Jul 2025 10:40:30 -0400 Steven Rostedt <[email protected]> wrote:
> On Tue, 15 Jul 2025 19:56:02 +0900 > "Masami Hiramatsu (Google)" <[email protected]> wrote: > > > +static void > > +trace_event_update_with_eval_map(struct module *mod, > > + struct trace_eval_map **start, > > + int len) > > { > > struct trace_eval_map **map; > > > > - if (len <= 0) > > - return; > > - > > map = start; > > > > - trace_event_eval_update(map, len); > > + /* This must run always for sanitizing. */ > > + trace_event_update_all(map, len); > > + > > + if (len <= 0) > > + return; > > > > trace_insert_eval_map_file(mod, start, len); > > } > > So this will add more work during boot up as it is processed on every > event regardless if it has an eval map or not. But this is only needed > if CONFIG_DEBUG_INFO_BTF=y and PAHOLE_HAS_BTF_TAG=y is enabled. Hmm, In this case can we check it in trace_event_update_all()? If we need to sanitize more word, it is easier to add a condition there. Or, maybe we can sanitize it while building the kernel as a part of post build process. Thanks, > > What about having this be: > > /* Always run sanitizer if PAHOLE_HAS_BTF_TAG is set */ > if (!IS_ENABLED(CONFIG_PAHOLE_HAS_BTF_TAG) && len <= 0) > return; > > map = start; > > trace_event_update_all(map, len); > > if (len <= 0) > return; > > trace_insert_eval_map_file(mod, start, len); > } > > -- Steve > -- Masami Hiramatsu (Google) <[email protected]>
