Re: [PATCH 0/4] MSR: MSR: MSR Whitelist and Batch Introduction

Borislav Petkov
2016-02-29T17:22:16Z

On Mon, Feb 29, 2016 at 01:31:44PM -0300, Henrique de Moraes Holschuh wrote:
> Fully agreed. That said, it would be nice to have a patchset (intended
> mostly for stable/LTS backporting) that restricts MSR access to a *static*
> whitelist that allows only the minimal access required by the current crop
> of general use utilities like powertop, turbostat, etc.

As I said before, if people want to shoot themselves in the foot, we
can't stop them.

However, we should start converting those tools away from msr.ko and
towards proper OS interfaces instead. And not a short list it is (this
only in the kernel repo) ... :-\

$ git grep -lE "cpu/.*/msr" | uniq
Documentation/devices.txt
arch/x86/Kconfig
arch/x86/kernel/msr.c
tools/power/cpupower/debug/i386/centrino-decode.c
tools/power/cpupower/debug/i386/powernow-k8-decode.c
tools/power/cpupower/man/cpupower-monitor.1
tools/power/cpupower/utils/cpupower.c
tools/power/cpupower/utils/helpers/msr.c
tools/power/x86/turbostat/turbostat.8
tools/power/x86/turbostat/turbostat.c
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.8
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
tools/testing/selftests/intel_pstate/aperf.c
tools/testing/selftests/intel_pstate/msr.c

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.