From patchwork Wed Oct 4 12:27:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= X-Patchwork-Id: 13408686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2017AE7B601 for ; Wed, 4 Oct 2023 12:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uvcm4Gc3FZNH5fCcQuBGEXOCwA1EaArmt1Mf//0LSfU=; b=p1dTJ9HzTQy8cE wg6WWVnGOb2zjdxh6K5+Id7EqE+zDwcjwDk9jwtx0X1Pn4PYbVVEJgF6jfWCcdPVR0kG4QQgUiW48 rZ/+BGY+6UE/5unxOpxFK4xsItTXmsNugAOq62mWDxycMHWcjkJz95QIxkE4rzO7L6y82Y40/Ge1d J/SxswQ/DHywzVgchGFUjnKl/4cWKo8M1KOrEP1ckWtIF7zG8/F8KAIVnDMgqC3C86CPucz3FNMET J3XVG2ImwGyPxbI2b553YDHmnita+eb/zhxec9uVhSR48x4cbVJ4k5Ybww82Qb5Yyi1masmhX8mdg N/SIQDqD963/XQch1A0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qo0yT-00005v-26; Wed, 04 Oct 2023 12:27:33 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qo0yR-00Hb6D-0C for linux-riscv@lists.infradead.org; Wed, 04 Oct 2023 12:27:32 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id AE19AB81D0C; Wed, 4 Oct 2023 12:27:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0494AC433C7; Wed, 4 Oct 2023 12:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696422449; bh=vZdeekHmX6PRJrot+PinxMvY1FiWo7fqDKl0jsBzl+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ImQPHdN5Vej8ZQgiOvsRoxKhp/zQ4Hl2xHXEjV4iyS98p1zFUHKHL50ytHlMRK484 9hzk0/ouyrOenAmjzEdDDnUHYfH6QmpzDmo1bL4rmj8feQ7JTPlFiv8OU0V9caUc61 IC3WjJiR2dah3NRJhNL5VcKtF0magsuCqJAVTnNZmhxEysDJC+p0Rfvb2uT2R9h1s1 ns7MX2dQ183fjYtbfCOPvPfvlf0BA4j9YQr/LxGTtCjjYa3UicdOf3eqrUunR1dZh9 QL5CYN/+QLMn8L1zku2UjN0HmQ/AjQeLhR9bQK0bMQArhxh3LGzK95NdheiCoQbN12 z4jEO4wgv/U8g== From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Mykola Lysenko , bpf@vger.kernel.org, netdev@vger.kernel.org Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH bpf-next 1/3] selftests/bpf: Add cross-build support for urandom_read et al Date: Wed, 4 Oct 2023 14:27:19 +0200 Message-Id: <20231004122721.54525-2-bjorn@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231004122721.54525-1-bjorn@kernel.org> References: <20231004122721.54525-1-bjorn@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231004_052731_282764_6D79CDFE X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Björn Töpel Some userland programs in the BPF test suite, e.g. urandom_read, is missing cross-build support. Add cross-build support for these programs Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 47365161b6fc..a9cbb85fa180 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -198,7 +198,7 @@ endif # do not fail. Static builds leave urandom_read relying on system-wide shared libraries. $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urandom_read_lib2.c liburandom_read.map $(call msg,LIB,,$@) - $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) \ + $(Q)$(CLANG) $(CLANG_TARGET_ARCH) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) \ $(filter %.c,$^) $(filter-out -static,$(LDLIBS)) \ -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \ -Wl,--version-script=liburandom_read.map \ @@ -206,7 +206,7 @@ $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urandom_read_lib2.c liburandom $(OUTPUT)/urandom_read: urandom_read.c urandom_read_aux.c $(OUTPUT)/liburandom_read.so $(call msg,BINARY,,$@) - $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $(filter %.c,$^) \ + $(Q)$(CLANG) $(CLANG_TARGET_ARCH) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $(filter %.c,$^) \ -lurandom_read $(filter-out -static,$(LDLIBS)) -L$(OUTPUT) \ -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \ -Wl,-rpath=. -o $@ From patchwork Wed Oct 4 12:27:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= X-Patchwork-Id: 13408687 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 84C8EE7B604 for ; Wed, 4 Oct 2023 12:27:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WkCLUbxTLlepfX8eANIPAlIv68CK2KZ3CtNVDsliO7I=; b=sRng2UjMYrxEMK unHiryCXxVMpEruDETyDWF6vFx1zll/96MVfz4zx99Qw+X/QjRvA5fEMd5AG/csaE903qfWzKVJAy Zxcewhn3OatwZt1biH6yWEYBEb2NaNNhBlu8VB2B8RNAKaGDrj/DG8FZHe1BNh49b9iqsMWwo/0kB AccZKLvul2WC2Yrg97RZTmHm1EjH0Osb36geqpcyx/E+FrfqdJpucvWowkVB1pZYtbnGZfTcolkw9 BvXHfeNTGCyM3pPfo5K+tk2IoWQPCu7T5oxbNUkt8vzGmeob3+XRTqYA1D3zxhRMNpQfw0+EiFDOf oVA5qT5omdebecaW6NNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qo0yZ-0000BO-1a; Wed, 04 Oct 2023 12:27:39 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qo0yT-00005Z-2x for linux-riscv@lists.infradead.org; Wed, 04 Oct 2023 12:27:37 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 7F780B81DE1; Wed, 4 Oct 2023 12:27:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E9CBC433C8; Wed, 4 Oct 2023 12:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696422451; bh=ijfr6HFXllf/luvFREpH5FQI3TulGFgVtkvmLdbFv64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ScLODdL0FrTl5WcI4ZFVzGB/3dhIzfv39c91kHKpMnyUpcbtbtAicWM3hO66nM6Jb bVGqwF21qcWd+bm1lueR+jBY8wwIWKYNoYTYcMV5uUX7HMo0X13sbX81fvHZnopNo5 1Rs4OiEOAF+6PrpMN19sAkF6KeNRClItyAajXK9P4zN5/jtP0FFPT0NH8sVkCsO0IR As5LUiW+61xLkD2OZ1LrQPGhaRqCIxEKNQFMrM9rKHv0Zp81Ws7ZX1n+IbeEys5JI1 MRPxVyJR7R7Nz6m5m+bZ3h1RwL7RYNlZzN2W5NJaI3R9hQmaMf1Ni4HoZgRsQyAp7L AZQTBqgRtdMfQ== From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Mykola Lysenko , bpf@vger.kernel.org, netdev@vger.kernel.org Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH bpf-next 2/3] selftests/bpf: Enable lld usage for RISC-V Date: Wed, 4 Oct 2023 14:27:20 +0200 Message-Id: <20231004122721.54525-3-bjorn@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231004122721.54525-1-bjorn@kernel.org> References: <20231004122721.54525-1-bjorn@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231004_052734_112810_3D39185F X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Björn Töpel RISC-V has proper lld support. Use that, similar to what x86 does, for urandom_read et al. Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index a9cbb85fa180..098e32c684d5 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -188,7 +188,7 @@ $(OUTPUT)/%:%.c $(Q)$(LINK.c) $^ $(LDLIBS) -o $@ # LLVM's ld.lld doesn't support all the architectures, so use it only on x86 -ifeq ($(SRCARCH),x86) +ifeq ($(SRCARCH),$(filter $(SRCARCH),x86 riscv)) LLD := lld else LLD := ld From patchwork Wed Oct 4 12:27:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= X-Patchwork-Id: 13408688 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A87BE7B601 for ; Wed, 4 Oct 2023 12:27:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=M28btBtbD0nUj86cGtFXzHJve8Er369I5AxPIMwA/34=; b=zGP9fStJ7hayUQ dmdoz7rWBR3ljqYZq8W+FhFbQ9xAwp8oXCgD7LIoYuTLLX0vpSFTfM+m7yL4C5FE0YAwJiB1CFZmw /XzvMksSsZ1MRWPUknxz8d2zXGgAXfySvhB1mi7Jk6JJ/la4tCobD9efSLY3Lb18KofeA5N1eSqlb dW/SGttuihtpw5SYYiLQqafW/V+vrm1bhKijij/FTkeFTfA0XgRD0mC1D0S/UqT2b60ZhF6ckw/L9 3kP41G61DViluVNJ4lB/vKIQ2sPlbbzmjqIXOF+4wG72Ualqsdp5DSepfk2cI15e7v7H4gp0AwqN5 wlh0e6HuVrsE2Kb+twmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qo0ya-0000CZ-0y; Wed, 04 Oct 2023 12:27:40 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qo0yW-000082-2d for linux-riscv@lists.infradead.org; Wed, 04 Oct 2023 12:27:38 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 6C155B81E08; Wed, 4 Oct 2023 12:27:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10B52C433CB; Wed, 4 Oct 2023 12:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696422454; bh=wY6Lz/zx7I9HiBpRiawuNkcCXD5tjJfz6F8komvznPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JXrJm4DS5M4NI/TAZPxlBg/4QQ0mBVNPLkmxB0BQ+hyoYvazGaRUKOD7m7X9a7Jsv 9BQSthEQTVVz3PvMnA853dexF644DxsIXZd7XMY0YUqA1h6IW1y8arPOx6lBVwS3NY tzRySzd1Ui1cu7I/GOXbI9Z0Y3orcUbZRhpb1WCz40Mz0Rw0FFuhs04+N2qo8lr6pX FvVqjZjX1j9HBv6WKAzAchdr1V/PrsjijZk4T+8ZmndGXybhpnaq+piKKLj+Wo7MGq kc24UfdHzDd8tkC5q7PZ7SQZRleU1B42NmDDujJtqhl/bQzMIwGKl4oFIQzSHi10vS 8op2PCRoSiVBQ== From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Mykola Lysenko , bpf@vger.kernel.org, netdev@vger.kernel.org Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH bpf-next 3/3] selftests/bpf: Add uprobe_multi to gen_tar target Date: Wed, 4 Oct 2023 14:27:21 +0200 Message-Id: <20231004122721.54525-4-bjorn@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231004122721.54525-1-bjorn@kernel.org> References: <20231004122721.54525-1-bjorn@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231004_052737_009989_D8EAC8AC X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Björn Töpel The uprobe_multi program was not picked up for the gen_tar target. Fix by adding it to TEST_GEN_FILES. Signed-off-by: Björn Töpel Acked-by: Jiri Olsa --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 098e32c684d5..07ac73cc339d 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -104,7 +104,7 @@ TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata \ xdp_features -TEST_GEN_FILES += liburandom_read.so urandom_read sign-file +TEST_GEN_FILES += liburandom_read.so urandom_read sign-file uprobe_multi # Emit succinct information message describing current building step # $1 - generic step name (e.g., CC, LINK, etc);