From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 66-220-144-179.mail-mxout.facebook.com (66-220-144-179.mail-mxout.facebook.com [66.220.144.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46C2837703A for ; Mon, 11 May 2026 05:35:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.220.144.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778477718; cv=none; b=nk9Vx0hE27jwkgsRJZIO1I0FQJiMDHTk7qbKEsiT7pQZNyYZ8my12BRMGs65bTbexSAqg9lEQ4lbZ5UifNCbOjk8uR2zY+TKMjnbZPcHhIQ93oyNtxdEHG7Vyb48MPoe2c4fIWq5attKGq9t0hwcGhPOQIYxaEGz9ZrffjxJWEE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778477718; c=relaxed/simple; bh=P4+znra0OXtW8CdjaF/udJz4xCXstWy5kjbGpm/en2U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lvoeR+UxYaE4MPSeN5rlW7gTw52P/PBKtrzkl+6BaW0koJuY5SHhlq1mRmmP+K7hNId+jtUuMrbqc80rDVa5te0soDk+L3CBO/GjLd8RoN4dIUcEnLIEVcdzCiH+JWvs+6bNc8zjtGN2I8SaQJcf1wA+ryMpARPUvMUYJDr82Tg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev; spf=fail smtp.mailfrom=linux.dev; arc=none smtp.client-ip=66.220.144.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=linux.dev Received: by devvm16039.vll0.facebook.com (Postfix, from userid 128203) id 44F1CA59DC962; Sun, 10 May 2026 22:35:13 -0700 (PDT) From: Yonghong Song To: bpf@vger.kernel.org Cc: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , "Jose E . Marchesi" , kernel-team@fb.com, Martin KaFai Lau , Puranjay Mohan Subject: [PATCH bpf-next v3 24/24] selftests/bpf: Enable stack argument tests for arm64 Date: Sun, 10 May 2026 22:35:13 -0700 Message-ID: <20260511053513.1898124-1-yonghong.song@linux.dev> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260511053301.1878610-1-yonghong.song@linux.dev> References: <20260511053301.1878610-1-yonghong.song@linux.dev> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Puranjay Mohan Now that arm64 supports stack arguments, enable the existing stack_arg, stack_arg_kfunc and verifier_stack_arg tests for __TARGET_ARCH_arm64. Signed-off-by: Puranjay Mohan Signed-off-by: Yonghong Song --- tools/testing/selftests/bpf/progs/btf__stack_arg_precision.c | 3 ++- .../selftests/bpf/progs/btf__verifier_stack_arg_order.c | 3 ++- tools/testing/selftests/bpf/progs/stack_arg.c | 3 ++- tools/testing/selftests/bpf/progs/stack_arg_kfunc.c | 3 ++- tools/testing/selftests/bpf/progs/stack_arg_precision.c | 3 ++- tools/testing/selftests/bpf/progs/verifier_stack_arg.c | 3 ++- tools/testing/selftests/bpf/progs/verifier_stack_arg_order.c | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/btf__stack_arg_precision.c= b/tools/testing/selftests/bpf/progs/btf__stack_arg_precision.c index 296fddfe6804..8d38aafe66a2 100644 --- a/tools/testing/selftests/bpf/progs/btf__stack_arg_precision.c +++ b/tools/testing/selftests/bpf/progs/btf__stack_arg_precision.c @@ -4,7 +4,8 @@ #include #include "../test_kmods/bpf_testmod_kfunc.h" =20 -#if defined(__TARGET_ARCH_x86) && defined(__BPF_FEATURE_STACK_ARGUMENT) +#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \ + defined(__BPF_FEATURE_STACK_ARGUMENT) =20 long subprog_call_mem_kfunc(long a, long b, long c, long d, long e, long= size) { diff --git a/tools/testing/selftests/bpf/progs/btf__verifier_stack_arg_or= der.c b/tools/testing/selftests/bpf/progs/btf__verifier_stack_arg_order.c index 2d5ddb24e241..9a05bbecd170 100644 --- a/tools/testing/selftests/bpf/progs/btf__verifier_stack_arg_order.c +++ b/tools/testing/selftests/bpf/progs/btf__verifier_stack_arg_order.c @@ -3,7 +3,8 @@ #include #include =20 -#if defined(__TARGET_ARCH_x86) && defined(__BPF_FEATURE_STACK_ARGUMENT) +#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \ + defined(__BPF_FEATURE_STACK_ARGUMENT) =20 int subprog_bad_order_6args(int a, int b, int c, int d, int e, int f) { diff --git a/tools/testing/selftests/bpf/progs/stack_arg.c b/tools/testin= g/selftests/bpf/progs/stack_arg.c index ab6240b997c5..b5e9929a4d63 100644 --- a/tools/testing/selftests/bpf/progs/stack_arg.c +++ b/tools/testing/selftests/bpf/progs/stack_arg.c @@ -21,7 +21,8 @@ struct { =20 int timer_result; =20 -#if defined(__TARGET_ARCH_x86) && defined(__BPF_FEATURE_STACK_ARGUMENT) +#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \ + defined(__BPF_FEATURE_STACK_ARGUMENT) =20 const volatile bool has_stack_arg =3D true; =20 diff --git a/tools/testing/selftests/bpf/progs/stack_arg_kfunc.c b/tools/= testing/selftests/bpf/progs/stack_arg_kfunc.c index fa9def876ea5..da0d4f91d273 100644 --- a/tools/testing/selftests/bpf/progs/stack_arg_kfunc.c +++ b/tools/testing/selftests/bpf/progs/stack_arg_kfunc.c @@ -6,7 +6,8 @@ #include "bpf_kfuncs.h" #include "../test_kmods/bpf_testmod_kfunc.h" =20 -#if defined(__TARGET_ARCH_x86) && defined(__BPF_FEATURE_STACK_ARGUMENT) +#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \ + defined(__BPF_FEATURE_STACK_ARGUMENT) =20 const volatile bool has_stack_arg =3D true; =20 diff --git a/tools/testing/selftests/bpf/progs/stack_arg_precision.c b/to= ols/testing/selftests/bpf/progs/stack_arg_precision.c index 2a0a344c83ca..bee2eeec021d 100644 --- a/tools/testing/selftests/bpf/progs/stack_arg_precision.c +++ b/tools/testing/selftests/bpf/progs/stack_arg_precision.c @@ -6,7 +6,8 @@ #include "../test_kmods/bpf_testmod_kfunc.h" #include "bpf_misc.h" =20 -#if defined(__TARGET_ARCH_x86) && defined(__BPF_FEATURE_STACK_ARGUMENT) +#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \ + defined(__BPF_FEATURE_STACK_ARGUMENT) =20 /* Force kfunc extern BTF generation for inline asm call below. * Uses its own SEC so it's not included as a .text subprog. diff --git a/tools/testing/selftests/bpf/progs/verifier_stack_arg.c b/too= ls/testing/selftests/bpf/progs/verifier_stack_arg.c index d38beba6b5e9..1939c931b6f3 100644 --- a/tools/testing/selftests/bpf/progs/verifier_stack_arg.c +++ b/tools/testing/selftests/bpf/progs/verifier_stack_arg.c @@ -12,7 +12,8 @@ struct { __type(value, long long); } map_hash_8b SEC(".maps"); =20 -#if defined(__TARGET_ARCH_x86) && defined(__BPF_FEATURE_STACK_ARGUMENT) +#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \ + defined(__BPF_FEATURE_STACK_ARGUMENT) =20 __noinline __used static int subprog_6args(int a, int b, int c, int d, int e, int f) diff --git a/tools/testing/selftests/bpf/progs/verifier_stack_arg_order.c= b/tools/testing/selftests/bpf/progs/verifier_stack_arg_order.c index 671c79969c6c..16b3eb5f51a2 100644 --- a/tools/testing/selftests/bpf/progs/verifier_stack_arg_order.c +++ b/tools/testing/selftests/bpf/progs/verifier_stack_arg_order.c @@ -5,7 +5,8 @@ #include #include "bpf_misc.h" =20 -#if defined(__TARGET_ARCH_x86) && defined(__BPF_FEATURE_STACK_ARGUMENT) +#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \ + defined(__BPF_FEATURE_STACK_ARGUMENT) =20 __noinline __used __naked static int subprog_bad_order_6args(int a, int b, int c, int d, int e, in= t f) --=20 2.53.0-Meta