mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Borislav Petkov <bp@alien8.de>
Cc: "Mcfadden, Marty Jay" <mcfadden8@llnl.gov>,
	Ingo Molnar <mingo@kernel.org>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"andriy.shevchenko@linux.intel.com" 
	<andriy.shevchenko@linux.intel.com>,
	"brgerst@gmail.com" <brgerst@gmail.com>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"dyoung@redhat.com" <dyoung@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"linux@horizon.com" <linux@horizon.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"luto@kernel.org" <luto@kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"pavel@ucw.cz" <pavel@ucw.cz>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"x86@kernel.org" <x86@kernel.org>,
	"yu.c.chen@intel.com" <yu.c.chen@intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH 0/4] MSR: MSR: MSR Whitelist and Batch Introduction
Date: Mon, 29 Feb 2016 13:31:44 -0300	[thread overview]
Message-ID: <20160229163144.GA7426@khazad-dum.debian.net> (raw)
In-Reply-To: <20160229145859.GA3724@pd.tnic>

On Mon, 29 Feb 2016, Borislav Petkov wrote:
> What you want to achieve can be implemented - if it hasn't happened
> already - in the already supplied drivers (rapl, x86_energy_perf_policy,
> etc).
> 
> Then, instead of filtering access to MSRs, we should not allow any
> non-OS controlled access to them. That means, not shipping msr.ko at
> all. Why?
> 
> You simply don't want to allow uncontrolled access to MSRs from
> userspace. Even to root. It is simply too dangerous to poke at them.

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.

We do need to deprecate MSR.ko, but IMHO it would be worth it to take the
time to make MSR.ko safer anyway *and backport that to older kernels*
because that is going to increase security on a large number of systems that
can't just disable MSR.ko without losing functionality right now.

Some kconfig control for what is included in the static whitelist (with
appropriate defaults) could make the deprecation period mostly painless both
for general use distros (that *do* enable MSR.ko) and for HPC deployments...

IMHO it would be acceptable to have a more complicated scenario where there
is a static "master whitelist", which can be made more strict (i.e. remove
access rights) through a soft whitelist managed by userspace (with
appropriate capability checks), if there is a real need for that level of
control on something we want to deprecate.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2016-02-29 16:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26  0:02 Marty McFadden
2016-02-26  0:02 ` [PATCH 1/4] MSR: Prep for separating msr.c into three files Marty McFadden
2016-02-26  2:56   ` kbuild test robot
2016-02-26 10:08   ` Andy Shevchenko
2016-02-26  0:02 ` [PATCH 2/4] " Marty McFadden
2016-02-26  0:02 ` [PATCH 3/4] MSR: msr Whitelist Implementation Marty McFadden
2016-02-26  1:05   ` kbuild test robot
2016-02-26  1:05   ` [PATCH] MSR: fix badzero.cocci warnings kbuild test robot
2016-02-26  0:02 ` [PATCH 4/4] MSR: msr Batch processing feature Marty McFadden
2016-02-26  2:48   ` Andy Lutomirski
2016-03-03 17:21   ` One Thousand Gnomes
2016-03-03 23:09     ` Mcfadden, Marty Jay
2016-02-26  7:37 ` [PATCH 0/4] MSR: MSR: MSR Whitelist and Batch Introduction Ingo Molnar
2016-02-28 18:54   ` Mcfadden, Marty Jay
2016-02-28 19:01     ` Borislav Petkov
2016-02-29  2:55       ` Mcfadden, Marty Jay
2016-02-29 14:58         ` Borislav Petkov
2016-02-29 16:31           ` Henrique de Moraes Holschuh [this message]
2016-02-29 17:22             ` Borislav Petkov
2016-02-29 17:53           ` George Spelvin
2016-02-29 18:20             ` Borislav Petkov
2016-02-29 22:35               ` Mcfadden, Marty Jay
2016-02-29 23:41                 ` Borislav Petkov
2016-03-01 19:01                   ` Rountree, Barry L.
2016-03-03  0:40                     ` Andy Lutomirski
2016-03-01  8:02                 ` Thomas Gleixner
2016-03-01 18:29                   ` Rountree, Barry L.
2016-03-01 18:38                     ` Borislav Petkov
2016-02-29 17:17         ` Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160229163144.GA7426@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=ak@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=dyoung@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=luto@kernel.org \
    --cc=mcfadden8@llnl.gov \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=x86@kernel.org \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®