Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1228983

Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops
Date 2015-09-21 03:20 +0200
Message-ID <qaXVT-8u0-1@gated-at.bofh.it> (permalink)
References <qaWQ9-6YN-3@gated-at.bofh.it> <qaWQ9-6YN-7@gated-at.bofh.it> <qaWZP-79N-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sep 20, 2015 5:15 PM, "Linus Torvalds" <torvalds@linux-foundation.org> wrote:
>
> On Sun, Sep 20, 2015 at 5:02 PM, Andy Lutomirski <luto@kernel.org> wrote:
> > This demotes an OOPS and likely panic due to a failed non-"safe" MSR
> > access to a WARN_ON_ONCE and a return of zero (in the RDMSR case).
> > We still write a pr_info entry unconditionally for debugging.
>
> No, this is wrong.
>
> If you really want to do something like this, then just make all MSR
> reads safe. So the only difference between "safe" and "unsafe" is that
> the unsafe version just doesn't check the return value, and silently
> just returns zero for reads (or writes nothing).
>
> To quote Obi-Wan: "Use the exception table, Luke".
>
> Because decoding instructions is just too ugly. We'll do it for CPU
> errata where we might have to do it for user space code too (ie the
> AMD prefetch mess), but for code that _we_ control? Hell no.
>
> So NAK on this.

My personal preference is to just not do this at all.  A couple people
disagree.  If we make the unsafe variants not oops, then I think we
want to have the nice loud warning, since these issues are bugs if
they happen.

We could certainly use the exception table for this, but it'll result
in bigger core, since each MSR access will need an exception table
entry and an associated fixup to call some helper that warns and sets
the result to zero.

I'd be happy to implement that, but only if it'll be applied.
Otherwise I'd rather just drop this patch and keep the rest of the
series.

--Andy
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] x86/msr: MSR access failure changes Andy Lutomirski <luto@kernel.org> - 2015-09-21 02:10 +0200
  [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops Andy Lutomirski <luto@kernel.org> - 2015-09-21 02:10 +0200
    Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-21 02:20 +0200
      Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Andy Lutomirski <luto@amacapital.net> - 2015-09-21 03:20 +0200
        Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Ingo Molnar <mingo@kernel.org> - 2015-09-21 10:50 +0200
          Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Paolo Bonzini <pbonzini@redhat.com> - 2015-09-21 14:30 +0200
          Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-21 18:40 +0200
            Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Arjan van de Ven <arjan@linux.intel.com> - 2015-09-21 19:10 +0200
              Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-21 19:30 +0200
              Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Andy Lutomirski <luto@amacapital.net> - 2015-09-21 19:50 +0200
                Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Paolo Bonzini <pbonzini@redhat.com> - 2015-09-22 10:20 +0200
            Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Andy Lutomirski <luto@amacapital.net> - 2015-09-21 20:20 +0200
              Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Borislav Petkov <bp@alien8.de> - 2015-09-21 20:40 +0200
              Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-21 20:50 +0200
            Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access  fails without !panic_on_oops Ingo Molnar <mingo@kernel.org> - 2015-09-22 09:20 +0200
  [PATCH v2 2/2] x86/msr: Set the return value to zero when native_rdmsr_safe fails Andy Lutomirski <luto@kernel.org> - 2015-09-21 02:10 +0200

csiph-web