Merge tag 'net-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
"Networking fixes for 5.12-rc8, including fixes from netfilter, and
bpf. BPF verifier changes stand out, otherwise things have slowed
down.
Current release - regressions:
- gro: ensure frag0 meets IP header alignment
- Revert "net: stmmac: re-init rx buffers when mac resume back"
- ethernet: macb: fix the restore of cmp registers
Previous releases - regressions:
- ixgbe: Fix NULL pointer dereference in ethtool loopback test
- ixgbe: fix unbalanced device enable/disable in suspend/resume
- phy: marvell: fix detection of PHY on Topaz switches
- make tcp_allowed_congestion_control readonly in non-init netns
- xen-netback: Check for hotplug-status existence before watching
Previous releases - always broken:
- bpf: mitigate a speculative oob read of up to map value size by
tightening the masking window
- sctp: fix race condition in sctp_destroy_sock
- sit, ip6_tunnel: Unregister catch-all devices
- netfilter: nftables: clone set element expression template
- netfilter: flowtable: fix NAT IPv6 offload mangling
- net: geneve: check skb is large enough for IPv4/IPv6 header
- netlink: don't call ->netlink_bind with table lock held"
* tag 'net-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits)
netlink: don't call ->netlink_bind with table lock held
MAINTAINERS: update my email
bpf: Update selftests to reflect new error states
bpf: Tighten speculative pointer arithmetic mask
bpf: Move sanitize_val_alu out of op switch
bpf: Refactor and streamline bounds check into helper
bpf: Improve verifier error messages for users
bpf: Rework ptr_limit into alu_limit and add common error path
bpf: Ensure off_reg has no mixed signed bounds for all types
bpf: Move off_reg into sanitize_ptr_alu
bpf: Use correct permission flag for mixed signed bounds arithmetic
ch_ktls: do not send snd_una update to TCB in middle
ch_ktls: tcb close causes tls connection failure
ch_ktls: fix device connection close
ch_ktls: Fix kernel panic
i40e: fix the panic when running bpf in xdpdrv mode
net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta
net/mlx5e: Fix setting of RS FEC mode
net/mlx5: Fix setting of devlink traps in switchdev mode
Revert "net: stmmac: re-init rx buffers when mac resume back"
...
This commit is contained in:
@@ -852,18 +852,19 @@ int xsk_socket__create_shared(struct xsk_socket **xsk_ptr,
|
||||
struct xsk_ring_cons *comp,
|
||||
const struct xsk_socket_config *usr_config)
|
||||
{
|
||||
bool unmap, rx_setup_done = false, tx_setup_done = false;
|
||||
void *rx_map = NULL, *tx_map = NULL;
|
||||
struct sockaddr_xdp sxdp = {};
|
||||
struct xdp_mmap_offsets off;
|
||||
struct xsk_socket *xsk;
|
||||
struct xsk_ctx *ctx;
|
||||
int err, ifindex;
|
||||
bool unmap = umem->fill_save != fill;
|
||||
bool rx_setup_done = false, tx_setup_done = false;
|
||||
|
||||
if (!umem || !xsk_ptr || !(rx || tx))
|
||||
return -EFAULT;
|
||||
|
||||
unmap = umem->fill_save != fill;
|
||||
|
||||
xsk = calloc(1, sizeof(*xsk));
|
||||
if (!xsk)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -261,8 +261,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
/* not actually fully unbounded, but the bound is very high */
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds, pointer arithmetic with it prohibited for !root",
|
||||
.result_unpriv = REJECT,
|
||||
.errstr = "value -4294967168 makes map_value pointer be out of bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
@@ -298,9 +296,6 @@
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
/* not actually fully unbounded, but the bound is very high */
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds, pointer arithmetic with it prohibited for !root",
|
||||
.result_unpriv = REJECT,
|
||||
.errstr = "value -4294967168 makes map_value pointer be out of bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R0 tried to sub from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 has pointer with unsupported alu operation",
|
||||
.errstr = "R0 tried to subtract pointer from scalar",
|
||||
.result = REJECT,
|
||||
},
|
||||
@@ -21,7 +21,7 @@
|
||||
BPF_ALU64_REG(BPF_SUB, BPF_REG_1, BPF_REG_0),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R1 tried to sub from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 has pointer with unsupported alu operation",
|
||||
.result_unpriv = REJECT,
|
||||
.result = ACCEPT,
|
||||
.retval = 1,
|
||||
@@ -34,22 +34,23 @@
|
||||
BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R0 tried to sub from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 has pointer with unsupported alu operation",
|
||||
.errstr = "R0 tried to subtract pointer from scalar",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
"check deducing bounds from const, 4",
|
||||
.insns = {
|
||||
BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),
|
||||
BPF_MOV64_IMM(BPF_REG_0, 0),
|
||||
BPF_JMP_IMM(BPF_JSLE, BPF_REG_0, 0, 1),
|
||||
BPF_EXIT_INSN(),
|
||||
BPF_JMP_IMM(BPF_JSGE, BPF_REG_0, 0, 1),
|
||||
BPF_EXIT_INSN(),
|
||||
BPF_ALU64_REG(BPF_SUB, BPF_REG_1, BPF_REG_0),
|
||||
BPF_ALU64_REG(BPF_SUB, BPF_REG_6, BPF_REG_0),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R1 tried to sub from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R6 has pointer with unsupported alu operation",
|
||||
.result_unpriv = REJECT,
|
||||
.result = ACCEPT,
|
||||
},
|
||||
@@ -61,7 +62,7 @@
|
||||
BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R0 tried to sub from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 has pointer with unsupported alu operation",
|
||||
.errstr = "R0 tried to subtract pointer from scalar",
|
||||
.result = REJECT,
|
||||
},
|
||||
@@ -74,7 +75,7 @@
|
||||
BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R0 tried to sub from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 has pointer with unsupported alu operation",
|
||||
.errstr = "R0 tried to subtract pointer from scalar",
|
||||
.result = REJECT,
|
||||
},
|
||||
@@ -88,7 +89,7 @@
|
||||
offsetof(struct __sk_buff, mark)),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R1 tried to sub from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 has pointer with unsupported alu operation",
|
||||
.errstr = "dereference of modified ctx ptr",
|
||||
.result = REJECT,
|
||||
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
|
||||
@@ -103,7 +104,7 @@
|
||||
offsetof(struct __sk_buff, mark)),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R1 tried to add from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 has pointer with unsupported alu operation",
|
||||
.errstr = "dereference of modified ctx ptr",
|
||||
.result = REJECT,
|
||||
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
|
||||
@@ -116,7 +117,7 @@
|
||||
BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R0 tried to sub from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 has pointer with unsupported alu operation",
|
||||
.errstr = "R0 tried to subtract pointer from scalar",
|
||||
.result = REJECT,
|
||||
},
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -43,7 +42,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -69,7 +67,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R8 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -94,7 +91,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R8 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -141,7 +137,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -210,7 +205,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -260,7 +254,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -287,7 +280,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -313,7 +305,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -342,7 +333,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R7 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -372,7 +362,6 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 4 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
},
|
||||
{
|
||||
@@ -400,7 +389,5 @@
|
||||
},
|
||||
.fixup_map_hash_8b = { 3 },
|
||||
.errstr = "unbounded min value",
|
||||
.errstr_unpriv = "R1 has unknown scalar with mixed signed bounds",
|
||||
.result = REJECT,
|
||||
.result_unpriv = REJECT,
|
||||
},
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
},
|
||||
.fixup_map_hash_16b = { 4 },
|
||||
.result_unpriv = REJECT,
|
||||
.errstr_unpriv = "R1 tried to add from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 has pointer with unsupported alu operation",
|
||||
.result = ACCEPT,
|
||||
},
|
||||
{
|
||||
@@ -94,6 +94,6 @@
|
||||
},
|
||||
.fixup_map_hash_16b = { 4 },
|
||||
.result_unpriv = REJECT,
|
||||
.errstr_unpriv = "R1 tried to add from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R0 has pointer with unsupported alu operation",
|
||||
.result = ACCEPT,
|
||||
},
|
||||
|
||||
@@ -505,7 +505,7 @@
|
||||
BPF_STX_MEM(BPF_DW, BPF_REG_1, BPF_REG_0, -8),
|
||||
BPF_EXIT_INSN(),
|
||||
},
|
||||
.errstr_unpriv = "R1 tried to add from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R1 stack pointer arithmetic goes out of range",
|
||||
.result_unpriv = REJECT,
|
||||
.result = ACCEPT,
|
||||
},
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
.fixup_map_hash_16b = { 5 },
|
||||
.fixup_map_array_48b = { 8 },
|
||||
.result = ACCEPT,
|
||||
.result_unpriv = REJECT,
|
||||
.errstr_unpriv = "R1 tried to add from different maps",
|
||||
.retval = 1,
|
||||
},
|
||||
{
|
||||
@@ -122,7 +120,7 @@
|
||||
.fixup_map_array_48b = { 1 },
|
||||
.result = ACCEPT,
|
||||
.result_unpriv = REJECT,
|
||||
.errstr_unpriv = "R2 tried to add from different pointers or scalars",
|
||||
.errstr_unpriv = "R2 tried to add from different maps, paths or scalars",
|
||||
.retval = 0,
|
||||
},
|
||||
{
|
||||
@@ -169,7 +167,7 @@
|
||||
.fixup_map_array_48b = { 1 },
|
||||
.result = ACCEPT,
|
||||
.result_unpriv = REJECT,
|
||||
.errstr_unpriv = "R2 tried to add from different maps, paths, or prohibited types",
|
||||
.errstr_unpriv = "R2 tried to add from different maps, paths or scalars",
|
||||
.retval = 0,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user