Message ID | 20221104094016.102049-1-asavkov@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp282357wru; Fri, 4 Nov 2022 02:48:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yuwYldQL4fhSx169drqsb6/2SQDEPbLB1eVVKuP9UnRtAu8AneAlTFF9eDnePLwKFfc3x X-Received: by 2002:a17:906:5dac:b0:78d:fa65:a4a9 with SMTP id n12-20020a1709065dac00b0078dfa65a4a9mr32541901ejv.223.1667555336945; Fri, 04 Nov 2022 02:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667555336; cv=none; d=google.com; s=arc-20160816; b=ANJrpNxpa5kogCXoOzMAz8x4M7kSEqDCi+b2TdReCdx7CSBbwtP+v5cKMPgDvfTI8J i/Kqr7ctRY88Rgkbr9pu6mmz20egj0GkdF3+V2HJFSLczvyl+YYNNlqZq3lyfqTFPSil NTxwpRLnXb0Dcw9jTbLz1bRDXGQeIEFP9Rb3Db36Asv+f5v4X5DRm6J/FpYeaC3DsOXf CGJnW7rrxzX0AZ/IAtsQscHDQ3N9Ohv85Ewu8bMTGSBtMOZPPdoboUi6y81SCLWe9a6f dKy16N8Bwi1BTikAHB+axqUAgvXmA04TYr/HhQfaLmV78TwvbyZhAOWOn+/FjnB0V+a4 y6Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CAzZhBjfROyNAW8yS7Aao6wSD/awgyWEX4D/3kHQqS4=; b=NvotslGNYDCnNRgz1HzhFrd6Z+1weRcdfPC4akuW6NUZOJKWDpQH+XfQxXwfSCsk1e Zf1nFDUZMXmC/i1m/p6OXo0IEBElEUADe4HnEg/gT+Zzt0lYTQvpWRw83/yFLftt+2NR eRlX1Ld1PTFOCGQYm45lUdqE+O2CdRtvGLFzxrCxsKArhQ2LYQMSvhxqnQz84CjsQ3tG bFCLjvFDAo0mNzvMIJrOVhT3ZgYRQo5dsSMKk7WY4qHr2Hw+LObFXVGJrE4I8EpUaoLS ECmA5Lyn6+Z9sgCOyCPwMR+5fXzxhGBBJ/MqxEjXZeLh4vlZxAWJs68hTFTetDVRVxbD UFWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C2jMK6e8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds17-20020a170907725100b0078d44c5da0esi4946979ejc.667.2022.11.04.02.48.33; Fri, 04 Nov 2022 02:48:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C2jMK6e8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbiKDJl0 (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 4 Nov 2022 05:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbiKDJlY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Nov 2022 05:41:24 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85ECA26578 for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 02:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667554828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=CAzZhBjfROyNAW8yS7Aao6wSD/awgyWEX4D/3kHQqS4=; b=C2jMK6e85WzI694Ur8Qgkwonu3SffF4R9zeiluwVqwhuA4DhbLv+eUchQaMQ0YTfmJgGO4 zcsvb11IaNapkmTi4ncOxa7Y4x2Sxl8tcmV2nENK5BpQH5Djy9FIZATPYEE0YlosffHR64 NFDQOR2uU8PDuTk4vSMoHMPACyLPBdo= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-fC2TeQ-_NQ-4q2nLoxm0bQ-1; Fri, 04 Nov 2022 05:40:25 -0400 X-MC-Unique: fC2TeQ-_NQ-4q2nLoxm0bQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D2A013815D34; Fri, 4 Nov 2022 09:40:24 +0000 (UTC) Received: from samus.usersys.redhat.com (unknown [10.43.17.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 882944A9254; Fri, 4 Nov 2022 09:40:23 +0000 (UTC) From: Artem Savkov <asavkov@redhat.com> To: Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Andrii Nakryiko <andrii@kernel.org>, bpf@vger.kernel.org, netdev@vger.kernel.org Cc: ykaliuta@redhat.com, linux-kernel@vger.kernel.org, Artem Savkov <asavkov@redhat.com> Subject: [PATCH bpf-next] selftests/bpf: fix build-id for liburandom_read.so Date: Fri, 4 Nov 2022 10:40:16 +0100 Message-Id: <20221104094016.102049-1-asavkov@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748558504875304111?= X-GMAIL-MSGID: =?utf-8?q?1748558504875304111?= |
Series |
[bpf-next] selftests/bpf: fix build-id for liburandom_read.so
|
|
Commit Message
Artem Savkov
Nov. 4, 2022, 9:40 a.m. UTC
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(-)
Comments
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
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
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
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!
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!
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.
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,,$@)