Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp766231pxk; Wed, 9 Sep 2020 19:41:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMYzOUWM9qJXZ1ZvuTAU+P6DQJqTq8uT+L6tX4AEGrBk8KGduunSgMlFCiSvKuaCsbWD4f X-Received: by 2002:a50:c051:: with SMTP id u17mr6127113edd.39.1599705706008; Wed, 09 Sep 2020 19:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599705705; cv=none; d=google.com; s=arc-20160816; b=VZrOHBIucP+AE+yIddUfJbk2FqCvJiUTPwjyGKxnnRougnT+9kWlK58riO0Icww2v1 ORSncLod4IOlCDD4xH0CK24ghDjnLRtXk2ro/abdpYadE2j7hmTYOoiauP4KdDyRf3kW 3gP6YrLIb+8EsfpU8XE8Q7XXIUcoBhBL3LgiAIL0vQgGN3FOqqN8vfEcKS5sXq4BzIpw wi0OBQd3+BB2Jb2E4TOq7lAS8NzADEqn95P5u1thEq5zQkd8mLFCZeyavHMUYFscTgcl Jl3nzrBCLKQ/PZDxvC5NLeF0QIBpOvGOY5gUSjTETrf5DfShOyn+H+1w2029rzZcGoYo tlng== 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=UMqV0gNms+/YN0J4UoHozIqkDOwbFjYIjU/HXB1hJUI=; b=q0XXn6eSMxpKxznM2S8K/h22yEQreUglG7QKpByo6buarDd3bbKKBoyyZhYe+osRUq FL2w9ePL9DgXErXpuS/xrbSXxShMjPcPP821Wkn6tY1uKNtKys0TsP/CY/An0F65i77T nQVbijO8S9snnRIpqXArAEwOO0KysnRIsWiRpU/e10S04zih4+rvzt9Zyz/RzLf0/Ynh UGfPs0KZDjlmS/xvvzIPWG3QIHVktc2QieuHfgMLZu5HYmBqH28dR+PoIXnWeHtKill7 B5et5C21K4byxTxNuEejKuvKT6RQiinNgz5ZQ3NvmSfqq1/YdyIS87aJrWvuFB/MadA1 VgUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XRNW6eJb; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si2697181ejc.620.2020.09.09.19.41.22; Wed, 09 Sep 2020 19:41:45 -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=@kernel.org header.s=default header.b=XRNW6eJb; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730493AbgIJCiN (ORCPT + 99 others); Wed, 9 Sep 2020 22:38:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:48528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730839AbgIJCfe (ORCPT ); Wed, 9 Sep 2020 22:35:34 -0400 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 92CA9221ED for ; Thu, 10 Sep 2020 00:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599696499; bh=UMqV0gNms+/YN0J4UoHozIqkDOwbFjYIjU/HXB1hJUI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XRNW6eJbWsLI2dCSUJMZosNlb4e/tykXXido1LD8pPrbG5UZ5QGektxxF0uvXt+MV w18DIgFZLwTpusUyngmzMOF41INJKtd6YRyH6FUTTLzWTp3HRAndMz0AKC0VOELqGy nfyu9nrXrAKcS+bohj+9WtnQwRFM3oAWDSLPeQ40= Received: by mail-wr1-f53.google.com with SMTP id k15so4721434wrn.10 for ; Wed, 09 Sep 2020 17:08:19 -0700 (PDT) X-Gm-Message-State: AOAM532GxAjsUtQD3vXJsN2bZQsyh1C/Gsp/m0GXMUOvr9yMxfYgfzgZ aMx0OOYoAiqT/qeTRp/N6DMEbgzVrXfArCesFE5glg== X-Received: by 2002:adf:ce8e:: with SMTP id r14mr6110885wrn.257.1599696498201; Wed, 09 Sep 2020 17:08:18 -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> <20200908173656.GI25236@zn.tnic> <20200908180112.GK25236@zn.tnic> <20200908191838.GA2014@sultan-box.localdomain> <20200908193029.GM25236@zn.tnic> In-Reply-To: From: Andy Lutomirski Date: Wed, 9 Sep 2020 17:08:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX To: Srinivas Pandruvada Cc: Borislav Petkov , Sultan Alsawaf , "Jason A. Donenfeld" , kitsunyan , "Brown, Len" , X86 ML , LKML , Linus Torvalds 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 6:02 PM Srinivas Pandruvada wrote: > > On Tue, 2020-09-08 at 21:30 +0200, Borislav Petkov wrote: > > On 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. > > > > > > > > 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. > > > > Or maybe BIOS is nuts, which is not a stretch. > > > The whole OC is based on experiments to come to correct values. This > depends on whole system design not just CPUs. > https://www.intel.com/content/www/us/en/gaming/resources/how-to-overclock.html > It warns about system stability. > > > Srinivas, what's the story here? > I checked and there is no public spec. There are several mailbox > commands with version dependent on the processor. > > The actual OC mailbox implementation itself is implemented in Linux in > intel_turbo_max_3 driver. So that is public. > So someone can develop a driver and provide some sysfs to send mailbox > commands, but kernel can't validate commands which can cause any > security or stability issues. Not sure if this is acceptable standard. > I don't think there is any precedent of creating such blind sysfs > entries. > > Having once written a rejected driver to poke at the Intel Xeon memory controller SMBUS, there is at least precedent for writing drivers for dangerous interfaces, if not merging said drivers :) But we have drivers for various EC interfaces, for other SMBUS hosts, etc, and all of these can cause all kinds of mischief if misused.