Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753687AbbKLVRn (ORCPT ); Thu, 12 Nov 2015 16:17:43 -0500 Received: from mga11.intel.com ([192.55.52.93]:51532 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753216AbbKLVRm (ORCPT ); Thu, 12 Nov 2015 16:17:42 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,283,1444719600"; d="scan'208";a="684164228" Date: Thu, 12 Nov 2015 13:17:41 -0800 From: "Luck, Tony" To: Andy Lutomirski Cc: Andy Lutomirski , Borislav Petkov , "linux-kernel@vger.kernel.org" , linux-edac , X86 ML , DanWilliamsdan.j.williams@intel.com Subject: Re: [PATCH 1/3] x86, ras: Add new infrastructure for machine check fixup tables Message-ID: <20151112211741.GA503@agluck-desk.sc.intel.com> References: <5bf6f812a7dd2b619487c57987e29b3884c6c4ec.1447093568.git.tony.luck@intel.com> <56441240.6000607@kernel.org> <20151112194422.GA31228@agluck-desk.sc.intel.com> 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 Content-Length: 1099 Lines: 23 On Thu, Nov 12, 2015 at 12:04:36PM -0800, Andy Lutomirski wrote: > > We already have code to recover from machine checks encountered > > while the processor is executing ring3 code. > > I meant failures during copy_from_user, copy_to_user, etc. Yes. copy_from_user() will be pretty interesting from a coverage point of view. We can recover by sending a SIGBUS to the process just like we would have if the process had accessed the data directly rather than passing the address to the kernel to acccess it. copy_to_user() is a lot harder. The machine check is on the kernel side of the copy. If we are copying from page cache as part of a read(2) syscall from a regular file we can probably nuke the page from the cache and return -EIO to the user. Other cases may be possible, but I don't immediately see any way to do it as a general case. -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/