Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754503AbcCNSlD (ORCPT ); Mon, 14 Mar 2016 14:41:03 -0400 Received: from mail-ig0-f195.google.com ([209.85.213.195]:35732 "EHLO mail-ig0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752276AbcCNSk7 (ORCPT ); Mon, 14 Mar 2016 14:40:59 -0400 MIME-Version: 1.0 In-Reply-To: References: <20160314120202.GD15800@pd.tnic> Date: Mon, 14 Mar 2016 11:40:58 -0700 X-Google-Sender-Auth: 59lUbu0uOuIUq6QJtIesmH4krUM Message-ID: Subject: Re: [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops From: Linus Torvalds To: Andy Lutomirski Cc: Paolo Bonzini , xen-devel , Arjan van de Ven , Borislav Petkov , X86 ML , Andrew Morton , KVM list , Andy Lutomirski , "linux-kernel@vger.kernel.org" , Peter Zijlstra Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 830 Lines: 25 On Mon, Mar 14, 2016 at 11:24 AM, Andy Lutomirski wrote: > > The code in my queue is, literally: > > bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup, > struct pt_regs *regs, int trapnr) > { > WARN_ONCE(1, "unchecked MSR access error: RDMSR from 0x%x", > (unsigned int)regs->cx); > > /* Pretend that the read succeeded and returned 0. */ > regs->ip = ex_fixup_addr(fixup); > regs->ax = 0; > regs->dx = 0; > return true; > } > EXPORT_SYMBOL(ex_handler_rdmsr_unsafe); I guess I can live with this, as long as we also extend the early-fault handling to work with the special exception handlers. And as long as people start understanding that killing the machine is a bad bad bad thing. It's a debugging nightmare. Linus