Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753208AbbF2K7E (ORCPT ); Mon, 29 Jun 2015 06:59:04 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:34410 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752757AbbF2K65 (ORCPT ); Mon, 29 Jun 2015 06:58:57 -0400 Date: Mon, 29 Jun 2015 11:58:53 +0100 From: Matt Fleming To: Henrique de Moraes Holschuh Cc: Prarit Bhargava , Andy Lutomirski , Ingo Molnar , "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: <20150629105853.GE28334@codeblueprint.co.uk> 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.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 958 Lines: 22 On Sun, 28 Jun, at 12:10:49PM, 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. Blacklisting also breaks horribly if you run old kernels on new hardware. We need to "fail-closed" if someone tries to access an MSR the kernel doesn't know about. -- Matt Fleming, Intel Open Source Technology Center -- 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/