Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2627293pxa; Mon, 17 Aug 2020 14:49:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkLKRbRj7U/jcn/miG8FfWVgTShWDEDIaCwYkFm57rpWCvBxhDWV+gD/BgWKx2862XAYBh X-Received: by 2002:a05:6402:297:: with SMTP id l23mr17115835edv.145.1597700965550; Mon, 17 Aug 2020 14:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597700965; cv=none; d=google.com; s=arc-20160816; b=BtcPmFRWfWe63k0Lk/lg7m4RiqliLGDowisNwzdHhLgY95eJVyA0xW72gEtlrxhHV4 46w5nzn78zvuD1rKscIRWcZcmcEDr/mgcg9wcloko9Wh/okbRxwqyhKcQmFtWiFvKX1A 6+XzRxMBCkUZSpyb/wM9t2umO2Vf1hvTBk0A6nc0FCQ1AqXCq7IBStdBYWCGh+7BvfZ8 u43F2yfCK/z9CDpeqIFyvOjIrHnDQcx5RAkIYoTvbH+j3/MyNP/Q2UoL7/EvKNkv+Bo2 D5iXUh117MHlqPCMfpEMc0M+i/O4KrYfz3eoE6+RP+e1uCMseB6c9BW35UvvZlWr0epa Ljpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=U4Ljhge3b+epbgJXir/y5ETgZWDFNKeJO8zvcM0T4us=; b=FDMeVWbormiaOPUF/xUPwVnDxhgNj73KaYWiEUlO4IRaLfU3JRu5QFbck/JEWnMwka 6WZOpdUHneplyruku3Tm3gauU+XU8qzGp2+kNcH4dNjCSWxFqwfkw/BcwAyOOU/oTgwP gyTUJ8zkx/FOFaxSdq6QAz01P1zdG7oJGEMEFrBierZmz3bWN3qkCQkvJZ/mJ8KdVDZ1 KVJci2D4QGFFhEY9I6flUddiEdsUh867A5wXFZzGet1kab0+66Iot73UEeFLfQTN6Kzd gejKJMnx9FMgWkBsIhVrQYW0f0i0aoz7nnCE2ej7Z5hCOaUkoI1Tyw1azbYDvgwSPoYq +TEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b="C/V/yGu/"; 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=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si13696824ede.331.2020.08.17.14.49.02; Mon, 17 Aug 2020 14:49:25 -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=@chrisdown.name header.s=google header.b="C/V/yGu/"; 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=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729816AbgHQP0d (ORCPT + 99 others); Mon, 17 Aug 2020 11:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729268AbgHQPYj (ORCPT ); Mon, 17 Aug 2020 11:24:39 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 666F4C061389 for ; Mon, 17 Aug 2020 08:24:39 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id w9so12658287qts.6 for ; Mon, 17 Aug 2020 08:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=U4Ljhge3b+epbgJXir/y5ETgZWDFNKeJO8zvcM0T4us=; b=C/V/yGu/4HGw7a6hMLP9ENVYj7zDu12bR05GBt/EgSs8a6JahItGEOI83s5DtjzNsi 4B4yy5oUx78hTyZUwHMrh/tJ4KzD3RW1fnpbH1UeMuFB6sKYcv4jFiWLkadC7mq8qpzU YpJxg2NhFWQqLqM47/UhmR+u9Ho3XekXb7wRw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=U4Ljhge3b+epbgJXir/y5ETgZWDFNKeJO8zvcM0T4us=; b=m9CICk9WpwxR6YgOEktydJAEp7QvMwTFRLMhed/xiDefxSEfukMGlsCDqJNh6nyxwW NrlPTuvABLsf/fWOFssiy58wlosxxNxeDdf8YnXlNiEWfnjs/DVa08u9VeIC653dJdlR foz066hzHiFMoaxGTUINFRiQPxsw0uG6fB2NhG1VnoE/1ei5QQ3ttmY+oPcqUz04IiM/ DbfarsYIrA3kC1gJfxkXBqJXrFKdI6gnCYca8P0fhxyZ/CqsZxS9nPRU4+f81FE4TFlg zOpv68eqhKGhQLfpWKUmoV3adw7gDS7lQ6orx+U+71dPvOikLOvnVgO9E4DfE+qpglaS INuw== X-Gm-Message-State: AOAM533WBOswoQZRTHDUi++wp+LScy7dxTgo6fG1MKOeMKsEZgVFK8xN CUgV5Jjt21FWxd6jDcCPMHryN5NFHcwWlvAIy8Y= X-Received: by 2002:aed:2358:: with SMTP id i24mr14078467qtc.234.1597677878337; Mon, 17 Aug 2020 08:24:38 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:47cc]) by smtp.gmail.com with ESMTPSA id i7sm17771201qkb.131.2020.08.17.08.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 08:24:37 -0700 (PDT) Date: Mon, 17 Aug 2020 16:24:36 +0100 From: Chris Down To: linux-kernel@vger.kernel.org Cc: Borislav Petkov , Jakub Kicinski , Andrew Morton , kernel-team@fb.com, sean.j.christopherson@intel.com, tony.luck@intel.com, torvalds@linux-foundation.org, x86@kernel.org Subject: [PATCH 2/2] x86: Make source of unrecognised MSR writes unambiguous Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.14.6 (2020-07-11) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In many cases the comm enough isn't enough to distinguish the offender, since for interpreted languages it's likely just going to be "python3" or whatever. Add the pid to make it unambiguous. Signed-off-by: Chris Down Cc: Borislav Petkov Cc: Jakub Kicinski --- arch/x86/kernel/msr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index 3babb0e58b0e..76b6b0011d62 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c @@ -99,8 +99,9 @@ static int filter_write(u32 reg) if (!__ratelimit(&fw_rs) || reg == MSR_IA32_ENERGY_PERF_BIAS) return 0; - pr_err("Write to unrecognized MSR 0x%x by %s\n" - "Please report to x86@kernel.org\n", reg, current->comm); + pr_err("Write to unrecognized MSR 0x%x by pid %s:%d\n" + "Please report to x86@kernel.org\n", + reg, current->comm, current->pid); return 0; } -- 2.28.0