[lkml]   [2012]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 02/10] random: use lockless techniques when mixing entropy pools
On Thu, Jul 05, 2012 at 02:12:05PM -0400, Theodore Ts'o wrote:
> The real-time Linux folks didn't like add_interrupt_randomness()
> taking a spinlock since it is called in the low-level interrupt
> routine. Using atomic_t's and cmpxchg is also too expensive on some
> of the older architectures. So we'll bite the bullet and use
> ACCESS_ONCE() and smp_rmb()/smp_wmb() to minimize the race windows
> when mixing in the entropy pool.
> Also, we will use a trylock when trying to increase then entropy
> accounting during the interrupt path to avoid taking a spinlock there;
> if there is contention, we will simply not credit the entropy count,
> thus failing safe. Thanks to Dan Carpenter for suggesting this
> approach.
> Signed-off-by: "Theodore Ts'o" <>
> ---

Any reason you don't want this backported to the -stable series?

 \ /
  Last update: 2012-07-05 21:01    [W:0.162 / U:141.504 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site