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:   Tue, 07 Mar 2023 09:35:01 +1100
From:   "NeilBrown" <neilb@...e.de>
To:     "Song Liu" <song@...nel.org>
Cc:     "Linux regressions mailing list" <regressions@...ts.linux.dev>,
        Jes.Sorensen@...il.com, "linux-raid" <linux-raid@...r.kernel.org>,
        "LKML" <linux-kernel@...r.kernel.org>,
        "Nikolay Kichukov" <hijacker@...um.net>
Subject: Re: [regression] Bug 217074 - upgrading to kernel 6.1.12 from 5.15.x
 can no longer assemble software raid0

On Tue, 07 Mar 2023, Song Liu wrote:
> On Sun, Mar 5, 2023 at 1:21 PM NeilBrown <neilb@...e.de> wrote:
> >
> > On Sat, 04 Mar 2023, Song Liu wrote:
> > > + Jes.
> > >
> > > It appeared to me that we can assemble the array if we have any of the
> > > following:
> > > 1. Enable CONFIG_BLOCK_LEGACY_AUTOLOAD;
> > > 2. Have a valid /etc/mdadm.conf;
> > > 3. Update mdadm to handle this case. (I tried some ugly hacks, which worked but
> > >     weren't clean).
> > >
> > > Since we eventually would like to get rid of CONFIG_BLOCK_LEGACY_AUTOLOAD, I
> > > think we need mdadm to handle this properly. But the logistics might
> > > be complicated, as
> > > mdadm are shipped separately.
> > >
> > > Jes, what do you think about this? AFAICT, we need to update the logic in
> > > mdopen.c:create_mddev().
> >
> > mdadm already handles this, but only if
> >    CREATE names=yes
> > is present in /etc/mdadm.conf
> >
> > Maybe we should flip the default for the next mdadm release, and patch
> > the kernel (with a stable backport) to select BLOCK_LEGACY_AUTOLOAD if
> > BLK_DEV_MD=m
> > Then revert that - say - 6 months after the new mdadm is released.
> 
> I like this idea. I guess we also need to select BLOCK_LEGACY_AUTOLOAD
> if BLK_DEV_MD=y?

Yes of course - sorry.

Something like the following.

Thanks,
NeilBrown


From: NeilBrown <neilb@...e.de>
Subject: md: select BLOCK_LEGACY_AUTOLOAD

When BLOCK_LEGACY_AUTOLOAD is not enable, mdadm is not able to
activate new arrays unless "CREATE names=yes" appears in
mdadm.conf

As this is a regression we need to always enable BLOCK_LEGACY_AUTOLOAD
for when MD is selected - at least until mdadm is updated and the
updates widely available.

Fixes: fbdee71bb5d8 ("block: deprecate autoloading based on dev_t")
Signed-off-by: NeilBrown <neilb@...e.de>

diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 998a5cfdbc4e..662d219c39bf 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -16,6 +16,10 @@ if MD

 config BLK_DEV_MD
 	tristate "RAID support"
 	select BLOCK_HOLDER_DEPRECATED if SYSFS
+	# BLOCK_LEGACY_AUTOLOAD requirement should be removed
+	# after relevant mdadm enhancements - to make "names=yes"
+	# the default - are widely available.
+	select BLOCK_LEGACY_AUTOLOAD
 	help
 	  This driver lets you combine several hard disk partitions into one
 	  logical block device. This can be used to simply append one


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ