Skip to content

Commit 9f7a9f9

Browse files
shunghsiyugregkh
authored andcommitted
selftests/bpf: remove use of __xlated()
Commit 68ec539, backport of mainline commit a41b382 ("selftests/bpf: Verify that sync_linked_regs preserves subreg_def") uses the __xlated() that wasn't in the v6.6 code-base, and causes BPF selftests to fail compilation. Remove the use of the __xlated() macro in tools/testing/selftests/bpf/progs/verifier_scalar_ids.c to fix compilation failure. Without the __xlated() checks the coverage is reduced, however the test case still functions just fine. Fixes: 68ec539 ("selftests/bpf: Verify that sync_linked_regs preserves subreg_def") Cc: Eduard Zingerman <[email protected]> Cc: Daniel Borkmann <[email protected]> Signed-off-by: Shung-Hsi Yu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ce444a0 commit 9f7a9f9

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

tools/testing/selftests/bpf/progs/verifier_scalar_ids.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -682,22 +682,6 @@ __msg("from 3 to 4")
682682
__msg("4: (77) r1 >>= 32 ; R1_w=0")
683683
__msg("5: (bf) r0 = r1 ; R0_w=0 R1_w=0")
684684
__msg("6: (95) exit")
685-
/* Verify that statements to randomize upper half of r1 had not been
686-
* generated.
687-
*/
688-
__xlated("call unknown")
689-
__xlated("r0 &= 2147483647")
690-
__xlated("w1 = w0")
691-
/* This is how disasm.c prints BPF_ZEXT_REG at the moment, x86 and arm
692-
* are the only CI archs that do not need zero extension for subregs.
693-
*/
694-
#if !defined(__TARGET_ARCH_x86) && !defined(__TARGET_ARCH_arm64)
695-
__xlated("w1 = w1")
696-
#endif
697-
__xlated("if w0 < 0xa goto pc+0")
698-
__xlated("r1 >>= 32")
699-
__xlated("r0 = r1")
700-
__xlated("exit")
701685
__naked void linked_regs_and_subreg_def(void)
702686
{
703687
asm volatile (

0 commit comments

Comments
 (0)