Received: by 10.192.165.148 with SMTP id m20csp917307imm; Wed, 2 May 2018 10:51:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq//EBUUHsrUw9r/VbBQrPTbKX5O6iE0OdTFLI3sbQrhi8LLT/3H0doYvVnjiXKpI64PMUH X-Received: by 2002:a17:902:33a5:: with SMTP id b34-v6mr21104880plc.232.1525283511925; Wed, 02 May 2018 10:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525283511; cv=none; d=google.com; s=arc-20160816; b=KH1jlBMN1ZS+214yalSBwBGzbpkz9WuZIjnzTjNKI93CVC+p2upbIdd4eHZcdnHSgt xYafRDCG0FkoSp+2TAVv2VFDx7cq6BirxeNS14qBi6sndol8801bKLC+cxFrd8QNsweh gfR1CgDteP5dzOdLBfS0r55YTW7FFvImH8jVoEMMu09yyfgdz3q2at5KevrYIjpLt9pg IRtBgpPKjhFVjbmcQe0Iulc3ZDKnrDifolmfPHDVbWRcMfzzmIWNm6DNXCfNnTCe839y yw2Re7+uDe/AZoNAexLkRLqTMCVrO+kQrvV8cQkBwu8JUY7JknOtJQy+rgZiazfnHTla v5Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:arc-authentication-results; bh=VK0bLl2zcUSmLZh5BSrdTa2zObJ+fUCzZNY9PQqpbL0=; b=dEk8cGxEdc8azNp2BoCrwAHl9rwrVM5uAYjZnbe9wZNq2gvYeWQ5iwF/iDar1yj+Sq LME5ztidFpSDhNkb+ROV9C2QbqgNMJsyj6J5NCINODPYOrc9xRc9/oOC1em0KEbLZ7OE I4SsX8HKqQ/u8AGVE/472VwX1Hzgyvvi5C6A24MimC1nuDzTvZUZ+N9kq/t7BIULbXmb FF6gEFKzwYGbJPOeo5bR4amuP0ez/bIYiSAcv4WfM2L6bK9FD5At+wSTXsWAPYRclqJk /sqhAzNI4dnRoRIAw7IH6l0SUEsOdGHdUS4na+57qi3isyUjp9qFSKzJQ1RoR+YObV4C eGqw== ARC-Authentication-Results: i=1; mx.google.com; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l192-v6si9943944pge.365.2018.05.02.10.51.37; Wed, 02 May 2018 10:51:51 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751567AbeEBRtm (ORCPT + 99 others); Wed, 2 May 2018 13:49:42 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:46902 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750942AbeEBRti (ORCPT ); Wed, 2 May 2018 13:49:38 -0400 Received: by mail-oi0-f66.google.com with SMTP id y15-v6so13728504oia.13 for ; Wed, 02 May 2018 10:49:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VK0bLl2zcUSmLZh5BSrdTa2zObJ+fUCzZNY9PQqpbL0=; b=NvAky+NYwaAnvA3wsBpWFb0Ak01gbDPfj7l2iYvhiUAJCvbqaNFltozTCJqQClWsqw UkA7oAE0XknaQpR8WSpvBAyFoDRuEXri88KtnN+MZqMmI/j9yGYfp9yWfXIDbXEPzN82 Y/AgldK5g/jUcGop8l5/KXqa/9MbpBvdIryXLz5mmatqxem/yHPNqxYFqPvYmieJCITh CgZ7NpbsE0GzXxaFd/3pQf3zF4AdizznaPQmII+P21OoXWR9kZzSy5dmr1N/1aRmKtMk jgl13m5M7/8ZM8UTeL6LfalIegTi24bKoMc6SRAXD8J5tudoKdHFvujZv6q5/MAfU/YI hNYg== X-Gm-Message-State: ALQs6tBL2fj7koiq88o+pglE4w6Xlufa1Pfwg4zZa021kM13ylT3nyCD O5kcqIf9PW/YQXivBnP63Jt2Xw== X-Received: by 2002:aca:4e15:: with SMTP id c21-v6mr11770655oib.254.1525283377400; Wed, 02 May 2018 10:49:37 -0700 (PDT) Received: from ?IPv6:2601:602:9802:a8dc::d2dd? ([2601:602:9802:a8dc::d2dd]) by smtp.gmail.com with ESMTPSA id s101-v6sm8254491ota.25.2018.05.02.10.49.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 May 2018 10:49:36 -0700 (PDT) Subject: Re: Linux messages full of `random: get_random_u32 called from` To: "Theodore Y. Ts'o" , Justin Forbes , Jeremy Cline , Sultan Alsawaf , Pavel Machek , LKML , Jann Horn References: <20180429170541.lrzwyihrd6d75rql@sultan-box> <20180429184101.GA31156@amd> <20180429202033.ysmc42mj2rrk3h7p@sultan-box> <20180429220519.GQ5965@thunk.org> <01000163186628e6-3fe4abfc-eaaf-470c-90c8-2d8ad91db8f1-000000@email.amazonses.com> <20180501125518.GI20585@thunk.org> <20180502000250.GI10479@thunk.org> <20180502162653.GB3461@thunk.org> From: Laura Abbott Message-ID: <3851ac8b-357d-3c82-2195-936e3c459212@redhat.com> Date: Wed, 2 May 2018 10:49:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180502162653.GB3461@thunk.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/02/2018 09:26 AM, Theodore Y. Ts'o wrote: > On Wed, May 02, 2018 at 07:09:11AM -0500, Justin Forbes wrote: >> Yes, Fedora libgcrypt is carrying a patch which makes it particularly >> painful for us, we have reached out to the libgcrypt maintainer to >> follow up on that end. But as I said before, even without that code >> path (no dracut-fips) we are seeing some instances of 4 minute boots. >> This is not really a workable user experience. And are you sure that >> every cloud platform and VM platform offers, makes it possible to >> config virtio-rng? > > Unfortunately, the answer is no. Google Compute Engine, alas, does > not currently support virtio-rng. With my Google hat on, I can't > comment on future product features. With my upstream developer hat > on, I'll give you three guesses what I have been advocating and > pushing for internally, and the first two don't count. :-) > > That being said, I just booted a Debian 9 (Stable, aka Stretch) > standard kernel, and then installed 4.17-rc3 (which has the > CVE-2018-1108 patches). The crng_init=2 message doesn't appear > immediately, and it does appear quite a bit later comapred to > the standard 4.9.0-6-amd64 Debian 9 kernel. However, the lack of a > fully initialized random pool doesn't prevent the standard Debian 9 > image from booting: > > May 2 15:33:42 localhost kernel: [ 0.000000] Linux version 4.17.0-rc3-xfstests (tytso@cwcc) (gcc version 7.3.0 (Debian 7.3.0-16)) #169 SMP Wed May 2 11:28:17 EDT 2018 > May 2 15:33:42 localhost kernel: [ 1.456883] random: fast init done > May 2 15:33:46 rng-testing systemd[1]: Startup finished in 3.202s (kernel) + 5.963s (userspace) = 9.166s. > May 2 15:33:46 rng-testing google-accounts: INFO Starting Google Accounts daemon. > May 2 15:44:39 rng-testing kernel: [ 661.436664] random: crng init done > > So it really does appear to be something going on with Fedora's > userspace; can you help try to track down what it is? > > Thanks, > > - Ted > It is a Fedora patch we're carrying https://src.fedoraproject.org/rpms/libgcrypt/blob/master/f/libgcrypt-1.6.2-fips-ctor.patch#_23 so yes, it is a Fedora specific use case. From talking to the libgcrypt team, this is a FIPS mode requirement to run power on self test at the library constructor and the self test of libgrcypt ends up requiring a fully seeded RNG. Citation is in section 9.10 of https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Module-Validation-Program/documents/fips140-2/FIPS1402IG.pdf The response was this _could_ be fixed in libgcrypt but it needs to be done carefully to ensure nothing actually gets broken. So in the mean time we're stuck with userspace getting blocked whenever some program decides to use libgcrypt too early. Thanks, Laura