From: Gao Xiang <hsiangkao@redhat.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, yuchao0@huawei.com
Subject: Re: FAILED: patch "[PATCH] erofs: fix extended inode could cross boundary" failed to apply to 4.19-stable tree
Date: Sun, 25 Apr 2021 18:55:34 +0800 [thread overview]
Message-ID: <20210425105534.GA3824039@xiangao.remote.csb> (raw)
In-Reply-To: <YIVHXmitglDYJmKi@kroah.com>
On Sun, Apr 25, 2021 at 12:41:34PM +0200, Greg KH wrote:
> On Sun, Apr 25, 2021 at 06:13:57PM +0800, Gao Xiang wrote:
> > On Sun, Apr 25, 2021 at 11:51:57AM +0200, Greg KH wrote:
> > > On Sun, Apr 25, 2021 at 05:39:13PM +0800, Gao Xiang wrote:
> > > > Hi Greg,
> > > >
> > > > On Sun, Apr 25, 2021 at 10:52:22AM +0200, Greg KH wrote:
> > > > > On Tue, Aug 18, 2020 at 10:55:46AM +0800, Gao Xiang wrote:
> > > > > > On Mon, Aug 17, 2020 at 02:38:46PM +0200, gregkh@linuxfoundation.org wrote:
> > > > > > >
> > > > > > > The patch below does not apply to the 4.19-stable tree.
> > > > > > > If someone wants it applied there, or to any other stable or longterm
> > > > > > > tree, then please email the backport, including the original git commit
> > > > > > > id to <stable@vger.kernel.org>.
> > > > > > >
> > > > > > > thanks,
> > > > > > >
> > > > > > > greg k-h
> > > > > > >
> > > > > > > ------------------ original commit in Linus's tree ------------------
> > > > > > >
> > > > > > > From 0dcd3c94e02438f4a571690e26f4ee997524102a Mon Sep 17 00:00:00 2001
> > > > > > > From: Gao Xiang <hsiangkao@redhat.com>
> > > > > > > Date: Thu, 30 Jul 2020 01:58:01 +0800
> > > > > > > Subject: [PATCH] erofs: fix extended inode could cross boundary
> > > > > > >
> > > > > > > Each ondisk inode should be aligned with inode slot boundary
> > > > > > > (32-byte alignment) because of nid calculation formula, so all
> > > > > > > compact inodes (32 byte) cannot across page boundary. However,
> > > > > > > extended inode is now 64-byte form, which can across page boundary
> > > > > > > in principle if the location is specified on purpose, although
> > > > > > > it's hard to be generated by mkfs due to the allocation policy
> > > > > > > and rarely used by Android use case now mainly for > 4GiB files.
> > > > > > >
> > > > > > > For now, only two fields `i_ctime_nsec` and `i_nlink' couldn't
> > > > > > > be read from disk properly and cause out-of-bound memory read
> > > > > > > with random value.
> > > > > > >
> > > > > > > Let's fix now.
> > > > > > >
> > > > > > > Fixes: 431339ba9042 ("staging: erofs: add inode operations")
> > > > > > > Cc: <stable@vger.kernel.org> # 4.19+
> > > > > > > Link: https://lore.kernel.org/r/20200729175801.GA23973@xiangao.remote.csb
> > > > > > > Reviewed-by: Chao Yu <yuchao0@huawei.com>
> > > > > > > Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
> > > > > >
> > > > > > Yeah, due to code difference, will manually backport this later...
> > > > >
> > > > > What ever happened to this backport? Did I miss it somewhere?
> > > >
> > > > Thanks for your reminder, since the codebase was cleaned up and 4.19
> > > > codebase is somewhat different from the current codebase.
> > > >
> > > > Sorry for forgeting it, and I will try to pick it up and send it out soon.
> > >
> > > No worries, just ran across this and wanted to make sure that I didn't
> > > drop it on my end somewhere.
> >
> > Nope, that was my fault. :)
> >
> > Due to 4.19 erofs staging version was quite an early version (1st upstreaming
> > version), more non-trivial conflicts occur in this patch. But it needs to be
> > fixed with careness if users would like to use 4.19 staging erofs and use
> > extended inode. I'm addressing this now.
> >
> > Yet, I've suggested all Android vendors / users use 5.4+ LTS fs/erofs versions,
> > since in-place decompression has been supported since linux 5.3 which is great
> > for performance. And the 5.4 erofs codebase is already shipped for many other
> > SoC vendors with their in-market products.
>
> I too would recommend that anyone using erofs use a newer version, but
> for those stuck on older kernels like 4.19, they don't seem to be able
> to want to do that.
>
> Should we just mark the filesystem as "BROKEN" on the stable 4.19 tree
> to prevent anyone from using it there? That feels drastic, but it's
> your call what would work best here.
4.19 staging erofs version is also workable with old mkfs (but lack of some
basic performance features compared with other actual in-market instances),
but I'm also saying "yes", it should be better to use Linux 5.4/5.10 LTS or
later codebase directly (or backporting such codebase to 4.19/4.14 manually
rather than directly use 4.19 in-tree staging erofs.)
I agree marking 4.19 staging erofs "BROKEN" may be a better choice here
and suggest them using 5.4/5.10 codebase instead if needed. But I'll still
mark stable patches for 4.19 in case of users using it (Also I will still
go on trying to backport this patch.)
Thanks,
Gao Xiang
>
> thanks,
>
> greg k-h
>
prev parent reply other threads:[~2021-04-25 10:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 12:38 FAILED: patch "[PATCH] erofs: fix extended inode could cross boundary" failed to apply to 4.19-stable tree gregkh
2020-08-18 2:55 ` Gao Xiang
2021-04-25 8:52 ` Greg KH
2021-04-25 9:39 ` Gao Xiang
2021-04-25 9:51 ` Greg KH
2021-04-25 10:13 ` Gao Xiang
2021-04-25 10:41 ` Greg KH
2021-04-25 10:55 ` Gao Xiang [this message]
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=20210425105534.GA3824039@xiangao.remote.csb \
--to=hsiangkao@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
--cc=yuchao0@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).