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] [day] [month] [year] [list]
Message-ID: <20070516070015.GA13980@infradead.org>
Date:	Wed, 16 May 2007 08:00:15 +0100
From:	hch <hch@...radead.org>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
	virtualization <virtualization@...ts.linux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>, hch <hch@...radead.org>
Subject: Re: [PATCH 1/6] lguest: host code tidyups

On Wed, May 16, 2007 at 09:32:16AM +1000, Rusty Russell wrote:
> On Tue, 2007-05-15 at 21:47 +1000, Stephen Rothwell wrote:
> > On Tue, 15 May 2007 21:42:35 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> > >
> > > On Tue, 15 May 2007 11:17:07 +1000 Rusty Russell <rusty@...tcorp.com.au> wrote:
> > > > -		on_each_cpu(adjust_pge, 0, 0, 1);
> > > > +		on_each_cpu(adjust_pge, (void *)0, 0, 1);
> > >
> > > Sorry?  What ever happened to a simple NULL?
> > 
> > Oh, I guess that is an explicit (numeric) 0 (of some type) caste to
> > "void *" because of the prototype - rather than not passing anything?
> 
> Indeed.  We really want to pass a bool, but on_each_cpu uses a void *.
> Hence the clearest solution seemed "(void *)0" and "(void *)1" in the
> callers.

Cleanest way to do that is to pass the value by reference.

	const int some_useful_name = 0;

	 on_each_cpu(adjust_pge, &some_useful_name, 0, 1);
-
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