From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx5.sberdevices.ru (mx5.sberdevices.ru [95.181.183.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80AF723E33D for ; Mon, 13 Apr 2026 07:20:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.181.183.35 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776064818; cv=none; b=ce31A5gpaWBG5ZYBIWI/EYMgv5MFkKdUjBo1d3aQPe6T+DI/JRzAZoowHnYTPrdbhxRX5Pku1wGfKKrNCsCbr8HFYBhO6491dKyt7BGjtfbHoJAOGltrytwILkXg4dY8E0h4bBxsrV4DHMO0JzCu3CpVnCbbbeFNBTm3YXcFZhU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776064818; c=relaxed/simple; bh=xhZSM6IYTIGMZj634Prx8fuTeIDZQSYzA7o0A3oFJ3I=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=TaDafRLqOZU3fvxnr29k22TcWmdtRc3UVzBQuaOps314CKkYH4sq0btPo2ZFrqrArMymvCeNiwUNH/gCOrC7koFbDJ2Yc+VXIXzwwFjNLn2mojXFsoTS07JtOLcwtAhSoREWu/gCtEQKw61tO18sRpACrQw4uSL4ZXBx6n5zcfc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=salutedevices.com; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=bCshRACZ; arc=none smtp.client-ip=95.181.183.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="bCshRACZ" Received: from p-antispam-ksmg-gc-msk01.sberdevices.ru (localhost [127.0.0.1]) by mx5.sberdevices.ru (Postfix) with ESMTP id D7AE5240008; Mon, 13 Apr 2026 10:20:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx5.sberdevices.ru D7AE5240008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=post; t=1776064805; bh=2txxPkYhLgXwCoRTgupCKDlZL9Usyjktg6+MNVeT3iA=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:From; b=bCshRACZ6Obd21S51MmJwymbudsBIw2yX2NsQH1JXC+5A3fN7iMaO8TTq2nFEWY7J vYzC/yd3l+vkvNoI+id5ghX+oKsdTgQZMh4a90wqRea7yGt5Qn6qjXDiLcb7dWdh28 JQlb7G0hBH4LvbG1rGK08jkvUmY7ds1v1I7vugVGFumK08L5pUSVzw2vXeea2J6cRS VZQ61HwV87+L0YD/bfYecGWDLjC/DPYRB0oIDKQwjsNmXFqH5u+QoRDJYqTm0/OWZX ExVHYbpkvPVraXtsEFrfqEfy+XVc2FOwtY9FUlfjqtzrpt1bNhZP3l7GV08WjCo24A 0JH18FMALFSRA== Received: from smtp.sberdevices.ru (p-exch-cas-a-m1.sberdevices.ru [172.24.201.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "sberdevices.ru", Issuer "R12" (not verified)) by mx5.sberdevices.ru (Postfix) with ESMTPS; Mon, 13 Apr 2026 10:20:05 +0300 (MSK) Message-ID: <15702a84-ea4f-4d12-b9e5-a37a4c3bb014@salutedevices.com> Date: Mon, 13 Apr 2026 10:20:00 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: erofs pointer corruption and kernel crash To: Gao Xiang CC: , , , , Gao Xiang References: <4a2f3801-fac1-42fe-ae75-da315822e088@salutedevices.com> <2e916997-0557-45e7-831a-b436c07c5ba4@salutedevices.com> <97ca00c7-822d-4b57-9dc0-9b396049adc9@salutedevices.com> <8c0bdfab-dbf2-4f1e-8e2a-ce18f166d841@linux.alibaba.com> <2ca3c8c6-f3ed-40ca-8f5c-1b43df479ad7@salutedevices.com> <36cddf44-3e08-4a19-82ed-04ca178ffab5@linux.alibaba.com> Content-Language: ru From: Arseniy Krasnov In-Reply-To: <36cddf44-3e08-4a19-82ed-04ca178ffab5@linux.alibaba.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: p-exch-cas-a-m2.sberdevices.ru (172.24.201.210) To p-exch-cas-a-m1.sberdevices.ru (172.24.201.216) X-KSMG-AntiPhishing: NotDetected, bases: 2026/04/13 06:13:00 X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Envelope-From: avkrasnov@salutedevices.com X-KSMG-AntiSpam-Info: LuaCore: 98 0.3.98 ca9d2f3beca9ca2a85e178af9d8e97d5fa2c38a3, {Tracking_phishing_log_reg_50_60}, {Tracking_uf_ne_domains}, {Tracking_bl_eng_cat}, {Tracking_arrow_http}, {Tracking_from_domain_doesnt_match_to}, salutedevices.com:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;smtp.sberdevices.ru:7.1.1,5.0.1;git.kernel.org:7.1.1, FromAlignment: s X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiSpam-Lua-Profiles: 202216 [Apr 13 2026] X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Version: 6.1.1.22 X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.1.8310, bases: 2026/04/13 06:49:00 #28394185 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-KATA-Status: Not Scanned X-KSMG-LinksScanning: NotDetected, bases: 2026/04/13 06:13:00 X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 5 13.04.2026 10:08, Gao Xiang пишет: > > > On 2026/4/11 23:10, Arseniy Krasnov wrote: >> >> >> 10.04.2026 18:41, Gao Xiang пишет: >>> Hi Arseniy, >>> >>> On 2026/4/10 21:27, Arseniy Krasnov wrote: >>>> >>>> >>>> 10.04.2026 15:20, Gao Xiang пишет: >>>>> >>>>> >>>>> On 2026/4/10 19:37, Arseniy Krasnov wrote: >>>>> >>>>> (drop unrelated folks since they all subscribed erofs mailing list) >>>>> >>>>>> >>>>>> >>>>>> 10.04.2026 11:31, Gao Xiang wrote: >>>>>>> Hi, >>>>>>> >>>>>>> On 2026/4/10 16:13, Arseniy Krasnov wrote: > > ... > >>>>>>> >>>>>>> I need more informations to find some clues. >>>>>> >>>>>> >>>>>> >>>>>> So reproduced again with this debug patch which adds magic to 'struct z_erofs_pcluster' and prints 'struct folio' >>>>>> when pointer in 'private' is passed to 'erofs_onlinefolio_end()'. In short - 'private' points to 'struct z_erofs_pcluster'. >>>>> First, erofs-utils 1.8.10 doesn't support `-E48bit`: >>>>> only erofs-utils 1.9+ ship it as an experimental >>>>> feature, see Changelog; so I think you're using >>>>> modified erofs-utils 1.8.10: >>>>> https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/ChangeLog >>>>> >>>>> ``` >>>>> erofs-utils 1.9 >>>>> >>>>>    * This release includes the following updates: >>>>>      - Add 48-bit layout support for larger filesystems (EXPERIMENTAL); >>>>> ``` >>>>> >>>>> Second, I'm pretty sure this issue is related to >>>>> experimenal `-E48bit`, and those information is >>>>> not enough for me to find the root cause, so I >>>>> need to find a way to reproduce myself: It may >>>>> take time; you could debug yourself but I don't >>>>> think it's an easy task if you don't quite familiar >>>>> with the EROFS codebase. >>>>> >>>>> Anyway I really suggest if you need a rush solution >>>>> for production, don't use `-E48bit + zstd` like >>>>> this for now: try to use other options like >>>>> `-zzstd -C65536 -Efragments` instead since those >>>>> are common production choices. >>>> >>>> Ok thanks for this advice! One more question: currently we use this options: >>>> "zstd,22 --max-extent-bytes 65536 -E48bit". Ok we remove "zstd,22" and "E48bit", >>>> but what about "--max-extent-bytes 65536" - is it considered stable option? >>>> Or it is better to use your version: "-zzstd -C65536 -Efragments" ? >>> >>> I'm not sure how you find this >>> "zstd,22 --max-extent-bytes 65536 -E48bit" combination. >>> >>> My suggestion based on production is that as long as >>> you don't use `-zzstd` ++ `-E48bit`, it should be fine. >>> >>> If you need smaller images, I suggest: `-zlzma,9 -C65536 -Efragments` >>> Or like Android, they all use `-zlz4hc`, >>> Or zstd, but don't add `-E48bit`. >>> >>> As for "--max-extent-bytes 65536", it can be dropped >>> since if `-E48bit` is not used, it only has negative >>> impacts. >>> >>> In short, `-E48bit` + `-zzstd` + `--max-extent-bytes` >>> enables new unaligned compression for zstd, but it's >>> a relatively new feature, I still still some time to >>> stablize it but my own time is limited and all things >>> are always prioritized. >> >> Ok, thanks for this advice! > > FYI, I can reproduce this issue locally with `-E48bit` > on in 600s. > > I do think it's a `-E48bit` + zstd issue so > non-`-E48bit` won't be impacted and I will find time > to troubleshoot it this week. Yes, without '-E48bit' we also can't reproduce it for entire weekend on several boards. No such panics. Thanks > > Thanks, > Gao Xiang > >> >> Thanks >> >>> >>> Thanks, >>> Gao Xiang >>> >>>> >>>> Thanks >>>> >>>>> >>>>> Thanks, >>>>> Gao Xiang >>> >