Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1886644ybh; Tue, 14 Jul 2020 09:48:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLflz9zGPKBZD9WOFaF+6PhRyIuG0wvj3wBteUSQdmEZUTtIdhHS9RkPWrEd+wPYl3i3b5 X-Received: by 2002:aa7:d50d:: with SMTP id y13mr5477704edq.230.1594745324806; Tue, 14 Jul 2020 09:48:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594745324; cv=none; d=google.com; s=arc-20160816; b=QEVFZHrBOblISs+/pb1rnPvbNw1ej153Jz3WoIDLZ5LCTXFYejBbKslt5wt5G/DbfT 3qZhbtXpzaV0zHXLNpNFPI5HnCmZwhb4+b4AIih0dCCQF3D8It5SrDECuqy0mim8dGH/ Gi6NqDOHxzIgBYGk8in7TloJ2JfuYMjjJOSQo4rz8UR9muGwuAvVUdTRNjXgtXsMNnyF idzTxm6vX7mJjIadjLp/oIt6JQ7Xy20H3JxQcyXzzznSiKAucvj/dg3AihCrPU2NPYW7 PtFWoCOFPal4XHrZKC+f6Rm4ri4JkLbBZO8zNFu7ls+xyAaagZsq6a4khcMqyKy8PP/p z7Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=SWOoSfZ1erhfX6OO+atvPLp0qYNrwu3+80q/mBkQFV8=; b=IJpq8mDjNXvhXHkl+cE1mVYv7gsGcUgAnYhklh9krNTe0A7w4/rZ51Od232B1lwmDF U5Es+agOxZVgAJTNAS1GXejY/sf+1QisiO8wOabzp8TUQTP2HU0AmjGHMWKEbPJGumnP uTuodPE78QFktsdPnQ8ZxEtWUFdS/zuSkcIPkJvz4Hej/NgAFLkCV/mNRt+hvmCeYAY7 72eODZCBmbRtxOLmPZ5rg8ahlqFYMtAfNj9K/0iNRNjUG7NGe3nzmL6wuAjXi+HbTchH AuiLZq9iwMuHcVybrSabpt+EETSOUcE3ZDeyzygMBu8XlylbJt5f0zgZUR50aLGrtBSc ZBOQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si11306375edh.362.2020.07.14.09.48.20; Tue, 14 Jul 2020 09:48: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727028AbgGNQqP (ORCPT + 99 others); Tue, 14 Jul 2020 12:46:15 -0400 Received: from mga02.intel.com ([134.134.136.20]:63426 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbgGNQqO (ORCPT ); Tue, 14 Jul 2020 12:46:14 -0400 IronPort-SDR: 9AspnhHnJKxdjgvKNxAcbIGKlh8Lj+n1Sbv4yQcJZ6L4JBinBPzZAA2xbjlZG8jP/PJSfbyv4f YRvw2kX+PD/g== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="137096649" X-IronPort-AV: E=Sophos;i="5.75,352,1589266800"; d="scan'208";a="137096649" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 09:46:14 -0700 IronPort-SDR: 0zIglL1rGjfXbMiyccoWIdYK7nyGnLsYlddSeTXk2lQJMEzThC5kWDM/9+ts/3x4JBnBUVHkha DaQY8d300C2w== X-IronPort-AV: E=Sophos;i="5.75,352,1589266800"; d="scan'208";a="316437149" Received: from agluck-desk2.sc.intel.com (HELO agluck-desk2.amr.corp.intel.com) ([10.3.52.68]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 09:46:13 -0700 Date: Tue, 14 Jul 2020 09:46:12 -0700 From: "Luck, Tony" To: Chris Down Cc: Borislav Petkov , linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com, torvalds@linux-foundation.org, x86@kernel.org, kernel-team@fb.com, Matthew Garrett Subject: Re: [PATCH -v2.1] x86/msr: Filter MSR writes Message-ID: <20200714164612.GA28474@agluck-desk2.amr.corp.intel.com> References: <20200615063837.GA14668@zn.tnic> <20200714121955.GA2080@chrisdown.name> <20200714154728.GA3101@nazgul.tnic> <20200714160448.GC2080@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714160448.GC2080@chrisdown.name> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 14, 2020 at 05:04:48PM +0100, Chris Down wrote: > Borislav Petkov writes: > > On Tue, Jul 14, 2020 at 01:19:55PM +0100, Chris Down wrote: > > > That is, even with pr_err_ratelimited, we still end up logging on basically > > > every single write, even though it's from the same TGID writing to the same > > > MSRs, and end up becoming >80% of kmsg. > > > > > > Of course, one can boot with `allow_writes=1` to avoid these messages at > > > > Yes, use that. > > > > From a quick scan over that "tool" you pointed me at, it pokes at some > > MSRs from userspace which the kernel *also* writes to and this is > > exactly what should not be allowed. > > I don't think we're in disagreement about that. My concern is strictly about > the amount of spam caused for some of those existing use cases during the > transition phase. People should know that their tools would break, but there > shouldn't be so many messages generated that it inevitably pushes other > useful information out of the kmsg buffer. Maybe we just need smarter filtering of warnings. It doesn't seem at all useful to warn for the same MSR 1000's of times. Maybe keep a count of warnings for each MSR and just stop all reports when reach a threshold? -Tony