Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3825180rdb; Mon, 11 Dec 2023 00:28:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5wUuGr7vOoNPL6CiIR9KFN09VhupHkQrHxgEyflPNetUDM1u80otESQFCKYo5cWowriEE X-Received: by 2002:a5b:791:0:b0:db4:355c:e78 with SMTP id b17-20020a5b0791000000b00db4355c0e78mr2349727ybq.55.1702283334630; Mon, 11 Dec 2023 00:28:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702283334; cv=none; d=google.com; s=arc-20160816; b=mmTErtfc6VWotZlxj05pnN/midRn05b9BFzW7kI/ZNo7ElSD+AtYeTKyPbzz3Y/4ER 2lzwJ8ZaWA9uSdekWLIar/8p25UJ2Oe5zazbbiwStEelDFXXtk+naPvJA+0yd0nNqDPG 1xFjditHlpCNa2F5cd/Cc0MzRHUeXP8t5sY1BciQcz8zSSLA6QIKPr9ePfAgq163X6+2 pyPwzgJIkmeK/bGuTkhNHeHrYZPl1pPcd/VkA7rl+0sHnVyFyeaIvoRhN4xUIAZ1+lw2 efyPxRLw1h6ilyNEqvOpvcT54TF2Ukomdhc/pfjWOVublhDHzOki8P1P2q6oEkMrFeq3 ELFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=ufmmYMWZz1hooDYvfSWzgc0cpVzmZSEs9cqbx4nTfPE=; fh=Y/7iESzx/GiLaFzjHb1O9incutgFSrUrGBty+ncuWhw=; b=DT0xpFQ1qB0z9VEDHDJ8N/agqPulBlNFMcKkJso4x6QTqdhE8BYVCXXnpLCu2Bm+mO +cXCubGe88DP7gclx2KCTHQH/iObY4AeDnypPqxfK5Za0mwHRATlS77orSHVUHMq62VO dBClUBdYYGp25ZdNCECdktKRgV6h8Soykf+5JiPgARrm/sLkXE7BjttodtcKQJh/E58N 0hdV1UoBh1rg6Nzu8uMrg1IVXuF4EXhUNJ9Ke4pbmvSfwVrZwNOMl5QuukzQf8gqiH1s UEtHYsjJQRHhwyMms7xHiBr2EP/Jwr96uT9DG1B72+gkB8AKe1TZDSVb/iudbVtUPtG2 qybA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-353-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=denx.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id em16-20020ad44f90000000b0067a9ff8b199si7601880qvb.261.2023.12.11.00.28.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 00:28:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-353-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=denx.de 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 42FCF1C2090C for ; Mon, 11 Dec 2023 08:28:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F56E20DCD; Mon, 11 Dec 2023 08:28:47 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 339F4E5; Mon, 11 Dec 2023 00:28:43 -0800 (PST) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 1E6ED1C0050; Mon, 11 Dec 2023 09:28:41 +0100 (CET) Date: Mon, 11 Dec 2023 09:28:40 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: Guenter Roeck , Jan Kara , Daniel =?iso-8859-1?Q?D=EDaz?= , stable@vger.kernel.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, shuah@kernel.org, patches@kernelci.org, lkft-triage@lists.linaro.org, pavel@denx.de, jonathanh@nvidia.com, f.fainelli@gmail.com, sudipm.mukherjee@gmail.com, srw@sladewatkins.net, rwarsow@gmx.de, conor@kernel.org, chrubis@suse.cz, linux-ext4@vger.kernel.org, Ted Tso Subject: Re: ext4 data corruption in 6.1 stable tree (was Re: [PATCH 5.15 000/297] 5.15.140-rc1 review) Message-ID: References: <20231124172000.087816911@linuxfoundation.org> <81a11ebe-ea47-4e21-b5eb-536b1a723168@linaro.org> <20231127155557.xv5ljrdxcfcigjfa@quack3> <20231205122122.dfhhoaswsfscuhc3@quack3> <4118ca20-fb7d-4e49-b08c-68fee0522d3d@roeck-us.net> <2023120643-evade-legal-ee74@gregkh> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sxUy6yRUZNOMIQt4" Content-Disposition: inline In-Reply-To: <2023120643-evade-legal-ee74@gregkh> --sxUy6yRUZNOMIQt4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > So I've got back to this and the failure is a subtle interaction betw= een > > > iomap code and ext4 code. In particular that fact that commit 936e114= a245b6 > > > ("iomap: update ki_pos a little later in iomap_dio_complete") is not = in > > > stable causes that file position is not updated after direct IO write= and > > > thus we direct IO writes are ending in wrong locations effectively > > > corrupting data. The subtle detail is that before this commit if ->en= d_io > > > handler returns non-zero value (which the new ext4 ->end_io handler d= oes), > > > file pos doesn't get updated, after this commit it doesn't get update= d only > > > if the return value is < 0. > > >=20 > > > The commit got merged in 6.5-rc1 so all stable kernels that have > > > 91562895f803 ("ext4: properly sync file size update after O_SYNC dire= ct > > > IO") before 6.5 are corrupting data - I've noticed at least 6.1 is st= ill > > > carrying the problematic commit. Greg, please take out the commit fro= m all > > > stable kernels before 6.5 as soon as possible, we'll figure out proper > > > backport once user data are not being corrupted anymore. Thanks! > > >=20 > >=20 > > Thanks a lot for the update. > >=20 > > Turns out this is causing a regression in chromeos-6.1, and reverting t= he > > offending patch fixes the problem. I suspect anyone running v6.1.64+ may > > have a problem. >=20 > Jan, thanks for the report, and Guenter, thanks for letting me know as > well. I'll go queue up the fix now and push out new -rc releases. Would someone have a brief summary here? I see 6.1.66 is out but I don't see any "Fixes: 91562895f803" tags. Plus, what is the severity of this? It is "data being corrupted when using O_SYNC|O_DIRECT" or does metadata somehow get corrupted, too? Thanks and best regards, Pavel --=20 DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --sxUy6yRUZNOMIQt4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCZXbIOAAKCRAw5/Bqldv6 8vAxAKCOJ3K0As4al5/2B9XBlV2nphZEGACeNMdfkQaFtWLePBti91xTjEsPsio= =qZ/a -----END PGP SIGNATURE----- --sxUy6yRUZNOMIQt4--