Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753694AbbKLHxU (ORCPT ); Thu, 12 Nov 2015 02:53:20 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:34496 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753258AbbKLHxS (ORCPT ); Thu, 12 Nov 2015 02:53:18 -0500 Date: Thu, 12 Nov 2015 08:53:13 +0100 From: Ingo Molnar To: Tony Luck Cc: Borislav Petkov , linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH 3/3] x86, ras: Add mcsafe_memcpy() function to recover from machine checks Message-ID: <20151112075313.GA5984@gmail.com> References: <02ef9e0e0b73591aa8ec37aae2409274d108af60.1447093569.git.tony.luck@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <02ef9e0e0b73591aa8ec37aae2409274d108af60.1447093569.git.tony.luck@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1125 Lines: 30 * Tony Luck wrote: > Using __copy_user_nocache() as inspiration create a memory copy > routine for use by kernel code with annotations to allow for > recovery from machine checks. > > Notes: > 1) Unlike the original we make no attempt to copy all the bytes > up to the faulting address. The original achieves that by > re-executing the failing part as a byte-by-byte copy, > which will take another page fault. We don't want to have > a second machine check! > 2) Likewise the return value for the original indicates exactly > how many bytes were not copied. Instead we provide the physical > address of the fault (thanks to help from do_machine_check() > +extern phys_addr_t mcsafe_memcpy(void *dst, const void __user *src, > + unsigned size); So what's the longer term purpose, where will mcsafe_memcpy() be used? Thanks, Ingo -- 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/