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=2.5 required=3.0 tests=CHARSET_FARAWAY_HEADER, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 8FD89C433E0 for ; Tue, 9 Jun 2020 02:29:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 37EDF2078C for ; Tue, 9 Jun 2020 02:29:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=necglobal.onmicrosoft.com header.i=@necglobal.onmicrosoft.com header.b="Lqmim4uq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37EDF2078C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=nec.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AA7B16B0002; Mon, 8 Jun 2020 22:29:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A58C46B0005; Mon, 8 Jun 2020 22:29:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 96F326B0006; Mon, 8 Jun 2020 22:29:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id 7CBE76B0002 for ; Mon, 8 Jun 2020 22:29:26 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 31773181ABEB0 for ; Tue, 9 Jun 2020 02:29:26 +0000 (UTC) X-FDA: 76908091932.24.cast21_63005bb26dbe Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 01EE91A4A0 for ; Tue, 9 Jun 2020 02:29:25 +0000 (UTC) X-HE-Tag: cast21_63005bb26dbe X-Filterd-Recvd-Size: 7594 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-eopbgr1310044.outbound.protection.outlook.com [40.107.131.44]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Jun 2020 02:29:24 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dYul8/36JgESxavv4RbW7zIF0eYNytsRR/7rAGXWNNTeyuiUxdGIyY+li4a2eoI7pDD1kl7tXRO6U3+IWlfc/M0s00xW2RHs8qzl0yGjYA+StzTUcsxR5ubEkZvtSpPiL4DgU2ArF1JNMwE/QO8M4ixE4Y26FaaF+3k/66TjTrqnaTWu46+BXZVNwgI7ikl6GvfqEHn814ZwWFxRN20hB5PQNh8KqW15snfkMOACt4VGZgRpPGl8zMXBAW5ec8xZXHpxm/p0XAs63MhTgntqC5t1b0NQTfXfVVCF4NEdUYcrUy6xfNzUtx+y2q3gnJzzL5k6uq1Y7adJAouV5IDlww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=52lLA7nnn/WJUCEuAQFmccKEK9r/CLOunF4zXl4X3n0=; b=nfxeWTehOYIXXgZZ9SDu7FhQrVDjldQHlYM5HmwgPMaL294zOZGGNjsT08Khj4W++BiEmgVfzBCuspVUU+I5f3ROLWR0z34ymPnA0TNg1DYLK+7iLKfHf/2Dilo+JqSzOIOKrE6GrAQoWui5my0WnVWBvSMR9ZvgfSgsdtU2rOGL0M7+L4CEioGf1wKGrGJt88W5MoxHzH9Rg9Q+jJq/S5CsKG9GIIdgPlob31YCmd0SotLj6rYbCPNhukECB6szc9BspgjqccshEoyWP6w1f1eYEu7eAHRvBOVodHvXz4BketJ21VzOkW+TCD+6ak7yf5P1pPcxmaxaTq9ftHZszw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nec.com; dmarc=pass action=none header.from=nec.com; dkim=pass header.d=nec.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=necglobal.onmicrosoft.com; s=selector1-necglobal-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=52lLA7nnn/WJUCEuAQFmccKEK9r/CLOunF4zXl4X3n0=; b=Lqmim4uqttx3wvq3HMd49fobF8sqYvxc4M3uFLCICbDm8AARo5fDOvMbG/c/ZTdhsEYl7MvAYo2KwiWA0bbBZzQgnRRGlrgWJglGroRPy8gQl/X54Hxm5hc77FM33wC0+YaSR5V2S80vWD068LXX/SCiMixaKks4arHWYSerts8= Received: from TY2PR01MB3210.jpnprd01.prod.outlook.com (2603:1096:404:74::14) by TY2PR01MB2459.jpnprd01.prod.outlook.com (2603:1096:404:6c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.23; Tue, 9 Jun 2020 02:29:20 +0000 Received: from TY2PR01MB3210.jpnprd01.prod.outlook.com ([fe80::3841:ec9f:5cdf:f58]) by TY2PR01MB3210.jpnprd01.prod.outlook.com ([fe80::3841:ec9f:5cdf:f58%5]) with mapi id 15.20.3066.023; Tue, 9 Jun 2020 02:29:20 +0000 From: =?iso-2022-jp?B?SE9SSUdVQ0hJIE5BT1lBKBskQktZOH0hIUQ+TGkbKEIp?= To: "Luck, Tony" CC: Naoya Horiguchi , Andrew Morton , "linux-mm@kvack.org" Subject: Re: [PATCH v1 2/2] mm/memory-failure: send SIGBUS(BUS_MCEERR_AR) only to current thread Thread-Topic: [PATCH v1 2/2] mm/memory-failure: send SIGBUS(BUS_MCEERR_AR) only to current thread Thread-Index: AQHWOtnl1cah9m0GZkSCCJAunzDDFg== Date: Tue, 9 Jun 2020 02:29:20 +0000 Message-ID: <20200609022919.GA28268@hori.linux.bs1.fc.nec.co.jp> References: <1591321039-22141-1-git-send-email-naoya.horiguchi@nec.com> <1591321039-22141-3-git-send-email-naoya.horiguchi@nec.com> <20200608221759.GA778@agluck-desk2.amr.corp.intel.com> In-Reply-To: <20200608221759.GA778@agluck-desk2.amr.corp.intel.com> Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nec.com; x-originating-ip: [165.225.110.205] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 03ab74d1-81c9-45cc-c49b-08d80c1cea96 x-ms-traffictypediagnostic: TY2PR01MB2459: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1002; x-forefront-prvs: 042957ACD7 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QzqWYYE899b1+QbgXTeJ08Caq4XOza8mc+QxoeQYyXRGOl1jrrzYTf7V5zsQ60Fm4u3IQAaAT7yIN0Z8ZvyjCsBkqsA0F+MffvyYw71pquFrDKU/FODlXHLpb0Ed7RxSLfchNCOhOD7sICfpf6l65RB5UG2slD3SHA554kbsGximnxxyvSdtuxJKrFzxWv/CSDViSGhgj5wST1daD7yhxK6Cyy8QpTv3TAooL+T15M4cYgg8r0FpJoi+SieJonG5D72t5emEPo6PwPh0JPjb/KEAoRT69DGaKgcfzXRrPhmnBcOhiwJXp53Z0S3luNT9 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY2PR01MB3210.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(136003)(39860400002)(346002)(376002)(396003)(8676002)(6512007)(9686003)(478600001)(2906002)(86362001)(8936002)(6916009)(6486002)(66476007)(85182001)(5660300002)(54906003)(26005)(66446008)(76116006)(4326008)(55236004)(64756008)(71200400001)(186003)(83380400001)(1076003)(33656002)(66556008)(6506007)(316002)(66946007);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: lxPHKy3aFpA5czJ3vl7jaMg6bd99IAgRUt3Xv6p4hsur8Gywzlh64ukIS4E7ssVGG6kxEc/OJ+yJ92P2+gVBaQae7qhd/UwRFRbaEb/TOfOJJf+8B4J+IAzHhAltgobbS+PziYL2xcDMmEYMa6gFO548duGNW5Gz/xBWbesgS8ssgavq8fF3Q/l/c3IClyD10cRAtgk4jDkEzOjrVAFW0dPphg/6nnmD5bl+mvOrHwKQc++6mMPl6tmXXe1++hnA/CKCqXWubZerzA6tq0/KnfE1ns6mPe+z6P/lQJyR0kTH0CvBdecAthrEVUqei02W1lh2ynQKrDLlpLeAJQMiUz92a06iHr3zWPXSpdzua+BFRckSO7ZQZD1fWbKj8YPoHsRCprq8vuQJIUkP53eWuzOLZ0YaoxYkHltFxeLrtCsGlpTNgvRNh65ntxTuLDt9WK9fhmQq8VlmSrV3KwellMzkid1bslOZONpOahVoNXVSeV5nn4InaKKnIwtY/cYG Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <2936FC1BCDD9194D8127835892611F4E@jpnprd01.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nec.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03ab74d1-81c9-45cc-c49b-08d80c1cea96 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jun 2020 02:29:20.7012 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e67df547-9d0d-4f4d-9161-51c6ed1f7d11 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: q2VRQlfc2t2UFyrGN2B0IExoRGcudZ1d7AcH7vBBBwylJhg3N8GT1RuhHTjI+OFffuU4ftV+HJ6CmVXLikw+kg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR01MB2459 X-Rspamd-Queue-Id: 01EE91A4A0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Mon, Jun 08, 2020 at 03:17:59PM -0700, Luck, Tony wrote: > On Fri, Jun 05, 2020 at 10:37:19AM +0900, Naoya Horiguchi wrote: > > Action Required memory error should happen only when a processor is > > about to access to a corrupted memory, so it's synchronous and only > > affects current process/thread. Recently commit 872e9a205c84 ("mm, > > memory_failure: don't send BUS_MCEERR_AO for action required error") > > fixed the issue that Action Required memory could unnecessarily send > > SIGBUS to the processes which share the error memory. But we still have > > another issue that we could send SIGBUS to a wrong thread. > >=20 > > This is because collect_procs() and task_early_kill() fails to add the > > current process to "to-kill" list. So this patch is suggesting to fix > > it. With this fix, SIGBUS(BUS_MCEERR_AR) is never sent to non-current > > process/thread. >=20 > Does the new code now send SIGBUS(BUS_MCEERR_AO) to all the other threads > of a multi-threaded process? No, it doesn't. This patch should not change anything for Action Optional case, and find_early_kill_thread() chooses one thread per process, so SIGBUS(BUS_MCEERR_AO) (as well as SIGBUS(BUS_MCEERR_AR)) should be sent onl= y to the chosen thread. - Naoya >=20 > It looks like it might (and I don't have some handy multi-threaded test > case to try it out). >=20 > If it does, is that what we want? >=20 > -Tony > =