From: cuigaosheng <cuigaosheng1@huawei.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: <davem@davemloft.net>, <linux-crypto@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next 2/2] crypto: crc32c - add missing Kconfig option select
Date: Thu, 25 Aug 2022 20:55:12 +0800 [thread overview]
Message-ID: <35ec0aed-ee54-b6ea-1d34-06839b20befb@huawei.com> (raw)
In-Reply-To: <Ywc36LxM2+0eqKu2@gondor.apana.org.au>
Thanks for your reply.
While I was debugging the kernel code of linux-next, I start the kernel
with qemu-system-arm with following commands:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- vexpress_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j32
qemu-system-arm -M vexpress-a9 -m 1024M -s -nographic -kernel arch/arm/boot/zImage \
-dtb arch/arm/boot/dts/vexpress-v2p-ca9.dtb -sd /home/rootfs.sd \
-append "root=/dev/mmcblk0 rw console=ttyAMA0"
But it failed, so I tried to locate the cause of the failure and finally found that
it failed from this patch(cad439fc040e crypto: api - Do not create test larvals if manager is disabled),
logs as follows:
> EXT4-fs (mmcblk0): Cannot load crc32c driver. VFS: Cannot open root
> device "mmcblk0" or unknown-block(179,0): error -80 Please append a
> correct "root=" boot option; here are the available partitions: 1f00
> 131072 mtdblock0 (driver?) 1f01 32768 mtdblock1 (driver?) b300 32768
> mmcblk0 driver: mmcblk Kernel panic - not syncing: VFS: Unable to
> mount root fs on unknown-block(179,0) CPU: 0 PID: 1 Comm: swapper/0
> Not tainted 5.15.0-rc1+ #1 Hardware name: ARM-Versatile Express
> [<8010f334>] (unwind_backtrace) from [<8010b08c>]
> (show_stack+0x10/0x14) [<8010b08c>] (show_stack) from [<8083f2a4>]
> (dump_stack_lvl+0x40/0x4c) [<8083f2a4>] (dump_stack_lvl) from
> [<8083b210>] (panic+0xf8/0x2f4) [<8083b210>] (panic) from [<80b0175c>]
> (mount_block_root+0x178/0x200) [<80b0175c>] (mount_block_root) from
> [<80b01bac>] (prepare_namespace+0x150/0x18c) [<80b01bac>]
> (prepare_namespace) from [<8084384c>] (kernel_init+0x10/0x124)
> [<8084384c>] (kernel_init) from [<80100130>] (ret_from_fork+0x14/0x24)
> Exception stack(0x8108bfb0 to 0x8108bff8) bfa0: ???????? ????????
> ???????? ???????? bfc0: ???????? ???????? ???????? ???????? ????????
> ???????? ???????? ???????? bfe0: ???????? ???????? ???????? ????????
> ???????? ???????? ---[ end Kernel panic - not syncing: VFS: Unable to
> mount root fs on unknown-block(179,0) ]---
In the patch, crypto_alloc_test_larval will return NULL if CONFIG_CRYPTO_MANAGER disabled, so
I checked to see if this change was the cause "EXT4-fs (mmcblk0): Cannot load crc32c driver
", the success logs does not have this error.
When I enabled CONFIG_CRYPTO_MANAGER, kernel can be boot successfully.
Could that be the reason? I would be very grateful if you could give me some advice.
Thanks very much!
在 2022/8/25 16:50, Herbert Xu 写道:
> On Thu, Aug 25, 2022 at 04:41:38PM +0800, Gaosheng Cui wrote:
>> The CRYPTO_CRC32C is using functions provided by CRYPTO_MANAGER,
>> otherwise the following error will occur:
>>
>> EXT4-fs (mmcblk0): Cannot load crc32c driver.
>>
>> So select CRYPTO_MANAGER when enable CRYPTO_CRC32C.
>>
>> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
>> ---
>> crypto/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/crypto/Kconfig b/crypto/Kconfig
>> index b1ccf873779d..7f124604323b 100644
>> --- a/crypto/Kconfig
>> +++ b/crypto/Kconfig
>> @@ -641,6 +641,7 @@ config CRYPTO_CRC32C
>> tristate "CRC32c CRC algorithm"
>> select CRYPTO_HASH
>> select CRC32
>> + select CRYPTO_MANAGER
>> help
>> Castagnoli, et al Cyclic Redundancy-Check Algorithm. Used
>> by iSCSI for header and data digests and by others.
> Why exactly does it need CRYPTO_MANAGER?
>
> Cheers,
next prev parent reply other threads:[~2022-08-25 12:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 8:41 [PATCH -next 0/2] A few fixup patches for crypto Gaosheng Cui
2022-08-25 8:41 ` [PATCH -next 1/2] crypto: api - Fix IS_ERR() vs NULL check Gaosheng Cui
2022-08-25 8:50 ` Herbert Xu
2022-08-25 13:10 ` cuigaosheng
2022-09-02 10:25 ` Herbert Xu
2022-08-25 8:41 ` [PATCH -next 2/2] crypto: crc32c - add missing Kconfig option select Gaosheng Cui
2022-08-25 8:50 ` Herbert Xu
2022-08-25 12:55 ` cuigaosheng [this message]
2022-09-02 10:23 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35ec0aed-ee54-b6ea-1d34-06839b20befb@huawei.com \
--to=cuigaosheng1@huawei.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®