Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752301AbbL3Xce (ORCPT ); Wed, 30 Dec 2015 18:32:34 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35700 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803AbbL3Xcc (ORCPT ); Wed, 30 Dec 2015 18:32:32 -0500 MIME-Version: 1.0 In-Reply-To: References: <20151224214632.GF4128@pd.tnic> <20151225114937.GA862@pd.tnic> <5FBC1CF1-095B-466D-85D6-832FBFA98364@intel.com> <20151226103252.GA21988@pd.tnic> Date: Wed, 30 Dec 2015 15:32:30 -0800 Message-ID: Subject: Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover from machine checks From: Tony Luck To: Andy Lutomirski Cc: Borislav Petkov , linux-nvdimm , X86 ML , "elliott@hpe.com" , "linux-mm@kvack.org" , Andrew Morton , "Williams, Dan J" , Ingo Molnar , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1467 Lines: 37 On Sun, Dec 27, 2015 at 4:18 AM, Andy Lutomirski wrote: > I think I can save you some pondering. This old patch gives two flag > bits. Feel free to borrow the patch, but you'll probably want to > change the _EXTABLE_CLASS_XYZ macros: > > https://git.kernel.org/cgit/linux/kernel/git/luto/linux.git/commit/?h=strict_uaccess_fixups/patch_v1&id=16644d9460fc6531456cf510d5efc57f89e5cd34 Thanks! I took that, and some of Boris's changes, and stirred it altogether at: git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git mcsafev6 First commit is just your patch from above (patch wouldn't apply it directly because of other nearby changes, but I think I didn't break it) Second commit pulls the core of fixup_exception() into separate functions for each class Third adds a new class that provides the fault number to the fixup code in regs->ax. Fourth is just a jumble of the rest .. needs to be split into two parts (one for machine check handler, second to add __mcsafe_copy()) Fifth is just a hack because I clearly didn't understand what I was doing in parts 2&3 because my new class shows up as '3' not '1'! Andy: Can you explain the assembler/linker arithmetic for the class? -Tony -- 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/