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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 19 Mar 2024 14:03:29 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Alison Schofield <alison.schofield@...el.com>,
	Beau Belgrave <beaub@...ux.microsoft.com>,
	Huang Yiwei <quic_hyiwei@...cinc.com>,
	John Garry <john.g.garry@...cle.com>,
	Randy Dunlap <rdunlap@...radead.org>,
	Thorsten Blum <thorsten.blum@...lux.com>,
	Vincent Donnefort <vdonnefort@...gle.com>,
	linke li <lilinke99@...com>, llvm@...ts.linux.dev
Subject: Re: [GIT PULL v2] tracing: Updates for v6.9

On Tue, Mar 19, 2024 at 01:13:33PM -0400, Steven Rostedt wrote:
> On Tue, 19 Mar 2024 13:06:53 -0400
> Steven Rostedt <rostedt@...dmis.org> wrote:
> 
> > This is in the fast path (where the trace event happens), but I can make it
> > always do strcmp(), even though it will slow down what is being recorded,
> > as I plan on removing the parameter in the next merge window anyway.
> 
> I'll change it to this:
> 
> #define __assign_str(dst, src)						\
> 	do {								\
> 		char *__str__ = __get_str(dst);				\
> 		int __len__ = __get_dynamic_array_len(dst) - 1;		\
> 		WARN_ON_ONCE(!src != !__data_offsets.dst##_ptr_);	\
> 		WARN_ON_ONCE(src && strcmp((src), __data_offsets.dst##_ptr_)); \
> 		memcpy(__str__, __data_offsets.dst##_ptr_ ? :		\
> 		       EVENT_NULL_STR, __len__);			\
> 		__str__[__len__] = '\0';				\
> 	} while (0)
> 
> The first WARN_ON() will report the bug if src is not NULL and the pointer
> is even though the strcmp() will likely crash in that case. But that's a
> bug if that happens anyway.

For what it's worth, I applied that change and built ARCH=x86_64
defconfig with LLVM 18.1.1 from [1] but it does not appear to help the
instances of -Wstring-compare; in fact, it adds some additional warnings
that I have not seen before. I have attached the full build log.

[1]: https://mirrors.edge.kernel.org/pub/tools/llvm/

Cheers,
Nathan

View attachment "build.log" of type "text/plain" (206343 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ