Subject: bug#34162: linux-libre 4.20+ fails to mount ext4 on aarch64

From: Efraim Flashner <[email-masked]>
Date: Wed, 23 Jan 2019 19:57:08 +0200

On Wed, Jan 23, 2019 at 07:54:24PM +0200, Efraim Flashner wrote:
> On Wed, Jan 23, 2019 at 11:54:31AM +0100, Ludovic Courtès wrote:
> > Hi Vagrant,
> > 
> > Vagrant Cascadian <[email-masked]> skribis:
> > 
> > > After upgrading to linux-libre 4.20, and again tested with 4.20.3, an
> > > aarch64 system failed to boot (using 4.19.10 worked fine):
> > >
> > > [    3.692351] device-mapper: ioctl: 4.39.0-ioctl (2018-04-03) initialised: [email-masked]
> > > ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/sda6 is mounted.
> > > /dev/sda6: clean, 596262/6553600 files, 7663147/26214400 blocks
> > > [    3.948786] EXT4-fs (sda6): Cannot load crc32c driver.
> > > ERROR: In procedure mount:
> > > In procedure mount: No such file or directory
> > >
> > > Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> > > GNU Guile 2.2.4
> > > Copyright (C) 1995-2017 Free Software Foundation, Inc.
> > >
> > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> > > This program is free software, and you are welcome to redistribute it
> > > under certain conditions; type `,show c' for details.
> > >
> > > Enter `,help' for help.
> > > scheme@(guile-user)>
> > >
> > > Workaround or fix was to add to config.scm:
> > >
> > > (initrd (append (list "crc32c_generic" ... ) %base-initrd-modules))
> > 
> > There are potentially two issues here:
> > 
> >   1. Why wasn’t crc32c_generic.ko automatically pulled in by the initrd
> >      build code?  Isn’t it a dependency of ext4.ko?
> > 
> >   2. Is crc32c_generic built-in in our x86_64 kernel config?
> > 
> $ grep _CRC gnu/packages/aux-files/linux-libre/4.20-{x86_,arm}64.conf
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:# CONFIG_W1_SLAVE_DS2433_CRC is not set
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_PWM_CRC=y
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRYPTO_CRC32C=y
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRYPTO_CRC32C_INTEL=y
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRYPTO_CRC32=m
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRYPTO_CRC32_PCLMUL=m
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRYPTO_CRCT10DIF=y
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRYPTO_CRCT10DIF_PCLMUL=m
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRC_CCITT=y
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRC16=y
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRC_T10DIF=y
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRC_ITU_T=m
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRC32=y
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:# CONFIG_CRC32_SELFTEST is not set
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRC32_SLICEBY8=y
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:# CONFIG_CRC32_SLICEBY4 is not set
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:# CONFIG_CRC32_SARWATE is not set
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:# CONFIG_CRC32_BIT is not set
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRC64=m
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:# CONFIG_CRC4 is not set
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRC7=m
> gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRC8=m
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:# CONFIG_W1_SLAVE_DS2433_CRC is not set
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRYPTO_CRC32C=m
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRYPTO_CRC32=m
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRYPTO_CRCT10DIF=y
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRC_CCITT=m
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRC16=m
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRC_T10DIF=y
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRC_ITU_T=m
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRC32=y
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:# CONFIG_CRC32_SELFTEST is not set
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRC32_SLICEBY8=y
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:# CONFIG_CRC32_SLICEBY4 is not set
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:# CONFIG_CRC32_SARWATE is not set
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:# CONFIG_CRC32_BIT is not set
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRC64=m
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:# CONFIG_CRC4 is not set
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRC7=m
> gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRC8=m
> 
> It looks like the only one that they share that is different is
> CONFIG_CRYPTO_CRC32C
> 
Checked the others right after I sent the previous email:
$ grep _CRC32C gnu/packages/aux-files/linux-libre/4.20-*.conf
gnu/packages/aux-files/linux-libre/4.20-arm.conf:CONFIG_CRYPTO_CRC32C=y
gnu/packages/aux-files/linux-libre/4.20-arm64.conf:CONFIG_CRYPTO_CRC32C=m
gnu/packages/aux-files/linux-libre/4.20-i686.conf:CONFIG_CRYPTO_CRC32C=y
gnu/packages/aux-files/linux-libre/4.20-i686.conf:CONFIG_CRYPTO_CRC32C_INTEL=y
gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRYPTO_CRC32C=y
gnu/packages/aux-files/linux-libre/4.20-x86_64.conf:CONFIG_CRYPTO_CRC32C_INTEL=y

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted