Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4586905rwl; Mon, 3 Apr 2023 07:05:22 -0700 (PDT) X-Google-Smtp-Source: AK7set9JM/ad6ELACl14ZRFax8x3DFWnFx8PiRitkkkiDiMT5CbPFk49fqKK2Ao4rTieQULBnHnn X-Received: by 2002:a05:6a20:be0a:b0:d6:a2f9:ca9a with SMTP id ge10-20020a056a20be0a00b000d6a2f9ca9amr31984085pzb.42.1680530722730; Mon, 03 Apr 2023 07:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680530722; cv=none; d=google.com; s=arc-20160816; b=mbIRo1CSlvAaGWyXoCX/7aiq+Kb3kOywvq5+f1abCQSCKuoOmZohpOzVj0igvjfEIk jfFHlBlAAPO0zUtBdenqCzNj4vr/aEjoK4rJHq2stZU34rfnW53ZZARRiUq8YMP9bZVz IogUBC0Lnzpuld5nLP/204ylL6NHswPaSx22ySN+SoDKhn+3JM9xwhXpUOYZTQN276rf rwd79+0jSfriRXUjg7tgq9yzPYxpZC5jUH+sa12detLKFWoRGeoAy9Zk8LBp7euS3VgY 4Bj88m6IRZtbKo6MCKkcL3HeJnj1voiRjydb3YUhCk5R9Av00ied/ZMn8QOLzGRsJiJA HDpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=JSV0NS/ye8GdnDC7h0zJlqhZ+RPWgtn0mRqw5NaS5OY=; b=sf1jQwMusORkpz4lKRF3nGtmKT3xlDkXP7a1NBBDa3j229U+M8xDx9FGiAsaUrcD+L K9kc32vGN6jz3ICT4gHlgcrnjnd4LPcLkLI8mToXRv4soBLldsIegPd1KJ/Wg7YoXThv 77iE9pwoRTDKYVkzBbw0fFUCb3P9+GcK5goBTFZpGRJo1wVGkDbEcwsyc8zVYmBiw9SF UopBouXlTiJrsTpLG+Ms2U9TKUTM21aDK1poZjhgPtPnHp5+5UCp4mOMusC5pDihqnaf 6q2BfwX3Tv//jlaMLCikODkUn9ji3QQiqBjt2uFW+YU+avrgQTf23WIcKuaWgm1eu4aE SRAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020a655cc2000000b0050fb1a00d3dsi8485300pgt.46.2023.04.03.07.04.58; Mon, 03 Apr 2023 07:05:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232725AbjDCN50 (ORCPT + 99 others); Mon, 3 Apr 2023 09:57:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232749AbjDCN5X (ORCPT ); Mon, 3 Apr 2023 09:57:23 -0400 Received: from p3plwbeout26-04.prod.phx3.secureserver.net (p3plsmtp26-04-2.prod.phx3.secureserver.net [216.69.139.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3776E1BF62 for ; Mon, 3 Apr 2023 06:57:18 -0700 (PDT) Received: from mailex.mailcore.me ([94.136.40.143]) by :WBEOUT: with ESMTP id jKgOpwxkjJzPrjKgPpDhO5; Mon, 03 Apr 2023 06:57:17 -0700 X-CMAE-Analysis: v=2.4 cv=OJjiYQWB c=1 sm=1 tr=0 ts=642adb3d a=EhJYbXVJKsomWlz4CTV+qA==:117 a=84ok6UeoqCVsigPHarzEiQ==:17 a=ggZhUymU-5wA:10 a=IkcTkHD0fZMA:10 a=dKHAf1wccvYA:10 a=v52JICOvAAAA:20 a=4ao_m9BdAAAA:8 a=WCF8PDb0v4YLkHPhQUUA:9 a=QEXdDO2ut3YA:10 a=MsgbvsnFcLE8lbaOJhbn:22 X-SECURESERVER-ACCT: phillip@squashfs.org.uk X-SID: jKgOpwxkjJzPr Received: from 82-69-79-175.dsl.in-addr.zen.co.uk ([82.69.79.175] helo=[192.168.178.33]) by smtp03.mailcore.me with esmtpa (Exim 4.94.2) (envelope-from ) id 1pjKgA-00005A-Od; Mon, 03 Apr 2023 14:57:05 +0100 Message-ID: Date: Mon, 3 Apr 2023 14:57:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 1/2] block: Rework bio_for_each_segment_all() To: Kent Overstreet Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, willy@infradead.org, axboe@kernel.dk, Ming Lei References: <20230327174402.1655365-1-kent.overstreet@linux.dev> <20230327174402.1655365-2-kent.overstreet@linux.dev> <52a5bd5c-d3a1-71d7-e1e5-7965501818bd@squashfs.org.uk> <4753802a-685f-ab56-fed2-22d6eb4cfccd@squashfs.org.uk> <5ab59623-4317-5aff-5173-d7285b5b224c@squashfs.org.uk> From: Phillip Lougher In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailcore-Auth: 439999529 X-Mailcore-Domain: 1394945 X-123-reg-Authenticated: phillip@squashfs.org.uk X-Originating-IP: 82.69.79.175 X-CMAE-Envelope: MS4xfK3f+MDVXoFRtin485DFFzlIRVdxg0qVA+GWjA05vGW2VyzcJIPoCK0uGIhCXDqApniUXrj2Tdan4gdcgZiw474qLG22fi4KZGfdS91yTNjLwLY6d3wY rWvKpfFFzFcsYMhfQj/g4rBr52mOMNpMCDxNC2o45p0loZV5pZAmxC8+JGkj/1ENDO45wb1Yark8w2DfGVgkV34ggESOTjglpFQPEgKkFUHsAvoT7DvFFoow SiM+O2gImWKVlb/yvHJkjQ== X-Spam-Status: No, score=-1.3 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/04/2023 03:28, Kent Overstreet wrote: > On Fri, Mar 31, 2023 at 02:10:15AM +0100, Phillip Lougher wrote: >> On 30/03/2023 19:59, Phillip Lougher wrote: >>> On 30/03/2023 18:55, Kent Overstreet wrote: >>>> On Wed, Mar 29, 2023 at 05:50:27PM +0100, Phillip Lougher wrote: >>>>> There is a problem with the above code, on testing I get the following >>>>> results: >>>>> >>>>> Index 78018785329, offset 49, bvec.bv_len 1024: In same bio, >>>>> metadata length >>>>> 32780 >>>> >>>> Could you share how you're doing your testing? I set up a basic test >>>> (created images using every compression type, tested reading them) and >>>> so far I'm not able to reproduce this. >>> >>> I use a very large Squashfs file that triggers the edge case. >>> >>> That is too big to post, and so I'll see if I can artifically generate >>> a small Squashfs filesystem that triggers the edge case. >>> >>> Phillip >>> >>> >> >> Hi, >> >> This is a Google drive link to a file that triggers the issue. >> >> https://drive.google.com/file/d/1-3-a1BKq62hZGQ6ynioreMSWFMuCV9B4/view?usp=sharing >> >> To reproduce the issue >> >> % mount -t squashfs /mnt -o errors=panic >> >> then either one of the following will produce a panic >> >> % ls /mnt >> % find /mnt -type f | xargs wc > /dev/null > > Appears to be fixed now - updated version of the patchset is at > https://evilpiepirate.org/git/bcachefs.git bio_folio_iter > > Can you confirm, then I'll mail out the updated series? Thw updated patch-set fixes the issues seen. Phillip