From: Feng Tang <feng.tang@intel.com>
To: Nick Terrell <terrelln@fb.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
X86 ML <x86@kernel.org>, Sedat Dilek <sedat.dilek@gmail.com>,
Ingo Molnar <mingo@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
"rong.a.chen@intel.com" <rong.a.chen@intel.com>,
"philip.li@intel.com" <philip.li@intel.com>,
Petr Malat <oss@malat.biz>
Subject: Re: PROBLEM: zstd bzImage decompression fails for some x86_32 config on 5.9-rc1
Date: Tue, 29 Sep 2020 13:47:30 +0800 [thread overview]
Message-ID: <20200929054730.GA55377@shbuild999.sh.intel.com> (raw)
In-Reply-To: <996F1C01-3607-4643-817E-8318DFCE59A9@fb.com>
On Tue, Sep 29, 2020 at 05:15:38AM +0000, Nick Terrell wrote:
>
>
> > On Sep 28, 2020, at 11:02 AM, Nick Terrell <terrelln@fb.com> wrote:
> >
> >
> >
> >> On Sep 28, 2020, at 1:55 AM, Feng Tang <feng.tang@intel.com> wrote:
> >>
> >> Hi Nick,
> >>
> >> 0day has found some kernel decomprssion failure case since 5.9-rc1 (X86_32
> >> build), and it could be related with ZSTD code, though initially we bisected
> >> to some other commits.
> >>
> >> The error messages are:
> >> Decompressing Linux...
> >>
> >> ZSTD-compressed data is corrupt
> >>
> >> This could be reproduced by compiling the kernel with attached config,
> >> and use QEMU to boot it.
> >>
> >> We suspect it could be related with the kernel size, as we only see
> >> it on big kernel, and some more info are:
> >>
> >> * If we remove a lot of kernel config to build a much smaller kernel,
> >> it will boot fine
> >>
> >> * If we change the zstd algorithm from zstd22 to zstd19, the kernel will
> >> boot fine with below patch
> >>
> >> Please let me know if you need more info, and sorry for the late report
> >> as we just tracked down to this point.
> >
> > Thanks for the report, I will look into it today.
>
> CC: Petr Malat
>
> I’ve successfully reproduced, and found the issue. It turns out that this
> patch [0] from Petr Malat fixes the issue. As I mentioned in that thread, his
> fix corresponds to this upstream commit [1].
Glad to know there is already a fix.
> Can we get Petr's patch merged into v5.9?
>
> This bug only happens when the window size is > 8 MB. A non-kernel workaround
> would be to compress the kernel level 19 instead of level 22, which uses an
> 8 MB window size, instead of a 128 MB window size.
>
> The reason it only shows up for large kernels, is that the code is only buggy
> when an offset > 8 MB is used, so a kernel <= 8 MB can't trigger the bug.
>
> Best,
> Nick
>
> [0] https://lkml.org/lkml/2020/9/14/94
With this patch, all the failed cases on my side could boot fine.
Tested-by: Feng Tang <feng.tang@intel.com>
Thanks,
Feng
> [1] https://github.com/facebook/zstd/commit/8a5c0c98ae5a7884694589d7a69bc99011add94d
next prev parent reply other threads:[~2020-09-29 5:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200928085505.GA22244@shbuild999.sh.intel.com>
2020-09-28 9:53 ` Sedat Dilek
2020-09-28 18:02 ` Nick Terrell
2020-09-29 5:15 ` Nick Terrell
2020-09-29 5:47 ` Feng Tang [this message]
2020-10-03 18:49 ` Sedat Dilek
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=20200929054730.GA55377@shbuild999.sh.intel.com \
--to=feng.tang@intel.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mingo@kernel.org \
--cc=oss@malat.biz \
--cc=philip.li@intel.com \
--cc=rong.a.chen@intel.com \
--cc=sedat.dilek@gmail.com \
--cc=terrelln@fb.com \
--cc=x86@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
all inboxes | Powered by JetHome®