Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1987629pxb; Mon, 8 Mar 2021 11:01:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJywaH5Vd5x0obuOISCzGB1MXxim9wpRw38u7wRpFjPw64iltROb08J2scQAQ2sMuSRRtXuS X-Received: by 2002:a05:6402:34d:: with SMTP id r13mr70493edw.64.1615230118745; Mon, 08 Mar 2021 11:01:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615230118; cv=none; d=google.com; s=arc-20160816; b=PbCPFPKAxYfpwP025kcfgCJzGgBflkGMViDzOnG16UPOGAbxiXSKO+FdwpBBdl8U4l thF2D87RQJ/rbo57Oun6MGNl6Ko0EttzSufiHfiA6WgozSNNqd47n4RpJezWMbWInpmA VJjfMEQY9FNulBlVfCWXfWZsDFEwhmQX9P7G9XZozAD5LNAmOd4yuMRFuQ2T4JE5AxN+ /f+fE7kpMcl1opG4m1YI5RCFat2e2sEl6e09/m6ABvRcsN6IdXFFuVq7ZEcXovbqRdr5 ak7IbxRArLnend8T5RsskpSEyV1aHnVyVQSso4KK3LpsqK7cqwLCSfLGVL6G30gEmeg9 oa2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:cc:references:message-id:date :subject:mime-version:from:content-transfer-encoding:dkim-signature; bh=V4Tigkzpq26eOM6aEUwWM7QVcYVGsExzXqZiJfAmSJA=; b=DS4cszo3ljHmh4tp6enj75QqojuupYfxjE7zSnyoi5bpCI3I9Zs58z1jBlsEIia49H z9fSRhErfTPzdIuU5COy7ORqgIMwJV6sybpOkAWoR9F3wuBRr0USt7Q9mhFRKBBlkH9+ GTDIuYOFzrMPZlSUstM92iF5GQjXOZv1sjYLNDWWEBJ5fEnpGYnXfc5CQTbYJc4MpcEd OYLwpn1LRHRIA+07fqEuHMlKLP0D8D6z7DiKFN3D+fFyRvO12xY2maULv5IS2Bljdok7 xVHpJGRKWRHgVhR7N6O5egdBoAYXPzRNjFB59venxlF/Ve+JKnuqh+V5OhfDghCG6hBD k1Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=Fv5HjlR4; 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 fx8si7250349ejb.481.2021.03.08.11.01.34; Mon, 08 Mar 2021 11:01:58 -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; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=Fv5HjlR4; 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 S229463AbhCHTAi (ORCPT + 99 others); Mon, 8 Mar 2021 14:00:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230412AbhCHTAc (ORCPT ); Mon, 8 Mar 2021 14:00:32 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77F0DC06175F for ; Mon, 8 Mar 2021 11:00:32 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id ba1so5335854plb.1 for ; Mon, 08 Mar 2021 11:00:32 -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=V4Tigkzpq26eOM6aEUwWM7QVcYVGsExzXqZiJfAmSJA=; b=Fv5HjlR4uYDG9QwkkKU0YgiyZx5kdn3v+zk31IL31g8+S9QsDdcYDdnR9S2kzgwnXH 8t/woWK17zbr68ALkZpU03jiNnoP3rKuCHDURjwFsEGM0oU9VGDCvZJg2HIem1kIC+35 yvS1Lk9w1Kq8Uuh4+4iDwixPLNuJO2C+JN0/zcPbedHxkId0VUcHdhiJpquAvtsvV8Fw l882PhdylzpYGNbszEXY+GPQFLq9KfaQp1Et8IZBU6QUxj9Ql/zgGuOxVyYEVzQiSSTX V7JXjANENDFrIfMQaL3HrMkhgguTiW4c1Ll024aB6rcQDKhb4TWgsi5jplw/uEsiIaYV qmtw== 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=V4Tigkzpq26eOM6aEUwWM7QVcYVGsExzXqZiJfAmSJA=; b=hhbR/AEAeSJsHqO8Mvhp29o/X2zszPs/0xamcOHfOtAM+awYZLRkD6asNd3vMq28cq b2k+6RwFKjMto7SQjOq5AjgophgowBG+o8zLQU+M/F2f/JO1hXX+CvCog0W5KY3VHKO4 yul9qEP5SQ9XKSmP8v/AddUE8vZMYujemNAe35eO4Y3s/Jkke2tew7tN8NKnHiY1m39w LrYGxxYGEYc14hqJL1ZPSyg0eWpV5iLIgD13ZGNbJyS8l833ZhDwFkSNuceFQWaxQqkh 83RXOg0dKRvobNhS8Ut0NB2PJ+yVFrmeX9Q4/9WR93WXFMmQg6uR5c5eqEsdGzngLjl7 Yl1w== X-Gm-Message-State: AOAM532ftP5Wrk+jiODtAZpHwHMV8g2qlokvACodd41nsGFoaJtg6ld3 gbdBZrYXb/kX/GlkxU+SpeSIgw== X-Received: by 2002:a17:90a:ba8b:: with SMTP id t11mr288602pjr.177.1615230031904; Mon, 08 Mar 2021 11:00:31 -0800 (PST) Received: from ?IPv6:2600:1010:b069:668b:f917:6da4:65d8:f711? ([2600:1010:b069:668b:f917:6da4:65d8:f711]) by smtp.gmail.com with ESMTPSA id gg22sm125432pjb.20.2021.03.08.11.00.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Mar 2021 11:00:31 -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: Mon, 8 Mar 2021 11:00:28 -0800 Message-Id: <047D5B49-FDBB-494C-81E9-DA811476747D@amacapital.net> References: <4fc1b4e8f1fb4c8c81f280db09178797@intel.com> Cc: Aili Yao , 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 In-Reply-To: <4fc1b4e8f1fb4c8c81f280db09178797@intel.com> To: "Luck, Tony" , Oleg Nesterov , Linux API X-Mailer: iPhone Mail (18D52) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mar 8, 2021, at 10:31 AM, Luck, Tony wrote: >=20 > =EF=BB=BF >>=20 >> Can you point me at that SIGBUS code in a current kernel? >=20 > 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 w= as consumed. >=20 > if (p->mce_vaddr !=3D (void __user *)-1l) { > force_sig_mceerr(BUS_MCEERR_AR, p->mce_vaddr, PAGE_SHIFT); Hmm. On the one hand, no one has complained yet. On the other hand, hardware= that supports this isn=E2=80=99t exactly common. We may need some actual ABI design here. We also need to make sure that thin= gs like io_uring accesses or, more generally, anything using the use_mm / us= e_temporary_mm ends up either sending no signal or sending a signal to the r= ight target. >=20 > Would it be any better if we used the BUS_MCEERR_AO code that goes into si= ginfo? Dunno. >=20 > That would make it match up better with what happens when poison is found > asynchronously by the patrol scrubber. I.e. the semantics are: >=20 > 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 sigi= nfo. >=20 > -Tony