lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 16 Feb 2024 11:47:11 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Namhyung Kim <namhyung@...nel.org>,
 Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
 linux-perf-users@...r.kernel.org, Ian Rogers <irogers@...gle.com>
Subject: Re: [PATCH] perf test: Enable Symbols test to work with a current
 module dso

On 31/01/24 22:58, Ian Rogers wrote:
> On Wed, Jan 31, 2024 at 11:24 AM Adrian Hunter <adrian.hunter@...el.com> 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 <adrian.hunter@...el.com>
> 
> Reviewed-by: Ian Rogers <irogers@...gle.com>
> 

Thanks Ian!

This patch is still OK.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ