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: <20241003141221.GT5594@noisy.programming.kicks-ass.net>
Date: Thu, 3 Oct 2024 16:12:21 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@...el.com>,
	linux-kernel@...r.kernel.org, amadeuszx.slawinski@...ux.intel.com,
	Tony Nguyen <anthony.l.nguyen@...el.com>,
	nex.sw.ncis.osdt.itp.upstreaming@...el.com, netdev@...r.kernel.org,
	Markus Elfring <Markus.Elfring@....de>, Kees Cook <kees@...nel.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [PATCH v1] cleanup: adjust scoped_guard() to avoid potential
 warning

On Thu, Oct 03, 2024 at 03:46:24PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 03, 2024 at 03:43:17PM +0300, Andy Shevchenko wrote:
> > On Thu, Oct 03, 2024 at 01:39:06PM +0200, Przemek Kitszel wrote:
> 
> ...
> 
> > > +#define __scoped_guard_labeled(_label, _name, args...)			\
> > > +	for (CLASS(_name, scope)(args);					\
> > > +	     __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);	\
> > > +		     ({ goto _label; }))				\
> > > +		if (0)							\
> > > +		_label:							\
> > > +			break;						\
> > > +		else
> > 
> > I believe the following will folow more the style we use in the kernel:
> > 
> > #define __scoped_guard_labeled(_label, _name, args...)			\
> > 	for (CLASS(_name, scope)(args);					\
> > 	     __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);	\
> > 		     ({ goto _label; }))				\
> > 		if (0) {						\
> > _label:									\
> > 			break;						\
> > 		} else
> > 

Yeah, needs braces like that. I'm not super opposed to this, however, 

> And FWIW:
> 1) still NAKed;

I would really like to understand why you don't like this; care to
elaborate Andy?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ