From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755726AbZEEPqT (ORCPT ); Tue, 5 May 2009 11:46:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752618AbZEEPqD (ORCPT ); Tue, 5 May 2009 11:46:03 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:59765 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752505AbZEEPqA (ORCPT ); Tue, 5 May 2009 11:46:00 -0400 Date: Tue, 5 May 2009 08:35:35 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: "Eric W. Biederman" cc: security@kernel.org, Linux Kernel Mailing List , Eric Paris , Jake Edge , linux-security-module@vger.kernel.org, mingo@redhat.com, Alan Cox , Matt Mackall , James Morris , Andrew Morton , Roland McGrath , Arjan van de Ven Subject: Re: [Security] [PATCH] proc: avoid information leaks to non-privileged processes In-Reply-To: Message-ID: References: <20090504125114.5e391564@chukar> <20090504125124.0f469970@infradead.org> User-Agent: Alpine 2.01 (LFD 1184 2008-12-16) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 5 May 2009, Linus Torvalds wrote: > > Note: the "pid + jiffies" is just meant to be a tiny tiny bit of noise. It > has no real meaning. It could be anything. I just picked the previous > seed, it's just that now we keep the state in between calls and that will > feed into the next result, and that should make all the difference. Actually, thinking about it, we could/should probably just remove that tiny bit of noise. After all, we get _real_ noise from the "keyptr->secret" thing. It's not updated all the time, but it's certainly updated often enough that nobody will ever see anything remotely guessable, I suspect. Not that the "pid+jiffies" should hurt either, of course. It just doesn't really look meaningful, and only exists as a historical oddity that relates to the previous implementation of get_random_int(). Linus