linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Gao Xiang <hsiangkao@redhat.com>, <linux-erofs@lists.ozlabs.org>
Cc: LKML <linux-kernel@vger.kernel.org>, stable@vger.kernel.org
Subject: Re: [PATCH] erofs: fix extended inode could cross boundary
Date: Mon, 3 Aug 2020 20:26:22 +0800	[thread overview]
Message-ID: <54db9f70-5c4e-8ba4-0a14-ff6b792fe5b4@huawei.com> (raw)
In-Reply-To: <20200729175801.GA23973@xiangao.remote.csb>

On 2020/7/30 1:58, Gao Xiang wrote:
> 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+
> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

      reply	other threads:[~2020-08-03 12:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 17:58 [PATCH] erofs: fix extended inode could cross boundary Gao Xiang
2020-08-03 12:26 ` Chao Yu [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=54db9f70-5c4e-8ba4-0a14-ff6b792fe5b4@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=hsiangkao@redhat.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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).