Re: [PATCH] x86/msr: Block writes to certain MSRs unconditionally

From: Andy Lutomirski
Date: Sun Apr 11 2021 - 12:03:51 EST


On Sat, Apr 10, 2021 at 11:52 AM Andi Kleen <ak@xxxxxxxxxxxxxxx> wrote:
>
> Borislav Petkov <bp@xxxxxxxxx> writes:
>
> > From: Borislav Petkov <bp@xxxxxxx>
> > Date: Sat, 10 Apr 2021 14:08:13 +0200
> >
> > There are a bunch of MSRs which luserspace has no business poking at,
> > whatsoever. Add a ban list and put the TSC-related MSRs in there. Issue
> > a big juicy splat to catch offenders.
>
> Have you ever seen any user programs actually write those MSRs?
> I don't see why they ever would, it's not that they have any motivation
> to do it (unlike SMM), and I don't know of any examples.

I have actually seen real user programs poke MSR_SYSCALL_MASK.