Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two cases of overlapping changes, nothing fancy. Signed-off-by: David S. Miller <davem@davemloft.net>
Цей коміт міститься в:
@@ -54,7 +54,7 @@ struct sr6_tlv_t {
|
||||
unsigned char value[0];
|
||||
} BPF_PACKET_HEADER;
|
||||
|
||||
__attribute__((always_inline)) struct ip6_srh_t *get_srh(struct __sk_buff *skb)
|
||||
static __always_inline struct ip6_srh_t *get_srh(struct __sk_buff *skb)
|
||||
{
|
||||
void *cursor, *data_end;
|
||||
struct ip6_srh_t *srh;
|
||||
@@ -88,7 +88,7 @@ __attribute__((always_inline)) struct ip6_srh_t *get_srh(struct __sk_buff *skb)
|
||||
return srh;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static __always_inline
|
||||
int update_tlv_pad(struct __sk_buff *skb, uint32_t new_pad,
|
||||
uint32_t old_pad, uint32_t pad_off)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ int update_tlv_pad(struct __sk_buff *skb, uint32_t new_pad,
|
||||
return 0;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static __always_inline
|
||||
int is_valid_tlv_boundary(struct __sk_buff *skb, struct ip6_srh_t *srh,
|
||||
uint32_t *tlv_off, uint32_t *pad_size,
|
||||
uint32_t *pad_off)
|
||||
@@ -177,7 +177,7 @@ int is_valid_tlv_boundary(struct __sk_buff *skb, struct ip6_srh_t *srh,
|
||||
return 0;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static __always_inline
|
||||
int add_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t tlv_off,
|
||||
struct sr6_tlv_t *itlv, uint8_t tlv_size)
|
||||
{
|
||||
@@ -221,7 +221,7 @@ int add_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t tlv_off,
|
||||
return update_tlv_pad(skb, new_pad, pad_size, pad_off);
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static __always_inline
|
||||
int delete_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh,
|
||||
uint32_t tlv_off)
|
||||
{
|
||||
@@ -259,7 +259,7 @@ int delete_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh,
|
||||
return update_tlv_pad(skb, new_pad, pad_size, pad_off);
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static __always_inline
|
||||
int has_egr_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh)
|
||||
{
|
||||
int tlv_offset = sizeof(struct ip6_t) + sizeof(struct ip6_srh_t) +
|
||||
|
@@ -90,6 +90,91 @@
|
||||
},
|
||||
.result = ACCEPT,
|
||||
},
|
||||
{
|
||||
"lsh64 by 0 imm",
|
||||
.insns = {
|
||||
BPF_LD_IMM64(BPF_REG_0, 1),
|
||||
BPF_LD_IMM64(BPF_REG_1, 1),
|
||||
BPF_ALU64_IMM(BPF_LSH, BPF_REG_1, 0),
|
||||
BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 1, 1),
|
||||
BPF_MOV64_IMM(BPF_REG_0, 2),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.result = ACCEPT,
|
||||
.retval = 1,
|
||||
},
|
||||
{
|
||||
"rsh64 by 0 imm",
|
||||
.insns = {
|
||||
BPF_LD_IMM64(BPF_REG_0, 1),
|
||||
BPF_LD_IMM64(BPF_REG_1, 0x100000000LL),
|
||||
BPF_ALU64_REG(BPF_MOV, BPF_REG_2, BPF_REG_1),
|
||||
BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 0),
|
||||
BPF_JMP_REG(BPF_JEQ, BPF_REG_1, BPF_REG_2, 1),
|
||||
BPF_MOV64_IMM(BPF_REG_0, 2),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.result = ACCEPT,
|
||||
.retval = 1,
|
||||
},
|
||||
{
|
||||
"arsh64 by 0 imm",
|
||||
.insns = {
|
||||
BPF_LD_IMM64(BPF_REG_0, 1),
|
||||
BPF_LD_IMM64(BPF_REG_1, 0x100000000LL),
|
||||
BPF_ALU64_REG(BPF_MOV, BPF_REG_2, BPF_REG_1),
|
||||
BPF_ALU64_IMM(BPF_ARSH, BPF_REG_1, 0),
|
||||
BPF_JMP_REG(BPF_JEQ, BPF_REG_1, BPF_REG_2, 1),
|
||||
BPF_MOV64_IMM(BPF_REG_0, 2),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.result = ACCEPT,
|
||||
.retval = 1,
|
||||
},
|
||||
{
|
||||
"lsh64 by 0 reg",
|
||||
.insns = {
|
||||
BPF_LD_IMM64(BPF_REG_0, 1),
|
||||
BPF_LD_IMM64(BPF_REG_1, 1),
|
||||
BPF_LD_IMM64(BPF_REG_2, 0),
|
||||
BPF_ALU64_REG(BPF_LSH, BPF_REG_1, BPF_REG_2),
|
||||
BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 1, 1),
|
||||
BPF_MOV64_IMM(BPF_REG_0, 2),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.result = ACCEPT,
|
||||
.retval = 1,
|
||||
},
|
||||
{
|
||||
"rsh64 by 0 reg",
|
||||
.insns = {
|
||||
BPF_LD_IMM64(BPF_REG_0, 1),
|
||||
BPF_LD_IMM64(BPF_REG_1, 0x100000000LL),
|
||||
BPF_ALU64_REG(BPF_MOV, BPF_REG_2, BPF_REG_1),
|
||||
BPF_LD_IMM64(BPF_REG_3, 0),
|
||||
BPF_ALU64_REG(BPF_RSH, BPF_REG_1, BPF_REG_3),
|
||||
BPF_JMP_REG(BPF_JEQ, BPF_REG_1, BPF_REG_2, 1),
|
||||
BPF_MOV64_IMM(BPF_REG_0, 2),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.result = ACCEPT,
|
||||
.retval = 1,
|
||||
},
|
||||
{
|
||||
"arsh64 by 0 reg",
|
||||
.insns = {
|
||||
BPF_LD_IMM64(BPF_REG_0, 1),
|
||||
BPF_LD_IMM64(BPF_REG_1, 0x100000000LL),
|
||||
BPF_ALU64_REG(BPF_MOV, BPF_REG_2, BPF_REG_1),
|
||||
BPF_LD_IMM64(BPF_REG_3, 0),
|
||||
BPF_ALU64_REG(BPF_ARSH, BPF_REG_1, BPF_REG_3),
|
||||
BPF_JMP_REG(BPF_JEQ, BPF_REG_1, BPF_REG_2, 1),
|
||||
BPF_MOV64_IMM(BPF_REG_0, 2),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.result = ACCEPT,
|
||||
.retval = 1,
|
||||
},
|
||||
{
|
||||
"invalid 64-bit BPF_END",
|
||||
.insns = {
|
||||
|
Посилання в новій задачі
Заблокувати користувача