Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732AbbF2Gm5 (ORCPT ); Mon, 29 Jun 2015 02:42:57 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:35823 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbbF2Gms (ORCPT ); Mon, 29 Jun 2015 02:42:48 -0400 Date: Mon, 29 Jun 2015 08:42:43 +0200 From: Ingo Molnar To: Henrique de Moraes Holschuh Cc: Prarit Bhargava , Andy Lutomirski , "linux-kernel@vger.kernel.org" , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , X86 ML , Len Brown , Dasaratharaman Chandramouli , Peter Zijlstra , Borislav Petkov , Andy Lutomirski , Denys Vlasenko , Brian Gerst , Arnaldo Carvalho de Melo Subject: Re: [PATCH] x86, msr: Allow read access to /dev/cpu/X/msr Message-ID: <20150629064243.GB16251@gmail.com> References: <1435341131-3279-1-git-send-email-prarit@redhat.com> <20150627083354.GA12834@gmail.com> <20150627083921.GA13074@gmail.com> <559005DD.3070003@redhat.com> <20150628151049.GB20989@khazad-dum.debian.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150628151049.GB20989@khazad-dum.debian.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1073 Lines: 31 * Henrique de Moraes Holschuh 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/