Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265464AbTIERFy (ORCPT ); Fri, 5 Sep 2003 13:05:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265520AbTIERFy (ORCPT ); Fri, 5 Sep 2003 13:05:54 -0400 Received: from waste.org ([209.173.204.2]:34999 "EHLO waste.org") by vger.kernel.org with ESMTP id S265464AbTIERFx (ORCPT ); Fri, 5 Sep 2003 13:05:53 -0400 Date: Fri, 5 Sep 2003 12:05:29 -0500 From: Matt Mackall To: Andries.Brouwer@cwi.nl Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] add_mouse_randomness Message-ID: <20030905170529.GM31897@waste.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1539 Lines: 34 On Fri, Sep 05, 2003 at 11:16:05AM +0200, Andries.Brouwer@cwi.nl wrote: > From oxymoron@waste.org Fri Sep 5 07:01:30 2003 > From: Matt Mackall > > > Today: > > Every keypress and every key release causes two calls of > > add_mouse_randomness and one call of add_keyboard_randomness. > > Key repeat causes lots of calls of add_mouse_randomness. > > > > The random driver contains a mechanism (delta, delta2, delta3) > > for estimating the amount of entropy in a stream of moments in > > time. But the fact that every event causes two calls, very > > quickly after each other, poisons this mechanism, and makes us > > overestimate. > > The real problem is that the deltas are calculated from gigahertz > cycle counters, but yes, we're calling too frequently and blowing away > useful history. I've experimented with making the deltas per-source as > well. > > I wouldnt know what is wrong with using gigahertz cycle counters. > The deltas are already per-source. Actually, they're only per-class. So if you have multiple mice, keyboards, drives, etc., they interfere with each other's deltas and increase the entropy estimates overall. -- Matt Mackall : http://www.selenic.com : of or relating to the moon - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/