lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Jun 2023 19:26:45 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Christoph Hellwig <hch@....de>
Cc:     axboe@...nel.dk, linux-kernel@...r.kernel.org,
        Fabio Estevam <festevam@...il.com>
Subject: Re: [PATCH] block: fix rootwait=

On Wed, Jun 07, 2023 at 03:57:46PM +0200, Christoph Hellwig wrote:

> Failures to look up the gendisk must return -ENODEV so that rootwait
> retries the lookup instead of -EINVAL which exits early.

This appears to be causing failures to find a root filesystem located on
a partition on a virtio device virtio-blk when booting on Arm FVP
virtual platforms on today's -next.  With root=/dev/vda1 we find the
device:

[    0.593310] virtio_blk virtio0: 1/0/0 default/read/poll queues
[    0.594413] virtio_blk virtio0: [vda] 2929688 512-byte logical blocks (1.50 GB/1.40 GiB)
[    0.598898]  vda: vda1

but then when it comes time to mount the rootfs we get:

[    1.035643] Waiting for root device /dev/vda1...

instead of mounting the device we already knew about.  A bisect (log
below) lands on this commit and reverting the first hunk:

> @@ -181,7 +181,7 @@ static int __init devt_from_devname(const char *name, dev_t *devt)
>         *p = '\0';
>         *devt = blk_lookup_devt(s, part);
>         if (*devt)
> -               return 0;
> +               return -ENODEV;

avoids the issue and allows us to boot as normal.  I need to stare at
the code a bit more to fully follow the intent of that bit of the change
but I'm about done for today, the commit log just mentions replacing
-EINVAL rather than 0.

Bisect log:

git bisect start
# bad: [db10f126048021b86e43a5d6a335ec49dec10155] Add linux-next specific files for 20230608
git bisect bad db10f126048021b86e43a5d6a335ec49dec10155
# good: [5f63595ebd82f56a2dd36ca013dd7f5ff2e2416a] Merge tag 'input-for-v6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
git bisect good 5f63595ebd82f56a2dd36ca013dd7f5ff2e2416a
# good: [dc3648f0663a83e9399f44faa473ce8891f8a469] Merge branch 'drm-next' of git://git.freedesktop.org/git/drm/drm.git
git bisect good dc3648f0663a83e9399f44faa473ce8891f8a469
# bad: [80f5925ba46062fd05697d83717d67162ae18812] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
git bisect bad 80f5925ba46062fd05697d83717d67162ae18812
# good: [2c5161ad2db3e89b608b89e4994e23ab58db7162] Merge branch 'for-linux-next' of git://anongit.freedesktop.org/drm-intel
git bisect good 2c5161ad2db3e89b608b89e4994e23ab58db7162
# good: [0e425a6896902e0112a4da8cbf71c067ec6d6d8f] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
git bisect good 0e425a6896902e0112a4da8cbf71c067ec6d6d8f
# good: [2dc4eeb36feb4b5baae9ec9ef145c974007d94b8] Merge branch 'for-6.5/block' into for-next
git bisect good 2dc4eeb36feb4b5baae9ec9ef145c974007d94b8
# bad: [e0e9727312109e289bcce88bbd2bbe86b9a209ca] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata.git
git bisect bad e0e9727312109e289bcce88bbd2bbe86b9a209ca
# good: [182faecd1a321d626190cb7e87d814da04c2a083] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
git bisect good 182faecd1a321d626190cb7e87d814da04c2a083
# bad: [f3e6f4e23cc82971bda01ef5cacb716fb564c7aa] Merge branch 'for-6.5/io_uring' into for-next
git bisect bad f3e6f4e23cc82971bda01ef5cacb716fb564c7aa
# bad: [80d994d2a71f88e0809dcaccef2259c791d2e3ef] pktcdvd: Use DEFINE_SHOW_ATTRIBUTE() to simplify code
git bisect bad 80d994d2a71f88e0809dcaccef2259c791d2e3ef
# bad: [3a41db531e5124adaa3a9ab9ca0c724aee85b10c] pktcdvd: Get rid of custom printing macros
git bisect bad 3a41db531e5124adaa3a9ab9ca0c724aee85b10c
# good: [a7cfa0af0c88353b4eb59db5a2a0fbe35329b3f9] blk-ioc: fix recursive spin_lock/unlock_irq() in ioc_clear_queue()
git bisect good a7cfa0af0c88353b4eb59db5a2a0fbe35329b3f9
# bad: [1341c7d2ccf42ed91aea80b8579d35bc1ea381e2] block: fix rootwait=
git bisect bad 1341c7d2ccf42ed91aea80b8579d35bc1ea381e2
# good: [3d2af77e31ade05ff7ccc3658c3635ec1bea0979] blk-cgroup: Reinit blkg_iostat_set after clearing in blkcg_reset_stats()
git bisect good 3d2af77e31ade05ff7ccc3658c3635ec1bea0979
# first bad commit: [1341c7d2ccf42ed91aea80b8579d35bc1ea381e2] block: fix rootwait=

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ