From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by kanga.kvack.org (Postfix) with ESMTP id 0E2906B002A for ; Thu, 31 Dec 2015 16:22:40 -0500 (EST) Received: by mail-ob0-f182.google.com with SMTP id wp13so67643940obc.1 for ; Thu, 31 Dec 2015 13:22:40 -0800 (PST) Received: from mail-ob0-x231.google.com (mail-ob0-x231.google.com. [2607:f8b0:4003:c01::231]) by mx.google.com with ESMTPS id n4si12954623obq.48.2015.12.31.13.22.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Dec 2015 13:22:39 -0800 (PST) Received: by mail-ob0-x231.google.com with SMTP id ba1so202101512obb.3 for ; Thu, 31 Dec 2015 13:22:39 -0800 (PST) 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> From: Andy Lutomirski Date: Thu, 31 Dec 2015 13:22:19 -0800 Message-ID: Subject: Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover from machine checks Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Tony Luck Cc: Robert , Borislav Petkov , "linux-mm@kvack.org" , X86 ML , Andrew Morton , "Williams, Dan J" , Ingo Molnar , "linux-kernel@vger.kernel.org" , linux-nvdimm On Jan 1, 2016 4:30 AM, "Tony Luck" wrote: > > On Wed, Dec 30, 2015 at 3:32 PM, Tony Luck wrote: > > 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? > > Never mind ... figured it out. > > The fixup entry in the extable is: > > label - . + 0x2000000 - BIAS > > The "label - ." part evaluates to a smallish negative value (because > the .fixup section is bundled in towards the end of .text, and the > ex_table section comes right after. > > Then you add 0x20000000 to get a positive number, then *subtract* > the BIAS. I'd picked BIAS = 0x40000000 thinking that would show > up directly in class bits. But 0x1ffff000 - 0x40000000 is 0xdffff000 > so bits 31 & 31 are both set, and this is class3 > > I switched to BIAS 0xC0000000 ... and now I get class 1 entries > (bit31=0, bit30=1). > > New patch series coming soon. That all sounds correct. You could also just to s/UACCESS/INDIRECT/ or whatever and leave using the next bit for whoever does the uaccess part, too. After all, introducing the "uaccess" class without actually implementing it isn't very useful. > > -Tony -- 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: email@kvack.org