From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752820AbcB2RWQ (ORCPT ); Mon, 29 Feb 2016 12:22:16 -0500 Received: from mail.skyhub.de ([78.46.96.112]:47447 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751995AbcB2RWM (ORCPT ); Mon, 29 Feb 2016 12:22:12 -0500 Date: Mon, 29 Feb 2016 18:22:08 +0100 From: Borislav Petkov To: Henrique de Moraes Holschuh Cc: "Mcfadden, Marty Jay" , Ingo Molnar , "ak@linux.intel.com" , "andriy.shevchenko@linux.intel.com" , "brgerst@gmail.com" , "dan.j.williams@intel.com" , "dyoung@redhat.com" , "hpa@zytor.com" , "linux@horizon.com" , "linux-kernel@vger.kernel.org" , "luto@kernel.org" , "mingo@redhat.com" , "pavel@ucw.cz" , "tglx@linutronix.de" , "viro@zeniv.linux.org.uk" , "x86@kernel.org" , "yu.c.chen@intel.com" , Peter Zijlstra , Arnaldo Carvalho de Melo , Jiri Olsa Subject: Re: [PATCH 0/4] MSR: MSR: MSR Whitelist and Batch Introduction Message-ID: <20160229172208.GB3724@pd.tnic> References: <1456444979-224547-1-git-send-email-mcfadden8@llnl.gov> <20160226073717.GA3884@gmail.com> <20160228190101.GB1256@pd.tnic> <20160229145859.GA3724@pd.tnic> <20160229163144.GA7426@khazad-dum.debian.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160229163144.GA7426@khazad-dum.debian.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.