Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp994416rwl; Fri, 24 Mar 2023 05:03:07 -0700 (PDT) X-Google-Smtp-Source: AKy350ZVZWh+Brh735d3Ab1DYjXldMvww5/+72E4yV5vonYh0H7ouAnuEYdFRk3eO4vXiSqznmE5 X-Received: by 2002:a17:90a:2acb:b0:23b:35cd:5b9a with SMTP id i11-20020a17090a2acb00b0023b35cd5b9amr1079069pjg.4.1679659387075; Fri, 24 Mar 2023 05:03:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679659387; cv=pass; d=google.com; s=arc-20160816; b=FbCHAYNcn1obPE9xux5+XZvRp85RHJwVZt20r1z8uKmkVuNX8odUUcI38c/UCZEPpN NOf4hxqTNBdWIIdKj7XX72TltqA5xyJQ4eiLcVt+EPwoYrFpOG0QNig/OgdGw3EHgMUL QuI8aCMvjnnRXGoaM5i/LnNJtS6lidNJLhcFGnM+nTuXO1UH/1gdrDFWKpp/vSVK5LCM CyEHN8uCX8UAuUaZaCTu6lWRjV96oRX+Rpk5YCZilbleT5P4yt1XgHTVDo3f05GRDMGO p5+PqS3PJKC4AZkf6D2i12p9mbh6xn3iX8ZcpNVNG6pbV9hsnUMf4RMquYv5ax1jXPiI hs7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jUJbwQB3iqjUqj0pnXv+tp6fMxB6gLsRL1oFO6Mx2Nc=; b=fmvsjnqSH5l6HfxQDIE22KowlxDR5ILT60Nf6ovqe7LvGfl+XQQ+KyHounYR/Oll67 eUEro/JsFfnlp3eeLPrY0ZgzS1u7k8EvsbvF2Ryb3DnYrHbOfpi4zsEsr2zfihwYAB1F KPrnYpWpQDWm0M2K0+ACBhe/3w721qGuFFifjlAuSOcblbYg01Ea3A0GzYvNrA5z48Z/ RJ8EevPWK1/48z0vHvhbfatRs+ZhMq/piFH1YVlOeefQM6ubxso0tD1Nzo7zhf04kZEW bJfwEE8Av9k4huWxojKAg8DQBn+ZI/pFXddFERqvbr5pUzrgE+LIjMdzMtLTIZ1B1MXU 3dbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b=b+uvwT2Y; arc=pass (i=1); 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h184-20020a636cc1000000b0050bcfe667fdsi20623437pgc.831.2023.03.24.05.02.43; Fri, 24 Mar 2023 05:03:07 -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=@chronox.de header.s=strato-dkim-0002 header.b=b+uvwT2Y; arc=pass (i=1); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229794AbjCXMBZ (ORCPT + 99 others); Fri, 24 Mar 2023 08:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231579AbjCXMBX (ORCPT ); Fri, 24 Mar 2023 08:01:23 -0400 Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3147723C74 for ; Fri, 24 Mar 2023 05:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679659278; cv=none; d=strato.com; s=strato-dkim-0002; b=ky6dkT5btkbDfhrLMIy1LGPiIA7szGH81buvm7MNvfSlgknSR29oFoa1DMviJ1s5yx 47TCbcUEcetaFn5iYFi35kMP3EONSgjfbIdWfUkr4KXDaMLR9MuAewrLa+YxDIza0LYv xDKkREPNssaR+3KTPbzBtJeKe0wpd5WJRGMTolsKasfDrBkfc3TyDpDFERPDJ1KeVTR+ mXm/4L9iTLriBslqzsFXkhVk1LCWRK9Z64SjLLiyJWT7uyQOeLzZHOV8yMaHiv0BNyag fhgHLuwqhy1DFbn0tHO0m23EXQXPFYrWggK6DqDcsPptA+yhkIosK9gH9ecnsSRNmG/g 5tgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1679659278; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=jUJbwQB3iqjUqj0pnXv+tp6fMxB6gLsRL1oFO6Mx2Nc=; b=lVoxYhp6gTJEPAF/HHcCMk/Q9esu6m8RGNE0JcV/2XjapE9I45OyiL7YNTDLyJzLc6 XDbDVEK3Ipz5YAPvRq/AsbGHMvOD7Iyk/1qPa3CDmFrW+zY/U3RKk5AHxuM45+jIAhMi 8nX2+6dVnkhnenwp6vEdz5ddzJmwfIX3fpL7IFowkxIh0CmOS+AY3Thcm6sk4tkerJRc 3jHnlnbygLsGdBXxxXlIjw9TqkLpJxvW71YiL0LtTKLjM5H3KwtJfylb6YsnU5bZQPX4 aDF9nJVaK91cYspxMJ5DwH29qYvyIXKECm4GlQ+J5ud9/j12moC5GBI4WjBycgXDl34J VJtw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1679659278; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=jUJbwQB3iqjUqj0pnXv+tp6fMxB6gLsRL1oFO6Mx2Nc=; b=b+uvwT2Ycr+MAhepwvmIzI6a5bET7/ArgQ+pHskt2Jq/Y1jRpCEjsck/wOCBagp08s ansvpdhyoP3Y9YloojYVa3NwHVqNqlVpt5j86vARWS9ryqg9Q1UQZVmMYRCtPyIEBjBi xKV2Cdb0DfN32JI2JWpsyos+bJwFCxugfRssyuygtJK9x69NtPSKpo8VX03KhadfDj5s 7iUwkiMem+qP9KWpebThMJycdL63QgJE3diLHxjibcqxEN4qL2+7hlH426lfEyIStIgW XUg7boEG6vVq4SSlD7xzopswPK9DQT35u29mvV7g+KrnhQHCAkaRYQEfmuL2X1qC6GHX 3LEA== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9y2gdNk2TvDr2d0uyvAg=" Received: from tauon.chronox.de by smtp.strato.de (RZmta 49.3.1 DYNA|AUTH) with ESMTPSA id u24edez2OC1HdDl (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 24 Mar 2023 13:01:17 +0100 (CET) From: Stephan Mueller To: Herbert Xu Cc: linux-crypto@vger.kernel.org Subject: Re: [PATCH] crypto: Jitter RNG - Permanent and Intermittent health errors Date: Fri, 24 Mar 2023 13:01:16 +0100 Message-ID: <19310206.9zqlukQJUG@tauon.chronox.de> In-Reply-To: References: <12194787.O9o76ZdvQC@positron.chronox.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE autolearn=unavailable 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 Am Freitag, 24. M=E4rz 2023, 10:27:37 CET schrieb Herbert Xu: Hi Herbert, > On Thu, Mar 23, 2023 at 08:17:14AM +0100, Stephan M=FCller wrote: > > @@ -138,29 +139,35 @@ static int jent_kcapi_random(struct crypto_rng *t= fm, > >=20 > > spin_lock(&rng->jent_lock); > >=20 > > - /* Return a permanent error in case we had too many resets in a row. = */ > > - if (rng->reset_cnt > (1<<10)) { > > + /* Enforce a disabled entropy source. */ > > + if (rng->disabled) { > >=20 > > ret =3D -EFAULT; > > goto out; > > =09 > > } >=20 > Can we please get rid of this completely when we're not in FIPS > mode? Remember that jent is now used by all kernel users through > drbg. Having it fail permanently in this fashion is unacceptable. >=20 > If we're not in FIPS mode it should simply carry on or at least > seek another source of entropy, perhaps from the kernel RNG. I will remove that from this patch. I plan to release another patch where t= he=20 oversampling rate will be increased in case of such health errors. This=20 increase in the oversampling rate would handle this issue much more=20 gracefully. Thanks Ciao Stephan