netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so
@ 2022-11-04  9:40 Artem Savkov
  2022-11-04 13:29 ` KP Singh
  2022-11-04 23:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 7+ messages in thread
From: Artem Savkov @ 2022-11-04  9:40 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, bpf, netdev
  Cc: ykaliuta, linux-kernel, Artem Savkov

lld produces "fast" style build-ids by default, which is inconsistent
with ld's "sha1" style. Explicitly specify build-id style to be "sha1"
when linking liburandom_read.so the same way it is already done for
urandom_read.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
---
 tools/testing/selftests/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 79edef1dbda4..5a792987df66 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -182,7 +182,8 @@ endif
 $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urandom_read_lib2.c
 	$(call msg,LIB,,$@)
 	$(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $^ $(LDLIBS)   \
-		     -fuse-ld=$(LLD) -Wl,-znoseparate-code -fPIC -shared -o $@
+		     -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \
+		     -fPIC -shared -o $@
 
 $(OUTPUT)/urandom_read: urandom_read.c urandom_read_aux.c $(OUTPUT)/liburandom_read.so
 	$(call msg,BINARY,,$@)
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so
  2022-11-04  9:40 [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so Artem Savkov
@ 2022-11-04 13:29 ` KP Singh
  2022-11-04 17:38   ` Daniel Borkmann
  2022-11-04 23:00 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 7+ messages in thread
From: KP Singh @ 2022-11-04 13:29 UTC (permalink / raw)
  To: Artem Savkov
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, bpf,
	netdev, ykaliuta, linux-kernel

On Fri, Nov 4, 2022 at 10:41 AM Artem Savkov <asavkov@redhat.com> wrote:
>
> lld produces "fast" style build-ids by default, which is inconsistent
> with ld's "sha1" style. Explicitly specify build-id style to be "sha1"
> when linking liburandom_read.so the same way it is already done for
> urandom_read.
>
> Signed-off-by: Artem Savkov <asavkov@redhat.com>

Acked-by: KP Singh <kpsingh@kernel.org>

This was done in
https://lore.kernel.org/bpf/20200922232140.1994390-1-morbo@google.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so
  2022-11-04 13:29 ` KP Singh
@ 2022-11-04 17:38   ` Daniel Borkmann
  2022-11-04 22:58     ` Andrii Nakryiko
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2022-11-04 17:38 UTC (permalink / raw)
  To: KP Singh, Artem Savkov
  Cc: Alexei Starovoitov, Andrii Nakryiko, bpf, netdev, ykaliuta, linux-kernel

Hi Artem,

On 11/4/22 2:29 PM, KP Singh wrote:
> On Fri, Nov 4, 2022 at 10:41 AM Artem Savkov <asavkov@redhat.com> wrote:
>>
>> lld produces "fast" style build-ids by default, which is inconsistent
>> with ld's "sha1" style. Explicitly specify build-id style to be "sha1"
>> when linking liburandom_read.so the same way it is already done for
>> urandom_read.
>>
>> Signed-off-by: Artem Savkov <asavkov@redhat.com>
> 
> Acked-by: KP Singh <kpsingh@kernel.org>
> 
> This was done in
> https://lore.kernel.org/bpf/20200922232140.1994390-1-morbo@google.com

When you say "fix", does it actually fix a failing test case or is it more
of a cleanup to align liburandom_read build with urandom_read? From glancing
at the code, we only check build id for urandom_read.

Cheers,
Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so
  2022-11-04 17:38   ` Daniel Borkmann
@ 2022-11-04 22:58     ` Andrii Nakryiko
  2022-11-04 23:07       ` Daniel Borkmann
  2022-11-07  7:37       ` Artem Savkov
  0 siblings, 2 replies; 7+ messages in thread
From: Andrii Nakryiko @ 2022-11-04 22:58 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: KP Singh, Artem Savkov, Alexei Starovoitov, Andrii Nakryiko, bpf,
	netdev, ykaliuta, linux-kernel

On Fri, Nov 4, 2022 at 10:38 AM Daniel Borkmann <daniel@iogearbox.net> wrote:
>
> Hi Artem,
>
> On 11/4/22 2:29 PM, KP Singh wrote:
> > On Fri, Nov 4, 2022 at 10:41 AM Artem Savkov <asavkov@redhat.com> wrote:
> >>
> >> lld produces "fast" style build-ids by default, which is inconsistent
> >> with ld's "sha1" style. Explicitly specify build-id style to be "sha1"
> >> when linking liburandom_read.so the same way it is already done for
> >> urandom_read.
> >>
> >> Signed-off-by: Artem Savkov <asavkov@redhat.com>
> >
> > Acked-by: KP Singh <kpsingh@kernel.org>
> >
> > This was done in
> > https://lore.kernel.org/bpf/20200922232140.1994390-1-morbo@google.com
>
> When you say "fix", does it actually fix a failing test case or is it more
> of a cleanup to align liburandom_read build with urandom_read? From glancing
> at the code, we only check build id for urandom_read.

I reworded the subject to "selftests/bpf: Use consistent build-id type
for liburandom_read.so" and pushed. Thanks!

>
> Cheers,
> Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so
  2022-11-04  9:40 [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so Artem Savkov
  2022-11-04 13:29 ` KP Singh
@ 2022-11-04 23:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-04 23:00 UTC (permalink / raw)
  To: Artem Savkov; +Cc: ast, daniel, andrii, bpf, netdev, ykaliuta, linux-kernel

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Fri,  4 Nov 2022 10:40:16 +0100 you wrote:
> lld produces "fast" style build-ids by default, which is inconsistent
> with ld's "sha1" style. Explicitly specify build-id style to be "sha1"
> when linking liburandom_read.so the same way it is already done for
> urandom_read.
> 
> Signed-off-by: Artem Savkov <asavkov@redhat.com>
> 
> [...]

Here is the summary with links:
  - [bpf-next] selftests/bpf: fix build-id for liburandom_read.so
    https://git.kernel.org/bpf/bpf-next/c/61fc5e66f755

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so
  2022-11-04 22:58     ` Andrii Nakryiko
@ 2022-11-04 23:07       ` Daniel Borkmann
  2022-11-07  7:37       ` Artem Savkov
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2022-11-04 23:07 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: KP Singh, Artem Savkov, Alexei Starovoitov, Andrii Nakryiko, bpf,
	netdev, ykaliuta, linux-kernel

On 11/4/22 11:58 PM, Andrii Nakryiko wrote:
> On Fri, Nov 4, 2022 at 10:38 AM Daniel Borkmann <daniel@iogearbox.net> wrote:
>>
>> Hi Artem,
>>
>> On 11/4/22 2:29 PM, KP Singh wrote:
>>> On Fri, Nov 4, 2022 at 10:41 AM Artem Savkov <asavkov@redhat.com> wrote:
>>>>
>>>> lld produces "fast" style build-ids by default, which is inconsistent
>>>> with ld's "sha1" style. Explicitly specify build-id style to be "sha1"
>>>> when linking liburandom_read.so the same way it is already done for
>>>> urandom_read.
>>>>
>>>> Signed-off-by: Artem Savkov <asavkov@redhat.com>
>>>
>>> Acked-by: KP Singh <kpsingh@kernel.org>
>>>
>>> This was done in
>>> https://lore.kernel.org/bpf/20200922232140.1994390-1-morbo@google.com
>>
>> When you say "fix", does it actually fix a failing test case or is it more
>> of a cleanup to align liburandom_read build with urandom_read? From glancing
>> at the code, we only check build id for urandom_read.
> 
> I reworded the subject to "selftests/bpf: Use consistent build-id type
> for liburandom_read.so" and pushed. Thanks!

Ack, sgtm!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so
  2022-11-04 22:58     ` Andrii Nakryiko
  2022-11-04 23:07       ` Daniel Borkmann
@ 2022-11-07  7:37       ` Artem Savkov
  1 sibling, 0 replies; 7+ messages in thread
From: Artem Savkov @ 2022-11-07  7:37 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: Daniel Borkmann, KP Singh, Alexei Starovoitov, Andrii Nakryiko,
	bpf, netdev, ykaliuta, linux-kernel

On Fri, Nov 04, 2022 at 03:58:43PM -0700, Andrii Nakryiko wrote:
> On Fri, Nov 4, 2022 at 10:38 AM Daniel Borkmann <daniel@iogearbox.net> wrote:
> >
> > Hi Artem,
> >
> > On 11/4/22 2:29 PM, KP Singh wrote:
> > > On Fri, Nov 4, 2022 at 10:41 AM Artem Savkov <asavkov@redhat.com> wrote:
> > >>
> > >> lld produces "fast" style build-ids by default, which is inconsistent
> > >> with ld's "sha1" style. Explicitly specify build-id style to be "sha1"
> > >> when linking liburandom_read.so the same way it is already done for
> > >> urandom_read.
> > >>
> > >> Signed-off-by: Artem Savkov <asavkov@redhat.com>
> > >
> > > Acked-by: KP Singh <kpsingh@kernel.org>
> > >
> > > This was done in
> > > https://lore.kernel.org/bpf/20200922232140.1994390-1-morbo@google.com
> >
> > When you say "fix", does it actually fix a failing test case or is it more
> > of a cleanup to align liburandom_read build with urandom_read? From glancing
> > at the code, we only check build id for urandom_read.

I called it a "fix" because it broke expectations of external tools, but
the reworded version sounds much better.

> I reworded the subject to "selftests/bpf: Use consistent build-id type
> for liburandom_read.so" and pushed. Thanks!

Thank you, Andrii.

-- 
 Artem


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-07  7:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04  9:40 [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so Artem Savkov
2022-11-04 13:29 ` KP Singh
2022-11-04 17:38   ` Daniel Borkmann
2022-11-04 22:58     ` Andrii Nakryiko
2022-11-04 23:07       ` Daniel Borkmann
2022-11-07  7:37       ` Artem Savkov
2022-11-04 23:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).