Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two minor conflicts in virtio_net driver (bug fix overlapping addition of a helper) and MAINTAINERS (new driver edit overlapping revamp of PHY entry). Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -340,6 +340,7 @@ static void test_bpf_obj_id(void)
|
||||
|
||||
/* Check getting prog info */
|
||||
info_len = sizeof(struct bpf_prog_info) * 2;
|
||||
bzero(&prog_infos[i], info_len);
|
||||
prog_infos[i].jited_prog_insns = ptr_to_u64(jited_insns);
|
||||
prog_infos[i].jited_prog_len = sizeof(jited_insns);
|
||||
prog_infos[i].xlated_prog_insns = ptr_to_u64(xlated_insns);
|
||||
@@ -369,6 +370,7 @@ static void test_bpf_obj_id(void)
|
||||
|
||||
/* Check getting map info */
|
||||
info_len = sizeof(struct bpf_map_info) * 2;
|
||||
bzero(&map_infos[i], info_len);
|
||||
err = bpf_obj_get_info_by_fd(map_fds[i], &map_infos[i],
|
||||
&info_len);
|
||||
if (CHECK(err ||
|
||||
@@ -394,7 +396,7 @@ static void test_bpf_obj_id(void)
|
||||
nr_id_found = 0;
|
||||
next_id = 0;
|
||||
while (!bpf_prog_get_next_id(next_id, &next_id)) {
|
||||
struct bpf_prog_info prog_info;
|
||||
struct bpf_prog_info prog_info = {};
|
||||
int prog_fd;
|
||||
|
||||
info_len = sizeof(prog_info);
|
||||
@@ -418,6 +420,8 @@ static void test_bpf_obj_id(void)
|
||||
nr_id_found++;
|
||||
|
||||
err = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &info_len);
|
||||
prog_infos[i].jited_prog_insns = 0;
|
||||
prog_infos[i].xlated_prog_insns = 0;
|
||||
CHECK(err || info_len != sizeof(struct bpf_prog_info) ||
|
||||
memcmp(&prog_info, &prog_infos[i], info_len),
|
||||
"get-prog-info(next_id->fd)",
|
||||
@@ -436,7 +440,7 @@ static void test_bpf_obj_id(void)
|
||||
nr_id_found = 0;
|
||||
next_id = 0;
|
||||
while (!bpf_map_get_next_id(next_id, &next_id)) {
|
||||
struct bpf_map_info map_info;
|
||||
struct bpf_map_info map_info = {};
|
||||
int map_fd;
|
||||
|
||||
info_len = sizeof(map_info);
|
||||
|
@@ -5980,6 +5980,34 @@ static struct bpf_test tests[] = {
|
||||
.result = REJECT,
|
||||
.result_unpriv = REJECT,
|
||||
},
|
||||
{
|
||||
"subtraction bounds (map value)",
|
||||
.insns = {
|
||||
BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
|
||||
BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
|
||||
BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
|
||||
BPF_LD_MAP_FD(BPF_REG_1, 0),
|
||||
BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
|
||||
BPF_FUNC_map_lookup_elem),
|
||||
BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 9),
|
||||
BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
|
||||
BPF_JMP_IMM(BPF_JGT, BPF_REG_1, 0xff, 7),
|
||||
BPF_LDX_MEM(BPF_B, BPF_REG_3, BPF_REG_0, 1),
|
||||
BPF_JMP_IMM(BPF_JGT, BPF_REG_3, 0xff, 5),
|
||||
BPF_ALU64_REG(BPF_SUB, BPF_REG_1, BPF_REG_3),
|
||||
BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 56),
|
||||
BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1),
|
||||
BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_0, 0),
|
||||
BPF_EXIT_INSN(),
|
||||
BPF_MOV64_IMM(BPF_REG_0, 0),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.fixup_map1 = { 3 },
|
||||
.errstr_unpriv = "R0 pointer arithmetic prohibited",
|
||||
.errstr = "R0 min value is negative, either use unsigned index or do a if (index >=0) check.",
|
||||
.result = REJECT,
|
||||
.result_unpriv = REJECT,
|
||||
},
|
||||
};
|
||||
|
||||
static int probe_filter_length(const struct bpf_insn *fp)
|
||||
|
Reference in New Issue
Block a user