Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1053215pxb; Fri, 22 Apr 2022 18:01:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV69Q8zib/98c/Ba6fz6PXTXeydXGP1y5foAHB7CY6sj5OvnEBop+rxKpTdYf08IkSDRM3 X-Received: by 2002:a17:90a:2b0f:b0:1cb:a3e5:413b with SMTP id x15-20020a17090a2b0f00b001cba3e5413bmr8350937pjc.115.1650675695189; Fri, 22 Apr 2022 18:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650675695; cv=none; d=google.com; s=arc-20160816; b=q8HXxTSU/NEXL/xEQxT7DRf7dsEFXZpkypMb43wR0y+CQJRjKggqeNpcw8rYhE1ihT oPsEjPXIGfi3Kf1WGRqvVuE968k1CzdRT6XdAihossv6hHZ8c39XS/ZL2azXg3I+3r0w nW/WQDWw7XMORe0dDVuYyhpDhscC/eO8dImJXAy1kef+vJKCk1NOg54nMKzEgSppybTV Qnt9eNPsHuOku+KMfPGdYE8OURo9CppOKVYR5kxj4Zi1ftMTGDuBgalhBcvrbK/EkeWt awbLofN4KTneGG3Afd/uKLUbeKSo0WkoKXYJKaviz5sfFhV7bsEWAUuybxg3+2LDl6en pa2w== 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=BtroWoypB74RmLGCXy/EXj5t2W95zgqhXYB+W+c3LYE=; b=ZOid9/9oXeWom7foFiLKz3uRcmMyuXDw57WjdFRKQR5pP+TITOjKecH3XqVyyu03lW aXz+eKV7HxVOaErFi/jyC8QZy8jV3UDhQif6HZFELu5DuV7HKmWs2d0oBIDEiD96Syyv FHXMv0hzrZYnc8BulyuvSfGqkwhBDcJLTqv6XKvBnIVsWEhjO29s617mXy05h88JkWax BVJ9LUXtDO8l/zLtNkZXv/uqpPfcN9rXxRMuE2zCEyv9eBHLeBWNAD229yLKhTMteo3u mlVbUJ5tY8tWuaZF9JbSgBoAoeCEUwtsVHEWNFkKchIiKfK69a0pY5aJ5HlGed7dHruO AMvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=apuirUnw; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a170902d54a00b00154a965e488si9533875plf.237.2022.04.22.18.01.02; Fri, 22 Apr 2022 18:01:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=apuirUnw; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230197AbiDWA4G (ORCPT + 99 others); Fri, 22 Apr 2022 20:56:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229927AbiDWA4G (ORCPT ); Fri, 22 Apr 2022 20:56:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B6C51738CA; Fri, 22 Apr 2022 17:53:10 -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 8ECB860FBB; Sat, 23 Apr 2022 00:53:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80106C385A8; Sat, 23 Apr 2022 00:53:09 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="apuirUnw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1650675185; 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=BtroWoypB74RmLGCXy/EXj5t2W95zgqhXYB+W+c3LYE=; b=apuirUnwiClPZkngdFTOM+QfyFKtnvlwA/luZqphpx2jlS66JX3i7wtN4EjErQfzF+Wktq ULcCQOdPLrsKonuld9pW6IPmx9nMIzMW7PE9KuqHSJGOFnvd19RTov2l7N8+riDdxwSkTx A6j27PAa97zJfQyvB5+w6Yd/uXjGpFg= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id d8f036cc (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 23 Apr 2022 00:53:05 +0000 (UTC) Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-2f7bb893309so21450917b3.12; Fri, 22 Apr 2022 17:53:03 -0700 (PDT) X-Gm-Message-State: AOAM530iWDSISiRD3YBdkGykYJ/YnCGEUfI1ouUWPhL11sHhAKJKSFan JTgq/eVTPulaHhhsazS8WWseWBJtiltryO6zkFg= X-Received: by 2002:a81:1d4:0:b0:2eb:1b10:f43e with SMTP id 203-20020a8101d4000000b002eb1b10f43emr7705887ywb.100.1650675181900; Fri, 22 Apr 2022 17:53:01 -0700 (PDT) MIME-Version: 1.0 References: <20220217162848.303601-1-Jason@zx2c4.com> <20220322155820.GA1745955@roeck-us.net> <0d20fb04-81b8-eeee-49ab-5b0a9e78c9f8@roeck-us.net> In-Reply-To: From: "Jason A. Donenfeld" Date: Sat, 23 Apr 2022 02:52:51 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1] random: block in /dev/urandom To: Arnd Bergmann , Guenter Roeck Cc: Mark Brown , Linux Kernel Mailing List , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , 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 , 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=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 Arnd/Guenter, On Wed, Mar 23, 2022 at 4:53 PM Arnd Bergmann wrote: > > On Wed, Mar 23, 2022 at 3:23 PM Guenter Roeck wrote: > > > > On 3/23/22 05:10, Mark Brown wrote: > > > On Tue, Mar 22, 2022 at 02:54:20PM -0700, Guenter Roeck wrote: > > > Kind of academic given that Jason seems to have a handle on what the > > > issues are but for KernelCI it's variations on mach-virt, plus > > > versatile-pb. There's a physical cubietruck as well, and BeagleBone > > > Blacks among others. My best guess would be systems with low RAM are > > > somehow more prone to issues. > > > > I don't think it is entirely academic. versatile-pb fails for me; > > if it doesn't fail at KernelCI, I'd like to understand why - not to > > fix it in my test environment, but to make sure that I _don't_ fix it. > > After all, it _is_ a regression. Even if that regression is triggered > > by bad (for a given definition of "bad") userspace code, it is still > > a regression. > > Maybe kernelci has a virtio-rng device assigned to the machine > and you don't? That would clearly avoid the issue here. Indeed it's probably something like that. Or maybe they're networked with something that has a steady stream of interrupts. I say this because I was able to reproduce Guenter's findings using the versatilepb machine with the versatile_defconfig config and the versatile-pb.dtb file. Indeed this board doesn't have a cycle counter. However, I did have success using the fallback timer and the other patches in the jd/for-guenter branch, so at least for versatile's nuances, I think (hope?) there's a reasonable success story here. Jason