Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp995183rdb; Fri, 16 Feb 2024 01:52:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX1kYNbgFYc/asyYbZcouVJexoMtYtxSOu8afWU6PK9DPH48Muazc2sfkfsGP+8ulnRQyUViMiMX94v3DyQ7/a7rL6GgFxPdgRohd21uA== X-Google-Smtp-Source: AGHT+IGg6wX+lU4XbNREFqZ52Nw26WCatcRxC8glTWiskvStlfDeKVf/yjHwr9583SNbHHQcieOL X-Received: by 2002:a62:c1c5:0:b0:6e0:ed60:9a27 with SMTP id i188-20020a62c1c5000000b006e0ed609a27mr3942864pfg.7.1708077161555; Fri, 16 Feb 2024 01:52:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708077161; cv=pass; d=google.com; s=arc-20160816; b=Syb+Gzg30fdD92UgUdvBZ3S1Z+nxhTwfkAoCCBBIFSEJ8APtu/4aksHCAeEYlry+QW 7YUnL8l/d7b5Lc6WOw2WCSvDtdVLDtuk16IGN/fffm1qK2/KAXBlWj7BCMQiNoE8TbiN ghk2zTDmoNJz4clUwBMxTtK41zLgOo7VypGnGCbAJwiforpIyZTNIgISl+d+L3Tm6b/N zvVmYjnEtoBQsfVwbGAkNPiHk/g7rtv5bJRcyRP1uFd2qnKXsGnlBbZ9ji9TlLvPZ1c4 ZG2IQ1tltbO8RA0rpuMykwQRVzDtpVAtY6JDtDV1BSQwzpr4rDKLRruKDWxCY+Mdjm7q OgWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=FrA1798kElJnCvY6t+jU/+3wcnzLsmy7w2YJGfAzkTk=; fh=WWSztG7B09YkQiP4d5lIRv/2xRKAEZaYW53Bw9H9+f8=; b=YdhjHde2235TXxWjx6pefxwI4RWGxbiWUgKOyktRqB30l8fj99VID7xiAbDY0yzaIs 3a5qy91kmjrTcoE9UNZgsu5yu7PrMuiCEKXcHAgjmQidQmkBZhvVA1Z5bdoGV65sDs1e k8CRrKsNVkfIkSrLqNiZb/Yu8MR3d7naA81JPhrIvj1C0spVrsgQ8Qkk9wzXT3mqk6Yx QVf+cI7jNS9yVTHti+ZjBYxQS1oEbBicLoxuA/8DCCWKEqQC8WFq7XayCBhJcrohi3Vg g3rLTQtwqXvm9qEflOj463YkTufItU/JQzdTrX3TZA/DuvuMmnGswswCYJlWj8s2oOVC 8/mg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="RMRg+Na/"; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-68354-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68354-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id fn7-20020a056a002fc700b006e0dd1fc7aasi2724026pfb.187.2024.02.16.01.52.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 01:52:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68354-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="RMRg+Na/"; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-68354-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68354-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7930CB228C1 for ; Fri, 16 Feb 2024 09:47:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EF2E1BDE1; Fri, 16 Feb 2024 09:47:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RMRg+Na/" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25A6C1BF28; Fri, 16 Feb 2024 09:47:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708076840; cv=none; b=rJDWeRKmRns6iZufTzCWg+1uNZBr5yx0qiT8dHj/2mP3cb5UTb/Md/wGyc9gSEA5FHjy8wThNoyV475r8pcjWpkiL8W0rs7P5sgGjsNnZao/lvQuqkHOQgDljqTroyNewsIvgCe0lj18slTmZPVlFvsKGzSWvQ2AU0lh9dYNQlI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708076840; c=relaxed/simple; bh=52oYAJx/bkBj6fjp/OHIlHLzNxTJ69+yLoxIJzbK3lo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ecaFBr6ypoXD4De+CFAzisQfvZn0X6Dy3u4Gg6XNPr2paXiNpv6Ek+9lRWgBW/dvPbVJpVq2mvrzuJSGgePqrT8WTjpLCLEIlMteSWMRH8glGBjkifrZtkpE9ScIAbXloXZTl0GU6qnPQkeTmkQ1BD9O7/16+l3uvVAuEmHqrAc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RMRg+Na/; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708076838; x=1739612838; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=52oYAJx/bkBj6fjp/OHIlHLzNxTJ69+yLoxIJzbK3lo=; b=RMRg+Na/hvkTtrd12NOOJrbJyvxdwkNHE6bwGbVaQV0fi5H6AlxtX44d 769HrkiD23yMTS0u43/v27Ec98NYkTJcNCf0k9xAWgU7nkcQdVkfQmeKD TfeW+HhLGAlBWSDySJe+kKlufcCZ+nuF+HNo1rtd9FBaDDcdHw3MvOATo 0OTXDIJXv4YWjRu2c2p8cKKY6TogvX5XLXpm/RdAYUbNJFUwCJ68Y0RES qwTBPJ2lMYVidi3iRgkYAb3VP637ACqOOMTprlUCvrNcyjz85Njp6KUhf OK9aAgzr0lo18ZIOVEnpoG5/N9enlMkUVn982Xww8aQPCBKyQdcgKhMHh A==; X-IronPort-AV: E=McAfee;i="6600,9927,10985"; a="6028849" X-IronPort-AV: E=Sophos;i="6.06,164,1705392000"; d="scan'208";a="6028849" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 01:47:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,164,1705392000"; d="scan'208";a="8475072" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.251.220.122]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 01:47:16 -0800 Message-ID: Date: Fri, 16 Feb 2024 11:47:11 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] perf test: Enable Symbols test to work with a current module dso Content-Language: en-US To: Namhyung Kim , Arnaldo Carvalho de Melo Cc: Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Ian Rogers References: <20240131192416.16387-1-adrian.hunter@intel.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 31/01/24 22:58, Ian Rogers wrote: > On Wed, Jan 31, 2024 at 11:24 AM Adrian Hunter wrote: >> >> The test needs a struct machine and creates one for the current host, >> but a side-effect is that struct machine has set up kernel maps >> including module maps. >> >> If the 'Symbols' test --dso option specifies a current kernel module, >> it will already be present as a kernel dso, and a map with kmaps needs >> to be used otherwise there will be a segfault - see below. >> >> For that case, find the existing map and use that. In that case also, >> the dso is split by section into multiple dsos, so test those dsos >> also. That in turn, shows up that those dsos have not had overlapping >> symbols removed, so the test fails. >> >> Example: >> >> Before: >> >> $ perf test -F -v Symbols --dso /lib/modules/$(uname -r)/kernel/arch/x86/kvm/kvm-intel.ko >> 70: Symbols : >> --- start --- >> Testing /lib/modules/6.7.2-local/kernel/arch/x86/kvm/kvm-intel.ko >> Segmentation fault (core dumped) >> >> After: >> >> $ perf test -F -v Symbols --dso /lib/modules/$(uname -r)/kernel/arch/x86/kvm/kvm-intel.ko >> 70: Symbols : >> --- start --- >> Testing /lib/modules/6.7.2-local/kernel/arch/x86/kvm/kvm-intel.ko >> Overlapping symbols: >> 41d30-41fbb l vmx_init >> 41d30-41fbb g init_module >> ---- end ---- >> Symbols: FAILED! >> >> Signed-off-by: Adrian Hunter > > Reviewed-by: Ian Rogers > Thanks Ian! This patch is still OK.