Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7435777yba; Thu, 2 May 2019 09:46:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzR8A/Z8SyqXrPb4HtMmrGDZ4oBy79r59arjzpczOvtJcr53eTAy/rJ8XI87OPKoah6jK9o X-Received: by 2002:a65:5343:: with SMTP id w3mr4772658pgr.232.1556815617936; Thu, 02 May 2019 09:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556815617; cv=none; d=google.com; s=arc-20160816; b=N+/OtCHB5NsNbkhE70wnP88DQPSuy1sxdeKiFdsp9XYixqbODqBcR3LNeo6Ka8Ztw2 dhuT8uNGV6M0X4RttQOwfIxPOSaAjmjXnTeZsgatgQWe39xp78W+XNnhSybWe9DYIG62 wvmxtHNvfHWXSNzVvc+OiMGOcASyMxcsL1yLQ2fGq1rVSHUTliwsmwzBI43qTUeEfOcI UyZfcSNmb6c+BmvcT+/4hZ6YYuLSUDuS5f4GjLfhXesjLhrxK/wBTTXoTArmxvmXMiQh LTFqu8+jdQzlvdWCM0sBDiph+5vJUfVBulS5aGrIAyExJRa4WrXGr4Ez7Irf+ML9ndVb SbhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SHbOKq6JTWffgCJIRF2gWVsgGXQKKc8XkaWvGai2ZzI=; b=MpSMlYjIUBUDJOv9iQbKz1yYqm4SQYfur1CHcuyr/G1gG45r9Kwx4YcltNNuKoyjDt d6Cx6X/DYh5Exi/+c+fn2rdwfb8DByl754kYI/irHRLes4SND/GWE1nZB+sjZC9CefvG wojLEl6qzPsKRaywnq75aYaVnrdT3dicyR1M7VPylEtC72kVDOdD5H90cEXkI8jHMd47 +lVFg3XtlsBSeyZ9hyx8357bnFaZgXewgHQWL9DS9e529/NwUmyDJzHoFr9kHxxti4U0 lGjfXbr8JRttUVM2olWuB1gYoFdWcIOp7YVkAWpuShGW/yClLPw1/hBPE5BHQMN9lVyL lCRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=GDh4zbm8; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si44957528pfd.51.2019.05.02.09.46.42; Thu, 02 May 2019 09:46:57 -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=fail header.i=@gmail.com header.s=20161025 header.b=GDh4zbm8; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726657AbfEBQp3 (ORCPT + 99 others); Thu, 2 May 2019 12:45:29 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38642 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbfEBQp3 (ORCPT ); Thu, 2 May 2019 12:45:29 -0400 Received: by mail-wm1-f65.google.com with SMTP id w15so3514987wmc.3 for ; Thu, 02 May 2019 09:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=SHbOKq6JTWffgCJIRF2gWVsgGXQKKc8XkaWvGai2ZzI=; b=GDh4zbm8o1D5vEGeall/FUSpxnl5A4A4A1Vx4vkOZ0saj8PUnNDArYn9ndi0iyOk/P LZ149e7pqokqCO5cIb/GTItBA32ERhPaKlTDcGQBvqIanGsaADzEiukMAV2rDZKs/3/X uP2S6o+O7g68iT0I2UNW4dfPsm3R7m4sn/d4rKhI35BLvLPCeNVFO4/wbvARLnYxxKNf niEk1wl3kfPmpB5AsFUk6vUzSxVPwa3mKt27sYIwmpg75bFDFDv58Tf1OgZ1ZG6Pi6Bz a5c/Ahd2wh8MwKUWve+nc8s7gIIApXRMAy4xTP8C3RAT9r+JvIFCCtGIZHstdYD/3znd f5RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=SHbOKq6JTWffgCJIRF2gWVsgGXQKKc8XkaWvGai2ZzI=; b=ksobRVd6ngFt5vfQmsGR+CKIH5332ABhAu/SMzpxPMi1DelYyHQ5ssggUQBIxqpcJe vmd9hkJZVJyM6ZaP/A/E1zI+C4UK6ttql4s0dqgHayvffrcH+iRytOSzFW7M8pnZ7QxP OBjqLHD1zNm4LpeYu4Lh4FVRbb7W4Eg0veuh8M+jWzBeS25xklJy+i/mlSeK/7ZS3L/R 91b7UUjPQms3xXKAu5tO2g8A/T5J7oTkACdO1pkqLqJUD3vkn4f9P1eHqFfopiVQJ4bE GKyeHtWk+lEBZxinukS7XX9L6WH4o7dqadjMLQdqbQR0ivKSBU1NNBnIKvKtZzIJP3xl DJbw== X-Gm-Message-State: APjAAAVKJZOOYhbsn8s5qask+sIx7weNlTKEMif5Znpz4wDEDMVFGANX FPWzdHEajIZ5BEt0hI++2/w= X-Received: by 2002:a1c:7518:: with SMTP id o24mr3034462wmc.42.1556815527776; Thu, 02 May 2019 09:45:27 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id v184sm12334603wma.6.2019.05.02.09.45.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 09:45:27 -0700 (PDT) Date: Thu, 2 May 2019 18:45:24 +0200 From: Ingo Molnar To: David Laight Cc: Andy Lutomirski , "Reshetova, Elena" , Theodore Ts'o , Eric Biggers , "ebiggers@google.com" , "herbert@gondor.apana.org.au" , Peter Zijlstra , "keescook@chromium.org" , 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: <20190502164524.GB115950@gmail.com> References: <57357E35-3D9B-4CA7-BAB9-0BE89E0094D2@amacapital.net> <2236FBA76BA1254E88B949DDB74E612BA4C66A8A@IRSMSX102.ger.corp.intel.com> <6860856C-6A92-4569-9CD8-FF6C5C441F30@amacapital.net> <2236FBA76BA1254E88B949DDB74E612BA4C6A4D7@IRSMSX102.ger.corp.intel.com> <303fc4ee5ac04e4fac104df1188952e8@AcuMS.aculab.com> <2236FBA76BA1254E88B949DDB74E612BA4C6C2C3@IRSMSX102.ger.corp.intel.com> <2e55aeb3b39440c0bebf47f0f9522dd8@AcuMS.aculab.com> <20190502150853.GA16779@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * David Laight wrote: > It has already been measured - it is far too slow. I don't think proper buffering was tested, was it? Only a per syscall RDRAND overhead which I can imagine being not too good. > > Because calling tens of millions of system calls per second will > > deplete any non-CPU-RNG sources of entropy and will also starve all > > other users of random numbers, which might have a more legitimate > > need for randomness, such as the networking stack ... > > If the function you use to generate random numbers from the 'entropy > pool' isn't reversible (in a finite time) I don't think you really need > to worry about bits-in v bits-out. Ok. Thanks, Ingo