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] [day] [month] [year] [list]
Message-ID: <20140430175209.166a42d9@notabene.brown>
Date:	Wed, 30 Apr 2014 17:52:09 +1000
From:	NeilBrown <neilb@...e.de>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	NFS <linux-nfs@...r.kernel.org>, Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH/RFC] SCHED: allow wait_on_bit functions to support a
 timeout.

On Wed, 30 Apr 2014 09:31:54 +0200 Peter Zijlstra <peterz@...radead.org>
wrote:

> On Wed, Apr 30, 2014 at 12:29:26PM +1000, NeilBrown wrote:
> > If you think it is a good cleanup I'll post a proper patch with all the right
> > Cc:s.
> 
> Yeah, its a good cleanup. Thanks!
> 
> > +static inline int
> > +wait_on_bit(void *word, int bit, unsigned mode)
> > +{
> > +	if (!test_bit(bit, word))
> > +		return 0;
> > +	return out_of_line_wait_on_bit(word, bit,
> > +				       bit_wait,
> > +				       mode & 65535);
> > +}
> > +
> > +static inline int
> > +wait_on_bit_io(void *word, int bit, unsigned mode)
> > +{
> > +	if (!test_bit(bit, word))
> > +		return 0;
> > +	return out_of_line_wait_on_bit(word, bit,
> > +				       bit_wait_io,
> > +				       mode & 65535);
> > +}
> 
> That actually fits on one <80 line. Also, where does the 16 bit mask
> come from? On which, I would write that in hex, 0xFFFF is slightly
> easier to recognise as (1<<16)-1.

That is a hangover from an earlier attempt which didn't work.  Thanks for
catching it.

I'll refresh and do some basic testing tomorrow and send it out, including to
Oleg.

Thanks,
NeilBrown

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ