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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 25D81C433F5 for ; Mon, 10 Oct 2022 12:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=j8Y+XiEljVnGD2PysX7T0J8j0dGolb5EY8kbKC4/nvw=; b=wNFUIzpN9GC+6PE6ZnxWAOYZqd gokiFZ97C5XfIBQF8sqZDiSdilFLgQnJiP2uTTLAx0T3CDhFSZpAJnJ9E0MPUH2DbiYxfTnuR3wrz i5ct26yhYSrd8maajC8WRMIncjU7+o7rHM+veQqYciMEyI09GI6NQKbHu9cWl+lwJsf0ceCWMJ6H6 csPuT3dB1Sj4jJi8QNwPYvlHpwNpP2r+rINX/0vaHxiNegh73AP0gGji28rmb9Z0w+ZxnZyV/syHH mdKhmyAhb94YotSZSus6eh1DoVaaUUWQDKb0HBHD2J+hixsBUDy0rDeRzysUQ2lSPRcBr60wWiNk7 MfFOe3Kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohrRo-000iNn-53; Mon, 10 Oct 2022 11:59:52 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohrRk-000iN2-Dw; Mon, 10 Oct 2022 11:59:50 +0000 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 9AC1C60EEA; Mon, 10 Oct 2022 11:59:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC3A9C433D6; Mon, 10 Oct 2022 11:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665403187; bh=ScpiDwtRZFErFYbgpp8J+ei9M73xvToMEZMjQ/4FmlA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B3zNALYAglrG2Nl/ooTOKsrZzAK9F2G06dofings2TssHvoxWNQOOI4IVHB63MyLr PMcpyzi32XCaVkQTnovXNIqp9Jd7cjsDONUxYceOW2uZuvBNbJDbayEl4KphNpq/wD wm3kuRqIleqB/G/Y6az8IIUQAej+ZuFROCKd6jRfBeyweFXdVydSr79YzaYG8sdQ2j T9H8K+RTs2u8KDEnbEZx/Q2TgM9QhQzmSNioB/6qH+t1v3PrMQkNyQ40KAYqAszeTc COVduXobZwzK2w3KY/9B6CM3EXnmf8NA9G2N0VgtVZXcyfL/iFsIO6UeYV3YoGjV2k 0TuyoKS25swJQ== Date: Mon, 10 Oct 2022 12:59:41 +0100 From: Mark Brown To: Florian Fainelli , "Jason A. Donenfeld" , Dominik Brodowski , Herbert Xu Cc: kernelci-results@groups.io, bot@kernelci.org, gtucker@collabora.com, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com Subject: Re: next/pending-fixes bisection: baseline.login on bcm2836-rpi-2-b Message-ID: References: <63426bce.170a0220.b8179.75b2@mx.google.com> MIME-Version: 1.0 In-Reply-To: <63426bce.170a0220.b8179.75b2@mx.google.com> X-Cookie: This sentence no verb. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221010_045948_578747_FFB73567 X-CRM114-Status: GOOD ( 32.94 ) 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: multipart/mixed; boundary="===============7232735768763481851==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7232735768763481851== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aU8Jiq92dpNGT5Dg" Content-Disposition: inline --aU8Jiq92dpNGT5Dg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The KernelCI bisection bot found a boot failure on Raspberry Pi 2B with multi_v7_defconfig+CONFIG_THUMB2_KERNEL on next/pending-fixes triggered by b006c439d58d ("hwrng: core - start hwrng kthread also for untrusted sources"). A RCU stall is detected towards the end of boot reading from the bcm2835 hwrng: <6>[ 3.362859] Freeing initrd memory: 16196K <3>[ 23.160131] rcu: INFO: rcu_sched self-detected stall on CPU <3>[ 23.166057] rcu: 0-....: (2099 ticks this GP) idle=3D03b4/1/0x400000= 02 softirq=3D28/28 fqs=3D1050 <4>[ 23.174895] (t=3D2101 jiffies g=3D-1147 q=3D2353 ncpus=3D4) <4>[ 23.180203] CPU: 0 PID: 49 Comm: hwrng Not tainted 6.0.0 #1 <4>[ 23.186125] Hardware name: BCM2835 <4>[ 23.189837] PC is at bcm2835_rng_read+0x30/0x6c <4>[ 23.194709] LR is at hwrng_fillfn+0x71/0xf4 <4>[ 23.199218] pc : [] lr : [] psr: 40000033 <4>[ 23.205840] sp : f093df70 ip : 00000000 fp : 00000000 <4>[ 23.211404] r10: c3c7e800 r9 : 00000000 r8 : c17e6b20 <4>[ 23.216968] r7 : c17e6b64 r6 : c18b0a74 r5 : c07ccd99 r4 : c3f171c0 <4>[ 23.223855] r3 : 000fffff r2 : 00000040 r1 : c3c7e800 r0 : c3f171c0 <4>[ 23.230743] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA Thumb Se= gment none <4>[ 23.238426] Control: 50c5387d Table: 0020406a DAC: 00000051 <4>[ 23.244519] CPU: 0 PID: 49 Comm: hwrng Not tainted 6.0.0 #1 Similar issues appear to be present with other configurations, for example a plain multi_v7_defconfig: https://storage.kernelci.org/next/pending-fixes/v6.0-9666-g02c05e0b8d5c/arm= /multi_v7_defconfig/gcc-10/lab-collabora/baseline-bcm2836-rpi-2-b.html I've left the full report below with links to more information including full logs, plus a reported-by tag for the bot: On Sat, Oct 08, 2022 at 11:35:58PM -0700, KernelCI bot wrote: > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * This automated bisection report was sent to you on the basis * > * that you may be involved with the breaking commit it has * > * found. No manual investigation has been done to verify it, * > * and the root cause of the problem may be somewhere else. * > * * > * If you do send a fix, please include this trailer: * > * Reported-by: "kernelci.org bot" * > * * > * Hope this helps! * > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >=20 > next/pending-fixes bisection: baseline.login on bcm2836-rpi-2-b >=20 > Summary: > Start: 7871897dadfa Merge branch 'fixes' of git://git.kernel.org/p= ub/scm/linux/kernel/git/sre/linux-power-supply.git > Plain log: https://storage.kernelci.org/next/pending-fixes/v6.0-5324-g= 7871897dadfa9/arm/multi_v7_defconfig+CONFIG_THUMB2_KERNEL=3Dy/gcc-10/lab-co= llabora/baseline-bcm2836-rpi-2-b.txt > HTML log: https://storage.kernelci.org/next/pending-fixes/v6.0-5324-g= 7871897dadfa9/arm/multi_v7_defconfig+CONFIG_THUMB2_KERNEL=3Dy/gcc-10/lab-co= llabora/baseline-bcm2836-rpi-2-b.html > Result: b006c439d58d hwrng: core - start hwrng kthread also for unt= rusted sources >=20 > Checks: > revert: PASS > verify: PASS >=20 > Parameters: > Tree: next > URL: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-= next.git > Branch: pending-fixes > Target: bcm2836-rpi-2-b > CPU arch: arm > Lab: lab-collabora > Compiler: gcc-10 > Config: multi_v7_defconfig+CONFIG_THUMB2_KERNEL=3Dy > Test case: baseline.login >=20 > Breaking commit found: >=20 > -------------------------------------------------------------------------= ------ > commit b006c439d58db625318bf2207feabf847510a8a6 > Author: Dominik Brodowski > Date: Thu Sep 22 15:59:31 2022 +0200 >=20 > hwrng: core - start hwrng kthread also for untrusted sources > =20 > Start the hwrng kthread even if the hwrng source has a quality setting > of zero. Then, every crng reseed interval, one batch of data from this > zero-quality hwrng source will be mixed into the CRNG pool. > =20 > This patch is based on the assumption that data from a hwrng source > will not actively harm the CRNG state. Instead, many hwrng sources > (such as TPM devices), even though they are assigend a quality level = of > zero, actually provide some entropy, which is good enough to mix into > the CRNG pool every once in a while. > =20 > Cc: Herbert Xu > Cc: Jason A. Donenfeld > Signed-off-by: Dominik Brodowski > Signed-off-by: Herbert Xu >=20 > diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c > index d7045dfaf16c..cc002b0c2f0c 100644 > --- a/drivers/char/hw_random/core.c > +++ b/drivers/char/hw_random/core.c > @@ -52,7 +52,7 @@ MODULE_PARM_DESC(default_quality, > =20 > static void drop_current_rng(void); > static int hwrng_init(struct hwrng *rng); > -static void hwrng_manage_rngd(struct hwrng *rng); > +static int hwrng_fillfn(void *unused); > =20 > static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t siz= e, > int wait); > @@ -96,6 +96,15 @@ static int set_current_rng(struct hwrng *rng) > drop_current_rng(); > current_rng =3D rng; > =20 > + /* if necessary, start hwrng thread */ > + if (!hwrng_fill) { > + hwrng_fill =3D kthread_run(hwrng_fillfn, NULL, "hwrng"); > + if (IS_ERR(hwrng_fill)) { > + pr_err("hwrng_fill thread creation failed\n"); > + hwrng_fill =3D NULL; > + } > + } > + > return 0; > } > =20 > @@ -167,8 +176,6 @@ static int hwrng_init(struct hwrng *rng) > rng->quality =3D 1024; > current_quality =3D rng->quality; /* obsolete */ > =20 > - hwrng_manage_rngd(rng); > - > return 0; > } > =20 > @@ -454,10 +461,6 @@ static ssize_t rng_quality_store(struct device *dev, > /* the best available RNG may have changed */ > ret =3D enable_best_rng(); > =20 > - /* start/stop rngd if necessary */ > - if (current_rng) > - hwrng_manage_rngd(current_rng); > - > out: > mutex_unlock(&rng_mutex); > return ret ? ret : len; > @@ -513,9 +516,6 @@ static int hwrng_fillfn(void *unused) > =20 > put_rng(rng); > =20 > - if (!quality) > - break; > - > if (rc <=3D 0) > continue; > =20 > @@ -534,22 +534,6 @@ static int hwrng_fillfn(void *unused) > return 0; > } > =20 > -static void hwrng_manage_rngd(struct hwrng *rng) > -{ > - if (WARN_ON(!mutex_is_locked(&rng_mutex))) > - return; > - > - if (rng->quality =3D=3D 0 && hwrng_fill) > - kthread_stop(hwrng_fill); > - if (rng->quality > 0 && !hwrng_fill) { > - hwrng_fill =3D kthread_run(hwrng_fillfn, NULL, "hwrng"); > - if (IS_ERR(hwrng_fill)) { > - pr_err("hwrng_fill thread creation failed\n"); > - hwrng_fill =3D NULL; > - } > - } > -} > - > int hwrng_register(struct hwrng *rng) > { > int err =3D -EINVAL; > -------------------------------------------------------------------------= ------ >=20 >=20 > Git bisection log: >=20 > -------------------------------------------------------------------------= ------ > git bisect start > # good: [833477fce7a14d43ae4c07f8ddc32fa5119471a2] Merge tag 'sound-6.1-r= c1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound > git bisect good 833477fce7a14d43ae4c07f8ddc32fa5119471a2 > # bad: [7871897dadfa90816daf4963be075236587ada9d] Merge branch 'fixes' of= git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git > git bisect bad 7871897dadfa90816daf4963be075236587ada9d > # good: [1b79573de717cfabe28221a98afaa6a3ff0e7458] crypto: blake2s - reve= rt unintended config addition of CRYPTO_BLAKE2S > git bisect good 1b79573de717cfabe28221a98afaa6a3ff0e7458 > # good: [1db031a4f6c36c02dbdd20d6c8e3f9771cdd4b78] Merge branch 'counter-= current' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter.git > git bisect good 1db031a4f6c36c02dbdd20d6c8e3f9771cdd4b78 > # bad: [2bf13565c357c2cb9fef5d929fbf4fa2541d92de] Merge branch 'master' o= f git://git.kernel.org/pub/scm/virt/kvm/kvm.git > git bisect bad 2bf13565c357c2cb9fef5d929fbf4fa2541d92de > # bad: [b006c439d58db625318bf2207feabf847510a8a6] hwrng: core - start hwr= ng kthread also for untrusted sources > git bisect bad b006c439d58db625318bf2207feabf847510a8a6 > # good: [f78f6f0bf34fd85c17ebcb31d645536112aa25d3] crypto: aspeed - fix b= uild error when only CRYPTO_DEV_ASPEED is enabled > git bisect good f78f6f0bf34fd85c17ebcb31d645536112aa25d3 > # good: [70513e1d65599f39aba4fa6594546f7c81fa59f4] crypto: aspeed - Fix c= heck for platform_get_irq() errors > git bisect good 70513e1d65599f39aba4fa6594546f7c81fa59f4 > # good: [0cb3c9cdf7fcc2ef75a6008223d2e3ee58ea00e1] crypto: octeontx2 - Re= move the unneeded result variable > git bisect good 0cb3c9cdf7fcc2ef75a6008223d2e3ee58ea00e1 > # good: [4edff849f7a0abca962374512907b3e2151091f4] crypto: zip - remove t= he unneeded result variable > git bisect good 4edff849f7a0abca962374512907b3e2151091f4 > # first bad commit: [b006c439d58db625318bf2207feabf847510a8a6] hwrng: cor= e - start hwrng kthread also for untrusted sources > -------------------------------------------------------------------------= ------ >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#32452): https://groups.io/g/kernelci-results/message/= 32452 > Mute This Topic: https://groups.io/mt/94212648/1131744 > Group Owner: kernelci-results+owner@groups.io > Unsubscribe: https://groups.io/g/kernelci-results/unsub [broonie@kernel.o= rg] > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- >=20 >=20 --aU8Jiq92dpNGT5Dg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmNECS0ACgkQJNaLcl1U h9CGFAf9EzBnRni4j58x461oU7Mrt9scFyRlrx3K9EXfYj7yCcVu0yxYdJvJdA4M 4RpWNUI5WYvUDSSnhNyI6awMPcbsqCShOLf7RuzvtMh/un/ErsLux4dhHwC+dOKv yh3jYxCfnibcUWwgmKTR90M7oWsURkKXeGd6+S8J0atdBiTDIc7eLi4GE5SDt8Xu Spy7S654SOfxTM1hsLSWhl97LsaBmF1DTxmE+q48rJ6j8dx64ENrpZdGJer+BHg0 AtqgoJ/naTz0X1kAvrS66a9m+ZyUtAW5LdcPo2Suwm3LMlNYf4igY1bVT9en5X8e LqaZor94lmq3uUXumEFpSkTyOxS2qg== =hVwa -----END PGP SIGNATURE----- --aU8Jiq92dpNGT5Dg-- --===============7232735768763481851== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7232735768763481851==--