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: <20140226142534.3b8c6eb1652d000206948ae0@linux-foundation.org>
Date:	Wed, 26 Feb 2014 14:25:34 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Gregory CLEMENT <gregory.clement@...e-electrons.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-next@...r.kernel.org,
	Johannes Berg <johannes.berg@...el.com>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: Regression with wait_event_timeout in next-20140226

On Wed, 26 Feb 2014 17:50:43 +0100 Peter Zijlstra <peterz@...radead.org> wrote:

> On Wed, Feb 26, 2014 at 05:35:19PM +0100, Gregory CLEMENT wrote:
> > Hi,
> > 
> > while testing next-20140226 I got an issue with the function
> > wait_event_timeout. When this function timed out instead of returning
> > 0, it returned the value of the timeout passed in parameter. I found
> > that reverting "sched/wait: Suppress Sparse 'variable shadowing'
> > warning" fixed this regression.
> > 
> > I got this issue in the driver drivers/i2c/busses/i2c-mv64xxx.c.
> 
> Ah indeed. We actually rely on the shadowing for ___wait_cond_timeout().
> 
> We further used the __ret variable in __wait_event_timeout()'s cmd
> argument: __ret = schedule_timeout(__ret). That now explicitly uses the
> wrong __ret.
> 
> Yeah, we need to pull that patch.


Is there anything we can do to make all this clearer?  Simply using a
distinctive variable name ("__wait_var__"?) in place of __ret (and
documenting it) would help a lot.

Some __ret's are long and some are int.  Maybe that's a glitch, maybe
it's because some __ret's are used for inter-macro communications and
some are not, which just makes things worse.

I started to do a patch, got all confused and gave up.  We've made
quite a tangly mess in there, alas.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ