public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: x86-ml <x86@kernel.org>, lkml <linux-kernel@vger.kernel.org>
Subject: RE: [RFC PATCH] x86/mce: Make mce_rdmsrl() do a plain RDMSR only
Date: Tue, 8 Sep 2020 15:07:05 +0000	[thread overview]
Message-ID: <c845adaad2414e5ba0bc74a51a1d0134@intel.com> (raw)
In-Reply-To: <20200908100837.GC25236@zn.tnic>

> Ok, so I think this is what Andy meant last night and PeterZ just
> suggested it too:
>
> We do a:
>
>	 _ASM_EXTABLE_HANDLE(1b, 2b, ex_handler_panic)
>
> which panics straight in the #GP handler and avoids the IRET.

We can even get a nice diagnostic message since the handler
has access to "regs". It can print which MSR (regs->cx) and
where it happened (regs->ip).

Which sounds like you might want a specific ex_handler_rdmsr
function rather than a generic ex_handler_panic.

Maybe same deal for wrmsr() too? That would also print edx:eax
so you could see what was being written.

-Tony

  reply	other threads:[~2020-09-08 15:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06 21:21 [RFC PATCH] x86/mce: Make mce_rdmsrl() do a plain RDMSR only Borislav Petkov
2020-09-07 20:06 ` Luck, Tony
2020-09-08  9:46   ` Borislav Petkov
2020-09-08 10:08     ` Borislav Petkov
2020-09-08 15:07       ` Luck, Tony [this message]
2020-09-08 15:25         ` Borislav Petkov
2020-09-09 11:30           ` Borislav Petkov
2020-09-09 18:20             ` Luck, Tony
2020-09-09 20:03               ` Borislav Petkov
2020-09-10 18:29                 ` Borislav Petkov
2020-09-10 18:38                   ` [PATCH -v2] x86/mce: Make mce_rdmsrl() panic on an inaccessible MSR Borislav Petkov
2020-09-10 18:42                   ` [RFC PATCH] x86/mce: Make mce_rdmsrl() do a plain RDMSR only Luck, Tony
2020-09-10 18:54                     ` Borislav Petkov
2020-09-10 19:43                       ` Luck, Tony
2020-09-07 20:16 ` Andy Lutomirski
2020-09-07 20:27   ` Borislav Petkov
2020-09-11  9:47 ` [tip: ras/core] x86/mce: Make mce_rdmsrl() panic on an inaccessible MSR tip-bot2 for Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c845adaad2414e5ba0bc74a51a1d0134@intel.com \
    --to=tony.luck@intel.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox