Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp962426pxm; Thu, 3 Mar 2022 07:54:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwc88044uwSXgRevJVvPcsB74Rgvba9aCIEHg0Jr/RuiiGvT1a8uZ/FoAsNosI9hDLXndnM X-Received: by 2002:a05:6402:27c7:b0:412:80f9:18af with SMTP id c7-20020a05640227c700b0041280f918afmr35159976ede.127.1646322847556; Thu, 03 Mar 2022 07:54:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646322847; cv=none; d=google.com; s=arc-20160816; b=KL2VJR/Ez93Y35M/99e/YPr0v0O3xKy4tTl55Rl1fTsh9rft5Xv7UKOMdBiYEawQ2o 6oSwBQgwzN0sqbundKnSqKc+j3GNzuZ17pSeONHSAtbypO6fAlNk1c+NWwmyGjGCgluj i5d4x7lDnL8ypfM2kgkA86vcdFXHEZVY4tMQRwxBLWELHdWy3tuaqj0hDp2RvuvTblOP SCBN9cWOC1dXitDt15afE4bEZhuxlEyKbBymO2F1Ys9aICay48K+LveDQirTQpRStFJJ MrjYiECtwaoiDo+Kz1j8GoVDd5vNlwehVfNPXkypn7saYWJpn396+4RJV4WTgwB6tOrG DVAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=IbMXq3Oh2h4kq551/TqLPFCkeBOE4I/lP3lXOWDFpn4=; b=OPQUKKUf5fEAtraQqcTDqCpnM+1LyJ7KbXutAVd9+2nBxv/PrpsElAeJdXQU6NxE94 lU51WWXJNzmIdx6kA2CNuTm8l2B51dF01VTLxS5ymuwFFW1bW6Mhe28gU17DoSUdfzeT Wl80LW6Y98segjLbQwM3tWHpBtXQucT5p3LBLyXWYE2ia8zpYhKitaXQzOnYBR52iwkk MZk2zgPIb0V6b9DHGlZbpQAzhBoF6Ebdf2B0MwnBUpEmVRydybrHyyq/e4zS3lm22AMS VNeXc+dCmQWB+MGEnbBorIUIBGn4V3MxAN1dypcR1GBV4raNqDYQIRCCs5i4Y3NnD67P TzjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a170906770800b006b26c4f1b26si1461499ejm.241.2022.03.03.07.53.34; Thu, 03 Mar 2022 07:54:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232505AbiCCPPw (ORCPT + 99 others); Thu, 3 Mar 2022 10:15:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234357AbiCCPP1 (ORCPT ); Thu, 3 Mar 2022 10:15:27 -0500 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8803847045 for ; Thu, 3 Mar 2022 07:14:37 -0800 (PST) Received: from cwcc.thunk.org (pool-108-7-220-252.bstnma.fios.verizon.net [108.7.220.252]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 223FEHkY016325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 3 Mar 2022 10:14:17 -0500 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 13A4415C3786; Thu, 3 Mar 2022 10:14:16 -0500 (EST) From: "Theodore Ts'o" To: linux-ext4@vger.kernel.org, Zhang Yi Cc: "Theodore Ts'o" , adilger.kernel@dilger.ca, jack@suse.cz, yukuai3@huawei.com Subject: Re: [PATCH v3] ext4: fix underflow in ext4_max_bitmap_size() Date: Thu, 3 Mar 2022 10:14:14 -0500 Message-Id: <164632037182.689479.17594587165510308394.b4-ty@mit.edu> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20220301111704.2153829-1-yi.zhang@huawei.com> References: <20220301111704.2153829-1-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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-ext4@vger.kernel.org On Tue, 1 Mar 2022 19:17:04 +0800, Zhang Yi wrote: > when ext4 filesystem is created with 64k block size, ^extent and > ^huge_file features. the upper_limit would underflow during the > computations in ext4_max_bitmap_size(). The problem is the size of block > index tree for such large block size is more than i_blocks can carry. > So fix the computation to count with this possibility. After this fix, > the 'res' cannot overflow loff_t on the extreme case of filesystem with > huge_files and 64K block size, so this patch also revert commit > 75ca6ad408f4 ("ext4: fix loff_t overflow in ext4_max_bitmap_size()"). > > [...] Applied, thanks! [1/1] ext4: fix underflow in ext4_max_bitmap_size() commit: 5c93e8ecd5bd3bfdee013b6da0850357eb6ca4d8 Best regards, -- Theodore Ts'o