Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2395779pxb; Tue, 13 Apr 2021 00:24:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3Xq0f8bBAytket5B/AeFDStgERWnJ2l6qnNzpCtuGuax2YEbrpbufuPdm8CKX/ZxwbnTA X-Received: by 2002:a17:907:20e9:: with SMTP id rh9mr31350440ejb.523.1618298665363; Tue, 13 Apr 2021 00:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618298665; cv=none; d=google.com; s=arc-20160816; b=mjyQzI76rUliuetxT7CkOKTPCsu9eP6Y9k6dXdNubhzTrXvW2BZojavwHz7lreaPy6 hR2/fYnrU82ee8cXuGBobh2sIJMO9Mfhw0YmpjA9ssWVwztDlpOI1Dw3f9xDMMsA3Dal NR6kTQw/eYTG7ic9zWdlfghkzGV0kvdX8ID47tOMr8+2bT7OiaMBxvUaTfvD9TkbOdnO nG+MEK3UAAH8VUwmkgPOZSFlO5nqmZKzKHaXI1bYHxIwwr8eDOlzv+abbxU7D762oZo7 eWZcpnfmouULZjlXPhcA9iGkKiVDEg7uDQf2F5hbCpdHtIARTe8nwLAIS/e5XxWubadc g7oA== 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=LC3H1cpiJHCBM+DlZ2l4WxoB82Db8dlZgy3XW4iJx9k=; b=nr5nJ5+piKwDIySLeMuZYVUUCuPlRia73KImh6e4aDHsz3eKo+Bp99cWWbdCh9aokn VVdPaMUo9IQkd3y2uLVHtftyXSmbkEGSnAT1bY+MEfd+4Im9yriKhKzksulKvsl+qTOL DQ2dvjxzKD9qU/pHRRNi128g7+P7CfUtrpsTM9tVBy16wUntOXdfH6mSBkSKeNCRehhh MFty37eHMylewF7MSdgALNh4tM94yo8DSYwEp2IPL2mu0XWYOkLNMCv1eexM1A5nIZTY CmzIrD1c9grt12UeePoUqRtcMW6VON5e+ng2FOw6cwU2ujSN0ozZu3sbhtroqwhd0SBN ByAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MruJg+xu; 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 h17si9177160ejs.651.2021.04.13.00.24.01; Tue, 13 Apr 2021 00:24:25 -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=MruJg+xu; 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 S241207AbhDLWnr (ORCPT + 99 others); Mon, 12 Apr 2021 18:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238901AbhDLWnr (ORCPT ); Mon, 12 Apr 2021 18:43:47 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6404C061574 for ; Mon, 12 Apr 2021 15:43:28 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id t22so6830802ply.1 for ; Mon, 12 Apr 2021 15:43:28 -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=LC3H1cpiJHCBM+DlZ2l4WxoB82Db8dlZgy3XW4iJx9k=; b=MruJg+xuFzaCytSuuv12vMblzQ7q5GzuCNFQGcXm+Nt1n0/BwllA6IzRBNEJfkPUFp AV6TMTGTvKWCJj+yl+J4zzuhWSgZ9GyY2jNqkKR6gRxOhlJFnTkl8g8axTdSR4j+edTX oE9mdIlsknxxUQT0/Z908lxQ05Dv0f/JULOMHTPTBvQQCQFE0TbcPNjDzooOgtEs4tl4 Ko0JzSNHOJCz50R47sGq+nEiYnuCliROrrWM5su1fPVKFtl1sHxaiR9kxxAs0uUbvcr1 xRQliwJO05PcRTOWdZXgMrGuK3Ejx2TEBUGySdj7T3FZ8mW+7fsfClLGtQVN1HakKk1k DiMg== 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=LC3H1cpiJHCBM+DlZ2l4WxoB82Db8dlZgy3XW4iJx9k=; b=kIcq6nY6f+u2Sn7y0InjyvpWAYlOgeb6KlycqUSoZQvoPZrVRG2tkw1QAtdq/ScIIA WGyk18cWgDimK1GWl4p+guG2NyE3khZHiIgo0cZp5Y/lWZSlCvRntM88s9zNFlIvdWqc HY9tTtuqsoUOgwMGHZVWQKMO1pAKVei+ZgYuubNLVAqKt3EzcXAHKXb8XdWqeZFX5M24 yprxwy1KT4UHkh3Mi0jeE59Uu70EF6rRsvH2274FMnPrjwlEp10MX68PGAWy5jUnETgq XqOi7arojF6hvpjaaM/U1qjDJtuhQXkKn8nK7KMI++YRDBGsOZSIBLF1xxmgathgaerB L8Mw== X-Gm-Message-State: AOAM531s++a9Fs4yd+G3dpbvjZwdZO3d0SvJkIkGnqTVE4mLddFx2aCR gjCxH9z4h/J1DRe6hj8V14hI+DBsX7fkRTs= X-Received: by 2002:a17:90b:1e50:: with SMTP id pi16mr1514048pjb.24.1618267407516; Mon, 12 Apr 2021 15:43:27 -0700 (PDT) Received: from localhost.localdomain (h175-177-040-153.catv02.itscom.jp. [175.177.40.153]) by smtp.gmail.com with ESMTPSA id l25sm13365373pgu.72.2021.04.12.15.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 15:43:27 -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 , linux-kernel@vger.kernel.org Subject: [PATCH v1 0/3] mm,hwpoison: fix sending SIGBUS for Action Required MCE Date: Tue, 13 Apr 2021 07:43:17 +0900 Message-Id: <20210412224320.1747638-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 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. My simple testing showed this patchset seems to work as intended, but if you have the related testcases, could you please test and let me have some feedback? Thanks, Naoya Horiguchi [1]: https://lore.kernel.org/linux-mm/20210331192540.2141052f@alex-virtual-machine/ --- Summary: Aili Yao (1): mm,hwpoison: return -EHWPOISON when page already Naoya Horiguchi (1): mm,hwpoison: add kill_accessing_process() to find error virtual address 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 | 166 ++++++++++++++++++++++++++++++++++++++++- 3 files changed, 178 insertions(+), 6 deletions(-)