2021-11-04 07:28:59

by Damien Le Moal

[permalink] [raw]
Subject: Re: [PATCH] crypto: api - Do not create test larvals if manager is disabled

On 2021/11/03 0:41, Geert Uytterhoeven wrote:
> Hi Herbert,
>
> On Tue, 19 Oct 2021, Herbert Xu wrote:
>> On Tue, Oct 05, 2021 at 07:33:28PM -0700, Nathan Chancellor wrote:
>>> I assume this is the diff you mean? This does not resolve the issue. My
>>> apologies if I am slow to respond, I am on vacation until the middle of
>>> next week.
>>
>> Sorry for the delay. The kernel robot figured out the problem
>> for me. It's the crypto_alg_tested call that causes api.c to
>> depend on algapi.c. This call is only invoked in the case where
>> the crypto manager is turned off. We could instead simply make
>> test larvals disappear in that case.
>>
>> ---8<---
>> The delayed boot-time testing patch created a dependency loop
>> between api.c and algapi.c because it added a crypto_alg_tested
>> call to the former when the crypto manager is disabled.
>>
>> We could instead avoid creating the test larvals if the crypto
>> manager is disabled. This avoids the dependency loop as well
>> as saving some unnecessary work, albeit in a very unlikely case.
>>
>> Reported-by: Nathan Chancellor <[email protected]>
>> Reported-by: Naresh Kamboju <[email protected]>
>> Reported-by: kernel test robot <[email protected]>
>> Fixes: adad556efcdd ("crypto: api - Fix built-in testing dependency failures")
>> Signed-off-by: Herbert Xu <[email protected]>
>
> Thanks for your patch, which is now commit cad439fc040efe5f
> ("crypto: api - Do not create test larvals if manager is disabled").
>
> I have bisected a failure to mount the root file system on k210 to this
> commit.
>
> Dmesg before/after:
>
> mmcblk0: mmc0:0000 SA04G 3.68 GiB
> random: fast init done
> mmcblk0: p1
> -EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
> -VFS: Mounted root (ext4 filesystem) readonly on device 179:1.
> +EXT4-fs (mmcblk0p1): Cannot load crc32c driver.
> +VFS: Cannot open root device "mmcblk0p1" or unknown-block(179,1): error -80

p1 exist as the message 2 lines above shows. And since the mount error is -80
(ELIBBAD), it is really all about crypto. Since the default k210 config compile
everything in-kernel (no modules), it should work. Was crc32c compiled as a
module ? If yes, then the k210 will need to be booted with U-Boot and use a real
initrd, which likely will all end-up in a no memory situation. ext4 in itself
will consume way too much memory...

> +Please append a correct "root=" boot option; here are the available partitions:
> +b300 3858432 mmcblk0
> + driver: mmcblk
> + b301 3854336 mmcblk0p1 00000000-01
>
>> --- a/crypto/algapi.c
>> +++ b/crypto/algapi.c
>> @@ -216,6 +216,32 @@ void crypto_remove_spawns(struct crypto_alg *alg, struct list_head *list,
>> }
>> EXPORT_SYMBOL_GPL(crypto_remove_spawns);
>>
>> +static struct crypto_larval *crypto_alloc_test_larval(struct crypto_alg *alg)
>> +{
>> + struct crypto_larval *larval;
>> +
>> + if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER))
>> + return NULL;
>> +
>> + larval = crypto_larval_alloc(alg->cra_name,
>> + alg->cra_flags | CRYPTO_ALG_TESTED, 0);
>> + if (IS_ERR(larval))
>> + return larval;
>> +
>> + larval->adult = crypto_mod_get(alg);
>> + if (!larval->adult) {
>> + kfree(larval);
>> + return ERR_PTR(-ENOENT);
>> + }
>> +
>> + refcount_set(&larval->alg.cra_refcnt, 1);
>> + memcpy(larval->alg.cra_driver_name, alg->cra_driver_name,
>> + CRYPTO_MAX_ALG_NAME);
>> + larval->alg.cra_priority = alg->cra_priority;
>> +
>> + return larval;
>> +}
>> +
>> static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
>> {
>> struct crypto_alg *q;
>> @@ -250,31 +276,20 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
>> goto err;
>> }
>>
>> - larval = crypto_larval_alloc(alg->cra_name,
>> - alg->cra_flags | CRYPTO_ALG_TESTED, 0);
>> + larval = crypto_alloc_test_larval(alg);
>> if (IS_ERR(larval))
>> goto out;
>>
>> - ret = -ENOENT;
>> - larval->adult = crypto_mod_get(alg);
>> - if (!larval->adult)
>> - goto free_larval;
>> -
>> - refcount_set(&larval->alg.cra_refcnt, 1);
>> - memcpy(larval->alg.cra_driver_name, alg->cra_driver_name,
>> - CRYPTO_MAX_ALG_NAME);
>> - larval->alg.cra_priority = alg->cra_priority;
>> -
>> list_add(&alg->cra_list, &crypto_alg_list);
>> - list_add(&larval->alg.cra_list, &crypto_alg_list);
>> +
>> + if (larval)
>> + list_add(&larval->alg.cra_list, &crypto_alg_list);
>>
>> crypto_stats_init(alg);
>>
>> out:
>> return larval;
>>
>> -free_larval:
>> - kfree(larval);
>> err:
>> larval = ERR_PTR(ret);
>> goto out;
>> @@ -403,10 +418,11 @@ int crypto_register_alg(struct crypto_alg *alg)
>> down_write(&crypto_alg_sem);
>> larval = __crypto_register_alg(alg);
>> test_started = static_key_enabled(&crypto_boot_test_finished);
>> - larval->test_started = test_started;
>> + if (!IS_ERR_OR_NULL(larval))
>> + larval->test_started = test_started;
>> up_write(&crypto_alg_sem);
>>
>> - if (IS_ERR(larval))
>> + if (IS_ERR_OR_NULL(larval))
>> return PTR_ERR(larval);
>>
>> if (test_started)
>> @@ -616,8 +632,8 @@ int crypto_register_instance(struct crypto_template *tmpl,
>> larval = __crypto_register_alg(&inst->alg);
>> if (IS_ERR(larval))
>> goto unlock;
>> -
>> - larval->test_started = true;
>> + else if (larval)
>> + larval->test_started = true;
>>
>> hlist_add_head(&inst->list, &tmpl->instances);
>> inst->tmpl = tmpl;
>> @@ -626,7 +642,7 @@ int crypto_register_instance(struct crypto_template *tmpl,
>> up_write(&crypto_alg_sem);
>>
>> err = PTR_ERR(larval);
>> - if (IS_ERR(larval))
>> + if (IS_ERR_OR_NULL(larval))
>> goto err;
>>
>> crypto_wait_for_test(larval);
>> diff --git a/crypto/api.c b/crypto/api.c
>> index ee5991fe11f8..cf0869dd130b 100644
>> --- a/crypto/api.c
>> +++ b/crypto/api.c
>> @@ -167,11 +167,8 @@ void crypto_wait_for_test(struct crypto_larval *larval)
>> int err;
>>
>> err = crypto_probing_notify(CRYPTO_MSG_ALG_REGISTER, larval->adult);
>> - if (err != NOTIFY_STOP) {
>> - if (WARN_ON(err != NOTIFY_DONE))
>> - goto out;
>> - crypto_alg_tested(larval->alg.cra_driver_name, 0);
>> - }
>> + if (WARN_ON_ONCE(err != NOTIFY_STOP))
>> + goto out;
>>
>> err = wait_for_completion_killable(&larval->completion);
>> WARN_ON(err);
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>


--
Damien Le Moal
Western Digital Research


2021-11-04 07:58:34

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] crypto: api - Do not create test larvals if manager is disabled

Hi Damien,

On Thu, Nov 4, 2021 at 8:29 AM Damien Le Moal <[email protected]> wrote:
> On 2021/11/03 0:41, Geert Uytterhoeven wrote:
> > On Tue, 19 Oct 2021, Herbert Xu wrote:
> >> On Tue, Oct 05, 2021 at 07:33:28PM -0700, Nathan Chancellor wrote:
> >>> I assume this is the diff you mean? This does not resolve the issue. My
> >>> apologies if I am slow to respond, I am on vacation until the middle of
> >>> next week.
> >>
> >> Sorry for the delay. The kernel robot figured out the problem
> >> for me. It's the crypto_alg_tested call that causes api.c to
> >> depend on algapi.c. This call is only invoked in the case where
> >> the crypto manager is turned off. We could instead simply make
> >> test larvals disappear in that case.
> >>
> >> ---8<---
> >> The delayed boot-time testing patch created a dependency loop
> >> between api.c and algapi.c because it added a crypto_alg_tested
> >> call to the former when the crypto manager is disabled.
> >>
> >> We could instead avoid creating the test larvals if the crypto
> >> manager is disabled. This avoids the dependency loop as well
> >> as saving some unnecessary work, albeit in a very unlikely case.
> >>
> >> Reported-by: Nathan Chancellor <[email protected]>
> >> Reported-by: Naresh Kamboju <[email protected]>
> >> Reported-by: kernel test robot <[email protected]>
> >> Fixes: adad556efcdd ("crypto: api - Fix built-in testing dependency failures")
> >> Signed-off-by: Herbert Xu <[email protected]>
> >
> > Thanks for your patch, which is now commit cad439fc040efe5f
> > ("crypto: api - Do not create test larvals if manager is disabled").
> >
> > I have bisected a failure to mount the root file system on k210 to this
> > commit.
> >
> > Dmesg before/after:
> >
> > mmcblk0: mmc0:0000 SA04G 3.68 GiB
> > random: fast init done
> > mmcblk0: p1
> > -EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
> > -VFS: Mounted root (ext4 filesystem) readonly on device 179:1.
> > +EXT4-fs (mmcblk0p1): Cannot load crc32c driver.
> > +VFS: Cannot open root device "mmcblk0p1" or unknown-block(179,1): error -80
>
> p1 exist as the message 2 lines above shows. And since the mount error is -80
> (ELIBBAD), it is really all about crypto. Since the default k210 config compile
> everything in-kernel (no modules), it should work. Was crc32c compiled as a
> module ? If yes, then the k210 will need to be booted with U-Boot and use a real
> initrd, which likely will all end-up in a no memory situation. ext4 in itself
> will consume way too much memory...

Everything is built-in, including crc32c. It worked fine, until the commit
referenced.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2021-11-04 12:16:50

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: api - Do not create test larvals if manager is disabled

On Thu, Nov 04, 2021 at 08:58:16AM +0100, Geert Uytterhoeven wrote:
> Hi Damien,
>
> On Thu, Nov 4, 2021 at 8:29 AM Damien Le Moal <[email protected]> wrote:
> > On 2021/11/03 0:41, Geert Uytterhoeven wrote:
>
> > > Thanks for your patch, which is now commit cad439fc040efe5f
> > > ("crypto: api - Do not create test larvals if manager is disabled").
> > >
> > > I have bisected a failure to mount the root file system on k210 to this
> > > commit.
> > >
> > > Dmesg before/after:
> > >
> > > mmcblk0: mmc0:0000 SA04G 3.68 GiB
> > > random: fast init done
> > > mmcblk0: p1
> > > -EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
> > > -VFS: Mounted root (ext4 filesystem) readonly on device 179:1.
> > > +EXT4-fs (mmcblk0p1): Cannot load crc32c driver.
> > > +VFS: Cannot open root device "mmcblk0p1" or unknown-block(179,1): error -80
> >
> > p1 exist as the message 2 lines above shows. And since the mount error is -80
> > (ELIBBAD), it is really all about crypto. Since the default k210 config compile
> > everything in-kernel (no modules), it should work. Was crc32c compiled as a
> > module ? If yes, then the k210 will need to be booted with U-Boot and use a real
> > initrd, which likely will all end-up in a no memory situation. ext4 in itself
> > will consume way too much memory...
>
> Everything is built-in, including crc32c. It worked fine, until the commit
> referenced.

Can someone please send me the Kconfig used in this case?

Thanks,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2021-11-04 13:11:50

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] crypto: api - Do not create test larvals if manager is disabled

Hi Herbert,

On Thu, Nov 4, 2021 at 1:16 PM Herbert Xu <[email protected]> wrote:
> On Thu, Nov 04, 2021 at 08:58:16AM +0100, Geert Uytterhoeven wrote:
> > On Thu, Nov 4, 2021 at 8:29 AM Damien Le Moal <[email protected]> wrote:
> > > On 2021/11/03 0:41, Geert Uytterhoeven wrote:
> >
> > > > Thanks for your patch, which is now commit cad439fc040efe5f
> > > > ("crypto: api - Do not create test larvals if manager is disabled").
> > > >
> > > > I have bisected a failure to mount the root file system on k210 to this
> > > > commit.
> > > >
> > > > Dmesg before/after:
> > > >
> > > > mmcblk0: mmc0:0000 SA04G 3.68 GiB
> > > > random: fast init done
> > > > mmcblk0: p1
> > > > -EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
> > > > -VFS: Mounted root (ext4 filesystem) readonly on device 179:1.
> > > > +EXT4-fs (mmcblk0p1): Cannot load crc32c driver.
> > > > +VFS: Cannot open root device "mmcblk0p1" or unknown-block(179,1): error -80
> > >
> > > p1 exist as the message 2 lines above shows. And since the mount error is -80
> > > (ELIBBAD), it is really all about crypto. Since the default k210 config compile
> > > everything in-kernel (no modules), it should work. Was crc32c compiled as a
> > > module ? If yes, then the k210 will need to be booted with U-Boot and use a real
> > > initrd, which likely will all end-up in a no memory situation. ext4 in itself
> > > will consume way too much memory...
> >
> > Everything is built-in, including crc32c. It worked fine, until the commit
> > referenced.
>
> Can someone please send me the Kconfig used in this case?

My config is nommu_k210_sdcard_defconfig with the changes below:

diff --git a/arch/riscv/configs/nommu_k210_sdcard_defconfig.orig
b/arch/riscv/configs/nommu_k210_sdcard_defconfig
index 61f887f65419950c..f14ea3803cea5f3d 100644
--- a/arch/riscv/configs/nommu_k210_sdcard_defconfig.orig
+++ b/arch/riscv/configs/nommu_k210_sdcard_defconfig
@@ -1,3 +1,5 @@
+CONFIG_WERROR=y
+CONFIG_LOCALVERSION="-k210"
# CONFIG_CPU_ISOLATION is not set
CONFIG_LOG_BUF_SHIFT=13
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
@@ -21,16 +23,15 @@ CONFIG_EMBEDDED=y
CONFIG_SLOB=y
# CONFIG_MMU is not set
CONFIG_SOC_CANAAN=y
-CONFIG_SOC_CANAAN_K210_DTB_SOURCE="k210_generic"
-CONFIG_MAXPHYSMEM_2GB=y
+CONFIG_SOC_CANAAN_K210_DTB_SOURCE="sipeed_maix_bit"
CONFIG_SMP=y
CONFIG_NR_CPUS=2
CONFIG_CMDLINE="earlycon console=ttySIF0 rootdelay=2 root=/dev/mmcblk0p1 ro"
CONFIG_CMDLINE_FORCE=y
# CONFIG_SECCOMP is not set
# CONFIG_STACKPROTECTOR is not set
-# CONFIG_GCC_PLUGINS is not set
-# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_EFI_PARTITION is not set
# CONFIG_MQ_IOSCHED_DEADLINE is not set
# CONFIG_MQ_IOSCHED_KYBER is not set
CONFIG_BINFMT_FLAT=y
@@ -39,10 +40,16 @@ CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_FW_LOADER is not set
# CONFIG_ALLOW_DEV_COREDUMP is not set
+CONFIG_MTD=y
+# CONFIG_MTD_OF_PARTS is not set
+CONFIG_MTD_SPI_NOR=y
# CONFIG_BLK_DEV is not set
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
# CONFIG_VT is not set
+# CONFIG_UNIX98_PTYS is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_LDISC_AUTOLOAD is not set
# CONFIG_HW_RANDOM is not set
@@ -52,7 +59,6 @@ CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_SPI=y
-# CONFIG_SPI_MEM is not set
CONFIG_SPI_DESIGNWARE=y
CONFIG_SPI_DW_MMIO=y
# CONFIG_GPIO_CDEV_V1 is not set
@@ -61,6 +67,7 @@ CONFIG_GPIO_SIFIVE=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_SYSCON=y
# CONFIG_HWMON is not set
+# CONFIG_HID is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y
# CONFIG_PWRSEQ_EMMC is not set
@@ -72,8 +79,9 @@ CONFIG_LEDS_GPIO=y
CONFIG_LEDS_USER=y
# CONFIG_VIRTIO_MENU is not set
# CONFIG_VHOST_MENU is not set
-# CONFIG_SURFACE_PLATFORMS is not set
-CONFIG_EXT2_FS=y
+# CONFIG_NVMEM is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_USE_FOR_EXT2 is not set
# CONFIG_FILE_LOCKING is not set
# CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY_USER is not set
@@ -82,8 +90,8 @@ CONFIG_LSM="[]"
CONFIG_PRINTK_TIME=y
# CONFIG_SYMBOLIC_ERRNAME is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
-# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
# CONFIG_FRAME_POINTER is not set
+CONFIG_VMLINUX_MAP=y
# CONFIG_DEBUG_MISC is not set
CONFIG_PANIC_ON_OOPS=y
# CONFIG_SCHED_DEBUG is not set

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2021-11-04 13:31:05

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: api - Do not create test larvals if manager is disabled

On Thu, Nov 04, 2021 at 02:11:34PM +0100, Geert Uytterhoeven wrote:
>
> My config is nommu_k210_sdcard_defconfig with the changes below:

Could you send me the actual config? Just in case something weird
happened during the kconfig process and options got flipped from
their default values.

Thanks,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2021-11-04 15:18:46

by Ido Schimmel

[permalink] [raw]
Subject: Re: [PATCH] crypto: api - Do not create test larvals if manager is disabled

On Thu, Nov 04, 2021 at 09:30:44PM +0800, Herbert Xu wrote:
> On Thu, Nov 04, 2021 at 02:11:34PM +0100, Geert Uytterhoeven wrote:
> >
> > My config is nommu_k210_sdcard_defconfig with the changes below:
>
> Could you send me the actual config? Just in case something weird
> happened during the kconfig process and options got flipped from
> their default values.

I can confirm Geert's observation. My system boots successfully with
cad439fc040e^, but fails with cad439fc040e. This is the error in the
kernel log:

EXT4-fs (sda3): Cannot load crc32c driver.

Attached my config. I can easily test patches.

Thanks


Attachments:
(No filename) (616.00 B)
config (108.06 kB)
Download all attachments

2021-11-05 07:26:56

by Herbert Xu

[permalink] [raw]
Subject: crypto: api - Fix boot-up crash when crypto manager is disabled

On Thu, Nov 04, 2021 at 05:18:34PM +0200, Ido Schimmel wrote:
>
> Attached my config. I can easily test patches.

Thanks!

Could you all try this patch please?

---8<---
When the crypto manager is disabled, we need to explicitly set
the crypto algorithms' tested status so that they can be used.

Fixes: cad439fc040e ("crypto: api - Do not create test larvals if...")
Reported-by: Geert Uytterhoeven <[email protected]>
Reported-by: Ido Schimmel <[email protected]>
Reported-by: Guenter Roeck <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

diff --git a/crypto/algapi.c b/crypto/algapi.c
index d379fd91fb7b..a366cb3e8aa1 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -284,6 +284,8 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)

if (larval)
list_add(&larval->alg.cra_list, &crypto_alg_list);
+ else
+ alg->cra_flags |= CRYPTO_ALG_TESTED;

crypto_stats_init(alg);

--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2021-11-05 13:26:20

by Guenter Roeck

[permalink] [raw]
Subject: Re: crypto: api - Fix boot-up crash when crypto manager is disabled

On Fri, Nov 05, 2021 at 03:26:08PM +0800, Herbert Xu wrote:
> On Thu, Nov 04, 2021 at 05:18:34PM +0200, Ido Schimmel wrote:
> >
> > Attached my config. I can easily test patches.
>
> Thanks!
>
> Could you all try this patch please?
>
> ---8<---
> When the crypto manager is disabled, we need to explicitly set
> the crypto algorithms' tested status so that they can be used.
>
> Fixes: cad439fc040e ("crypto: api - Do not create test larvals if...")
> Reported-by: Geert Uytterhoeven <[email protected]>
> Reported-by: Ido Schimmel <[email protected]>
> Reported-by: Guenter Roeck <[email protected]>
> Signed-off-by: Herbert Xu <[email protected]>

Tested-by: Guenter Roeck <[email protected]>

>
> diff --git a/crypto/algapi.c b/crypto/algapi.c
> index d379fd91fb7b..a366cb3e8aa1 100644
> --- a/crypto/algapi.c
> +++ b/crypto/algapi.c
> @@ -284,6 +284,8 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
>
> if (larval)
> list_add(&larval->alg.cra_list, &crypto_alg_list);
> + else
> + alg->cra_flags |= CRYPTO_ALG_TESTED;
>
> crypto_stats_init(alg);
>
> --
> Email: Herbert Xu <[email protected]>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2021-11-05 14:33:37

by Ido Schimmel

[permalink] [raw]
Subject: Re: crypto: api - Fix boot-up crash when crypto manager is disabled

On Fri, Nov 05, 2021 at 03:26:08PM +0800, Herbert Xu wrote:
> On Thu, Nov 04, 2021 at 05:18:34PM +0200, Ido Schimmel wrote:
> >
> > Attached my config. I can easily test patches.
>
> Thanks!
>
> Could you all try this patch please?
>
> ---8<---
> When the crypto manager is disabled, we need to explicitly set
> the crypto algorithms' tested status so that they can be used.
>
> Fixes: cad439fc040e ("crypto: api - Do not create test larvals if...")
> Reported-by: Geert Uytterhoeven <[email protected]>
> Reported-by: Ido Schimmel <[email protected]>
> Reported-by: Guenter Roeck <[email protected]>
> Signed-off-by: Herbert Xu <[email protected]>

Tested-by: Ido Schimmel <[email protected]>

Thanks, Herbert!

2021-11-05 18:00:28

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: crypto: api - Fix boot-up crash when crypto manager is disabled

Hi Herbert,

On Fri, Nov 5, 2021 at 8:26 AM Herbert Xu <[email protected]> wrote:
> Could you all try this patch please?
>
> ---8<---
> When the crypto manager is disabled, we need to explicitly set
> the crypto algorithms' tested status so that they can be used.
>
> Fixes: cad439fc040e ("crypto: api - Do not create test larvals if...")
> Reported-by: Geert Uytterhoeven <[email protected]>
> Reported-by: Ido Schimmel <[email protected]>
> Reported-by: Guenter Roeck <[email protected]>
> Signed-off-by: Herbert Xu <[email protected]>

Thanks!

Tested-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds