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]
Message-ID: <20250327124141.GC31358@noisy.programming.kicks-ass.net>
Date: Thu, 27 Mar 2025 13:41:41 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 4/5] bugs/x86: Augment warnings output by concatenating
 'cond_str' with the regular __FILE__ string in _BUG_FLAGS()

On Thu, Mar 27, 2025 at 10:36:32AM +0100, Ingo Molnar wrote:

> > > diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
> > > index aff1c6b7a7f3..e966199c8ef7 100644
> > > --- a/arch/x86/include/asm/bug.h
> > > +++ b/arch/x86/include/asm/bug.h
> > > @@ -50,7 +50,7 @@ do {									\
> > >  		     "\t.org 2b+%c3\n"					\
> > >  		     ".popsection\n"					\
> > >  		     extra						\
> > > -		     : : "i" (__FILE__), "i" (__LINE__),		\
> > > +		     : : "i" (cond_str __FILE__), "i" (__LINE__),		\
> > >  			 "i" (flags),					\
> > >  			 "i" (sizeof(struct bug_entry)));		\
> > >  } while (0)
> > 
> > Sneaky :-)
> 
> BTW., any reason why we go all the trouble with the bug_entry::line u16 
> number, instead of storing it in the bug_entry::file string with a
> :__LINE__ postfix or so?

I have no clue; this is well before my time. But yes, that seems a
viable option indeed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ