lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251021155746.7623b0f4@gandalf.local.home>
Date: Tue, 21 Oct 2025 15:57:46 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Steven Rostedt <rostedt@...nel.org>, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org, Masami
 Hiramatsu <mhiramat@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Andrew Morton
 <akpm@...ux-foundation.org>, Arnd Bergmann <arnd@...db.de>, Masahiro Yamada
 <masahiroy@...nel.org>, Nicolas Schier <nicolas.schier@...ux.dev>, Nick
 Desaulniers <nick.desaulniers+lkml@...il.com>, Catalin Marinas
 <catalin.marinas@....com>, Linus Torvalds <torvalds@...ux-foundation.org>,
 Randy Dunlap <rdunlap@...radead.org>, Stephen Rothwell
 <sfr@...b.auug.org.au>
Subject: Re: [PATCH v9 4/4] tracing: Add warnings for unused tracepoints for
 modules

On Wed, 15 Oct 2025 16:19:28 -0700
Nathan Chancellor <nathan@...nel.org> wrote:

> Hi Steve,
> 
> On Wed, Oct 15, 2025 at 04:38:46PM -0400, Steven Rostedt wrote:
> > diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal
> > index 542ba462ed3e..6f909979af91 100644
> > --- a/scripts/Makefile.modfinal
> > +++ b/scripts/Makefile.modfinal
> > @@ -28,6 +28,12 @@ ccflags-remove-y := $(CC_FLAGS_CFI)
> >  .module-common.o: $(srctree)/scripts/module-common.c FORCE
> >  	$(call if_changed_rule,cc_o_c)
> >  
> > +ifneq ($(WARN_ON_UNUSED_TRACEPOINTS),"")  
> 
> Drop the "", nowhere else in Kbuild appears to do this.
> 
> > +cmd_check_tracepoint = ${objtree}/scripts/tracepoint-update $<;  
> 
> Please use $(objtree) to be consistent with the rest of Kbuild.

OK for both.

> 
> > +else
> > +cmd_check_tracepoint =
> > +endif
> > +
> >  quiet_cmd_ld_ko_o = LD [M]  $@
> >        cmd_ld_ko_o =							\
> >  	$(LD) -r $(KBUILD_LDFLAGS)					\
> > @@ -57,6 +63,7 @@ if_changed_except = $(if $(call newer_prereqs_except,$(2))$(cmd-check),      \
> >  ifdef CONFIG_DEBUG_INFO_BTF_MODULES
> >  	+$(if $(newer-prereqs),$(call cmd,btf_ko))
> >  endif
> > +	+$(call cmd,check_tracepoint)
> >  
> >  targets += $(modules:%.o=%.ko) $(modules:%.o=%.mod.o) .module-common.o
> >  
> > diff --git a/scripts/tracepoint-update.c b/scripts/tracepoint-update.c
> > index 6ec30f39d0ad..7e068de9c7f1 100644
> > --- a/scripts/tracepoint-update.c
> > +++ b/scripts/tracepoint-update.c
> > @@ -188,6 +188,13 @@ static int process_tracepoints(void *addr, char const *const fname)
> >  		}
> >  	}
> >  
> > +	/*
> > +	 * Modules may not have either section. But if it has one section,
> > +	 * it should have both of them.
> > +	 */
> > +	if (!check_data_sec && !tracepoint_data_sec)
> > +		return 0;
> > +  
> 
> This feels like it could be its own patch but I guess it does not make
> much sense without enablement. It might be worth calling this out a bit
> more in the commit message.
> 

It was found during debugging. I could make this a separate patch in
preparation for this patch.

-- Steve



> >  	if (!check_data_sec) {
> >  		fprintf(stderr,	"no __tracepoint_check in file: %s\n", fname);
> >  		return -1;
> > -- 
> > 2.51.0
> > 
> >   


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ