Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2215014pxb; Mon, 8 Mar 2021 18:16:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfViS8NXuouDFH+ub8KfVL9371h/3oLT8qtjLwSczEvNs2DDtuT0MlrkN11IcH4kAMFON2 X-Received: by 2002:a05:6402:34d:: with SMTP id r13mr1541971edw.64.1615256175633; Mon, 08 Mar 2021 18:16:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615256175; cv=none; d=google.com; s=arc-20160816; b=Tlc8Y6H+z1B91zAXaDv6JNdWW2Bnva703TEOsWSrYZrTNanQO73tFSdTnK88PvhgKE S3ljkQtKQR0VrwX0YLi4DQu525Q1vreJIQtyWZNG+G0t9ouTaOjOiC2MzrGphFHcS8fb FcASIyaddzh9zYUxkkY7QAw4b4FzFzDXh9dNRTCuOAmicAl0VL93G2GD14ikz5sxCPdQ mWlhzPeaUD6GlCpQk+iTv0VMvUP70+D4ueKFysIFiwEkTb8iLmNH9W4nFHoEC73ZkeM6 d3RtEGWv44Loxkb82XEtsdA8BrKi6Ammw1RqWLwr82YFINDoXAKfGP4ikhzuxYscIFJi kwCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=s5b9ShE2OnVtxIb4t3tANlyNGU1gDPCdlkmoneZckhM=; b=WdZpvY5uuo6FRmxXmAk4712o9HaaEB4qWq3HBVxRSbaZj7J7LMRs7hnR23Iy9o+1+w 4do/i4gc5ELMsSgtenm+8SjwAw5mku2Xlwn/v2LODO1DTPwJcOEA55ia4AP16t7Y1Sb0 CNKbk79ArZFxZGNrom6oanYXJeOM3wgXBH/5B4IASel/Le8YZkosMobFFSuYBTm9u/Ro 8IP+6YRbYtK+eObYC68Zg5BVYEaKwspfGmDdYCRIknOoRTs/9jjbwN+wrayRJOsNqo64 qk6zP0CprDFTSz5HxY9VbgH37M1Oal1j+nnYj3/NOaZBMwJTiCQuqDlURpsFjhZHvg5H DYng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t23si7687393ejj.290.2021.03.08.18.15.52; Mon, 08 Mar 2021 18:16:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbhCICO5 (ORCPT + 99 others); Mon, 8 Mar 2021 21:14:57 -0500 Received: from mail.kingsoft.com ([114.255.44.145]:13958 "EHLO mail.kingsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbhCICO4 (ORCPT ); Mon, 8 Mar 2021 21:14:56 -0500 X-AuditID: 0a580157-463ff70000021a79-54-6046d380849f Received: from mail.kingsoft.com (localhost [10.88.1.32]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.kingsoft.com (SMG-1-NODE-87) with SMTP id 7C.E2.06777.083D6406; Tue, 9 Mar 2021 09:46:40 +0800 (HKT) Received: from alex-virtual-machine (172.16.253.254) by KSBJMAIL2.kingsoft.cn (10.88.1.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 9 Mar 2021 10:14:52 +0800 Date: Tue, 9 Mar 2021 10:14:52 +0800 From: Aili Yao To: "Luck, Tony" CC: Andy Lutomirski , Andy Lutomirski , HORIGUCHI NAOYA , Dave Hansen , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , X86 ML , "yangfeng1@kingsoft.com" , Linux-MM , LKML , Subject: Re: [PATCH v3] x86/fault: Send a SIGBUS to user process always for hwpoison page access. Message-ID: <20210309101452.281af49d@alex-virtual-machine> In-Reply-To: <4fc1b4e8f1fb4c8c81f280db09178797@intel.com> References: <20210308174912.4ac9029a@alex-virtual-machine> <8F3F763F-59CC-4E25-B4DE-89CD0632F754@amacapital.net> <4fc1b4e8f1fb4c8c81f280db09178797@intel.com> Organization: kingsoft X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.253.254] X-ClientProxiedBy: KSBJMAIL1.kingsoft.cn (10.88.1.31) To KSBJMAIL2.kingsoft.cn (10.88.1.32) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsXCFcGooNtw2S3B4HajkcXnDf/YLF5saGe0 mLZR3OLyrjlsFvfW/Ge1WL22gdXi/K61rBaXDixgsrjYeIDR4njvASaLzZumMlu8uXCPxeLH hsesDrwe31v7WDzuv/nL4rF5hZbH4j0vmTw2repk89j0aRK7x7tz59g95p0M9HhxdSOLx/t9 V9k8Pm+S8zjR8oU1gCeKyyYlNSezLLVI3y6BK+Pe5yWsBSfZK851bGRqYHzB2sXIySEhYCJx 6PlOli5GLg4hgelMEjde3WWEcF4ySuzauZkdpIpFQEWib98jZhCbTUBVYte9WWDdIgJqEpcW P2AGaWAWaGeRaLv5CqxBWCBZ4sykB4wgNq+AlcTWPxuBVnBwcApYSvRPTodYsJBR4ufvQ2CD +AXEJHqv/GeCOMleom3LIqheQYmTM5+wgNjMAjoSJ1YdY4aw5SW2v50DZgsJKEocXvKLHaJX SeJI9ww2CDtWYtm8V6wTGIVnIRk1C8moWUhGLWBkXsXIUpybbriJERKL4TsY5zV91DvEyMTB eIhRgoNZSYTX77hbghBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHeluOuCUIC6YklqdmpqQWpRTBZ Jg5OqQYmzbNND/KYcyd/a1l3tZ3Nak6X+PVFdsHtx6b69M3ufjWZR3bzlE4LnWbx389n33Po 2Gkatzo8a82TJyZtFip/V764NKfue87d++27bdSerlvx80R/EvvvBW/uuE1YuncKp8X/GX1r fPm2fcvN3jaz0fh0mhp70n1x2/O/4nJmPt2p0710B1vOoTOC9a+LjnauSpab/XHZxrS2n0Jt bu8fSO2dlt626BTjSpWnEu1J+5bMeympo8S2qeWQzcpmt/45h5J027dm/pv0mMlcfWVLhtJx 3pcrlQ688Z5RzVYvc+dqpmZqxBnXom+TVYQYgrZdlxOVnG7x1ORJSornBa6tvPZVWfvL6ss3 1czYFPpgkRJLcUaioRZzUXEiAJeOtqg0AwAA Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Mar 2021 18:31:07 +0000 "Luck, Tony" wrote: > > Can you point me at that SIGBUS code in a current kernel? > > It is in kill_me_maybe(). mce_vaddr is setup when we disassemble whatever get_user() > or copy from user variant was in use in the kernel when the poison memory was consumed. > > if (p->mce_vaddr != (void __user *)-1l) { > force_sig_mceerr(BUS_MCEERR_AR, p->mce_vaddr, PAGE_SHIFT); > > Would it be any better if we used the BUS_MCEERR_AO code that goes into siginfo? > > That would make it match up better with what happens when poison is found > asynchronously by the patrol scrubber. I.e. the semantics are: > > AR: You just touched poison at this address and need to do something about that. > AO: Just letting you know that you have some poison at the address in siginfo. > > -Tony Is the kill action for this scenario in memory_failure()? -- Thanks! Aili Yao