Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1203165lqm; Thu, 2 May 2024 08:02:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUctgw038heRpOQjXKR6YHEhCKDrOwszXR0U+S2+gDk4de7s9Tx04vDT5xHw6A8s3GPFcXHNwNCbsJaH1tWXBdlh6mUrLtgGDXooi3glA== X-Google-Smtp-Source: AGHT+IHHT2fJzS9EX3zc3lblfU3WM12ICQIP3ZOyXo91tmzSEapPyKA0BbbgODV78i/lH9Opbyrp X-Received: by 2002:a9d:7d8e:0:b0:6ed:51e8:4d0b with SMTP id j14-20020a9d7d8e000000b006ed51e84d0bmr104301otn.11.1714662152561; Thu, 02 May 2024 08:02:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714662152; cv=pass; d=google.com; s=arc-20160816; b=SwBLvu+I1c33dLSlw1LKrhJ8TcU8/MI/5J0fa6D7iP4psUR9HVbdnV9oI1CvvA+Ke7 jP9/V2cvMHYm0cISTY3XWV87phcmY62MsKicDDvD4V6vz7pCuNmeJMZXveEEvJXtTqLb s7j1xY6v6+n4ehYQ44y/dGMmzG+P0opic4dpCOyH7ex3PUxdjLC1gUXHvwHOd4QAvdl0 GABFAKOIC2uoc1R7aEe9XdSc5FBLg7gEQnNN3B4ZVXY1mv7bZtUTqFiXwpmlaMzyp3KA V5w1rjuVd7pSqUR03dAfV1dcXNg7jPfwWNGknIcAVBzRKKbI1TnMqCnC84qA0FE1hBy+ kFCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=JR52nggQZWfUmENivxZcKYRaIXuqgrtJvq+qw8Lw9Hk=; fh=T54JR9xnpG9hZJxdPOK6MBeLRp+0QlCGXaxxK/p8Zv8=; b=jY2rRXVQxsnj1i6sRgt7abYWnHkFTd2MQb2AGYTPmU8ciFF+Qu6M9DoywkJNXNyyYH JjwzLJVHTLNujDfylC8uj6Mhs8xr2l13+AcJ5Z2cFrQyUlpZRZ0w2UMTMg8kXXgOZhO4 V727sv2f0br32R7pjRi+H0zn40zGONj7pRfe5MM1E606NwGqYU1/MOuVRQFblTkC79i/ FlAo02CdyEraP+5v2oqm9jicIv2V29DCwhUKyJtmWrOvf33f8Bw2E1NyHn9kRZ+W6mBj i1KZM4B9/3Optwxx/+W1kFQVSJk0SYapR2oHxbBZ+V1bhDdoNtywlIe+X6Nnxz8vks8B 9e9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=PQYu2pjI; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-ext4+bounces-2263-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bt50-20020a05683039f200b006ed5a12e50dsi346945otb.269.2024.05.02.08.02.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:02:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2263-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=PQYu2pjI; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-ext4+bounces-2263-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F0D5728904C for ; Thu, 2 May 2024 14:51:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22D9215359A; Thu, 2 May 2024 14:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b="PQYu2pjI" X-Original-To: linux-ext4@vger.kernel.org Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 196731E526 for ; Thu, 2 May 2024 14:51:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.9.28.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661514; cv=none; b=RkcHSIP2IMhOyYuuQysohdoLUZ045AwZD7J0IjCdc/CulP6wPPpVuFppqFzzFq7mMz6Jwn/2XcXUkCBw65yEczNdrKiPzOx1iZQgOgvC4CL585TvxhjOY2D+L+z5zF0a7RHdHpL1Kknmaeba4au5XvbR2/hKeQQfBCQPDS3AkbQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661514; c=relaxed/simple; bh=WPgF3F69+qFKERSg7dMFGdM8ADSRBEOSxQ03oIZjEf0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eONukfP9juSsHV3iK8iJZFqXAieqhY4m2bCTej9NdXGQlraAU2oSFEUhVPIvHnXNR6khmSsp+h1BVTc2pFoWRs8uMsXsRwTw4OKXVsnTzaKDUbR3cCQ5rWDRGw1Qab5pVckbjY9eLA/ZnmCdvUwApY7WBMvyOuans0v5+Spy0mI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b=PQYu2pjI; arc=none smtp.client-ip=18.9.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Received: from cwcc.thunk.org (pool-108-26-156-33.bstnma.fios.verizon.net [108.26.156.33]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 442EpYE7032603 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 2 May 2024 10:51:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1714661497; bh=JR52nggQZWfUmENivxZcKYRaIXuqgrtJvq+qw8Lw9Hk=; h=From:Subject:Date:Message-ID:MIME-Version:Content-Type; b=PQYu2pjIXuElk9PJbHlNvKspB/mzsOm4RvSeWI1H5DWyzAp5NlNiegbdjVV6kQma6 oW9c2glpBS+HB/hu4a2/BDpD5urcidcVeMwuFj+mKqJq9JtpaDIRYuc0yKh62+nPsj AohDgOqoHYMx2gwYHKSA4URxlubb86RsAdCO34g4DJN/ocCigCJHcitpf2KB3zgK9/ 0Zv5UiDDtVgrIm4yy/0fF6lXlpfdGmGPuavTJIzltCxu4P2XC6ZxzogvEnAbc2Wb0N vnwOrevVfULcB/40BrbfyHp8SXQvj54QvROifLK8WkoBpu3bxVpWwsJZZSE2Wd8r5C s7tGSC+G3zAjQ== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 3DB9F15C02BB; Thu, 2 May 2024 10:51:34 -0400 (EDT) From: "Theodore Ts'o" To: linux-ext4@vger.kernel.org, "Ritesh Harjani (IBM)" Cc: "Theodore Ts'o" , Jan Kara , stable@kernel.org Subject: Re: [PATCH 1/2] ext4: Fixes len calculation in mpage_journal_page_buffers Date: Thu, 2 May 2024 10:51:31 -0400 Message-ID: <171466148381.2958828.7901686717993253303.b4-ty@mit.edu> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Thu, 29 Feb 2024 11:40:13 +0530, Ritesh Harjani (IBM) wrote: > Truncate operation can race with writeback, in which inode->i_size can get > truncated and therefore size - folio_pos() can be negative. This fixes the > len calculation. However this path doesn't get easily triggered even > with data journaling. > > Applied, thanks! [1/2] ext4: Fixes len calculation in mpage_journal_page_buffers commit: c2a09f3d782de952f09a3962d03b939e7fa7ffa4 [2/2] ext4: Remove PAGE_MASK dependency on mpage_submit_folio commit: 53c17fe55a06cbb405b94d96759611d725d2c47a Best regards, -- Theodore Ts'o