From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755973Ab2GJPoY (ORCPT ); Tue, 10 Jul 2012 11:44:24 -0400 Received: from s15943758.onlinehome-server.info ([217.160.130.188]:48260 "EHLO mail.x86-64.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751930Ab2GJPoX (ORCPT ); Tue, 10 Jul 2012 11:44:23 -0400 Date: Tue, 10 Jul 2012 17:44:10 +0200 From: Borislav Petkov To: Tony Luck Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Chen Gong , "Huang, Ying" , Hidetoshi Seto Subject: Re: [PATCH] x86/mce: Need to let kill_proc() send signal to doomed process Message-ID: <20120710154410.GA29892@aftab.osrc.amd.com> References: <3908561D78D1C84285E8C5FCA982C28F19348DFF@ORSMSX104.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 09, 2012 at 01:34:36PM -0700, Tony Luck wrote: > In commit dad1743e5993f19b3d7e7bd0fb35dc45b5326626 > x86/mce: Only restart instruction after machine check recovery if it is safe > > we fixed mce_notify_process() to force a signal to the current process > if it was not restartable (RIPV bit not set in MCG_STATUS). But doing > it here means that the process doesn't get told the virtual address of > the fault via siginfo_t->si_addr. This would prevent application level > recovery from the fault. > > Make a new MF_MUST_KILL flag bit for memory_failure() et. al. to use > so that we will provide the right information with the signal. > > Signed-off-by: Tony Luck > --- > > v2: Fix brainfart where I forgot to check mi->restartable to decide whether > to pass in the new MF_MUST_KILL bit [Thanks Boris for spotting this!] > Use same style syntax !!(flags & MF_MUST_KILL) [Also from Boris] > Faked tests with RIPV set and not set ... and found that we need one > more check on MF_MUST_KILL earlier in hwpoison_user_mappings() to > make sure it doesn't think the clean page case is recoverable. Ok, now it makes pretty good sense. Acked-by: Borislav Petkov Thanks. -- Regards/Gruss, Boris. Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach GM: Alberto Bozzo Reg: Dornach, Landkreis Muenchen HRB Nr. 43632 WEEE Registernr: 129 19551