Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp219947lqs; Mon, 4 Mar 2024 22:57:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUy1Yf5yjzA0l11Ds9G9aJf3dinR1NKyUeRuUPY/WznwsJgabNcpLfq5Ylt7mjFBoCmxfjcTT4Pl74zpHMES1uQnhkyFt+CDfx8KjfEvw== X-Google-Smtp-Source: AGHT+IEtIA1zisc+EVLWl9VdyjVeBuef9R9Z2OZ8gU4pTdoGbk91K4rSVMAR0OfWe7M56LDxNmNa X-Received: by 2002:a17:906:2406:b0:a44:f4a9:ea3e with SMTP id z6-20020a170906240600b00a44f4a9ea3emr4551721eja.12.1709621853747; Mon, 04 Mar 2024 22:57:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709621853; cv=pass; d=google.com; s=arc-20160816; b=cHeGBmBARxxEmvlc3l4ejfJIEzF0ExXqFHsASIyK6yMt7VNEhCKh7fWl5I01YEHnqV iHTMUdm5OIIo2JP7oSrJXFT/3gwyOhQx05Odgn6CofU1fVL/zjZnwWOiCCBnXz/gBre6 IkePijSZiOzDV03mmBgzQwsPlNFhDD1MigSsiIFcoUaSAdKoT9bVH+nv3niTe12SSLPO SqrCTfQSdwcC9c7TQRGccBOw0spf5Ym8T8/pE3qWNRsEZJS5/FDJtgV6eyQUKip8dE7v dxH7KsLT8bLIH6vu++EQvORCojQn22O7gzIfkwjng0O6Grb/oULjzE12Xrpd2GiWRqFr e9lQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=A36R5Gd/vsG+A0aOpC+BM1uXSTwWNP/Wvxg+ft/N2hc=; fh=jw+sLrNv2dQhAY/V6AyFzLtZY6BV2+8sv8nSViV1YeE=; b=FuCuJLChO+N91hOOkhV1AMcYecRNoNDdtZ+LsYvNdk9IAi8A/25909xSULb0g1dLLp qRdpGXlFfbux7+TOcYduTghXNlXGMkfODBoR/KZajm242VS1xPA4kjLpOwAkyg0mWGIe TyHuo9rPLhDcnb5NEkNwBHice2t5+b9ePGe9vIOiIXC3kVMOCz4S/+FrkCPED/enbnit 8bGBspdK7rDlbR4JzUtSHR2dLfkZ+aziOrN8Qig1N6ytFgEbWfy8F88P5nH4BMz0cym5 F6g+KepU5nr6Avn7EktqgVibSpeHNt7mfzR6Vcl4yUAeDGjaKtR/NHLDSXYbDUjaxN6N 6yVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-91755-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91755-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ky26-20020a170907779a00b00a44eb205b46si2692430ejc.819.2024.03.04.22.57.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 22:57:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91755-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-91755-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91755-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 7C8661F221AC for ; Tue, 5 Mar 2024 06:57:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85C2F7D411; Tue, 5 Mar 2024 06:57:15 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (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 A0B461E520; Tue, 5 Mar 2024 06:57:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709621835; cv=none; b=sUmpwDt4RQggwBcg3y1bo/ZctD3WTPhbOGejgVqEwzFF/5Bk3SAxta0J62admC2JiLk7Y0A3eBrsFOtFVt+0YTw4WDCBYcOuG5Dlrn3w2ReUwbpUBxZqYqFmYFNqWmY4wtHN5qIvgBpaYHOZrqUpLT3DUzu8E++dImiBIryP3iE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709621835; c=relaxed/simple; bh=j5xdkyAxdoy8QAlxjMj5w7uWMdaAuQTOn/PLDJgCo3M=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Gcg0z3nZaQ1bKF4qAxuvOQ6R5ROY2S90nZd5gSj45PMC0ttwRwJdC90GWbSWest5dHFlU9xFY8V/cKNaWS70g6GxI71GJmveuGMnPiiHv2GlDNdqdG7mDkpyp8fE7Snf3yEgX4lA9tNHWhwMWBzykZI6fBAIfrpN94fxSFz9EoE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4TpmY138dPz1xqCv; Tue, 5 Mar 2024 14:55:33 +0800 (CST) Received: from kwepemm600017.china.huawei.com (unknown [7.193.23.234]) by mail.maildlp.com (Postfix) with ESMTPS id D954718002D; Tue, 5 Mar 2024 14:57:09 +0800 (CST) Received: from [10.174.179.234] (10.174.179.234) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 5 Mar 2024 14:57:08 +0800 Message-ID: <7e6f9061-1bb9-4d7d-b679-c0183037cbf2@huawei.com> Date: Tue, 5 Mar 2024 14:57:08 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [bug report] dead loop in generic_perform_write() //Re: [PATCH v7 07/12] iov_iter: Convert iterate*() to inline funcs To: Linus Torvalds , David Howells CC: Al Viro , Jens Axboe , Christoph Hellwig , Christian Brauner , David Laight , Matthew Wilcox , Jeff Layton , , , , , , Kefeng Wang References: <20230925120309.1731676-1-dhowells@redhat.com> <20230925120309.1731676-8-dhowells@redhat.com> <4e80924d-9c85-f13a-722a-6a5d2b1c225a@huawei.com> <769021.1709553367@warthog.procyon.org.uk> From: Tong Tiangen In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600017.china.huawei.com (7.193.23.234) 在 2024/3/5 2:32, Linus Torvalds 写道: > On Mon, 4 Mar 2024 at 03:56, David Howells wrote: >> >> That said, I wonder if: >> >> #ifdef copy_mc_to_kernel >> >> should be: >> >> #ifdef CONFIG_ARCH_HAS_COPY_MC > > Hmm. Maybe. We do have that > > #ifdef copy_mc_to_kernel > > pattern already in , so clearly we've done it both ways. > > I personally like the "just test for the thing you are using" model, > which is then why I did it that way, but I don't have hugely strong > opinions on it. > >> and whether it's possible to find out dynamically if MCEs can occur at all. > > I really wanted to do something like that, and look at the source page > to decide "is this a pmem page that can cause machine checks", but I > didn't find any obvious way to do that. > > Improvement suggestions more than welcome. I used EINJ to simulate hardware memory error and tested it on an ARM64 server. This solution can solve the coredump deadloop problem. I'll sort it out and send the patch. Thanks, Tong. > > Linus > .