Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6697414ybi; Wed, 29 May 2019 11:39:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxhZq95L/fHkhB3IZKF8emItiUUy+eeKbUyqeVfzSbdSJogpMvIb5J8Y3LWk5VF9NkW6nL X-Received: by 2002:a17:90a:338e:: with SMTP id n14mr5529397pjb.35.1559155198314; Wed, 29 May 2019 11:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559155198; cv=none; d=google.com; s=arc-20160816; b=ENmWCE3jaGW2YTsrFcklQRGRdeykgAEv7RbSMXVROu9/y9nX7bw1gZzzzXQqnILuvN iQcF5aKhFvREnEYKZ8DsNjnPNE8W5IJUz+Un61pUxI3JrYAp3pgaoVFZTpH9t2D0hNoM W/EoFFf1C/+5Ri/GQMmsS6bbv0Cso/YSDRMZJBLL5ZUitxxVaNOJ9EoIuVEWxGkZZq0N o05nGDY5VI/ADTZAKHCHJ+tk60lqX09foUnNjdwc00CXmWQ/TWVeJZrgexIcxOOBvUxW 3YgF2jc+h4Q7a+LqMgiLU1wc8FhnqbTPLQYim7rvDv4RPuuIu2zwfoejw7wBxmBw1b+p u1eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=SxLHP6OsBSFBHfXsjyle6HK6OxP8uorD2s0mT+kaxlI=; b=a7bB2SCIZYK8BNWqEV47QMayUrLz7I9/ZtyDENc6v8EMbJ0+1W6AShytcrUHxdbtwM NaGx+672V5lhM02rAxaDhdKxachVN2lgmWOcEXslieSXDaXaSqzOR+rqKUGlrNVGog56 evr16fg6Gko1pZJnAVJy5Z26lJfztmQR6fv+53rjNApyP924QeZzKBxpyclvF3/Ar1zR uKTkpESU5RrOHbZ3zo63FGbSOJ+FPWf9bcwybgnI0DoIUEfOrNIHP5EaLK2N/Kq/C7Oa wsVZz9xZjoP2sln+6hP1RZG7W4eaPKtBtVpkevefEKOGU7EMaidBLzdQYBIYcIQaP4jT u0vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZJnvsiZf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si491890pfa.85.2019.05.29.11.39.42; Wed, 29 May 2019 11:39:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZJnvsiZf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726320AbfE2ShV (ORCPT + 99 others); Wed, 29 May 2019 14:37:21 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38458 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfE2ShU (ORCPT ); Wed, 29 May 2019 14:37:20 -0400 Received: by mail-pg1-f195.google.com with SMTP id v11so403936pgl.5 for ; Wed, 29 May 2019 11:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SxLHP6OsBSFBHfXsjyle6HK6OxP8uorD2s0mT+kaxlI=; b=ZJnvsiZfD896d8Ck9n1bdw3mump/AlALJB5fwIzPOA+C33mqxnYVAfEZ5o+whJAwIm 1GBP1aRsHCuezNBr49RvOw7cvjJSq1VBTBHhkaQN5w+KT7ghtAX+lR9xmMb8fa/yXXXy bp9CUbT7rz8KKjzE0NgMCBXs4Hgri8+6rXxZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SxLHP6OsBSFBHfXsjyle6HK6OxP8uorD2s0mT+kaxlI=; b=Nyr+xbnXsKU6CqxTr+yA88KVk4LDMDDn4ujrzEWYIAR2yXExdBUkLiQ1qm8+IwfkbP vvG7ASuJP2Z67AjwWSpOq6fLeosyWLtQJD9RNMDOPpCxDu7Mnczm0qCU0hdDCYpFzIVD 528FRF4jmc2zYyLfKG2nmVzqJVIwUHgbIeiPsRbaIza5/aMxTrFekRdUvadebeSX94DG oij9fBtbeoBonSelp+yR3bcF1DTdL7Z89zXH0AnJHrn47hLpFGTg9WboSiUIaJJi8Jjl 4+0r5YJPFOx3F6PKdTh+Uolq+wtJRyIMRdlAsZ4s9XNqKPwxISiL6w92mmqlL2u6CpdG 5EFQ== X-Gm-Message-State: APjAAAUCuZOB4N0DFZjrexTPbPeDA9UQNN4OL/G8HH86wHK1mnQc143M 4ECGHQw2GfnNal/CC9dY6oCKFg== X-Received: by 2002:a63:5c4c:: with SMTP id n12mr142269302pgm.111.1559155040001; Wed, 29 May 2019 11:37:20 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b3sm363961pfr.146.2019.05.29.11.37.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2019 11:37:18 -0700 (PDT) Date: Wed, 29 May 2019 11:37:17 -0700 From: Kees Cook To: "Reshetova, Elena" Cc: Theodore Ts'o , Ingo Molnar , Andy Lutomirski , David Laight , Eric Biggers , "ebiggers@google.com" , "herbert@gondor.apana.org.au" , Peter Zijlstra , Daniel Borkmann , "linux-kernel@vger.kernel.org" , "jpoimboe@redhat.com" , "jannh@google.com" , "Perla, Enrico" , "mingo@redhat.com" , "bp@alien8.de" , "tglx@linutronix.de" , "gregkh@linuxfoundation.org" , "Edgecombe, Rick P" , Linus Torvalds , Peter Zijlstra Subject: Re: [PATCH] x86/entry/64: randomize kernel stack offset upon syscall Message-ID: <201905291136.FD61FF42@keescook> References: <20190509055915.GA58462@gmail.com> <2236FBA76BA1254E88B949DDB74E612BA4C7741F@IRSMSX102.ger.corp.intel.com> <20190509084352.GA96236@gmail.com> <201905111703.5998DF5F@keescook> <20190512080245.GA7827@gmail.com> <201905120705.4F27DF3244@keescook> <2236FBA76BA1254E88B949DDB74E612BA4CA8DBF@IRSMSX102.ger.corp.intel.com> <20190528133347.GD19149@mit.edu> <2236FBA76BA1254E88B949DDB74E612BA4CABA56@IRSMSX102.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2236FBA76BA1254E88B949DDB74E612BA4CABA56@IRSMSX102.ger.corp.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 29, 2019 at 10:13:43AM +0000, Reshetova, Elena wrote: > On related note: the current prng we have in kernel (prandom) is based on a > *very old* style of prngs, which is basically 4 linear LFSRs xored together. > Nowadays, we have much more powerful prngs that show much better > statistical and even security properties (not cryptographically secure, but still > not so linear like the one above). > What is the reason why we still use a prng that is couple of decades away from the > state of art in the area? It is actively used, especially by network stack, > should we update it to smth that is more appropriate (speed would be comparable)? > > I am mostly talking about PCG-based generators: > http://www.pcg-random.org/ > > If people are interested, I could put together a PoC and we have an expert here we can > consult for providing calculations for min-entropy, HILL entropy and whatever > is requested. If we get better generators with no speed loss, I can't imagine anyone objecting. :) -- Kees Cook