Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp791651pxb; Fri, 22 Apr 2022 11:13:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrogpQsfvm5V8dG8Dohqd5XDkof8O6teUCx8xmqGzzkSfgCuN0fZ54oc/ViAEQnh9ZgBYW X-Received: by 2002:a63:6f44:0:b0:398:31d6:e37f with SMTP id k65-20020a636f44000000b0039831d6e37fmr4836011pgc.177.1650651195594; Fri, 22 Apr 2022 11:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650651195; cv=none; d=google.com; s=arc-20160816; b=lutN+VO0mQ4qIZGWAHGUD0Y78Sal2L1/6zrfbA68qKHByalgDTDfyA1ACGBUcIpipD zx8ewOpSSwn6J0CApEVd09YXM6cqYJS5e48OrAXLttolP9iHmM1ymP0KLD5zY/1RRSE+ 7LLPSay6Rtq1wYdKxn5jawHowOJeVniKsKYA2YkRz2EDbXve5m6dleGqOtIMdtgiPAHp /iBf5ZgQc6Bfk9dqSOHII2lFLwv1++LH7WR0SG00GTp9JkyDj50fvDn6mIwz7cBfh+50 073t7EyX3uCsQvt2gVwrLRNBKeozY35b7AeoAoJRIOOpcIjh6o66Y0JkaXKqO2hybSLR f5SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=R42MnBKkf8h8aMzJ+cq5aRlVGTDAAdFMWhjGUtpnOIw=; b=eJf+U5zK5+4n7KvX73tKK9F1JJqEAom7WIdjLg/507xAuILAsrejn6gFTDz3sShgT/ 7zy9FVumgR21IqB4dA9CXwFmbB+ISlR71t6ied88lWPGguJ/lsLthauMVlIm/djhM8OQ q7k6+XtO6mO8rdm1eW38E6Vgw3R38Kn0BOLOpeV4mkadNPDmqXVXWxK4SkHeHp9Dwnb8 jngIcCSTwyhZLpuUwnyiLevH0YAoLjSN3Pkc31yCzY4BZTCGQdNddodmfXng4rz5Pz++ eWk6uVC0vIRGKeB4CEHmI3EV17Np5TQmhvdZV80qe/myTlQGPgjGl3cZ4Gc/aFrIoItE UeTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b="MlmeQg3/"; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id cd13-20020a056a00420d00b0050cec4de7eesi2541116pfb.223.2022.04.22.11.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:13:15 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b="MlmeQg3/"; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DA4EA12D21E; Fri, 22 Apr 2022 10:48:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1448120AbiDVNqE (ORCPT + 99 others); Fri, 22 Apr 2022 09:46:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234180AbiDVNqC (ORCPT ); Fri, 22 Apr 2022 09:46:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BD34583BA; Fri, 22 Apr 2022 06:43:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 26818620E2; Fri, 22 Apr 2022 13:43:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CF18C385A9; Fri, 22 Apr 2022 13:43:08 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="MlmeQg3/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1650634981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=R42MnBKkf8h8aMzJ+cq5aRlVGTDAAdFMWhjGUtpnOIw=; b=MlmeQg3/JN/ztJlQabbkkw8Vcws4ZxrJJbHqrroh7rKqcWjE7Yc5bQnl0asaPf2cRPMJ3/ rNMDBgiJF8qj2EuXsJ6s5DY2dEzRFJQMjR4qgjJPGD6+9ENYshkAhJUvQHiUxMX6HPh2DG hqGqpWH26uIs2yIJMZyE9VhEtJ9qHVE= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 83ceb0e7 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 22 Apr 2022 13:43:01 +0000 (UTC) Received: by mail-yb1-f171.google.com with SMTP id r189so14556958ybr.6; Fri, 22 Apr 2022 06:43:00 -0700 (PDT) X-Gm-Message-State: AOAM532kZN3KWlfpy0pTnJJTnPZShZYo6OnV6ncjJxkZ1tqgY9E+XC7X nNSRr6rwIv7kaggvgw06LQAZ6imzvwGzBcuRIG8= X-Received: by 2002:a05:6902:154d:b0:644:b2e7:146 with SMTP id r13-20020a056902154d00b00644b2e70146mr4512095ybu.271.1650634978328; Fri, 22 Apr 2022 06:42:58 -0700 (PDT) MIME-Version: 1.0 References: <20220217162848.303601-1-Jason@zx2c4.com> <20220322155820.GA1745955@roeck-us.net> In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 22 Apr 2022 15:42:46 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1] random: block in /dev/urandom To: Guenter Roeck Cc: LKML , Linux Crypto Mailing List , linux-arch , Dinh Nguyen , Nick Hu , Max Filippov , Palmer Dabbelt , "David S . Miller" , Yoshinori Sato , Michal Simek , Borislav Petkov , Guo Ren , Geert Uytterhoeven , Joshua Kinard , David Laight , Dominik Brodowski , Eric Biggers , Ard Biesheuvel , Arnd Bergmann , Thomas Gleixner , Andy Lutomirski , Kees Cook , Lennart Poettering , Konstantin Ryabitsev , Linus Torvalds , Greg Kroah-Hartman , "Theodore Ts'o" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hey Guenter, On Tue, Mar 22, 2022 at 6:56 PM Guenter Roeck wrote: > > On 3/22/22 10:09, Jason A. Donenfeld wrote: > > Hey Guenter, > > > > On Tue, Mar 22, 2022 at 08:58:20AM -0700, Guenter Roeck wrote: > >> On Thu, Feb 17, 2022 at 05:28:48PM +0100, Jason A. Donenfeld wrote: > >>> This topic has come up countless times, and usually doesn't go anywhere. > >>> This time I thought I'd bring it up with a slightly narrower focus, > >>> updated for some developments over the last three years: we finally can > >>> make /dev/urandom always secure, in light of the fact that our RNG is > >>> now always seeded. > >>> > >> > >> [ ... ] > >> > >> This patch (or a later version of it) made it into mainline and causes a > >> large number of qemu boot test failures for various architectures (arm, > >> m68k, microblaze, sparc32, xtensa are the ones I observed). Common > >> denominator is that boot hangs at "Saving random seed:". A sample bisect > >> log is attached. Reverting this patch fixes the problem. > > > > As Linus said, it was worth a try, but I guess it just didn't work. For > > my own curiosity, though, do you have a link to those QEMU VMs you could > > share? I'd sort of like to poke around, and if we do ever reattempt this > > sometime down the road, it seems like understanding everything about why > > the previous time failed might be a good idea. > > > > Everything - including the various root file systems - is at > git@github.com:groeck/linux-build-test.git. Look into rootfs/ for the > various boot tests. I'll be happy to provide some qemu command lines > if needed. I've been playing with a few things, and I'm wondering how close I am to making this problem go away. I just made this branch: https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git/log/?h=jd/for-guenter Any interest in setting your tests on that and seeing if it still breaks? Or, perhaps better, do you have a single script that runs all your various tests and does all the toolchain things right, so I can just point it at that tree and iterate? Jason