Re: [tip:perf/core] [perf/core] 166f10836a: perf-sanity-tests.Object_code_reading.fail

From: Mi, Dapeng

Date: Thu Jul 16 2026 - 02:30:40 EST



On 7/10/2026 4:41 PM, Oliver Sang wrote:
> hi, Dapeng,
>
> On Thu, Jul 09, 2026 at 05:04:11PM +0800, Mi, Dapeng wrote:
>> Hi Oliver,
>>
>> It looks the direct reason causing the test case failure is the "0" sampled
>> IP. This is expected. The commit 166f10836a653dfa280d4335603b52f685b8b1ef
>> ("perf/core: Fix kernel register info leak via hardware skid") mitigates a
>> security hole and may lead to the sampled IP could be 0. 
>>
>> What user right is used to run this command, root or normal user? If it's a
> root user. as 'sudo' in attached:
>
> "2026-07-10 15:38:50 sudo ASAN_OPTIONS=fast_unwind_on_malloc=0 /usr/src/linux-perf-x86_64-rhel-9.4-bpf-166f10836a653dfa280d4335603b52f685b8b1ef/tools/perf/perf test 23 -vvv"
>
>> root user, suppose it should not generate such kind of error. Could you
>> please add "-vvv" option and rerun this test? The "-vvv" option would print
>> more  verbose log.
> as attached, thanks

"

  disabled                         1
  inherit                          1
  *exclude_kernel                   1*
  exclude_hv                       1
  mmap                             1

"

The event "exclude_kernel" attribute is set in the test case,  so it's
possible that perf overwrites the kernel IP to 0 to prevent kernel IP
leakage if PMI hits into kernel space. 

In general, the "exclude_kernel" attribute should not be set for root user,
I have no idea why "exclude_kernel" is set in this case.

Anyway, we could have to improve this test case and skip these "0" sample IPs.

Thanks.


>
>
>> Thanks!
>>
>> -Dapeng
>>
>>
>> On 7/9/2026 12:36 PM, kernel test robot wrote:
>>> Hello,
>>>
>>> kernel test robot noticed "perf-sanity-tests.Object_code_reading.fail" on:
>>>
>>> commit: 166f10836a653dfa280d4335603b52f685b8b1ef ("perf/core: Fix kernel register info leak via hardware skid")
>>> https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git perf/core
>>>
>>>
>>> in testcase: perf-sanity-tests
>>> version:
>>> with following parameters:
>>>
>>> perf_compiler: clang
>>> group: group-00
>>>
>>>
>>>
>>> config: x86_64-rhel-9.4-bpf
>>> compiler: gcc-14
>>> test machine: 224 threads 4 sockets Intel(R) Xeon(R) Platinum 8380H CPU @ 2.90GHz (Cooper Lake) with 192G memory
>>>
>>> (please refer to attached dmesg/kmsg for entire log/backtrace)
>>>
>>>
>>>
>>>
>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>> the same patch/commit), kindly add following tags
>>> | Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
>>> | Closes: https://lore.kernel.org/oe-lkp/202607091054.7c96d6c6-lkp@xxxxxxxxx
>>>
>>>
>>> 2026-07-07 00:10:32 sudo ASAN_OPTIONS=fast_unwind_on_malloc=0 /usr/src/linux-perf-x86_64-rhel-9.4-bpf-166f10836a653dfa280d4335603b52f685b8b1ef/tools/perf/perf test 23 -v
>>> 23: Object code reading : Running (1 active)
>>> ---- start ----
>>> ...
>>> Bytes read match those read by objdump
>>> Reading object code for memory address: 0x7feb8f2134fa
>>> File is: /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
>>> On file address is: 0x204fa
>>> Objdump command is: objdump -z -d --start-address=0x204fa --stop-address=0x2057a /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
>>> Bytes read match those read by objdump
>>> Reading object code for memory address: 0
>>> thread__find_map failed
>>> ---- end(-1) ----
>>> 23: Object code reading : FAILED!
>>>
>>> === Test Summary ===
>>> Passed main tests : 0
>>> Passed subtests : 0
>>> Skipped tests : 0
>>> Failed tests : 1
>>> List of failed tests:
>>> 23: Object code reading
>>>
>>>
>>>
>>> The kernel config and materials to reproduce are available at:
>>> https://download.01.org/0day-ci/archive/20260709/202607091054.7c96d6c6-lkp@xxxxxxxxx
>>>
>>>
>>>