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]
Date:	Thu, 05 Jul 2012 15:45:50 -0500
From:	Matt Mackall <mpm@...enic.com>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Linux Kernel Developers List <linux-kernel@...r.kernel.org>,
	torvalds@...ux-foundation.org, w@....eu, ewust@...ch.edu,
	zakir@...ch.edu, greg@...ah.com, nadiah@...ucsd.edu,
	jhalderm@...ch.edu, tglx@...utronix.de, davem@...emloft.net
Subject: Re: [PATCH 02/10] random: use lockless techniques when mixing
 entropy pools

On Thu, 2012-07-05 at 15:47 -0400, Theodore Ts'o wrote:
> On Thu, Jul 05, 2012 at 02:10:12PM -0500, Matt Mackall wrote:
> > 
> > I don't think this will work correctly. It's important that simultaneous
> > _readers_ of the state get different results. Otherwise, you can get
> > things like duplicate UUIDs generated on different cores, something
> > that's been observed in the field(!). I thought I added a comment to
> > that effect some years back, but I guess not.
> 
> That's easy to fix; we just need to take a spinlock on the extract
> side.  The main issue is that Thomas very much doesn't want us to take
> a spinlock in the interrupt handler codepath.  But if we take a
> spinlock while extracting, that should take care of this concern.

Yup. This is why there's a separate _extract function to start with,
though this particular optimization hadn't been made yet. You do need to
continue to be sure to do the mix and extract in one operation though.

-- 
Mathematics is the supreme nostalgia of our time.


--
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