Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX

From: Andy Lutomirski
Date: Wed Sep 09 2020 - 22:32:47 EST


On Tue, Sep 8, 2020 at 3:32 PM Matthew Garrett <mjg59@xxxxxxxxxx> wrote:
>
> On Tue, Sep 8, 2020 at 1:35 PM Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
>
> > Undervolting is a bit different. It’s a genuinely useful configuration that can affect system stability. In general, I think it should be allowed, and it should have a real driver in tree.
>
> Agree that this should be a proper driver rather than permitting
> arbitrary poking (especially if this isn't an architecturally defined
> MSR - there's no guarantee that it'll have the same functionality
> everywhere).

After looking at the code for intel-undervolt a bit, that definitely
needs kernel or even firmware support. That MSR really is a mailbox.
You write commands to it and read responses. There's no way that user
code can have adequate locking.