Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752443AbbLKTca (ORCPT ); Fri, 11 Dec 2015 14:32:30 -0500 Received: from mga03.intel.com ([134.134.136.65]:36954 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752048AbbLKTc2 (ORCPT ); Fri, 11 Dec 2015 14:32:28 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,414,1444719600"; d="scan'208";a="705674323" Message-Id: From: Tony Luck Date: Fri, 11 Dec 2015 11:13:23 -0800 Subject: [PATCHV2 0/3] Machine check recovery when kernel accesses poison To: Ingo Molnar Cc: Borislav Petkov , Andrew Morton , Andy Lutomirski , Dan Williams , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@ml01.01.org, x86@kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2346 Lines: 50 This series is initially targeted at the folks doing filesystems on top of NVDIMMs. They really want to be able to return -EIO when there is a h/w error (just like spinning rust, and SSD does). I plan to use the same infrastructure in parts 1&2 to write a machine check aware "copy_from_user()" that will SIGBUS the calling application when a syscall touches poison in user space (just like we do when the application touches the poison itself). Changes V1->V2: 0-day: Reported build errors and warnings on 32-bit systems. Fixed 0-day: Reported bloat to tinyconfig. Fixed Boris: Suggestions to use extra macros to reduce code duplication in _ASM_*EXTABLE. Done Boris: Re-write "tolerant==3" check to reduce indentation level. See below. Andy: Check IP is valid before searching kernel exception tables. Done. Andy: Explain use of BIT(63) on return value from mcsafe_memcpy(). Done (added decode macros). Andy: Untangle mess of code in tail of do_machine_check() to make it clear what is going on (e.g. that we only enter the ist_begin_non_atomic() if we were called from user code, not from kernel!). Done Tony Luck (3): x86, ras: Add new infrastructure for machine check fixup tables 2/6] x86, ras: Extend machine check recovery code to annotated ring0 areas 3/6] x86, ras: Add mcsafe_memcpy() function to recover from machine checks arch/x86/Kconfig | 4 ++ arch/x86/include/asm/asm.h | 10 +++- arch/x86/include/asm/uaccess.h | 8 +++ arch/x86/include/asm/uaccess_64.h | 5 ++ arch/x86/kernel/cpu/mcheck/mce-severity.c | 22 +++++++- arch/x86/kernel/cpu/mcheck/mce.c | 69 +++++++++++------------ arch/x86/kernel/x8664_ksyms_64.c | 2 + arch/x86/lib/copy_user_64.S | 91 +++++++++++++++++++++++++++++++ arch/x86/mm/extable.c | 19 +++++++ include/asm-generic/vmlinux.lds.h | 6 ++ include/linux/module.h | 1 + kernel/extable.c | 20 +++++++ 12 files changed, 219 insertions(+), 38 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/