Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp763187pxk; Wed, 9 Sep 2020 19:33:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4jyFjdiUJj48/ypVmMMgM49SPv2+a/DVucDi1bPwVBrQfEIJo6Y3spw0tLAsPemUnNLM4 X-Received: by 2002:a17:906:76c7:: with SMTP id q7mr6910839ejn.541.1599705224166; Wed, 09 Sep 2020 19:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599705224; cv=none; d=google.com; s=arc-20160816; b=qo4V7C0MtOpVZQ2PaC0C0jzRkR79ll2RL5jomRFRIH+IFE9ramnrZ7+6S8NFt91f7h aCbrugvmI0OhMdY4q78oEdFtllbOLz1thLJjFz1SG8aktnjdq2CQ2HvTKE6tSxlfxSeH vf2RMIrFqHsgegNIxOPvIfo4GYzFTNxgJnkRlj7Pl+/+mgo1/zkcAPitkUEMRhdDz3PL 1A3CHH9h7CGzhLxDULyI/lSRqaIG/7mLlueK9pFnh2InT/zVYHnQaoq0kvq/IwUrz48F Kt52Y66XtV2xPedd6bsonHQuyLrE+XMbEPY8MEhRg+jX3fwPku09p3SzOdgk5BoLkXBu OTBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=eWAHVcKjtXdeqOTZCSkcRSusZ/slGE+EgSx61RATsRg=; b=Vm1mp5oiKG7WoYAploDlxBql1Z/20VDCzamK1WDAZiBvbZtFSdPoLYB9bu/F0G4Ghy pWMWQO8CgFDl7zhthbJ9BMZkHtO2vFPnioq82b6XLs1WIrHBmHSjRkutxrF6SdsPcKhz Un6u8Tb3kM4tA2OXqS0oB+L6SBhP/TLN8dxJp+DZgs0sDmVZj1H/76/Ro2lwHhZWgBIy YjlOUuJn/0v5iaEyjD/P5dYlxDaE/06g6z3gvENE7+FgVYCZuvmVNxpfz0rTI2280dx5 1KFB+wqpJnm9Pn/cFhE0U5IG5Wwy49Jk3h+FKrHwO382Rrnv6zfmeq66F6ID/VG40293 dkPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qP1mLFoF; 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 bh20si2687461ejb.294.2020.09.09.19.33.21; Wed, 09 Sep 2020 19:33:44 -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=qP1mLFoF; 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 S1730478AbgIJCcd (ORCPT + 99 others); Wed, 9 Sep 2020 22:32:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:39572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730921AbgIJCZa (ORCPT ); Wed, 9 Sep 2020 22:25:30 -0400 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 4BB2D208CA for ; Wed, 9 Sep 2020 23:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599695820; bh=G/d7I7uYDPr+xcXLSAz55tCVxS++/YD+BwhhhZQ43rE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qP1mLFoFElIO3POE7p4mPUAYXwmsO/XSRrk3t5/qHZWwPmEBX9oUK3Ytty/iZa4Mh UxBxO0tdVkS8hnI6o3a/YfGj5gTiUN4wdk00h/C60TAK1Lr75rN+d793UgH2dGKZXE 87xu1sF3AVtntrGULLDYy7gBUkGv67K2IFmH9JPI= Received: by mail-wm1-f41.google.com with SMTP id k18so4007605wmj.5 for ; Wed, 09 Sep 2020 16:57:00 -0700 (PDT) X-Gm-Message-State: AOAM532+5oyO6h4DRkrmvQjuvNo4B5X1bD0ehbOaBPySh1ws2NULO8fs QfZFT4EIpP3RWyFyCOo4WjtEBph2y/mnqf8kwa8IkQ== X-Received: by 2002:a05:600c:2183:: with SMTP id e3mr6114629wme.49.1599695818930; Wed, 09 Sep 2020 16:56:58 -0700 (PDT) MIME-Version: 1.0 References: <20200908193029.GM25236@zn.tnic> <025308CD-6E1A-41E1-8B3D-E9842CE00794@amacapital.net> In-Reply-To: From: Andy Lutomirski Date: Wed, 9 Sep 2020 16:56:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX To: Matthew Garrett Cc: Borislav Petkov , James Bottomley , Sultan Alsawaf , "Jason A. Donenfeld" , Srinivas Pandruvada , kitsunyan , "Brown, Len" , X86 ML , LKML , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 3:32 PM Matthew Garrett wrote: > > On Tue, Sep 8, 2020 at 1:35 PM Andy Lutomirski wrot= e: > > > Undervolting is a bit different. It=E2=80=99s a genuinely useful config= uration that can affect system stability. In general, I think it should be= allowed, and it should have a real driver in tree. > > Agree that this should be a proper driver rather than permitting > arbitrary poking (especially if this isn't an architecturally defined > MSR - there's no guarantee that it'll have the same functionality > everywhere). After looking at the code for intel-undervolt a bit, that definitely needs kernel or even firmware support. That MSR really is a mailbox. You write commands to it and read responses. There's no way that user code can have adequate locking.