Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp525150lqs; Tue, 5 Mar 2024 08:33:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUmJeuKcJ8M+AIp5KWpKaODu1wqCZY37QaP3UBkT5IpQwBH8CWGU+KiZjR7dhJbwMXG4kzHSj4O1PXy/RnYIJtq2ABR2VyDPXdsZOODxg== X-Google-Smtp-Source: AGHT+IGMB5rETVPm+xZuBGEGMrQeaOAObW1sktm0cFBS2+4QVmKU1Qecmo9amY+VPrramTMJdGnH X-Received: by 2002:a17:906:a454:b0:a45:7f60:a724 with SMTP id cb20-20020a170906a45400b00a457f60a724mr3171321ejb.72.1709656425837; Tue, 05 Mar 2024 08:33:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709656425; cv=pass; d=google.com; s=arc-20160816; b=hII2xlGL/92tiUI25y5/gyhjQqF0lKlKAsy1RIu5IP43QX/wbWM55g/HklScRyKxuw FYmU6Jk8djtl2wdHIxpKTWEa75OklFCPYlYTEMBbDTd+hydf2gH+VQg8b+yNokh9H/r+ V61iX0TZJrnwUIePgcm9eMtXmv8sNowoYSAj12Ap9ZOOOKuiXWWQ8RWZQasVU3A6ADn7 f3sighkBtmAkxXH5QJYJJxaeiGpf7V8G726jkWtOQssYVjPOMc+TgJeFqxnBvZ4iJ1Hw +vW2UFYpLkgQTaj+xlzjQ00xEDhoq4ho7QFG03P3AQwQUvgpljwlvGirV5wxtHy3Ybo+ jJ2g== 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=WNJ9vSmdCfSXIJyLvkfzSq9P0EuDYN0/r9yDOuVG/Wc=; fh=kqAhBNObVEzbkn7vgidev4K4dm2KYDeY01Vl3d3Fg/0=; b=bhe7CLbdWxdwp+rpNv37YX73mTmzvSAsiIRXlQTtZoTRtpB0OHBiIrNu6/3JifC/3h f489yLhPjWMl/5o4Wyqm40ZB3t1HljFF2UbYU0UjOMoujbcuOL3ll6vbpYduXNC26KeO 6b/DJaq82jrdFdXn4bc+y2kfuzPQnYo8sBPUuwS4Aq4gEjt7Mbp8++9aPBL7OkPIGeSe Wbb4ncwxyzJQs+/QH3Jc06PbSRSC013OMu9mvWXwyJ1xLInzYxh+MT5Q8xxcIm5ugoT9 it60BNJ1tUMv6XWBOc2xZYvp1YJOtjzlKyVeSv0MQj2xoforOSPwS2eLBpnTreTU3dJp iisg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="eiM/+xGV"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92689-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92689-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h13-20020a170906260d00b00a4469b1cec8si4501013ejc.714.2024.03.05.08.33.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 08:33:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92689-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="eiM/+xGV"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92689-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92689-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8EDAF1F25B64 for ; Tue, 5 Mar 2024 16:33:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AF7DC8F3; Tue, 5 Mar 2024 16:33:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eiM/+xGV" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9F89E8BF7; Tue, 5 Mar 2024 16:33:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709656409; cv=none; b=lGKOocaQ364404TdSTOK6kmmcggI0bNC9POx4AU4BPvq4gT+cT+aM0suI24/NaRIYQbLajzxUmiGcSh6dBiH/W4Eoo6BLgq0Mx0O2LJRxqP375Z7zLmvhUAvq1SH3l3Jri9myiumj6NdQeXylXWEfkfM1PH5fjRYigflFgueZ+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709656409; c=relaxed/simple; bh=8ZYP/7MwdqiNvcPoMantYVW6jsePrsovyNrL/k8U4FU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=so3PNCuvefNV9swf9RuucAU5GOIi6+UkLaYwBOEJC2WyYnyq76Z0OafFLZ4++WESYaUGUPxyOvZ/FXN9752LuyNlcnYy/p73j0BDzJ1FUNtNsnzNe7BHez8tyS9KSNUO3sTjNZjTRQObz2neHKySP6wWRr+BgPMPUh2Zm/SE7W0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eiM/+xGV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A2A3C433F1; Tue, 5 Mar 2024 16:33:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709656409; bh=8ZYP/7MwdqiNvcPoMantYVW6jsePrsovyNrL/k8U4FU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eiM/+xGVUBR7Hm7arb/ZDBR7gbqkbtT9lsm1U66ZKiapEN4GXQhf2UVTTGXKZqO81 pK3NYXDZHX2242ccHULVL8YU8YlRMKxp6IPa5jw/u0+O02NB+jfmtBzLp6XTB6M+mp 07d/Wg8dvMlVp1bCf7TUXKSW4ru8tZxNscRjAE9lB4ZvAAwjLWlI1klaMxLzni7hDy lI2ZvPw5kT0mvPHR38oWAojTDBWLg+co42OyS7gfIKonVqHudunQAO7RTdJg/9z6/t opjICPCEDIVxjKUwmt2oApPqxbVuoZg8IwvF1KeSbrdbVAf8b6njCjGelECuQfgL7c 6ts9SXcUXRE2g== From: Christian Brauner To: Linus Torvalds , Tong Tiangen Cc: Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com, Guohanjun , David Howells , Al Viro , Jens Axboe , Alexander Viro , Jan Kara , Andrew Morton Subject: Re: [PATCH] coredump: get machine check errors early rather than during iov_iter Date: Tue, 5 Mar 2024 17:33:20 +0100 Message-ID: <20240305-staatenlos-vergolden-5c67aef6e2bd@brauner> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305133336.3804360-1-tongtiangen@huawei.com> References: <20240305133336.3804360-1-tongtiangen@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=1508; i=brauner@kernel.org; h=from:subject:message-id; bh=8ZYP/7MwdqiNvcPoMantYVW6jsePrsovyNrL/k8U4FU=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaQ+9wyUiOiW+7iabV/PY8FJZubV28M0e+o+rprXMdPhX eADHTP5jlIWBjEuBlkxRRaHdpNwueU8FZuNMjVg5rAygQxh4OIUgIk05TAyrNLk4WVaVKp/yzCW 2b+/q9t0z42mk28440S3bMosPf4ggZHhS0LbRQObGrMiF66n6onKzsIbqv5lR57JbklmKTH1ncs NAA== X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Content-Transfer-Encoding: 8bit On Tue, 05 Mar 2024 21:33:36 +0800, Tong Tiangen wrote: > The commit f1982740f5e7 ("iov_iter: Convert iterate*() to inline funcs") > leads to deadloop in generic_perform_write()[1], due to return value of > copy_page_from_iter_atomic() changed from non-zero value to zero. > > The code logic of the I/O performance-critical path of the iov_iter is > mixed with machine check[2], actually, there's no need to complicate it, > a more appropriate method is to get the error as early as possible in > the coredump process instead of during the I/O process. In addition, > the iov_iter performance-critical path can have clean logic. > > [...] I'll send this together with two other fixes we have pending. --- Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.fixes [1/1] coredump: get machine check errors early rather than during iov_iter https://git.kernel.org/vfs/vfs/c/da1085a16551