Message ID | 20230705113926.751791-1-bjorn@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1807293vqx; Wed, 5 Jul 2023 04:50:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlFnGFNpZk38pIzZRomuhzVP1LjHHmpTKI7r80foKe7CRe2+0t6Brfs/4Z0AkPQ6eN2SksNT X-Received: by 2002:a05:6870:438e:b0:1a3:93e:c26f with SMTP id r14-20020a056870438e00b001a3093ec26fmr19601117oah.31.1688557831090; Wed, 05 Jul 2023 04:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688557831; cv=none; d=google.com; s=arc-20160816; b=u+2AXvjJ3w984g3fa9JaZWnfUdbIpakeB0yv8s1ifiaI4SqPNY3JpN82d4/yAJmkWm D4gH60uNUxory0TQ32DWsW7D19kwE2fJW9gzn8+rlGNQFV0pSU080t732dPoydDbpCGu DdqlDb26qdpeKwvz+Uu5Mr5HnSZO7iYdEfKiXlTgwvRzpIP94+pN1wWZ1eBGEvosC3lW LnDBgaW35AMWIWSWvjQJz8bXOdHtp3SjPDV8A7b4sQJGEJg1Uo0Zo/XpzVD2XvbHVK43 8JACozSfIrTxpB2nuxz4KSKcNy6wUn+Q5AgVknYHaNpIIkNAYEFI3yaMajFHLb/Zex7P r1tg== 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=pHc687+lsQHOHL3tUpoTdULRjrfFkvPPf8KRGBVOk0Y=; fh=vjlyGd3B5WsFEyochNsdQTpPcR//GsEeV6y5Wa+1jo0=; b=KltsMYZNSe/Wbo0VwkCVJgW7XVJutkHWKOyiX6VanS80hJONoMxJHW3zt10IAB8M3u zx727qcLVqn5Bv2hq2NCIq2mdNNp3GJ4uYjnR9nLkUgFkW0p82VuT1CGYS9VxqMijbLQ s+67YRO05lbmSW4O2nLsiJxdBZSgsOQJJDGNHZQc1M9cQl3xQshpI89JnZM9A65U9Gpt DV7f1Nfiz1f334xJtEBhsg4iGsFDAdwuGaHboHMEzPYKG5thPsy62y/KZDI1lloFDZcJ pnrqh+2MtXJMxCwbLOULUa4s//LiOiYMZ95Bw/h06KuxPKuLTT0p4QC0LGmFsEI6BGQk X5KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mmty4s3l; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a634949000000b0053f4a814953si22335617pgk.870.2023.07.05.04.50.17; Wed, 05 Jul 2023 04:50:31 -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=@kernel.org header.s=k20201202 header.b=Mmty4s3l; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231545AbjGELjh (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Wed, 5 Jul 2023 07:39:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231464AbjGELjf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 5 Jul 2023 07:39:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8F03172B; Wed, 5 Jul 2023 04:39:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 04C1661504; Wed, 5 Jul 2023 11:39:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA9CAC433C8; Wed, 5 Jul 2023 11:39:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688557173; bh=ZbcL7/Ws+420j+1VsDqK0BIHNk64SeGaagfrpJQvNdU=; h=From:To:Cc:Subject:Date:From; b=Mmty4s3lrufZwNUJbmiCj64hkHAdaNMtj0NrKL1xoLIeHV/15A0PRwZ5cpSk8y3Z0 DeQv/e6LxOjNjfnGKpXI/au6LQHfFGqF4L44oXy3W0OkKpzvlJ6jFa7LSMpm+7LcsP /6DOgupRUUJXsl3R4AuugfH+Mz1J+zdndck/Q6UGo/Nxn8/M1IiBRQBtkmTeNPAmU/ 1Sm6UbRVvPU1yEvbv7ez9eiiPmjY1XMg9CtIA7ONv22VXO4O8HThPKzKCDlnWA1l+2 9Dh0bwIaHEG0r/3BWpDbObUv7Zxsop3rbGRukHQRokz8Q3dcuhYDVlI/rnOOKQrsIE qg6SHth7qP4YA== From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn@kernel.org> To: Andrii Nakryiko <andrii@kernel.org>, Mykola Lysenko <mykolal@fb.com>, bpf@vger.kernel.org, netdev@vger.kernel.org Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn@rivosinc.com>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH bpf-next 0/2] BPF kselftest cross-build/RISC-V fixes Date: Wed, 5 Jul 2023 13:39:24 +0200 Message-Id: <20230705113926.751791-1-bjorn@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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?1770581216141263517?= X-GMAIL-MSGID: =?utf-8?q?1770581216141263517?= |
Series |
BPF kselftest cross-build/RISC-V fixes
|
|
Message
Björn Töpel
July 5, 2023, 11:39 a.m. UTC
From: Björn Töpel <bjorn@rivosinc.com>
This series has two minor fixes, found when cross-compiling for the
RISC-V architecture.
Some RISC-V systems do not define HAVE_EFFICIENT_UNALIGNED_ACCESS,
which made some of tests bail out. Fix the failing tests by adding
F_NEEDS_EFFICIENT_UNALIGNED_ACCESS.
...and some RISC-V systems *do* define
HAVE_EFFICIENT_UNALIGNED_ACCESS. In this case the autoconf.h was not
correctly picked up by the build system.
Cheers,
Björn
Björn Töpel (2):
selftests/bpf: Add F_NEEDS_EFFICIENT_UNALIGNED_ACCESS to some tests
selftests/bpf: Honor $(O) when figuring out paths
tools/testing/selftests/bpf/Makefile | 4 ++++
tools/testing/selftests/bpf/verifier/atomic_cmpxchg.c | 1 +
tools/testing/selftests/bpf/verifier/ctx_skb.c | 2 ++
tools/testing/selftests/bpf/verifier/jmp32.c | 8 ++++++++
tools/testing/selftests/bpf/verifier/map_kptr.c | 2 ++
tools/testing/selftests/bpf/verifier/precise.c | 2 +-
6 files changed, 18 insertions(+), 1 deletion(-)
base-commit: a94098d490e17d652770f2309fcb9b46bc4cf864
Comments
On 7/5/23 1:39 PM, Björn Töpel wrote: > From: Björn Töpel <bjorn@rivosinc.com> > > This series has two minor fixes, found when cross-compiling for the > RISC-V architecture. > > Some RISC-V systems do not define HAVE_EFFICIENT_UNALIGNED_ACCESS, > which made some of tests bail out. Fix the failing tests by adding > F_NEEDS_EFFICIENT_UNALIGNED_ACCESS. > > ...and some RISC-V systems *do* define > HAVE_EFFICIENT_UNALIGNED_ACCESS. In this case the autoconf.h was not > correctly picked up by the build system. Looks good, applied thanks! Any plans on working towards integrating riscv into upstream BPF CI? Would love to see that happening. :) Thanks, Daniel
Daniel Borkmann <daniel@iogearbox.net> writes: > On 7/5/23 1:39 PM, Björn Töpel wrote: >> From: Björn Töpel <bjorn@rivosinc.com> >> >> This series has two minor fixes, found when cross-compiling for the >> RISC-V architecture. >> >> Some RISC-V systems do not define HAVE_EFFICIENT_UNALIGNED_ACCESS, >> which made some of tests bail out. Fix the failing tests by adding >> F_NEEDS_EFFICIENT_UNALIGNED_ACCESS. >> >> ...and some RISC-V systems *do* define >> HAVE_EFFICIENT_UNALIGNED_ACCESS. In this case the autoconf.h was not >> correctly picked up by the build system. > > Looks good, applied thanks! Thank you! > Any plans on working towards integrating riscv into upstream BPF CI? > Would love to see that happening. :) Yes! I started hacking a bit on that some time back: https://github.com/libbpf/ci/pull/87 https://github.com/kernel-patches/vmtest/pull/194 (TL;DR: I'll continuing that work at some point.) RISC-V still needs cross-compilation, and testing on qemu/TCG (on typically x86-hosts), which puts some constraints on the rootfs/cross-compilation host; For RISC-V Debian Bullseye is way too old (a lot packages are missing/broken). Typically for BPF it would be Ubuntu Kinetic (or later), or some Debian Sid snapshot. The rootfs, the host, and the host foreign arch would need to be the same for "no-hassle cross-compilation on Debian derivatives" -- and at least younger than "Ubuntu Kinetic"-age. AFAIU, there are some issues with rootfs version and build host versioning for other archs as well: https://github.com/libbpf/ci/pull/83 Björn