{
"ALU_MOV_X: dst = 4294967295",
.u.insns_int = {
- BPF_ALU32_IMM(BPF_MOV, R1, 4294967295),
+ BPF_ALU32_IMM(BPF_MOV, R1, 4294967295U),
BPF_ALU32_REG(BPF_MOV, R0, R1),
BPF_EXIT_INSN(),
},
INTERNAL,
{ },
- { { 0, 4294967295 } },
+ { { 0, 4294967295U } },
},
{
"ALU64_MOV_X: dst = 2",
{
"ALU64_MOV_X: dst = 4294967295",
.u.insns_int = {
- BPF_ALU32_IMM(BPF_MOV, R1, 4294967295),
+ BPF_ALU32_IMM(BPF_MOV, R1, 4294967295U),
BPF_ALU64_REG(BPF_MOV, R0, R1),
BPF_EXIT_INSN(),
},
INTERNAL,
{ },
- { { 0, 4294967295 } },
+ { { 0, 4294967295U } },
},
/* BPF_ALU | BPF_MOV | BPF_K */
{
{
"ALU_MOV_K: dst = 4294967295",
.u.insns_int = {
- BPF_ALU32_IMM(BPF_MOV, R0, 4294967295),
+ BPF_ALU32_IMM(BPF_MOV, R0, 4294967295U),
BPF_EXIT_INSN(),
},
INTERNAL,
{ },
- { { 0, 4294967295 } },
+ { { 0, 4294967295U } },
},
{
"ALU_MOV_K: 0x0000ffffffff0000 = 0x00000000ffffffff",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000ffffffff0000),
- BPF_LD_IMM64(R3, 0x00000000ffffffff),
+ BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
+ BPF_LD_IMM64(R3, 0x00000000ffffffffLL),
BPF_ALU32_IMM(BPF_MOV, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU64_OR_K: dst = 0x0",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000ffffffff0000),
+ BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
BPF_LD_IMM64(R3, 0x0),
BPF_ALU64_IMM(BPF_MOV, R2, 0x0),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
{
"ALU64_MOV_K: dst = -1",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000ffffffff0000),
- BPF_LD_IMM64(R3, 0xffffffffffffffff),
+ BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
+ BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
BPF_ALU64_IMM(BPF_MOV, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
"ALU_ADD_X: 1 + 4294967294 = 4294967295",
.u.insns_int = {
BPF_LD_IMM64(R0, 1),
- BPF_ALU32_IMM(BPF_MOV, R1, 4294967294),
+ BPF_ALU32_IMM(BPF_MOV, R1, 4294967294U),
BPF_ALU32_REG(BPF_ADD, R0, R1),
BPF_EXIT_INSN(),
},
INTERNAL,
{ },
- { { 0, 4294967295 } },
+ { { 0, 4294967295U } },
},
{
"ALU64_ADD_X: 1 + 2 = 3",
"ALU64_ADD_X: 1 + 4294967294 = 4294967295",
.u.insns_int = {
BPF_LD_IMM64(R0, 1),
- BPF_ALU32_IMM(BPF_MOV, R1, 4294967294),
+ BPF_ALU32_IMM(BPF_MOV, R1, 4294967294U),
BPF_ALU64_REG(BPF_ADD, R0, R1),
BPF_EXIT_INSN(),
},
INTERNAL,
{ },
- { { 0, 4294967295 } },
+ { { 0, 4294967295U } },
},
/* BPF_ALU | BPF_ADD | BPF_K */
{
"ALU_ADD_K: 1 + 4294967294 = 4294967295",
.u.insns_int = {
BPF_LD_IMM64(R0, 1),
- BPF_ALU32_IMM(BPF_ADD, R0, 4294967294),
+ BPF_ALU32_IMM(BPF_ADD, R0, 4294967294U),
BPF_EXIT_INSN(),
},
INTERNAL,
{ },
- { { 0, 4294967295 } },
+ { { 0, 4294967295U } },
},
{
"ALU_ADD_K: 0 + (-1) = 0x00000000ffffffff",
"ALU64_ADD_K: 0 + (-1) = 0xffffffffffffffff",
.u.insns_int = {
BPF_LD_IMM64(R2, 0x0),
- BPF_LD_IMM64(R3, 0xffffffffffffffff),
+ BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
BPF_ALU64_IMM(BPF_ADD, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU_SUB_X: 4294967295 - 4294967294 = 1",
.u.insns_int = {
- BPF_LD_IMM64(R0, 4294967295),
- BPF_ALU32_IMM(BPF_MOV, R1, 4294967294),
+ BPF_LD_IMM64(R0, 4294967295U),
+ BPF_ALU32_IMM(BPF_MOV, R1, 4294967294U),
BPF_ALU32_REG(BPF_SUB, R0, R1),
BPF_EXIT_INSN(),
},
{
"ALU64_SUB_X: 4294967295 - 4294967294 = 1",
.u.insns_int = {
- BPF_LD_IMM64(R0, 4294967295),
- BPF_ALU32_IMM(BPF_MOV, R1, 4294967294),
+ BPF_LD_IMM64(R0, 4294967295U),
+ BPF_ALU32_IMM(BPF_MOV, R1, 4294967294U),
BPF_ALU64_REG(BPF_SUB, R0, R1),
BPF_EXIT_INSN(),
},
{
"ALU_SUB_K: 4294967295 - 4294967294 = 1",
.u.insns_int = {
- BPF_LD_IMM64(R0, 4294967295),
- BPF_ALU32_IMM(BPF_SUB, R0, 4294967294),
+ BPF_LD_IMM64(R0, 4294967295U),
+ BPF_ALU32_IMM(BPF_SUB, R0, 4294967294U),
BPF_EXIT_INSN(),
},
INTERNAL,
{
"ALU64_SUB_K: 4294967294 - 4294967295 = -1",
.u.insns_int = {
- BPF_LD_IMM64(R0, 4294967294),
- BPF_ALU64_IMM(BPF_SUB, R0, 4294967295),
+ BPF_LD_IMM64(R0, 4294967294U),
+ BPF_ALU64_IMM(BPF_SUB, R0, 4294967295U),
BPF_EXIT_INSN(),
},
INTERNAL,
"ALU64_MUL_K: 1 * (-1) = 0xffffffffffffffff",
.u.insns_int = {
BPF_LD_IMM64(R2, 0x1),
- BPF_LD_IMM64(R3, 0xffffffffffffffff),
+ BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
BPF_ALU64_IMM(BPF_MUL, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU_DIV_X: 4294967295 / 4294967295 = 1",
.u.insns_int = {
- BPF_LD_IMM64(R0, 4294967295),
- BPF_ALU32_IMM(BPF_MOV, R1, 4294967295),
+ BPF_LD_IMM64(R0, 4294967295U),
+ BPF_ALU32_IMM(BPF_MOV, R1, 4294967295U),
BPF_ALU32_REG(BPF_DIV, R0, R1),
BPF_EXIT_INSN(),
},
{
"ALU64_DIV_X: 0xffffffffffffffff / (-1) = 0x0000000000000001",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0xffffffffffffffffUL),
- BPF_LD_IMM64(R4, 0xffffffffffffffffUL),
- BPF_LD_IMM64(R3, 0x0000000000000001UL),
+ BPF_LD_IMM64(R2, 0xffffffffffffffffLL),
+ BPF_LD_IMM64(R4, 0xffffffffffffffffLL),
+ BPF_LD_IMM64(R3, 0x0000000000000001LL),
BPF_ALU64_REG(BPF_DIV, R2, R4),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU_DIV_K: 4294967295 / 4294967295 = 1",
.u.insns_int = {
- BPF_LD_IMM64(R0, 4294967295),
- BPF_ALU32_IMM(BPF_DIV, R0, 4294967295),
+ BPF_LD_IMM64(R0, 4294967295U),
+ BPF_ALU32_IMM(BPF_DIV, R0, 4294967295U),
BPF_EXIT_INSN(),
},
INTERNAL,
{
"ALU_DIV_K: 0xffffffffffffffff / (-1) = 0x1",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0xffffffffffffffffUL),
+ BPF_LD_IMM64(R2, 0xffffffffffffffffLL),
BPF_LD_IMM64(R3, 0x1UL),
BPF_ALU32_IMM(BPF_DIV, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
{
"ALU64_DIV_K: 0xffffffffffffffff / (-1) = 0x0000000000000001",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0xffffffffffffffffUL),
- BPF_LD_IMM64(R3, 0x0000000000000001UL),
+ BPF_LD_IMM64(R2, 0xffffffffffffffffLL),
+ BPF_LD_IMM64(R3, 0x0000000000000001LL),
BPF_ALU64_IMM(BPF_DIV, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU_MOD_X: 4294967295 % 4294967293 = 2",
.u.insns_int = {
- BPF_LD_IMM64(R0, 4294967295),
- BPF_ALU32_IMM(BPF_MOV, R1, 4294967293),
+ BPF_LD_IMM64(R0, 4294967295U),
+ BPF_ALU32_IMM(BPF_MOV, R1, 4294967293U),
BPF_ALU32_REG(BPF_MOD, R0, R1),
BPF_EXIT_INSN(),
},
{
"ALU_MOD_K: 4294967295 % 4294967293 = 2",
.u.insns_int = {
- BPF_LD_IMM64(R0, 4294967295),
- BPF_ALU32_IMM(BPF_MOD, R0, 4294967293),
+ BPF_LD_IMM64(R0, 4294967295U),
+ BPF_ALU32_IMM(BPF_MOD, R0, 4294967293U),
BPF_EXIT_INSN(),
},
INTERNAL,
{
"ALU64_AND_K: 0x0000ffffffff0000 & 0x0 = 0x0000ffff00000000",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000ffffffff0000),
- BPF_LD_IMM64(R3, 0x0000000000000000),
+ BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
+ BPF_LD_IMM64(R3, 0x0000000000000000LL),
BPF_ALU64_IMM(BPF_AND, R2, 0x0),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU64_AND_K: 0x0000ffffffff0000 & -1 = 0x0000ffffffffffff",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000ffffffff0000),
- BPF_LD_IMM64(R3, 0x0000ffffffff0000),
+ BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
+ BPF_LD_IMM64(R3, 0x0000ffffffff0000LL),
BPF_ALU64_IMM(BPF_AND, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU64_AND_K: 0xffffffffffffffff & -1 = 0xffffffffffffffff",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0xffffffffffffffff),
- BPF_LD_IMM64(R3, 0xffffffffffffffff),
+ BPF_LD_IMM64(R2, 0xffffffffffffffffLL),
+ BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
BPF_ALU64_IMM(BPF_AND, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU64_OR_K: 0x0000ffffffff0000 | 0x0 = 0x0000ffff00000000",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000ffffffff0000),
- BPF_LD_IMM64(R3, 0x0000ffffffff0000),
+ BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
+ BPF_LD_IMM64(R3, 0x0000ffffffff0000LL),
BPF_ALU64_IMM(BPF_OR, R2, 0x0),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU64_OR_K: 0x0000ffffffff0000 | -1 = 0xffffffffffffffff",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000ffffffff0000),
- BPF_LD_IMM64(R3, 0xffffffffffffffff),
+ BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
+ BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
BPF_ALU64_IMM(BPF_OR, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU64_OR_K: 0x000000000000000 | -1 = 0xffffffffffffffff",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000000000000000),
- BPF_LD_IMM64(R3, 0xffffffffffffffff),
+ BPF_LD_IMM64(R2, 0x0000000000000000LL),
+ BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
BPF_ALU64_IMM(BPF_OR, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU64_XOR_K: 0x0000ffffffff0000 ^ 0x0 = 0x0000ffffffff0000",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000ffffffff0000),
- BPF_LD_IMM64(R3, 0x0000ffffffff0000),
+ BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
+ BPF_LD_IMM64(R3, 0x0000ffffffff0000LL),
BPF_ALU64_IMM(BPF_XOR, R2, 0x0),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU64_XOR_K: 0x0000ffffffff0000 ^ -1 = 0xffff00000000ffff",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000ffffffff0000),
- BPF_LD_IMM64(R3, 0xffff00000000ffff),
+ BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
+ BPF_LD_IMM64(R3, 0xffff00000000ffffLL),
BPF_ALU64_IMM(BPF_XOR, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ALU64_XOR_K: 0x000000000000000 ^ -1 = 0xffffffffffffffff",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0x0000000000000000),
- BPF_LD_IMM64(R3, 0xffffffffffffffff),
+ BPF_LD_IMM64(R2, 0x0000000000000000LL),
+ BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
BPF_ALU64_IMM(BPF_XOR, R2, 0xffffffff),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
BPF_MOV32_IMM(R0, 2),
{
"ST_MEM_DW: Store/Load double word: max negative 2",
.u.insns_int = {
- BPF_LD_IMM64(R2, 0xffff00000000ffff),
- BPF_LD_IMM64(R3, 0xffffffffffffffff),
+ BPF_LD_IMM64(R2, 0xffff00000000ffffLL),
+ BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
BPF_ST_MEM(BPF_DW, R10, -40, 0xffffffff),
BPF_LDX_MEM(BPF_DW, R2, R10, -40),
BPF_JMP_REG(BPF_JEQ, R2, R3, 2),