Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4240606pxy; Mon, 26 Apr 2021 23:32:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyS/56V1SqtcBuKgTew4rVImriE1eVbaJATJzSBp8luPjHoTlCqmhk5pmBWOci2zC4px2Rc X-Received: by 2002:aa7:92cb:0:b029:1f1:542f:2b2b with SMTP id k11-20020aa792cb0000b02901f1542f2b2bmr21056768pfa.31.1619505120018; Mon, 26 Apr 2021 23:32:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619505120; cv=none; d=google.com; s=arc-20160816; b=jaNB6mflJNV7PLYpUV2RdX8mJHHxs7eSv4B4T1woOy3+HKBvwmBW846IHGHoEw3ce4 2aPrXKnF3gVc7ZFJPISnK9je4ceGFaxmxQNqmCzU2xGJP5Fv4rT3Q/J9SSWojvJ607Xe 3ySHr1+kHjN5umQbXQKIGc1EzDWbvhTp7Ih1ed/l1kBCYZ41urGuZgI+oApSvIiju8v2 nRTX5Dn4CbMyECOGQIagW/StCT6FmSwZROa4hTVuPDGJOUEWVOfS/2LQBnGMb9EnTiPF HBaebPthkczWZfLAaJdOPyxDJ3F7l8jX/rKZTr+i29kRJCRuRD7hdCDB/TM4X5G1Cb++ Xkig== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=+aGegkQjwMUtviPo4UcR/9R+s7d5J718KkDbEu1QhUk=; b=Vf0Wl75ni0G5gEsUqTvG2pJ+mEPGc7IKaLPn/PQ0/4z6kUmYOpFeoCDUYjK5vzoMLy mCPKZI/hEfG3Dew1ZDxOCHi4EvU38p12K11y1wCrrsZHLD5ae8xVjeh+sqgs7tLkKm53 HYcaufR/IsdwrZnFN40yoBBh28ZM/PsTFpfG4jNiFbeAcIvW6M03EFhRosEZxSHZi3cc rpOUh2XGXQOE4sKe7dDy0mZpDxDKYtXGIsV1LVBzt0Gfd+lDh0VRimuMKGw03c26CpAj s2EJ7IBIIqHGyqgwK+SPVojgA7GadNcKGucUw9I3o+yYrZXUf3KmYBULPQI3zleQezPD RITQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CdiuVYnD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s1si19847656pgi.559.2021.04.26.23.31.47; Mon, 26 Apr 2021 23:32:00 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=CdiuVYnD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234669AbhD0Gar (ORCPT + 99 others); Tue, 27 Apr 2021 02:30:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbhD0Gaq (ORCPT ); Tue, 27 Apr 2021 02:30:46 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6484BC061574 for ; Mon, 26 Apr 2021 23:30:04 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id e15so3880606pfv.10 for ; Mon, 26 Apr 2021 23:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+aGegkQjwMUtviPo4UcR/9R+s7d5J718KkDbEu1QhUk=; b=CdiuVYnDc91r61NEtGapjJljYlO6Cd42QkAJrkzxP4qI4NX0MGCtEjsQSFAlJGCDfW yrKsNFg+BtTyE/E+KzuZMT/+wGbZ//XwLlzZOc85UGL8AQvPWmOQpyMwysYSE7dgjXvJ rIOi8H81LuWlqxKiRLwr+aJ3wIDW5dnDVQu6CXljR+hEV5BU4S9/p0L3fakfmWRT83X/ GbO+3Sc6VLNxln6+RU+23c405JPfltlmUHMM+mDLp7w8m/Hpjgd9Mlo3snQx7ecIDIaj PbD/AcKqDMylOjYTZHdZQ5GSvwBqv6b1KyWIH1XgMvso/kvOMSl6Rm1sNjG8I/XM7519 S9sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+aGegkQjwMUtviPo4UcR/9R+s7d5J718KkDbEu1QhUk=; b=d0TrYEHgxrJ0xqQyhBt212ISl4OQBsVbjg5AU2faqs/gz+kLH6lX8Yowl1l/h43EMu jzELOluQuBA07mpQYOKf4b9mkwlcCUQUXbZ8nafNLTREBtE+ALWNyrH0xN6VK1uv759F JU0LP6EnBCnvfffpKA/yqjuZYm7iD+PQI9n354c9vbAEN3FWhc2iRWKfMpptQP+I73oo veqc0gEjjSn7I2WDRB5HHAnnN9gFbkdyYbErl4G1VuOpctnXH1gEclGphjnFz4IdJQhf +h+Myw7AeYyjEX5tE068o6QmMOZqpbAXPOgOOxeOUR6hhlhkyRqJHHwQrjVZf3Xf68gD xtJw== X-Gm-Message-State: AOAM531rprauIeEZlghjW4cnY2kICtrqdVQk+SJOWk078SMEWt+gLSEh V6yJypV/g+dL+w7mu0viUw== X-Received: by 2002:a62:b606:0:b029:222:7cab:5b1 with SMTP id j6-20020a62b6060000b02902227cab05b1mr20977812pff.32.1619505003866; Mon, 26 Apr 2021 23:30:03 -0700 (PDT) Received: from localhost.localdomain (h175-177-040-153.catv02.itscom.jp. [175.177.40.153]) by smtp.gmail.com with ESMTPSA id t9sm902704pgg.6.2021.04.26.23.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 23:30:03 -0700 (PDT) From: Naoya Horiguchi To: linux-mm@kvack.org, Tony Luck , Aili Yao Cc: Andrew Morton , Oscar Salvador , David Hildenbrand , Borislav Petkov , Andy Lutomirski , Naoya Horiguchi , Jue Wang , linux-kernel@vger.kernel.org Subject: [PATCH v4 0/2] mm,hwpoison: fix sending SIGBUS for Action Required MCE Date: Tue, 27 Apr 2021 15:29:51 +0900 Message-Id: <20210427062953.2080293-1-nao.horiguchi@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I updated the series based on Boris's review. I folded 2/3 and 3/3 into one patch, updated description, added some refactored and rebased onto v5.12. There's no essential change in how the problem is solved. v1: https://lore.kernel.org/linux-mm/20210412224320.1747638-1-nao.horiguchi@gmail.com/ v2 (only 3/3 is posted): https://lore.kernel.org/linux-mm/20210419023658.GA1962954@u2004/ v3: https://lore.kernel.org/linux-mm/20210421005728.1994268-1-nao.horiguchi@gmail.com/ Thanks, Naoya Horiguchi --- quote from cover letter of v1 --- I wrote this patchset to materialize what I think is the current allowable solution mentioned by the previous discussion [1]. I simply borrowed Tony's mutex patch and Aili's return code patch, then I queued another one to find error virtual address in the best effort manner. I know that this is not a perfect solution, but should work for some typical case. [1]: https://lore.kernel.org/linux-mm/20210331192540.2141052f@alex-virtual-machine/ --- Summary: Naoya Horiguchi (1): mm,hwpoison: send SIGBUS when the page has already been poisoned Tony Luck (1): mm/memory-failure: Use a mutex to avoid memory_failure() races arch/x86/kernel/cpu/mce/core.c | 13 ++- include/linux/swapops.h | 5 ++ mm/memory-failure.c | 180 +++++++++++++++++++++++++++++++++++++---- 3 files changed, 182 insertions(+), 16 deletions(-)