From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50FA3C433DB for ; Tue, 23 Feb 2021 15:34:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DD16F64E20 for ; Tue, 23 Feb 2021 15:34:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD16F64E20 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amacapital.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 72B056B006E; Tue, 23 Feb 2021 10:34:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6DA346B0070; Tue, 23 Feb 2021 10:34:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57AAE6B0071; Tue, 23 Feb 2021 10:34:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id 42AC96B006E for ; Tue, 23 Feb 2021 10:34:00 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 04823814A for ; Tue, 23 Feb 2021 15:34:00 +0000 (UTC) X-FDA: 77849928240.07.0D03F4F Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by imf24.hostedemail.com (Postfix) with ESMTP id 14FE1A0002DD for ; Tue, 23 Feb 2021 15:33:49 +0000 (UTC) Received: by mail-pl1-f172.google.com with SMTP id d16so1177412plg.0 for ; Tue, 23 Feb 2021 07:33:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=S1+694tF7E6JOAf32EqgTXj/ubixpJ18hXdr8aPWDgI=; b=ngI0rU01hqa40qg2u4VlRUqm7wgIOZH9Lo+aTRNgzkK1of1tdZYDsLDeM3bnImibnp 1i/0USARwUi98V6w1t1REkAkyscY8CtbG6D13TkF4Aq1YoRYzalAzBe/6tuySpb41ZBZ MArEOMogQRMgVIgfD7EPHqJVo1YMTyltkKXMlnpRhSzfa10s2YM2AlxIiM3OvMzTKFT3 UU3ROBZ/1pWcAKZhdK4AeN7Ubo6z4W/hqW+tMs1XEzLk+l8XoTglqEbFaVV3FvPXYeTM QHo4xkQfOZ0k2ZXsVFH6cU2hSf2YovEtg5Nz7y4mIqvz3T/09pUhzL30+00ayJcHXwKA 35hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=S1+694tF7E6JOAf32EqgTXj/ubixpJ18hXdr8aPWDgI=; b=eNIUZOp8bKiTtxSr98SqEFU6OG9YQXr5Kjn5XSv2xccxjYKESRRjcjKpx52lGoThyX 1Kht+HWBr3WButFfnOipCT7O4PAuEHp8pMDCw68+476pS1/Dz1OMr0ayoJZDedILCmHy /xjhI2RPWLLVxA2e6vW2Aj4xJNS6H2rxjsfp9y+OQ1hYcFX0oX58UNG5mG5tTEpRcWhx GN7hush6ypsK3o4Xgy/lOhLEGTB5gljT/RaMc8g+HX68SNkawuP37QUSCCdUjB9QapMz j4m3UbIRIrvEQUBqhHD6i3kmyoZP/JCGYVeGyigRUj571F/m0Sya7Xq2PymVoRn/hmfd clrA== X-Gm-Message-State: AOAM530DFd+U5AGBRCc8ZyKjlzs4vUdwQGtNaS7p1sCZP1jxiJ0Y7Xmh ansBOXQofATzhcdtIvgQqKNSaw== X-Google-Smtp-Source: ABdhPJzoRKhmfzQGuTbH5ITlI5Le0B+bcvxH1DrTPvM8crTJxrwekIakZjx/PditZmlrkpz5AeZJVQ== X-Received: by 2002:a17:90a:b292:: with SMTP id c18mr29248288pjr.134.1614094428836; Tue, 23 Feb 2021 07:33:48 -0800 (PST) Received: from ?IPv6:2601:646:c200:1ef2:2488:1c5a:27b:935? ([2601:646:c200:1ef2:2488:1c5a:27b:935]) by smtp.gmail.com with ESMTPSA id 3sm21357516pfd.45.2021.02.23.07.33.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Feb 2021 07:33:47 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v3] x86/fault: Send a SIGBUS to user process always for hwpoison page access. Date: Tue, 23 Feb 2021 07:33:46 -0800 Message-Id: <788DFBA0-903F-4548-9C2F-B1A1543EE770@amacapital.net> References: <20210223204436.1df73153@alex-virtual-machine> Cc: =?utf-8?Q?"HORIGUCHI_NAOYA=28=E5=A0=80=E5=8F=A3=E3=80=80=E7=9B=B4?= =?utf-8?Q?=E4=B9=9F=29"?= , tony.luck@intel.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, yangfeng1@kingsoft.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org In-Reply-To: <20210223204436.1df73153@alex-virtual-machine> To: Aili Yao X-Mailer: iPhone Mail (18D52) X-Stat-Signature: qd5yn4k6jwgy7emgz4635sy1xsgu3of4 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 14FE1A0002DD Received-SPF: none (amacapital.net>: No applicable sender policy available) receiver=imf24; identity=mailfrom; envelope-from=""; helo=mail-pl1-f172.google.com; client-ip=209.85.214.172 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614094429-755696 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > On Feb 23, 2021, at 4:44 AM, Aili Yao wrote: >=20 > =EF=BB=BFOn Fri, 5 Feb 2021 17:01:35 +0800 > Aili Yao wrote: >=20 >> When one page is already hwpoisoned by MCE AO action, processes may not >> be killed, processes mapping this page may make a syscall include this >> page and result to trigger a VM_FAULT_HWPOISON fault, as it's in kernel >> mode it may be fixed by fixup_exception, current code will just return >> error code to user code. >>=20 >> This is not sufficient, we should send a SIGBUS to the process and log >> the info to console, as we can't trust the process will handle the error >> correctly. >>=20 >> Suggested-by: Feng Yang >> Signed-off-by: Aili Yao >> --- >> arch/x86/mm/fault.c | 62 +++++++++++++++++++++++++++++---------------- >> 1 file changed, 40 insertions(+), 22 deletions(-) >>=20 > Hi luto; > Is there any feedback? At the very least, this needs a clear explanation of why your proposed behav= ior is better than the existing behavior. >=20 > Thanks > Aili Yao