Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2208574pxk; Sat, 3 Oct 2020 11:51:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9g0xlVt6Umbvm+bb/NlRRUK2eqwpPTz5rO26X/SF6vc2ouFVYtipDeWUoqxYcckWye7AR X-Received: by 2002:a50:9d0a:: with SMTP id v10mr9537212ede.144.1601751080901; Sat, 03 Oct 2020 11:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601751080; cv=none; d=google.com; s=arc-20160816; b=i7x7bk8MtDdfKIQK+ZQqtGWeRlQwhq6YR8Cs6MNLhyBmTRELH0P4wUpcHJuaknKZVB 2b36QLfGp/T2m1QJH31pVX7PO7AAu48WO1KIpz7EQJDLATv2VzF99Mg8ZmHQ2E69Sqqj 5teIUFwFTNbzve6aW2S1XpryL8DZVs/kGOHx8omxL6kTS3PqxoX7hwVWYHtTxz1gGz3O esfvNskJHY9qAlntvIwUZnVr+HmnnCgzgijXzKTniYaxyKZLz0LFwlyVTDkZC8xJIl7v OL5iBAXdVKP9IUZxWVvi5Atd0owmDvxzsYG1Tl/NHlSeY3AXji35IeaQ7bWqkNYocBFZ 3Rzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:reply-to:in-reply-to:references:mime-version :dkim-signature; bh=M+NTwkwx0N9yWO/wezg68AB6eVWtAoDDg6Kty2qKvP4=; b=ioGsJtissJfSSCgASuT8qKHbWEmKDjOuOTIJCiHrRNe6SmfPOklemUZ1OYV1kjndwz 6NVrAGEdQC0KhyPL1n6p3jYT/+jVrSgwC3z7YHl0ALi/z8nb/HRVparNUk99Hpsby0Ti kBiLcRoX7WzXI4S2B2zCzAN5czYh1l/N/R5Ecw69AwU7HltVB19vZszHE9RRvntYFU+t mTiTzdI2v5B8FuHJuqKgxfwWo7WjCJqnRcnAix6iqqZYs3UiqKUXlAPE5oTSad6ftve9 hV6l2/RaG3/gI+zjwtXNb9nb52Vl76L6JABeujE6DPeFi4Z2JIXneU2lTjG+hLNLXyRm mQnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hzBguYBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h23si3999862ejx.721.2020.10.03.11.50.57; Sat, 03 Oct 2020 11:51:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hzBguYBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725828AbgJCSty (ORCPT + 99 others); Sat, 3 Oct 2020 14:49:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725818AbgJCSty (ORCPT ); Sat, 3 Oct 2020 14:49:54 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 087DAC0613D0; Sat, 3 Oct 2020 11:49:54 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id d197so5082994iof.0; Sat, 03 Oct 2020 11:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=M+NTwkwx0N9yWO/wezg68AB6eVWtAoDDg6Kty2qKvP4=; b=hzBguYBkZBzqEmJuug5dfNrRgMRf6oBU/2R4G6OqH0ZlE8g5C+3cfL9s2NOAT7E/Hd hGQ67gOxjyqiarz6Gye17iQkaLwoBT/sPyZSRHeKfiP0YSqONZRVnTRbtTNRfzjfhJnp BdXbK+akhn7RNnn4nLegEW94W+Zo9gUZwPHkPNRmsAiBv/Oz7bgVLTxC6SmJT6CTPxT4 I2Jtb8e1Kvv7Kc0TAqEEwJ6rO3kjFoRBLMDpb5va1XFFcIdDLBDJ0x/jdm9YyDOlrnZz 0zLfHNnVDBY+qZLiVjh40pfXt4lqLMjjXCPT/stvkZQv94+Mc5NyvD8V7yjs4WfFwffA VrkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=M+NTwkwx0N9yWO/wezg68AB6eVWtAoDDg6Kty2qKvP4=; b=a5O/XDBcE0fZOYVPAAvjSyyKYiuV86m0A05LHHuHejFV+CJkCKy6sKanJ+TvmReOhg 7WdB3T3IYXzhcibFahGn0ENgShWrr9Y67JqEW/JPmL+xPJzwh/gF1QC2Y9VkCAE7T4a6 bgkTY2I9xvRgjSRrLph+BXpmKQdyEBFVcU+VgVVqqc62iv3YEvJPGndhT5uHuwXccMvT atS4IuqTdoAIThwpdQneC6vPxUlXSikR/H2nXvD48CF2rbUJEyS/43d4dtrDtKl24C64 dGrOv5IQTGy905AJOdkVYxQF21AIEZlbHjbnitNdVZapiG4oZDa/qfw7YOq1ZV+AgXxD b1tw== X-Gm-Message-State: AOAM533CYk36fhjYHpHrDI001btjHXu8FxmC7hYq9SkaRu2LIEFM/X+Y 20fGoittFq6HzLgWkb9zFjXmpnSQfgApqeFeWhk= X-Received: by 2002:a05:6638:1389:: with SMTP id w9mr7118360jad.138.1601750993142; Sat, 03 Oct 2020 11:49:53 -0700 (PDT) MIME-Version: 1.0 References: <20200928085505.GA22244@shbuild999.sh.intel.com> <74757C2A-7C09-4C2E-9828-E8D12EE4706B@fb.com> <996F1C01-3607-4643-817E-8318DFCE59A9@fb.com> <20200929054730.GA55377@shbuild999.sh.intel.com> In-Reply-To: <20200929054730.GA55377@shbuild999.sh.intel.com> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Sat, 3 Oct 2020 20:49:41 +0200 Message-ID: Subject: Re: PROBLEM: zstd bzImage decompression fails for some x86_32 config on 5.9-rc1 To: Feng Tang Cc: Nick Terrell , Linux Kernel Mailing List , X86 ML , Ingo Molnar , Masahiro Yamada , Linux Kbuild mailing list , "rong.a.chen@intel.com" , "philip.li@intel.com" , Petr Malat Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2020 at 7:47 AM Feng Tang wrote: > > On Tue, Sep 29, 2020 at 05:15:38AM +0000, Nick Terrell wrote: > > > > > > > On Sep 28, 2020, at 11:02 AM, Nick Terrell wrote: > > > > > > > > > > > >> On Sep 28, 2020, at 1:55 AM, Feng Tang 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 confi= g, > > >> 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 rep= ort > > >> as we just tracked down to this point. > > > > > > Thanks for the report, I will look into it today. > > > > CC: Petr Malat > > > > I=E2=80=99ve successfully reproduced, and found the issue. It turns out= that this > > patch [0] from Petr Malat fixes the issue. As I mentioned in that threa= d, 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 work= around > > would be to compress the kernel level 19 instead of level 22, which use= s 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 <=3D 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 > I applied this patch to see if it is OK with x86 64bit - Yes, it is. Feel free to add my: Tested-by: Sedat Dilek - Sedat - > Thanks, > Feng > > > [1] https://github.com/facebook/zstd/commit/8a5c0c98ae5a7884694589d7a69= bc99011add94d > >