Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp201690pxa; Fri, 21 Aug 2020 05:13:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwiQ0IgvqdXln7Mqba0cmq8ZA281PC8+3ohVpxKk1lCm8y1Ypdhxpb1Knht/u9dfgnOgPS X-Received: by 2002:a50:a2e6:: with SMTP id 93mr2398399edm.147.1598011986557; Fri, 21 Aug 2020 05:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598011986; cv=none; d=google.com; s=arc-20160816; b=PAV1AcZcpEj8aPIEtNeqzi+t6SwE/wzmG6HLQhtKCc/kO7LlPa+gbWz4qbeyhXdtMw DlKduKq6eBXZrGNp4yZD6tC+zxKar+2uJkA1L7LKibmFn3dpAw+CTAnf2quKswJxqPFF mBj0PU6W45dVXmztVlneplKUxWEGpaJVN+eG1B9Y/2xP7nk2oorhC6H6+Kk6Pm1614lc 6OVUyujV+8HzztbOlWKhNs0bAeGn7zgL+obnVrKQaBwtaP3ATkwVoNZu/D3leT71k0/u hadgJuBfR+k6Ma9I3wMss+Igrj7KXRkY6h81VdoCcGatqllR6/JnEDnAcZUx6C4nslCq cb+Q== 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=d/W+Q2C5EanLhSLHdSwnb0l9xdV162iKpsjQAENkTzs=; b=lBa5IVVUxoPDmmX9jiUikc2Jt/L9Vjnyahuhg/trjpSR4Hy4PuPy+aMrxbRLLf1Ra7 x8BIX5UokXCGiwtx3RFAkbsQIitTr1g06M1HLCaWJpEbWvIjfvqAWqNABQAtExlFSjOA wsjxHq+8AKrvfu3/+v71xsB2VfygYFOiQJ86JlrZEUDUMb9giblg1Hb3iPAX+cgxE2Sg oaPfT8gX1TddeCytW/t7+em3vsWZudZcIgpl+pFyFii6j21jFq0Woy8JZfCfm6W/rwek Oc5P+sxSJ98OFwZavgyY/LtQ5XwEQTrU1vLo9mFDbA5uEPerNU+08XsErenZe1EdGJiz aKKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=dz8aD+Vi; 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 ok21si1101384ejb.373.2020.08.21.05.12.42; Fri, 21 Aug 2020 05:13:06 -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=dz8aD+Vi; 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 S1726257AbgHUMLh (ORCPT + 99 others); Fri, 21 Aug 2020 08:11:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727860AbgHUMLB (ORCPT ); Fri, 21 Aug 2020 08:11:01 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F897C061386 for ; Fri, 21 Aug 2020 05:10:38 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id d14so1093719qke.13 for ; Fri, 21 Aug 2020 05:10:38 -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=d/W+Q2C5EanLhSLHdSwnb0l9xdV162iKpsjQAENkTzs=; b=dz8aD+ViInktElTWiu54BR/XO8bD3mAk7HTP3qCy2R50bThFmh7svzzAraKsSaB0jL SaZ7yzTzX3CXz/fVp4e/mhk3WKr8uta5Fj1INNo+Af19NoHA9HhQRVFfpvvMjB9NZsCh IDhmu0eLGjzhgoMbO6Zu+k+ksfwTe9Su6Su7M= 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=d/W+Q2C5EanLhSLHdSwnb0l9xdV162iKpsjQAENkTzs=; b=JrDnKQA5CH05nCNDT5l9YVPL+PLnDoQMH5ZrGA/4MiLTYbnPRDrFzZuMdyNOGHmoAf QZ6H3xxbwOaMigYSoQ4mHtCo5+KiHQD4UD2JHztqD/icUH/AHwV0ZMixOSSvfbiIcfkN 5WdC1xWFbHpk/ST7qzyfUO4ox7qxHGHjanZ8P9VJsQdIJ7T2DhlBzWPQ1X35bk3Z/gYC 1utMG9cqtRPGQLMpmgDMC8Cv/UXMS/FWqT0nzWNGKt6G/phWZ5UwRtB0Xx83RGasVJkE 18oQWHrNoiarTGb53IJlNYg9FRhnqGvJ7F962cyyKle1L+fIcmo/Ni19NPvXwbb3OMKa a/EA== X-Gm-Message-State: AOAM531OMFhxqkQ1KJVBK3sr9OdxalAdDWZVpvyUR2ynELJyHc74CqFW uh2BEcmd2jOeuVWFvlDS7yq2kXRHDOwZm4BP X-Received: by 2002:a37:e89:: with SMTP id 131mr2437257qko.279.1598011837034; Fri, 21 Aug 2020 05:10:37 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:23fc]) by smtp.gmail.com with ESMTPSA id 20sm1956489qtp.53.2020.08.21.05.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 05:10:36 -0700 (PDT) Date: Fri, 21 Aug 2020 13:10:35 +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 v2 2/2] x86: Make source of unrecognised MSR writes unambiguous Message-ID: <6f6fbd0ee6c99bc5e47910db700a6642159db01b.1598011595.git.chris@chrisdown.name> 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 eaf375245549..812e64ef5ff5 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c @@ -102,8 +102,9 @@ static int filter_write(u32 reg) if (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 %s (pid: %d)\n" + "Please report to x86@kernel.org\n", + reg, current->comm, current->pid); return 0; } -- 2.28.0