History

bpf: Remove test for MOVSX32 with offset=32

MOVSX32 only supports sign extending 8-bit and 16-bit operands into 32 bit operands. The "ALU_MOVSX | BPF_W" test tries to sign extend a 32 bit operand into a 32 bit operand which is equivalent to a normal BPF_MOV. Remove this test as it tries to run an invalid instruction.

Puranjay Mohan committed 3 years ago

Commit 5fa201f1 parent 9cea90c1 file · +0 −16Browse files

Unified · Split

lib/test_bpf.c+0−16
@@ -5144,22 +5144,6 @@ static struct bpf_test tests[] = { · 5143 unmodified lines
5144 { },5144 { },
5145 { { 0, 0x1 } },5145 { { 0, 0x1 } },
5146 },5146 },
5147 {
5148 "ALU_MOVSX | BPF_W",
5149 .u.insns_int = {
5150 BPF_LD_IMM64(R2, 0x00000000deadbeefLL),
5151 BPF_LD_IMM64(R3, 0xdeadbeefdeadbeefLL),
5152 BPF_MOVSX32_REG(R1, R3, 32),
5153 BPF_JMP_REG(BPF_JEQ, R2, R1, 2),
5154 BPF_MOV32_IMM(R0, 2),
5155 BPF_EXIT_INSN(),
5156 BPF_MOV32_IMM(R0, 1),
5157 BPF_EXIT_INSN(),
5158 },
5159 INTERNAL,
5160 { },
5161 { { 0, 0x1 } },
5162 },
5163 /* MOVSX64 REG */5147 /* MOVSX64 REG */
5164 {5148 {
5165 "ALU64_MOVSX | BPF_B",5149 "ALU64_MOVSX | BPF_B",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t