From: Tony Luck <tony.luck@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Lutomirski <luto@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-nvdimm@ml01.01.org, x86@kernel.org
Subject: [PATCHV2 0/3] Machine check recovery when kernel accesses poison
Date: Fri, 11 Dec 2015 11:13:23 -0800 [thread overview]
Message-ID: <cover.1449861203.git.tony.luck@intel.com> (raw)
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Tony Luck <tony.luck@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Lutomirski <luto@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-nvdimm@ml01.01.org, x86@kernel.org
Subject: [PATCHV2 0/3] Machine check recovery when kernel accesses poison
Date: Fri, 11 Dec 2015 11:13:23 -0800 [thread overview]
Message-ID: <cover.1449861203.git.tony.luck@intel.com> (raw)
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
next reply other threads:[~2015-12-11 19:32 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 19:13 Tony Luck [this message]
2015-12-11 19:13 ` [PATCHV2 0/3] Machine check recovery when kernel accesses poison Tony Luck
2015-12-10 21:58 ` [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables Tony Luck
2015-12-10 21:58 ` Tony Luck
2015-12-11 20:06 ` Andy Lutomirski
2015-12-11 20:06 ` Andy Lutomirski
2015-12-11 21:01 ` Luck, Tony
2015-12-11 21:01 ` Luck, Tony
2015-12-12 10:11 ` Borislav Petkov
2015-12-12 10:11 ` Borislav Petkov
2015-12-14 17:58 ` Ross Zwisler
2015-12-14 17:58 ` Ross Zwisler
2015-12-14 22:27 ` Borislav Petkov
2015-12-14 22:27 ` Borislav Petkov
2015-12-15 1:00 ` Luck, Tony
2015-12-15 1:00 ` Luck, Tony
2015-12-15 9:46 ` Borislav Petkov
2015-12-15 9:46 ` Borislav Petkov
2015-12-15 10:44 ` Borislav Petkov
2015-12-15 10:44 ` Borislav Petkov
2015-12-11 0:14 ` [PATCHV2 2/3] x86, ras: Extend machine check recovery code to annotated ring0 areas Tony Luck
2015-12-11 0:14 ` Tony Luck
2015-12-11 20:08 ` Andy Lutomirski
2015-12-11 20:08 ` Andy Lutomirski
2015-12-15 11:43 ` Borislav Petkov
2015-12-15 11:43 ` Borislav Petkov
2015-12-15 23:46 ` Luck, Tony
2015-12-15 23:46 ` Luck, Tony
2015-12-11 0:21 ` [PATCHV2 3/3] x86, ras: Add mcsafe_memcpy() function to recover from machine checks Tony Luck
2015-12-11 0:21 ` Tony Luck
2015-12-11 20:09 ` Andy Lutomirski
2015-12-11 20:09 ` Andy Lutomirski
2015-12-11 21:19 ` Luck, Tony
2015-12-11 21:19 ` Luck, Tony
2015-12-11 21:32 ` Konrad Rzeszutek Wilk
2015-12-11 21:50 ` Andy Lutomirski
2015-12-11 21:50 ` Andy Lutomirski
2015-12-11 22:17 ` Luck, Tony
2015-12-11 22:17 ` Luck, Tony
2015-12-11 22:20 ` Dan Williams
2015-12-11 22:20 ` Dan Williams
2015-12-11 22:26 ` Andy Lutomirski
2015-12-11 22:26 ` Andy Lutomirski
2015-12-11 22:35 ` Luck, Tony
2015-12-11 22:35 ` Luck, Tony
2015-12-11 22:38 ` Andy Lutomirski
2015-12-11 22:38 ` Andy Lutomirski
2015-12-11 22:45 ` Luck, Tony
2015-12-11 22:45 ` Luck, Tony
2015-12-11 22:55 ` Andy Lutomirski
2015-12-11 22:55 ` Andy Lutomirski
2015-12-14 8:36 ` Ingo Molnar
2015-12-14 8:36 ` Ingo Molnar
2015-12-14 19:46 ` Luck, Tony
2015-12-14 19:46 ` Luck, Tony
2015-12-14 20:11 ` Andy Lutomirski
2015-12-14 20:11 ` Andy Lutomirski
2015-12-15 13:11 ` Borislav Petkov
2015-12-15 13:11 ` Borislav Petkov
2015-12-15 17:45 ` Dan Williams
2015-12-15 17:45 ` Dan Williams
2015-12-15 17:53 ` Luck, Tony
2015-12-15 17:53 ` Luck, Tony
2015-12-15 18:21 ` Borislav Petkov
2015-12-15 18:21 ` Borislav Petkov
2015-12-15 18:27 ` Dan Williams
2015-12-15 18:27 ` Dan Williams
2015-12-15 18:35 ` Dan Williams
2015-12-15 18:35 ` Dan Williams
2015-12-15 18:39 ` Borislav Petkov
2015-12-15 18:39 ` Borislav Petkov
2015-12-15 19:19 ` Elliott, Robert (Persistent Memory)
2015-12-15 19:19 ` Elliott, Robert (Persistent Memory)
2015-12-15 19:28 ` Borislav Petkov
2015-12-15 19:28 ` Borislav Petkov
2015-12-15 20:25 ` Elliott, Robert (Persistent Memory)
2015-12-15 20:25 ` Elliott, Robert (Persistent Memory)
2015-12-21 17:33 ` Borislav Petkov
2015-12-21 17:33 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1449861203.git.tony.luck@intel.com \
--to=tony.luck@intel.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.