From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755634AbcCBUrz (ORCPT ); Wed, 2 Mar 2016 15:47:55 -0500 Received: from mga03.intel.com ([134.134.136.65]:21210 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754321AbcCBUry (ORCPT ); Wed, 2 Mar 2016 15:47:54 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,530,1449561600"; d="scan'208";a="58627801" Date: Wed, 2 Mar 2016 12:47:41 -0800 From: "Luck, Tony" To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , Borislav Petkov , Andrew Morton , Tony Luck , Peter Zijlstra , "H. Peter Anvin" , Andy Lutomirski Subject: Re: [PATCH v14] x86, mce: Add memcpy_mcsafe() Message-ID: <20160302204739.GA4728@intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Thu, Feb 18, 2016 at 11:47:26AM -0800, Tony Luck wrote: > Make use of the EXTABLE_FAULT exception table entries to write > a kernel copy routine that doesn't crash the system if it > encounters a machine check. Prime use case for this is to copy > from large arrays of non-volatile memory used as storage. > > We have to use an unrolled copy loop for now because current > hardware implementations treat a machine check in "rep mov" > as fatal. When that is fixed we can simplify. Ping. Anything more needed for this? In his last message Linus seemed OK with a *kernel* copy function that avoided death by machine check. He said: What a "memcpy_fault()" (or whatever it would be called) means is that the kernel is doing its own copies, but knows that there is some fragility involved, and wants to have a recovery mechanism that isn't "oops, we got a machine check in the kernel, now we need to kill the machine". The only things left to argue are the name, and the return value. -Tony