Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp392870rwl; Thu, 30 Mar 2023 18:16:08 -0700 (PDT) X-Google-Smtp-Source: AKy350YjnPndwMrYZErJ4ghL34ngGLbt3J/MkNgGh/G1uFfJ7/M0QoI8iHWK2c1cB1bOob+FwdQT X-Received: by 2002:a05:6a00:a09:b0:62d:dade:833 with SMTP id p9-20020a056a000a0900b0062ddade0833mr2300512pfh.3.1680225368332; Thu, 30 Mar 2023 18:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680225368; cv=none; d=google.com; s=arc-20160816; b=Smp3vXal68o6Qkr+rt+WpdaGh8n2WOFOgGLI8lRg7s9LCZGJPNsqWZLipeeQJKLQxA tq3ynl1nsLG7OEP1v6DYR2iIc6IuKM/hr/270GlPfR6Hv+UVZ3VPGfv8zgaho7RpON7p 3J/jPXsxDfWmjV9S8ghosdoXBD+5hl4qeY4BlinziVsru2krFT1A5Nii+CQwQn51xb8d eYZnOvXY4amwG3MH6m+BEUDER6EZoHJVmH5or51VZfM0WS8ntA82qUygv6M4MWZue7We 2ejuo1xRqFIPJk0JYbcczmXv/g+WA4+4judzS73NSj4B/FKLVBUME+PIMxspDbT9SBto IIGw== 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:references :cc:to:from:subject:user-agent:mime-version:date:message-id; bh=PelnCzQJPBpOuw5liyNHil0F1VWKqecD0FjXsFF9JPQ=; b=sAcCwOA0jc5Qa+5k4bb8bjz8KXcx/nQBAXMtkXQ4jVNwaVR6wue+suf7roNd/Xmww/ KmTSSHve/mYD6uIyqozXaZKS15a0y8twBMGEkGumynMeYoLt0oVqwol34TSkG7N4+C91 5wn7BriSN/VL0cpLigOWau59lUIofo/oU1qJX7NMpBgIlcP1Y54tr8mPUudfWS+bucBt 9vCU42lgmjg7CNiHG2I1EZYwUeJbZkiOHIEcmwutmaxu+xpDDJvmoI2lR74gNTjn545f dw4MOp+AqFj6lpI+vISaX0U2Kj1OtZGPLB7Q6q7CMniI0J/KSHnO/OJd97cmG4BDamJ2 XMjg== 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 x188-20020a6263c5000000b005ecf91666b8si1164016pfb.184.2023.03.30.18.15.57; Thu, 30 Mar 2023 18:16:08 -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 S229671AbjCaBNG (ORCPT + 99 others); Thu, 30 Mar 2023 21:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjCaBNF (ORCPT ); Thu, 30 Mar 2023 21:13:05 -0400 X-Greylist: delayed 165 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 30 Mar 2023 18:13:03 PDT Received: from p3plwbeout25-03.prod.phx3.secureserver.net (p3plsmtp25-03-2.prod.phx3.secureserver.net [216.69.139.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 567FBBDC3 for ; Thu, 30 Mar 2023 18:13:03 -0700 (PDT) Received: from mailex.mailcore.me ([94.136.40.141]) by :WBEOUT: with ESMTP id i3HUpUgzYhXpBi3HWpZnnm; Thu, 30 Mar 2023 18:10:18 -0700 X-CMAE-Analysis: v=2.4 cv=Z88poFdA c=1 sm=1 tr=0 ts=642632fa a=bheWAUFm1xGnSTQFbH9Kqg==:117 a=84ok6UeoqCVsigPHarzEiQ==:17 a=ggZhUymU-5wA:10 a=IkcTkHD0fZMA:10 a=k__wU0fu6RkA:10 a=v52JICOvAAAA:20 a=OzmVjPQ5Tx5mEpMD0PMA:9 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: phillip@squashfs.org.uk X-SID: i3HUpUgzYhXpB Received: from 82-69-79-175.dsl.in-addr.zen.co.uk ([82.69.79.175] helo=[192.168.178.33]) by smtp02.mailcore.me with esmtpa (Exim 4.94.2) (envelope-from ) id 1pi3HU-000BSU-JI; Fri, 31 Mar 2023 02:10:16 +0100 Message-ID: <5ab59623-4317-5aff-5173-d7285b5b224c@squashfs.org.uk> Date: Fri, 31 Mar 2023 02:10:15 +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() From: Phillip Lougher 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> In-Reply-To: <4753802a-685f-ab56-fed2-22d6eb4cfccd@squashfs.org.uk> 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: MS4xfEmkHjiJMxqjqDT1bqM25V1sruMQxYj6fcWMOKDoQi8zNMk8RqSiqDeDYB5ezroMyvMJRimKmQzWFK3gZtfshyMTDAlcgQaX59hebdoa1OFapn3uLLN8 prnz06TA3Tk3E2nuuyQye5jgGLmd662uaKW4PUNQLUDWyeLyx8TPBKvY1UC43b2NchvzLGjDJ9qcyAXL679qXKIEh7uIHno3HjRDTIPWQe+Nks1CkbmkPvOS zzzNnmsBoQ8HdCsDZ3kbbw== X-Spam-Status: No, score=0.0 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 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 Phillip