Re: [PATCH] x86, msr: Allow read access to /dev/cpu/X/msr

From: Ingo Molnar
Date: Mon Jun 29 2015 - 02:43:00 EST



* Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> wrote:

> On Sun, 28 Jun 2015, Prarit Bhargava wrote:
>
> > Is it easier to blacklist MSRs we don't want generally exposed, or only expose
> > the ones that we think are safe? That's sort of a devil's advocate sort of
> > question ;) and I'm wondering what the shorter list is.
>
> The only way to make MSR access safe is to allow it only by whitelisting. The
> x86 platform restricts all MSR access to ring 0 for a damn good reason.

Exactly.

We also want to document them along the way: just exposing all doesn't achieve
that.

> Also, such a whitelist would most likely need to be vendor and model-aware, and
> to differentiate "allow reads" from "allow writes"...

Initially it should only allow reads - which I believe fully meets turbostat's
needs.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/