[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200727024426.GI23808@casper.infradead.org>
Date: Mon, 27 Jul 2020 03:44:26 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Christoph Hellwig <hch@....de>,
Lukasz Stelmach <l.stelmach@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
linux-kernel@...r.kernel.org, "H. Peter Anvin" <hpa@...or.com>,
Song Liu <song@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-raid@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Shaohua Li <shli@...com>
Subject: Re: [PATCH 16/23] initramfs: simplify clean_rootfs
On Mon, Jul 27, 2020 at 03:41:49AM +0100, Al Viro wrote:
> On Thu, Jul 23, 2020 at 04:27:34PM +0200, Christoph Hellwig wrote:
> > On Thu, Jul 23, 2020 at 04:25:34PM +0200, Lukasz Stelmach wrote:
> > > >> Can you comment out the call to d_genocide? It seems like for your
> > > >> the fact that clean_rootfs didn't actually clean up was a feature and
> > > >> not a bug.
> > > >>
> > > >> I guess the old, pre-2008 code also wouldn't have worked for you in
> > > >> that case.
> > > >
> > > > Did you get a chance to try this?
> > >
> > > Indeed, commenting out d_genocide() helps.
> >
> > So given that people have relied on at least the basic device nodes
> > like /dev/console to not go away since 2008, I wonder if we should just
> > remove clean_rootfs entirely
> >
> > Linus, Al?
>
> First of all, d_genocide() is simply wrong here from VFS point of view. _IF_
> you want recursive removal, you need simple_recursive_remove(path.dentry, NULL).
> And it's a userland-visible change of behaviour.
>
> As for removal of clean_rootfs()... FWIW, the odds of an image that would
> eventually fail accidentally getting past the signature mismatch check are
> fairly low. I've no idea what scenario the author of that thing used to have;
> that would be Shaohua Li <shaohua.li@...el.com>. Cc'd...
Shaohua is now at Facebook.
Powered by blists - more mailing lists