From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9413C47082 for ; Thu, 3 Jun 2021 07:12:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A64F1613E3 for ; Thu, 3 Jun 2021 07:12:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A64F1613E3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ExCPswBbxe3oB+hE4+frWQUD00OeuwzZm7zMjUSjFIQ=; b=bhl1gg4k+PHSi+ RDPmAnQS8Z9P63wgFG07YZMsatmMobNQbJh0aARyOCNjZj9cFNC2om8hOlsHCsAkIf9zb0AENvi+E XQTrat69EkHHECOoDGUJqbq48aUXE1LjCU4/aY5JFmYa3w3vffbpQYeRK8H15gxm62w9o9e4DQwqu 3ddiq/1uCl7kpkNo/ld0NMG4inei4gDvaUIDPRxC+JfkYbwKwyQxL0tcehruPWZNZFBsALSBwKkar 6xXkBpC3XYfyVyDe38L42cXUM8B4TA+NLKSXZAUjNpGOmqYMtiLlstCx2/2PeCzUCWOWIqeRaa4Nf zAH1cUIttr5mZh+it3KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lohUw-007Rtc-Ox; Thu, 03 Jun 2021 07:10:34 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lohUs-007Rsv-L1 for linux-arm-kernel@lists.infradead.org; Thu, 03 Jun 2021 07:10:32 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 48757613EE for ; Thu, 3 Jun 2021 07:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622704230; bh=QPWw+yQzMuj6jyETxOCploSLSOhpRB/s4jC3ZykDsZU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Ztnfpu04WiJInus4OSpyx+zezCCfScxzTXAyCBg5scAKldX5mdgMB76mQgWtkf0s2 26RgwSvl8x0uTzMhprIL+OZDxiNJUy5cOo88lBmwMBMTnrWJPZY8SYd7+qG5IJPafu NxNbQ0m55rpcSd2hAvWqXF0Y1RwBCJgvPtYEtf5D5Qp2RpDgglaYrtu2N4SLRu+OXN JGAQD5gjE9880md7MqrvvxDbLYtrL/Qatvbe2rR5JZYEM3CWFUIbG/2p/4Xg67jmZz xvoTOZwL0MmkQdCavHqvMRX46/oqsN9Cf8nfGpclyPZbHHrKmh7811fWjCj1Pq99XQ sskpkVG+CNN0w== Received: by mail-ot1-f42.google.com with SMTP id r26-20020a056830121ab02902a5ff1c9b81so4850468otp.11 for ; Thu, 03 Jun 2021 00:10:30 -0700 (PDT) X-Gm-Message-State: AOAM530VDxH2reaf+tSBmO6pe+o3Sl8W1gXPzzF+VVaLRGjGT6s1AZ5q H7+C4EBVCTmIURfLbz5S7FwBYPQE4Q8e7pe3TCE= X-Google-Smtp-Source: ABdhPJxrmcJZ+zaq40BTOJnoe8vgsHy0P5DRi8z1TCa2fueVG9ffghuZJxjkavXhoo+Ve+c+CnUcfMBaEF6Icrcj+x8= X-Received: by 2002:a9d:69c5:: with SMTP id v5mr28310523oto.108.1622704229638; Thu, 03 Jun 2021 00:10:29 -0700 (PDT) MIME-Version: 1.0 References: <7d5697f3994fc1f9cf39d332525269056e3649b3.camel@kernel.crashing.org> <0339748b54e2faeddeec8d50e32a6c6ff4e8b3b7.camel@kernel.crashing.org> <20210531020235.6e4ea946@slackpad.fritz.box> <2ae9253c6f5753c13a7ed755ab0c67316c06d9b0.camel@kernel.crashing.org> <20210603011922.1d0e9249@slackpad.fritz.box> <03af6cf4f263f9de4b7dbcf16e8a1c4962347191.camel@kernel.crashing.org> In-Reply-To: <03af6cf4f263f9de4b7dbcf16e8a1c4962347191.camel@kernel.crashing.org> From: Ard Biesheuvel Date: Thu, 3 Jun 2021 09:10:17 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: RNDR/SS vs. SMCCC To: Benjamin Herrenschmidt Cc: Andre Przywara , Mark Brown , Will Deacon , "Saidi, Ali" , Linux ARM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210603_001030_747830_394C3289 X-CRM114-Status: GOOD ( 24.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 3 Jun 2021 at 03:41, Benjamin Herrenschmidt wrote: > > On Thu, 2021-06-03 at 01:19 +0100, Andre Przywara wrote: > > > > You mean like this? > > https://gitlab.arm.com/linux-arm/linux-ap/-/commit/87e3722f437f9c3f09397e0e9812e6509c94786a > > Yes. We have a similar one in Amazon Linux which I think Ali submitted > a while back but never went upstream. > I think it is fine to have something like this upstream. At the time, I asked Andre not to include it, in order to keep the discussion focused on the SMCCC and arch hook bits. This is all sorted now, so I think it makes sense to upstream this. > > This is not reviewed nor widely tested, but I used it for assessing the > > quality of the SMCCC provided numbers on the Juno board using rngtest. > > I think one problem was that this opens the SMCCC to userland, so the > > entropy could be depleted from there (again under the assumption that > > this is really a problem in practice). > > IMHO, userland can always adjust permission to /dev/hwrng if it wishes > to do so... > True. However, the way things are currently set up, the hwrng is used both either internally (if the entropy estimate is high enough) or via rngd in user space to read from /dev/hwrng and write it back to /dev/random. This is kind of pointless in this case, although not harmful per se > > I would be interested to hear opinions on this. > > The issue is with things like FIPS certification (and other such > horrors) where I believe /dev/random is much harder to deal with since > it mixes multiple entropy sources. > /dev/random is not an entropy source but a random number generator. I agree with your characterization of FIPS in the general case, but the /dev/random kludge we have is not pretty either :-) Note that NIST SP800-90A/B compliance has similar requirements, i.e., if user space wants to seed its own DRBG in user space and comply with these specs, it needs a compliant entropy source as well. However, health tests on the entropy source are also mandated, and it is not clear to me how that would fit into the SMCCC + /dev/hwrng arrangement. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel