Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4094423pxk; Tue, 8 Sep 2020 10:30:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQCS5WPrmkI3N7z//+8l4HEKqpovLM0/sErEogABlKv5Ule+Ls1mCGVSO45KZCAyq81Dip X-Received: by 2002:aa7:dcc1:: with SMTP id w1mr25786edu.360.1599586247785; Tue, 08 Sep 2020 10:30:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599586247; cv=none; d=google.com; s=arc-20160816; b=a10KAT8jXrSOYj5t8cvRz5XR46LrhLJjSQqxv8ANRBop/rU5xYCSKujssZaiRAC3jU mxeNvUzoddNPKvmzPXF0I5vAwK6gxVwtTXDPeM9XiOKpaTFmf/u+V1K9adZKk+oTU0RN cNOqnnAKQ+4yOPX2K04eRc1Fceo8wKqELh1/D/MIO3SNWig9ovNvimJEDlxx+VUcDFSJ Q03NdmzWJHVwXWLQk6IuHjtfBloypAxoAW8v2jFJVI0DQQ/MZhzLhRSwvBNy+r6/bldV nq3l4fyDos5q4Vv5RA95WzYoK4P1Kx2fU9FoOSWKMkFXQs1yPqNiNI43eVSWhZpThlFZ junA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=15q5FThEds/Z/CaUdLp3431BJPEYfF3oYzvn3+5/8ag=; b=E2a7Q4rlzR/ImTvOzAYJkbV+BOvlSZ8Ikwo/moNHpPQhJyO1VfKaDMIAYjk83+3TE6 hKRMgLK1kfYAwFFZ+KjmW+BgSBdIKIMAF+LT+urZ5XxFOlRR68I+3ilNAP8/pgZLemdk VkKibE95rjsGJd7oRKR34UdXZjvic+Qc+KyRR4Zl6BLROz9Glgq+Rr/29n7qxKVlWBcc 7dgo5wLZgel01CWtUyvKEUDL1lssfOKiDxLhnPn8fG9k7nEWuBxiczS97QfIozir0GpA zoZ5xaJJOftyjUiEEhir3Ji2uF0Aa8FCdz8/CzCzOZAbDWnIAxp/1J4Z8RGAQa0/ohtW 1Ktg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=znOTximh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f26si15591290ejj.250.2020.09.08.10.30.25; Tue, 08 Sep 2020 10:30:47 -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=@zx2c4.com header.s=mail header.b=znOTximh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727935AbgIHR3u (ORCPT + 99 others); Tue, 8 Sep 2020 13:29:50 -0400 Received: from mail.zx2c4.com ([192.95.5.64]:57035 "EHLO mail.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731789AbgIHR31 (ORCPT ); Tue, 8 Sep 2020 13:29:27 -0400 Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 0892b1cd for ; Tue, 8 Sep 2020 17:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=mqjBG2eyKf9WfashkF7sbHwX2A4=; b=znOTxi mhb8G81iYoy+f/yTeW4GMiHepLhCboJJd++kcoezc4jQuPctQr0eepjGiXUOtQzp vAqpA5KY0+L06CR87DSWhOdBO3fOl0DxR1NQ5sfE9Lr7JnaAzMZ+cZuXC9E8DO2U hi6JAx/Mx8PJgdqOR5d3sQ6G731jtyBztZcWKHUygBVuuq0/iJp/d4F8jASr1TDi g0LXoykzcM3hIINlzbpquj8y4e86Gkun+rKpD1pzs6U2L3oGGNenwDc/x1WQf5s2 ivLJyZX4XDyelFk9rF6yyJgQ5cPRbk7TtJaV2Zl0P51HFYVNQjJ+feNLDQVi7+fR Z1P/WKheDT4bHGWw== Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 8bf06f7b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 8 Sep 2020 17:00:29 +0000 (UTC) Received: by mail-il1-f172.google.com with SMTP id x2so16196901ilm.0 for ; Tue, 08 Sep 2020 10:29:23 -0700 (PDT) X-Gm-Message-State: AOAM533+J3NcseFxlQbRuLekuuLd+5K8fi174+2VhVGpzmPp2gkwqtAb oi0W29SlrPOsxRDUqW5ZDUYoerfhwiv8ZsY1gtQ= X-Received: by 2002:a92:c9c5:: with SMTP id k5mr24594830ilq.231.1599586162847; Tue, 08 Sep 2020 10:29:22 -0700 (PDT) MIME-Version: 1.0 References: <20200907094843.1949-1-Jason@zx2c4.com> <20200907100647.GB10657@zn.tnic> <22617e57e541e460fac09db04fdb370f8e96e8ef.camel@linux.intel.com> <20200908172558.GG25236@zn.tnic> In-Reply-To: <20200908172558.GG25236@zn.tnic> From: "Jason A. Donenfeld" Date: Tue, 8 Sep 2020 19:29:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX To: Borislav Petkov Cc: Srinivas Pandruvada , kitsunyan , "Brown, Len" , X86 ML , LKML , Linus Torvalds , Sultan Alsawaf Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 8, 2020 at 7:26 PM Borislav Petkov wrote: > > On Tue, Sep 08, 2020 at 07:12:44PM +0200, Jason A. Donenfeld wrote: > > > Overclocking is not architectural I/F and is supported by some special > > > CPU skews. I can't find any public document to specify the commands > > > which can be used via this OC mailbox. I have to check internally to > > > see if there is any. To add a proper sysfs interface we have to make > > > sure that we are not allowing some random commands to hardware and > > > crash the system. > > > > Well you can definitely crash the system this way -- undervolting can > > result in all sorts of nice glitching. You might be able to even > > programmatically undervolt to compromise the kernel in clever ways (a > > lockdown bypass, I guess, but who cares). > > > > That's why I initially suggested this was pretty squarely in the realm > > of hobbyists and should just be added to that whitelist. > > If that MSR can cause all kinds of crazy, I'd prefer writes to it from > userspace to be completely forbidden, actually. And if force-enabled, > with a BIG FAT WARNING each time userspace writes to it. Well that's not cool. And it's sure to really upset the fairly sizable crowd of people who rely on undervolting and related things to make their laptops remotely usable, especially in light of the crazy thermal designs for late-era 14nm intel cpus. Tools like intel-undervolt have been a godsend in that regard. I came here posting a patch to remove the annoying message you added for that use case. Now you want to just totally remove that feature all together from the kernel? Sounds like a regression in functionality I simply can't get behind. I know that my laptop, at least, would suffer. Jason