Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp457793ybm; Thu, 28 May 2020 07:11:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVf8RHzMvmxYSExAgHC/Z70zomznq3pcVRmepUHU5B6cGbvOi+nk+tGfhPp07a0jrUshWJ X-Received: by 2002:a05:6402:357:: with SMTP id r23mr3313236edw.230.1590675068516; Thu, 28 May 2020 07:11:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590675068; cv=none; d=google.com; s=arc-20160816; b=Wgo2gmH5mE0EQ5I2GBRu0vkvm3lERhc8AEZxP8SQ9JaR8sWoDTPX5T+JEnqu8l/4sq AKtrXMuTfsn4twSWSWyL00HdEqMzK1/jopOUfB+uWG0nJMqAbFxSZ5FIQza51gYeYoRi 1yyzIFuMVz2N26kim/cm7iVdsqPSYoKf+DV6IDZpGhioDWHoJscGtdJWnTo2QDR/fUY4 xm/v9Ny2Rg9lEPLmUCv4XdOmDAG4qoe7JSmi5rwFKCvIANU3AqBMpo78eOkChBS9jjjG QFTGmWV8BK93FgbWqW0eZdbWcwAlRpAHtbyTPgs2ozs+dtM4zAfHIJrM1oad+yLCfShG GW2g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=0VJgrAinu7BXg7F+8GIOZnowAMYyWM27BSkEVRf2kSY=; b=O/L5LuTuud0HzWRTLRjx5kOhLd0uR5itAiN3sOwmAc3oHw5WPtWJyANxwGiW2qIr+I RO/jQsafEdoBrcJNupHOo05s1kLW7SjvWDnOJNfWjQKb74cVJR4gCzo1ybKTvnT5UHXA 68vCxEPyIhe4Ba4qzzEeS+wwhXvD5lSuJirzgki9JCzZpeoYCzKLK28/DI0gY8VfizW+ k5iQh9XmwCwKFJYx04KMJxDXGaWCukUM9DwuA+GRjtycBbdW3OIqEwKozH7QTARc/H6b a3QU18z9gmcGlkJR/hiJjE38JPf4dy46iZo0bSs0hDGDR5bChNSZNzO6r+g0IH9ySdRO mBTA== 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 e24si3785601ejh.298.2020.05.28.07.10.35; Thu, 28 May 2020 07:11:08 -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 S2390888AbgE1OId (ORCPT + 99 others); Thu, 28 May 2020 10:08:33 -0400 Received: from mga06.intel.com ([134.134.136.31]:47664 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390658AbgE1OId (ORCPT ); Thu, 28 May 2020 10:08:33 -0400 IronPort-SDR: WwPl4F/y7v25SPZV3vvsdqAplTiEVNWz7Xot+hzxPm6Sn4C9LTRlv09/hrTMnuX43BtcAFgoBF u6vuWyERX+qA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2020 07:08:32 -0700 IronPort-SDR: jhvXYTMRxGyLYTjqyMgsmUO8xYLqrhvph+wpWlnok9jeP2btu47K5r2fmEWuX9EBbJTGGxCYwf IRAeqivDnweA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,444,1583222400"; d="scan'208";a="345913556" Received: from linux.intel.com ([10.54.29.200]) by orsmga001.jf.intel.com with ESMTP; 28 May 2020 07:08:32 -0700 Received: from [10.251.9.11] (kliang2-mobl.ccr.corp.intel.com [10.251.9.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 9E9B75803E3; Thu, 28 May 2020 07:08:31 -0700 (PDT) Subject: Re: [PATCH V2 3/3] perf/x86/intel/uncore: Validate MMIO address before accessing To: Andi Kleen Cc: David Laight , "peterz@infradead.org" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" 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> <20200528140226.GI611145@tassilo.jf.intel.com> From: "Liang, Kan" Message-ID: <6746309b-c761-e338-c7d6-85ab6edb9052@linux.intel.com> Date: Thu, 28 May 2020 10:08:29 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <20200528140226.GI611145@tassilo.jf.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/28/2020 10:02 AM, Andi Kleen wrote: >>>> + >>>> + 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. > OK. Will only dump the invalid offset. Thanks, Kan