Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp455154ybm; Thu, 28 May 2020 07:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS0RdDZZkmg7ai2IIkNVi4I0MLScGBqr+mEQ8p2xZGKsiamhOCaNeuvnDpB9ahC/ryKShd X-Received: by 2002:a05:6402:c0e:: with SMTP id co14mr3254850edb.177.1590674854462; Thu, 28 May 2020 07:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590674854; cv=none; d=google.com; s=arc-20160816; b=a45dUENse71I3bjBd/pmjQnBzUZ68oZe6ZlYZiYPLU0jTq66VtoJLIpnpj6IB+RzYN J1sNPO1k5weaIs+KQMkHBKVftcXq3vl+hk5A0mUVnysOIPHwVFaRxQ5Oo3JdD9yvb5OO c1mJIdELHP0cEIBFqAY+SRT5AyxfsFMQKAkgyyDbdm4oQ+jjkGJvcbLwjWNzXUn+i4i2 fjdc1CEGyNKdzsNfqS2GbeO0xp5LN8Qq63Jnq7WOMS1yG1avfWec6jspe9p2IWd6fk3K Dd2ZBU4gYaNwdHLf4+9y124UUhg5kKzLVKf5izFlQ1TrR8UNoPdRzMv7DLnRxJlxgJwQ XWCw== 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=YB5ogDoTAQpUnp248aXIbRBA8HEm5qt4R8ltWsTOQVY=; b=k2VukqxST7ZwycBlX+p0v0UZFrVOyXiJQEQV1P2N2R3pt+brBTVSRQ29s0fD79kd0S t8m7wD9woDV6uarYIvH0KtIfCL2c2B1obyLjkJ2fWl7j+kxtlS1RKHKqx68oCIivgMEB a2wlKILEE/TAwK/l3ajtllw8AXoFMJqV+ENfNZalPPWg0tjvaoDhTpt8An83O+vKcIgG s1JR1Uii2mMWFk1PuTx9zTdGARMRftkB5ueIgcCv/HgRgeuqnvAyP+SulyEAO8O+BVuV yQM4hg1ZqwuhwWjsJ5dC3mxIaLa//YtTbwC1xzdllgpGnCHLdf8u/+cLRS59u4bq5AVu EGJg== 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 a21si3783248ejx.547.2020.05.28.07.07.10; Thu, 28 May 2020 07:07:34 -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 S2390658AbgE1OC2 (ORCPT + 99 others); Thu, 28 May 2020 10:02:28 -0400 Received: from mga11.intel.com ([192.55.52.93]:23319 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390540AbgE1OC0 (ORCPT ); Thu, 28 May 2020 10:02:26 -0400 IronPort-SDR: h6bPnYEg5gBrlQDEHGc3TbOt2Tox5kxXA3y7CErvfLI3kTNyuckYwdaKcuPmOMbgKnc41C8ie5 Zjydsylj0HtQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2020 07:02:26 -0700 IronPort-SDR: FecJ5r7Uq94DHHhmghjJ99Hvb8ZmtORb1/VYFUzXzQZYhvqyvxiHHpVDK/trA5Xr61fSY10z0b 2Rj89oBj22nA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,444,1583222400"; d="scan'208";a="292004382" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.21]) by fmsmga004.fm.intel.com with ESMTP; 28 May 2020 07:02:26 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 0B799301C60; Thu, 28 May 2020 07:02:26 -0700 (PDT) Date: Thu, 28 May 2020 07:02:26 -0700 From: Andi Kleen To: "Liang, Kan" Cc: David Laight , "peterz@infradead.org" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH V2 3/3] perf/x86/intel/uncore: Validate MMIO address before accessing Message-ID: <20200528140226.GI611145@tassilo.jf.intel.com> References: <1590671727-99311-1-git-send-email-kan.liang@linux.intel.com> <1590671727-99311-3-git-send-email-kan.liang@linux.intel.com> <79403443-e893-da26-ee6d-1fd7f252bbfe@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79403443-e893-da26-ee6d-1fd7f252bbfe@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > + > > > + pr_warn_once("perf uncore: Access invalid address of %s.\n", > > > + box->pmu->type->name); > > > > Pretty hard to debug without the invalid offset. > > > > I will dump the box->io_addr and offset for debugging. Please don't overengineer. -Andi