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]
Message-ID: <0f6d16c1-0e85-4709-9846-3a993a9f041b@linux.dev>
Date: Mon, 11 Aug 2025 22:06:40 -0700
From: Yonghong Song <yonghong.song@...ux.dev>
To: 赵佳炜 <phoenix500526@....com>
Cc: ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
 bpf@...r.kernel.org, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 2/2] selftests/bpf: Force -O2 for USDT selftests to
 cover SIB handling logic



On 8/10/25 1:55 AM, 赵佳炜 wrote:
>
>
> Hi Yonghong,
>
> I found another issue where symbols can be duplicated, and I’m not sure how to tell them apart.
>
> For example, I created two C files named usdt_rip.c and hello.c. Both define their own static ti variables, like:`static volatile char ti = 0;`.
>
> After compiling, I obtained an ELF file usdt_rip whose .symtab contains the following entries:
>
> $ readelf -s usdt_rip
>
> Symbol table '.symtab' contains 42 entries:
>     Num:    Value          Size Type    Bind   Vis      Ndx Name
>       0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
>       1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS Scrt1.o
>       2: 000000000000038c    32 OBJECT  LOCAL  DEFAULT    4 __abi_tag
>       3: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS usdt_rip.c
>       4: 0000000000004021     1 OBJECT  LOCAL  DEFAULT   25 ti
>       5: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS crtstuff.c
>       6: 00000000000010a0     0 FUNC    LOCAL  DEFAULT   14 deregister_tm_clones
>       7: 00000000000010d0     0 FUNC    LOCAL  DEFAULT   14 register_tm_clones
>       8: 0000000000001110     0 FUNC    LOCAL  DEFAULT   14 __do_global_dtors_aux
>       9: 0000000000004020     1 OBJECT  LOCAL  DEFAULT   25 completed.0
>      10: 0000000000003df8     0 OBJECT  LOCAL  DEFAULT   21 __do_global_dtor[...]
>      11: 0000000000001150     0 FUNC    LOCAL  DEFAULT   14 frame_dummy
>      12: 0000000000003df0     0 OBJECT  LOCAL  DEFAULT   20 __frame_dummy_in[...]
>      13: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS damo.c
>      14: 0000000000004022     1 OBJECT  LOCAL  DEFAULT   25 ti
>      15: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS crtstuff.c
>      16: 00000000000020d8     0 OBJECT  LOCAL  DEFAULT   19 __FRAME_END__
>
>
> As you can see, there are two ti variables in the .symtab section. Their values are very close, making them hard to distinguish.
>
> I’m unsure how to handle this situation. Do you have any suggestions?

Did you check relocations? Relocaitons should be able to point exact which symbol.

>
> Thanks,
> Jiawei Zhao
[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ