Received: by 10.192.165.148 with SMTP id m20csp3117087imm; Sun, 29 Apr 2018 14:35:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoFH9CpOjU/nlF0F3e3HGE6ysFumPUmWU7+V1XUyHqPsaX9sTAXbXhH3aVy8hKhVIw+HLa3 X-Received: by 2002:a17:902:3381:: with SMTP id b1-v6mr10226655plc.248.1525037706255; Sun, 29 Apr 2018 14:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525037706; cv=none; d=google.com; s=arc-20160816; b=ueTZBcgFY0mp00lqG6j1Oj3qblNmXnxJ8IO/ehK+LwcNhbkJhyF3vyEREf5VzVvn74 jNVrGhhbF5b9xrUXjh63m0947jKkZPys/IxEHEYQQbyFRF3edX20ObwIo+sjdG/hN6EM /ywkrI13qVI+ocYWHkSQ/2VUSP3uXwbRGTlnrGT8GgByoJNcpxuiScOMIIBQynjkHxSU MCQIkOfV8NXjNvF9zNBbCopvU8/1zrxsfevN0OjL58quTr05F6HgAHa+QKLZEO6cTATI dOBG+KTph6ZP7amMap/UVb+YdTNKeBuTG+mxqBtweZaEXw1brjFv5X8HxBW7LugTo5ZF iALQ== 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:arc-authentication-results; bh=skXD0nfKnFwwAezaIlajlDQ3j76dqk84ERHbPjiMXIc=; b=Irs90KuMiwbXT7AaNel91UKdnJCf+FabuaAAyx8V8Vbm4WRZ9KvgdMEKSQB2zBRL/g wbNGntr7r8T9OXj6k+BBha98rt6A614RNB9+MWth1j/aM3zmMXqDDf+Z6VyNsf1VtKPG qQ+RRXd7hyxKiuzqz5i6c2oHrX1AwDspLu6IFsz6HPpoQ6I+7lUGBjsXTvJ5bxvcCrSY Kc2ZBMzWY2BMnWdMkhC97tZOP1vr9/k6y7XY+2y6w9Tjf+FDFv62ZAFvKPZz7Tk/4Q2H LVc/mmvLH3+qazd0dNitcucRFkw+/k36b+oGnqemoQV5hTZrN1mD3MCEX4jIBcyMvq3F uo3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HlCg1ABx; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f25-v6si5172116pgv.47.2018.04.29.14.34.52; Sun, 29 Apr 2018 14:35:06 -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=@gmail.com header.s=20161025 header.b=HlCg1ABx; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754221AbeD2Vei (ORCPT + 99 others); Sun, 29 Apr 2018 17:34:38 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:41872 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752238AbeD2Veg (ORCPT ); Sun, 29 Apr 2018 17:34:36 -0400 Received: by mail-oi0-f41.google.com with SMTP id 11-v6so5950798ois.8 for ; Sun, 29 Apr 2018 14:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=skXD0nfKnFwwAezaIlajlDQ3j76dqk84ERHbPjiMXIc=; b=HlCg1ABx37rKVQ7sRC26VpO0/cI3Iip9n/ukZvPJl1sdikJua9p4MBsIvksGhjrVGs VZTKG5hQVGhtHfC246+CdGCBvZm1FUnFerQj01MZDEizmQ/kmWxiEaiK7V5Nt5PsFrYz idP5WGvXhBtG1uwOohvAuObBMyYUVRTmSnj8J/+n6avOZehhdmcA6/HB9lfAInMnIvXX w0g85hcZb3/PlZNpe+6ijwtI5+uJu6M2YMj6fegrLEBte9zRG2jYVXXsIleaWJjBBTvu zKOgE9v0f+6l8432K82xqQvOh/2ieIAjL0LOtMPaUWVf4YIDzFWQQp1OTAifZ0kkOWyz eV4Q== 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:user-agent; bh=skXD0nfKnFwwAezaIlajlDQ3j76dqk84ERHbPjiMXIc=; b=tLHur/FJ+9WUl1UgBNXY+1Zw2H6gR4ayf8Sv3d2PBcxB4Tv73bsBk2oiMWWho/A82P f80pGIEGYpCMHjJvg3aT5sdiIWsXtmPLT1MAyz8iJXI2obTS0uNmMh+ng8uOU8Gd20y7 lcmhmN+zs4S0oR+DWlAKPWgxRuUSHAB06W5ExcuNGKVsHcy0dWSdVEwbIbtBD5Af9ZM9 Qm2NcygTs5cFSSSaE6aRCQNz27QT8sONC7VqiKnNVTlOxRw6ZmZm/dxml6EfAvn9sTuI VJOngMwVTdDGD7xBdCl/jbYuaUyiBXxCgX5TLBg9Mtikt16YJbY9NNaNAsRxz38F7272 h2gw== X-Gm-Message-State: ALQs6tADJ74CBciOjCpWS7fTlsx3MXzY8Vo1ylPxfvSWND9ANvAUNN5f Wi7uRdckPD1BvxieAkoeOGw= X-Received: by 2002:aca:618a:: with SMTP id v132-v6mr1198710oib.220.1525037676051; Sun, 29 Apr 2018 14:34:36 -0700 (PDT) Received: from sultan-box ([107.193.118.89]) by smtp.gmail.com with ESMTPSA id k12-v6sm3850670otj.53.2018.04.29.14.34.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Apr 2018 14:34:34 -0700 (PDT) Date: Sun, 29 Apr 2018 14:34:31 -0700 From: Sultan Alsawaf To: Pavel Machek Cc: "Theodore Y. Ts'o" , linux-kernel@vger.kernel.org, Jann Horn Subject: Re: Linux messages full of `random: get_random_u32 called from` Message-ID: <20180429213431.7mupyregrnp2ytqq@sultan-box> References: <20180426192524.GD5965@thunk.org> <2add15cb-2113-0504-a732-81255ea61bf5@gmail.com> <20180426235630.GG5965@thunk.org> <3eb5761e-7b25-4178-0560-fba5eb43ce6a@gmail.com> <20180427201036.GL5965@thunk.org> <20180429143205.GD13475@amd> <20180429170541.lrzwyihrd6d75rql@sultan-box> <20180429184101.GA31156@amd> <20180429202033.ysmc42mj2rrk3h7p@sultan-box> <20180429211855.GA17525@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180429211855.GA17525@amd> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 29, 2018 at 11:18:55PM +0200, Pavel Machek wrote: > So -- I'm pretty sure systemd and friends should be using > /dev/urandom. Maybe gpg wants to use /dev/random. _Maybe_. > > [ 2.948192] random: systemd: uninitialized urandom read (16 bytes > read) > [ 2.953526] systemd[1]: systemd 215 running in system mode. (+PAM > +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ > -SECCOMP -APPARMOR) > [ 2.980278] systemd[1]: Detected architecture 'x86'. > [ 3.115072] usb 5-2: New USB device found, idVendor=0483, > idProduct=2016, bcdDevice= 0.01 > [ 3.119633] usb 5-2: New USB device strings: Mfr=1, Product=2, > SerialNumber=0 > [ 3.124147] usb 5-2: Product: Biometric Coprocessor > [ 3.128621] usb 5-2: Manufacturer: STMicroelectronics > [ 3.163839] systemd[1]: Failed to insert module 'ipv6' > [ 3.181266] systemd[1]: Set hostname to . > [ 3.267243] random: systemd-sysv-ge: uninitialized urandom read (16 > bytes read) > [ 3.669590] random: systemd-sysv-ge: uninitialized urandom read (16 > bytes read) > [ 3.696242] random: systemd: uninitialized urandom read (16 bytes > read) > [ 3.700066] random: systemd: uninitialized urandom read (16 bytes > read) > [ 3.703716] random: systemd: uninitialized urandom read (16 bytes > read) > > Anyway, urandom should need to be seeded once, and then provide random > data forever... which is not impression I get from the dmesg output > above. Boot clearly proceeds... somehow. So now I'm confused. Hmm... Well, the attached patch (which redirects /dev/random to /dev/urandom) didn't fix my boot issue, so I'm at a loss as well. Sultan From 15f54e2756866956d8713fdec92b54c6c69eb1bb Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Sun, 29 Apr 2018 12:53:44 -0700 Subject: [PATCH] char: mem: Link /dev/random to /dev/urandom --- drivers/char/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/mem.c b/drivers/char/mem.c index ffeb60d3434c..0cd22e6100ad 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -870,7 +870,7 @@ static const struct memdev { #endif [5] = { "zero", 0666, &zero_fops, 0 }, [7] = { "full", 0666, &full_fops, 0 }, - [8] = { "random", 0666, &random_fops, 0 }, + [8] = { "random", 0666, &urandom_fops, 0 }, [9] = { "urandom", 0666, &urandom_fops, 0 }, #ifdef CONFIG_PRINTK [11] = { "kmsg", 0644, &kmsg_fops, 0 }, -- 2.14.1