Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp865536pxb; Thu, 30 Sep 2021 20:20:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqx7I3GnfNu+MnE6dwThbTiT868dLeA+8EQxYw49PdfY/DizyT/2MUqAygukTiyqPsIqmV X-Received: by 2002:a17:90b:950:: with SMTP id dw16mr10476335pjb.25.1633058441014; Thu, 30 Sep 2021 20:20:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633058441; cv=none; d=google.com; s=arc-20160816; b=MGPfqCYhQ0MapjMNT89LkQoVyCwpD2vzA9Ufnx6l62AjYF03T0rjpgps6HotJIi/8H gKjEqbzkchk/E0Jx8ZZMzm1YdlkFAxKWwKRU/FZhBJxEuITNHPCXD/m3SI1qipP/7Yxp aa0P5HouDGxN9854JlwFh3GDIbqkmlrAmutkPJPVlvxydnB5kv9x3tcnDCFKQM0X11fo jkwlfUZLEoz4C2J2dlWMZivbLRX9v+XFwIG/N77d1rcaeMfL2Hyr3pm6BLGmQZZVFG57 dYbpF5LRWknuOajbhwlkxZcXOhDNEae7wA91l5Rld2cYh42/GqOSja4mDWZG/3csp7Ey vUJg== 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=+DAZbH24gGnEvgR4Ma0py106cQJqiNcgWhplgrLjc6U=; b=z/ND/uUc0tno317uNR3pS5gRKb8TVDx/IUyr3KITjPzUucfPq+mfdgbdPCI76HfKnw hHKSjiLXZeNInHeNDFP3Kmi2F3NS0lqWtI7/f9Y56GtM4nZcMw3N9Fh72CQSDDlHwj91 fXmBm2S4Cw7fOz4Ni3iYX3S8BBu+ltMv/rhAExx9W+srUSTT88B6h5huxm7qxbjI3tXv tT/V2N9V9ViN+s8wCBaeDzrfjm9QcQZdEwL3ifjTN9Y5cI5Y10kr2qTRXNQlN4gnmU+A 4iV6upgtAGUIebvc6DcwN+udjymr4UxdbsH1Ldh6Kgl0xkdwVfMUnumE1xvjeS5dxxCV fu9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si5963798pgd.77.2021.09.30.20.20.14; Thu, 30 Sep 2021 20:20:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbhJADNJ (ORCPT + 99 others); Thu, 30 Sep 2021 23:13:09 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:38659 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230283AbhJADNH (ORCPT ); Thu, 30 Sep 2021 23:13:07 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 1913BER3009042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Sep 2021 23:11:15 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 5AB1015C34A8; Thu, 30 Sep 2021 23:11:14 -0400 (EDT) From: "Theodore Ts'o" To: Ritesh Harjani , linux-ext4@vger.kernel.org Cc: "Theodore Ts'o" , Jan Kara , Andreas Dilger Subject: Re: [PATCH] ext4: Fix loff_t overflow in ext4_max_bitmap_size() Date: Thu, 30 Sep 2021 23:11:13 -0400 Message-Id: <163305786450.211691.6215423597966857187.b4-ty@mit.edu> X-Mailer: git-send-email 2.31.0 In-Reply-To: <594f409e2c543e90fd836b78188dfa5c575065ba.1622867594.git.riteshh@linux.ibm.com> References: <594f409e2c543e90fd836b78188dfa5c575065ba.1622867594.git.riteshh@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sat, 5 Jun 2021 10:39:32 +0530, Ritesh Harjani wrote: > We should use unsigned long long rather than loff_t to avoid > overflow in ext4_max_bitmap_size() for comparison before returning. > w/o this patch sbi->s_bitmap_maxbytes was becoming a negative > value due to overflow of upper_limit (with has_huge_files as true) > > Below is a quick test to trigger it on a 64KB pagesize system. > > [...] Applied, thanks! [1/1] ext4: Fix loff_t overflow in ext4_max_bitmap_size() commit: f9b9e1afe996e8b4a0a2ea8481c41756fff53d08 Best regards, -- Theodore Ts'o