Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CED71C169C4 for ; Thu, 7 Feb 2019 01:37:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 996B4217F9 for ; Thu, 7 Feb 2019 01:37:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726547AbfBGBhU (ORCPT ); Wed, 6 Feb 2019 20:37:20 -0500 Received: from mout.gmx.net ([212.227.17.21]:43351 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbfBGBhU (ORCPT ); Wed, 6 Feb 2019 20:37:20 -0500 Received: from [10.8.11.6] ([196.52.84.14]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LvQkh-1hH5np1Mln-010ead for ; Thu, 07 Feb 2019 02:37:18 +0100 To: linux-kernel@vger.kernel.org From: "Artem S. Tashkinov" Subject: On the issue of CPU model-specific registers write protection in UEFI secure boot mode Message-ID: <8d1f8adc-222b-40df-4573-67f28819126c@gmx.com> Date: Thu, 7 Feb 2019 01:37:16 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:MFmXOgcNerOfqqeHVRvWtqTF7kjbBWUR82moBWcaj9ZhJPVTXOn xbFV7jIcqN4QcANZl7OSwh96+QfN6EpriVLFEuv8eygabe2Jm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voqz55o155KYJrrJeVOt17qHnhZF15Xry9Kbja9Vrga4KCHieVQJ46 b+VXnQAkq/Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello LKML, Is there a serious reason why CPU MSR is write protected in UEFI secure boot mode in Linux? * In order to even use MSR you have to be root to `modprobe msr`. * In order to read/write from/to MSR you have to be root as /dev/cpu/*/msr is accessible only by root. * CPU registers don't survive reboot/power cycles. * I'm not a CPU designer but if I'm not mistaken MSR cannot be used to create any sort of stealth malware. So, I'm asking this question because these registers allow to fine tune Intel CPU power parameters ( https://github.com/georgewhewell/undervolt ) like voltage and others and make it possible to run your system both faster and cooler and right now it's not possible under Linux and perfectly possible under competing proprietary OSes. Of course, the user can * fetch his distro kernel sources * apply a patch from ( https://github.com/intel/intel-cmt-cat/wiki/UEFI-Secure-Boot-Compatibility ) * install his own UEFI certificate * compile, sign and install a patched MSR kernel module However this all has to be done for each new kernel release and many Linux users just cannot do anything on this list. Best regards, Artem