[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87pmv2g1v3.fsf@oc8242746057.ibm.com>
Date: Wed, 28 Jul 2021 12:38:08 +0200
From: Alexander Egorenkov <egorenar@...ux.ibm.com>
To: Luis Chamberlain <mcgrof@...nel.org>,
Bruno Goncalves <bgoncalv@...hat.com>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>,
akpm@...ux-foundation.org, bp@...en8.de, corbet@....net,
gregkh@...uxfoundation.org, jeyu@...nel.org,
linux-kernel@...r.kernel.org, ndesaulniers@...gle.com,
torvalds@...ux-foundation.org, Dave Young <dyoung@...hat.com>
Subject: Re: [PATCH v3 1/2] init/initramfs.c: do unpacking asynchronously
Luis Chamberlain <mcgrof@...nel.org> writes:
> On Tue, Jul 27, 2021 at 09:31:54AM +0200, Bruno Goncalves wrote:
>> On Mon, Jul 26, 2021 at 1:46 PM Rasmus Villemoes
>> <linux@...musvillemoes.dk> wrote:
>> >
>> > On 24/07/2021 09.46, Alexander Egorenkov wrote:
>> > > Hello,
>> > >
>> > > since e7cb072eb988 ("init/initramfs.c: do unpacking asynchronously"), we
>> > > started seeing the following problem on s390 arch regularly:
>> > >
>> > > [ 5.039734] wait_for_initramfs() called before rootfs_initcalls
>
> So some context here, which might help.
>
> The initramfs_cookie is initialized until a a rootfs_initcall() is
> called, in this case populate_rootfs(). The code is small, so might
> as well include it:
>
> static int __init populate_rootfs(void)
> {
> initramfs_cookie = async_schedule_domain(do_populate_rootfs, NULL,
> &initramfs_domain);
> if (!initramfs_async)
> wait_for_initramfs();
> return 0;
> }
> rootfs_initcall(populate_rootfs);
>
> The warning you see comes from a situation where a wait_for_initramfs()
> gets called but we haven't yet initialized initramfs_cookie. There are
> only a few calls for wait_for_initramfs() in the kernel, and the only
> thing I can think of is that somehow s390 may rely on a usermode helper
> early on, but not every time.
>
> What umh calls does s390 issue?
>
>> Unfortunately, we haven't been able to find the root cause, but since
>> June 23rd we haven't hit this panic...
>>
>> Btw, this panic we were hitting only when testing kernels from "scsi"
>> and "block" trees.
>
> Do you use drdb maybe?
>
> Luis
You are right, it looks like wait_for_initramfs() is being triggered by drbg:
[ 3.396467] [<00000001f8d917e4>] call_usermodehelper_exec+0x44/0x1c8
[ 3.396470] [<00000001f8da5524>] __request_module+0x17c/0x3d0
[ 3.396473] [<00000001f93b4808>] crypto_alg_mod_lookup+0x228/0x290
[ 3.396475] [<00000001f93b4aae>] crypto_alloc_tfm_node+0x5e/0x158
[ 3.396477] [<00000001f93bbe14>] crypto_alloc_shash+0x34/0x40
[ 3.396480] [<00000001f93d2ee2>] drbg_init_hash_kernel+0x3a/0x100
[ 3.396482] [<00000001f93d306e>] drbg_alloc_state+0xc6/0x280
[ 3.396484] [<00000001f93d33d8>] drbg_kcapi_seed+0x1b0/0x310
[ 3.396486] [<00000001f93d1884>] crypto_rng_reset+0x5c/0xe0
[ 3.396488] [<00000001f93c1750>] alg_test_drbg+0x300/0x478
[ 3.396490] [<00000001f93c0934>] alg_test+0x304/0x530
[ 3.396493] [<00000001f93bedb8>] cryptomgr_test+0x68/0x70
[ 3.396495] [<00000001f8d9f40c>] kthread+0x14c/0x160
[ 3.396497] [<00000001f8d2af14>] __ret_from_fork+0x3c/0x58
[ 3.396500] [<00000001f984c86a>] ret_from_fork+0xa/0x30
Regards
Alex
Powered by blists - more mailing lists