Re: [PATCH] x86/mce: Need to let kill_proc() send signal to doomedprocess

From: Borislav Petkov
Date: Tue Jul 10 2012 - 11:44:58 EST


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 <tony.luck@xxxxxxxxx>
> ---
>
> 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 <borislav.petkov@xxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/