From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754440AbbL0N0I (ORCPT ); Sun, 27 Dec 2015 08:26:08 -0500 Received: from mail-ob0-f182.google.com ([209.85.214.182]:34235 "EHLO mail-ob0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbbL0N0G (ORCPT ); Sun, 27 Dec 2015 08:26:06 -0500 MIME-Version: 1.0 In-Reply-To: <6c0b3214-f120-47ee-b7fe-677b4f27f039@email.android.com> References: <20151224214632.GF4128@pd.tnic> <20151225114937.GA862@pd.tnic> <5FBC1CF1-095B-466D-85D6-832FBFA98364@intel.com> <20151226103252.GA21988@pd.tnic> <20151227100919.GA19398@nazgul.tnic> <6c0b3214-f120-47ee-b7fe-677b4f27f039@email.android.com> From: Andy Lutomirski Date: Sun, 27 Dec 2015 05:25:45 -0800 Message-ID: Subject: Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover from machine checks To: Boris Petkov Cc: Tony Luck , 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 On Sun, Dec 27, 2015 at 5:17 AM, Boris Petkov wrote: > Andy Lutomirski wrote: >>You certainly can, but it doesn't scale well to multiple users of >>similar mechanisms. It also prevents you from using the same >>mechanism in anything that could be inlined, which is IMO kind of >>unfortunate. > > Well, but the bit 31 game doesn't make it any better than the bit 63 fun IMO. Should the exception table entry maybe grow a u32 flags instead? > That could significantly bloat the kernel image. Anyway, the bit 31 game isn't so bad IMO because it's localized to the extable macros and the extable reader, whereas the bit 63 thing is all tangled up with the __mcsafe_copy thing, and that's just the first user of a more general mechanism. Did you see this: https://git.kernel.org/cgit/linux/kernel/git/luto/linux.git/commit/?h=strict_uaccess_fixups/patch_v1&id=16644d9460fc6531456cf510d5efc57f89e5cd34 (If you and/or Tony use it, take out the uaccess stuff -- it's not useful for what you're doing, and I should have stuck that in a separate patch in the first place.) --Andy