Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4209572pxk; Tue, 8 Sep 2020 13:40:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypH93xORZcpKrJ/mt7Ren/zI+xOB1tdqxewKJWBxK1+ucFsPbZYBlDTD1nXjrNm1yNlQM6 X-Received: by 2002:a17:907:37b:: with SMTP id rs27mr318486ejb.0.1599597615444; Tue, 08 Sep 2020 13:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599597615; cv=none; d=google.com; s=arc-20160816; b=G5aiBqNnPVytLJ+3sI2opxpz0cXdNbldIbi50F35w3YZsGvjIVZhVliSiBU8dkfL4o uw4Sm3Nk/TmKPnoWyugRAVy5DLHClgV/dvcp0SLL2aEaSZoCB2YH2fa4hoSA2KyNtNBz d2Kl0wSCfZvJqlbLBny5tsn/91mmDbDhrfGmuW267BrtocMWgWKHdCIPfNwHYD4KTvAY hFWvrgzf2qvtzdgc2joQW+BEDTu2if+DJ8/Il8Jbq4sJnvKF4Ut4ePpqY7cKeWnVWzhd u/7ArQEASlVSNmXigCmF3fUB8JO3mTF2THYizHffLy7yUiu1B7/zmn1Sw5o3Owu1rYh2 N4Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=Pi5Ot7NAsKXZl3XWiN+smNBToz4aQuIesxq10kCmT3k=; b=vai2KCSN69Eoy5H6tsBE/3Dt/Isggai1Zv+xG463JMocdyghTztX/+cgKHmkyATQWE Rai3e+P9dd6mzW22ZP5Va7uclews8irEvxy4AuPeJ8dch2kUbiPBXyGv7B7KvVeo55rY W+fW32Fhl7uylVOiK1EzGTlUSRNMOcu/gm45F7B28OLRn2Fq64RHLz8/0bPUkLSFpu8T iB0FCbUYScw70ap3DsD5PUTBsZ+vHA9QiAypAKoEhGenPgXmS6Gq/l9xlVXR5gyQkyWU +xO1SOMDsNCzzS5VaBA7hwwWlt+SD9Q8did6n3N/Gd49uv+Ri9X7lMVjJ3j6jGdQfFNH rlRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=1tRNglgM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si165083edq.199.2020.09.08.13.39.08; Tue, 08 Sep 2020 13:40:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=1tRNglgM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728572AbgIHUfa (ORCPT + 99 others); Tue, 8 Sep 2020 16:35:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbgIHUf3 (ORCPT ); Tue, 8 Sep 2020 16:35:29 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19063C061573 for ; Tue, 8 Sep 2020 13:35:27 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id o68so263219pfg.2 for ; Tue, 08 Sep 2020 13:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=Pi5Ot7NAsKXZl3XWiN+smNBToz4aQuIesxq10kCmT3k=; b=1tRNglgMOS8BOH6OLOjRYKqh9Ki7qg9E4DucR8BCg3UxGQL3Wkem6udt1zLg6sW2Df BFEIxxwePeJpCIuz28a2ntxIXPKUJX/uGyvV0WaNTlloglSqk4ogkDIh9Dxt1Nr4pqdD ke6AhF5cb159RvaRumAByzVy8+3XeeXo7we4fxo5H0n9r0a5mviTorEHZrZrnC96qJNF uswciVaihsCTKh1+FKIETBYYm+zTA81f7uOqvPsOGmTaNdcA8Uu54kKh2vOhJapBff5Q qnaoxBZAl0TmcZEmpy9vLEcMVH/oVXs2U1hcwPZ1qk5o3OafkkbYXBUIn5UOrxYJlN5Q 0a+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=Pi5Ot7NAsKXZl3XWiN+smNBToz4aQuIesxq10kCmT3k=; b=Vi+EnbwuxC4feG6eYuFKn2nh4t/mHT/TXa3XEhA9le5rtDsjr9/KnAfgJMr69lGvBH e2478MIvuMYTRdAhAlSVzoDh0u+Uc7t0ZryXM0ILp/566TwERzk53tu8+ebI9dLgW0CT OQ93c/Gsru9K8ixpMoQv6SZGIOQeotIYiGUFRmgn7Wi1cHRvwontb88OcT5+im8IDRMr r29YqqNGHJ/2eO85kycN8irDT9xUVqIdnHxrkH8bsSngxcSFuZXQxFiZ0dgoRr+YwfwV CRjnoUktwAAPScMddRHDvojIjAldLZFTDti7nBpg/enMDQPNNQNEPqbgPeosLHp+js4c KGVg== X-Gm-Message-State: AOAM532isnvnfLOPE8s/0pkEyXgrgSro7UEnSOIelozDlnsWuJu8bUw6 T0DzObiK3NfD8tDT0exvTf3ZKA== X-Received: by 2002:a17:902:be0b:: with SMTP id r11mr427647pls.84.1599597321777; Tue, 08 Sep 2020 13:35:21 -0700 (PDT) Received: from [100.97.122.108] (3.sub-174-194-201.myvzw.com. [174.194.201.3]) by smtp.gmail.com with ESMTPSA id h15sm116176pjf.54.2020.09.08.13.35.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Sep 2020 13:35:20 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX Date: Tue, 8 Sep 2020 13:35:18 -0700 Message-Id: <025308CD-6E1A-41E1-8B3D-E9842CE00794@amacapital.net> References: <20200908193029.GM25236@zn.tnic> Cc: Sultan Alsawaf , "Jason A. Donenfeld" , Srinivas Pandruvada , kitsunyan , "Brown, Len" , X86 ML , LKML , Linus Torvalds In-Reply-To: <20200908193029.GM25236@zn.tnic> To: Borislav Petkov , Matthew Garrett , James Bottomley X-Mailer: iPhone Mail (17H35) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 8, 2020, at 12:30 PM, Borislav Petkov wrote: >=20 > =EF=BB=BFOn Tue, Sep 08, 2020 at 12:18:38PM -0700, Sultan Alsawaf wrote: >> I'd like to point out that on Intel's recent 14nm parts, undervolting >> is not so much for squeezing every last drop of performance out of the >> SoC as it is for necessity. >=20 > >=20 > Sounds to me that this undervolting functionality should be part of > the kernel and happen automatically. I have no clue, though, whether > people who do it, just get lucky and undervolting doesn't cause any > other hardware issues, or there's a real reason for this power madness > and if not done, power-related failures happen only on some boxes so > they decided to do them on all. >=20 > Or maybe BIOS is nuts, which is not a stretch. >=20 > Srinivas, what's the story here? >=20 I have seriously mixed opinions about this. First, there are really two separate issues here. One is undervolting these p= arts, and one is the MSR interface. In my mind, the MSR part is an easy call. Userspace has no more business pok= ing some undocumented mailbox MSR than it does poking any other MSR. We shou= ld not give special dispensation here. It should be allowed if the MSR restr= ictions are off, and otherwise we should warn or forbid it. Undervolting is a bit different. It=E2=80=99s a genuinely useful configurati= on that can affect system stability. In general, I think it should be allow= ed, and it should have a real driver in tree. But this has a tricky interaction with lockdown. An interface that allows r= oot to destabilize a system may well allow root to escalate privileges. But= I think that making lockdown=3Dintegrity prevent tuning voltages and such w= ould be quite obnoxious. Should there perhaps be a separate lockdown bit for stability? I assume that Intel XTU and such work on Secure-Booted Windows.=