Skip to content

Commit 829cca4

Browse files
committed
Merge tag 'net-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bpf, and bluetooth. Not all that quiet given spring celebrations, but "current" fixes are thinning out, which is encouraging. One outstanding regression in the mlx5 driver when using old FW, not blocking but we're pushing for a fix. Current release - new code bugs: - eth: enetc: workaround for unresponsive pMAC after receiving express traffic Previous releases - regressions: - rtnetlink: restore RTM_NEW/DELLINK notification behavior, keep the pid/seq fields 0 for backward compatibility Previous releases - always broken: - sctp: fix a potential overflow in sctp_ifwdtsn_skip - mptcp: - use mptcp_schedule_work instead of open-coding it and make the worker check stricter, to avoid scheduling work on closed sockets - fix NULL pointer dereference on fastopen early fallback - skbuff: fix memory corruption due to a race between skb coalescing and releasing clones confusing page_pool reference counting - bonding: fix neighbor solicitation validation on backup slaves - bpf: tcp: use sock_gen_put instead of sock_put in bpf_iter_tcp - bpf: arm64: fixed a BTI error on returning to patched function - openvswitch: fix race on port output leading to inf loop - sfp: initialize sfp->i2c_block_size at sfp allocation to avoid returning a different errno than expected - phy: nxp-c45-tja11xx: unregister PTP, purge queues on remove - Bluetooth: fix printing errors if LE Connection times out - Bluetooth: assorted UaF, deadlock and data race fixes - eth: macb: fix memory corruption in extended buffer descriptor mode Misc: - adjust the XDP Rx flow hash API to also include the protocol layers over which the hash was computed" * tag 'net-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (50 commits) selftests/bpf: Adjust bpf_xdp_metadata_rx_hash for new arg mlx4: bpf_xdp_metadata_rx_hash add xdp rss hash type veth: bpf_xdp_metadata_rx_hash add xdp rss hash type mlx5: bpf_xdp_metadata_rx_hash add xdp rss hash type xdp: rss hash types representation selftests/bpf: xdp_hw_metadata remove bpf_printk and add counters skbuff: Fix a race between coalescing and releasing SKBs net: macb: fix a memory corruption in extended buffer descriptor mode selftests: add the missing CONFIG_IP_SCTP in net config udp6: fix potential access to stale information selftests: openvswitch: adjust datapath NL message declaration selftests: mptcp: userspace pm: uniform verify events mptcp: fix NULL pointer dereference on fastopen early fallback mptcp: stricter state check in mptcp_worker mptcp: use mptcp_schedule_work instead of open-coding it net: enetc: workaround for unresponsive pMAC after receiving express traffic sctp: fix a potential overflow in sctp_ifwdtsn_skip net: qrtr: Fix an uninit variable access bug in qrtr_tx_resume() rtnetlink: Restore RTM_NEW/DELLINK notification behavior net: ti/cpsw: Add explicit platform_device.h and of_platform.h includes ...
2 parents 4413ad0 + d0f89c4 commit 829cca4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+990
-517
lines changed

Documentation/networking/ip-sysctl.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ tcp_app_win - INTEGER
340340
Reserve max(window/2^tcp_app_win, mss) of window for application
341341
buffer. Value 0 is special, it means that nothing is reserved.
342342

343+
Possible values are [0, 31], inclusive.
344+
343345
Default: 31
344346

345347
tcp_autocorking - BOOLEAN

arch/arm64/net/bpf_jit.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,8 @@
281281
/* DMB */
282282
#define A64_DMB_ISH aarch64_insn_gen_dmb(AARCH64_INSN_MB_ISH)
283283

284+
/* ADR */
285+
#define A64_ADR(Rd, offset) \
286+
aarch64_insn_gen_adr(0, offset, Rd, AARCH64_INSN_ADR_TYPE_ADR)
287+
284288
#endif /* _BPF_JIT_H */

arch/arm64/net/bpf_jit_comp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1900,7 +1900,8 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
19001900
restore_args(ctx, args_off, nargs);
19011901
/* call original func */
19021902
emit(A64_LDR64I(A64_R(10), A64_SP, retaddr_off), ctx);
1903-
emit(A64_BLR(A64_R(10)), ctx);
1903+
emit(A64_ADR(A64_LR, AARCH64_INSN_SIZE * 2), ctx);
1904+
emit(A64_RET(A64_R(10)), ctx);
19041905
/* store return value */
19051906
emit(A64_STR64I(A64_R(0), A64_SP, retval_off), ctx);
19061907
/* reserve a nop for bpf_tramp_image_put */

arch/loongarch/net/bpf_jit.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,10 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext
10221022
emit_atomic(insn, ctx);
10231023
break;
10241024

1025+
/* Speculation barrier */
1026+
case BPF_ST | BPF_NOSPEC:
1027+
break;
1028+
10251029
default:
10261030
pr_err("bpf_jit: unknown opcode %02x\n", code);
10271031
return -EINVAL;

drivers/bluetooth/btbcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ static const char *btbcm_get_board_name(struct device *dev)
511511
len = strlen(tmp) + 1;
512512
board_type = devm_kzalloc(dev, len, GFP_KERNEL);
513513
strscpy(board_type, tmp, len);
514-
for (i = 0; i < board_type[i]; i++) {
514+
for (i = 0; i < len; i++) {
515515
if (board_type[i] == '/')
516516
board_type[i] = '-';
517517
}

drivers/bluetooth/btsdio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ static void btsdio_remove(struct sdio_func *func)
358358
if (!data)
359359
return;
360360

361+
cancel_work_sync(&data->work);
361362
hdev = data->hdev;
362363

363364
sdio_set_drvdata(func, NULL);

drivers/net/bonding/bond_main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,7 +3269,8 @@ static int bond_na_rcv(const struct sk_buff *skb, struct bonding *bond,
32693269

32703270
combined = skb_header_pointer(skb, 0, sizeof(_combined), &_combined);
32713271
if (!combined || combined->ip6.nexthdr != NEXTHDR_ICMP ||
3272-
combined->icmp6.icmp6_type != NDISC_NEIGHBOUR_ADVERTISEMENT)
3272+
(combined->icmp6.icmp6_type != NDISC_NEIGHBOUR_SOLICITATION &&
3273+
combined->icmp6.icmp6_type != NDISC_NEIGHBOUR_ADVERTISEMENT))
32733274
goto out;
32743275

32753276
saddr = &combined->ip6.saddr;
@@ -3291,7 +3292,7 @@ static int bond_na_rcv(const struct sk_buff *skb, struct bonding *bond,
32913292
else if (curr_active_slave &&
32923293
time_after(slave_last_rx(bond, curr_active_slave),
32933294
curr_active_slave->last_link_up))
3294-
bond_validate_na(bond, slave, saddr, daddr);
3295+
bond_validate_na(bond, slave, daddr, saddr);
32953296
else if (curr_arp_slave &&
32963297
bond_time_in_interval(bond, slave_last_tx(curr_arp_slave), 1))
32973298
bond_validate_na(bond, slave, saddr, daddr);

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,10 @@ static dma_addr_t macb_get_addr(struct macb *bp, struct macb_dma_desc *desc)
10641064
}
10651065
#endif
10661066
addr |= MACB_BF(RX_WADDR, MACB_BFEXT(RX_WADDR, desc->addr));
1067+
#ifdef CONFIG_MACB_USE_HWSTAMP
1068+
if (bp->hw_dma_cap & HW_DMA_CAP_PTP)
1069+
addr &= ~GEM_BIT(DMA_RXVALID);
1070+
#endif
10671071
return addr;
10681072
}
10691073

drivers/net/ethernet/freescale/enetc/enetc_ethtool.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,20 @@ static int enetc_get_mm(struct net_device *ndev, struct ethtool_mm_state *state)
989989
return 0;
990990
}
991991

992+
/* FIXME: Workaround for the link partner's verification failing if ENETC
993+
* priorly received too much express traffic. The documentation doesn't
994+
* suggest this is needed.
995+
*/
996+
static void enetc_restart_emac_rx(struct enetc_si *si)
997+
{
998+
u32 val = enetc_port_rd(&si->hw, ENETC_PM0_CMD_CFG);
999+
1000+
enetc_port_wr(&si->hw, ENETC_PM0_CMD_CFG, val & ~ENETC_PM0_RX_EN);
1001+
1002+
if (val & ENETC_PM0_RX_EN)
1003+
enetc_port_wr(&si->hw, ENETC_PM0_CMD_CFG, val);
1004+
}
1005+
9921006
static int enetc_set_mm(struct net_device *ndev, struct ethtool_mm_cfg *cfg,
9931007
struct netlink_ext_ack *extack)
9941008
{
@@ -1040,6 +1054,8 @@ static int enetc_set_mm(struct net_device *ndev, struct ethtool_mm_cfg *cfg,
10401054

10411055
enetc_port_wr(hw, ENETC_MMCSR, val);
10421056

1057+
enetc_restart_emac_rx(priv->si);
1058+
10431059
mutex_unlock(&priv->mm_lock);
10441060

10451061
return 0;

drivers/net/ethernet/intel/iavf/iavf.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ enum iavf_vsi_state_t {
5959
struct iavf_vsi {
6060
struct iavf_adapter *back;
6161
struct net_device *netdev;
62-
unsigned long active_cvlans[BITS_TO_LONGS(VLAN_N_VID)];
63-
unsigned long active_svlans[BITS_TO_LONGS(VLAN_N_VID)];
6462
u16 seid;
6563
u16 id;
6664
DECLARE_BITMAP(state, __IAVF_VSI_STATE_SIZE__);
@@ -158,15 +156,20 @@ struct iavf_vlan {
158156
u16 tpid;
159157
};
160158

159+
enum iavf_vlan_state_t {
160+
IAVF_VLAN_INVALID,
161+
IAVF_VLAN_ADD, /* filter needs to be added */
162+
IAVF_VLAN_IS_NEW, /* filter is new, wait for PF answer */
163+
IAVF_VLAN_ACTIVE, /* filter is accepted by PF */
164+
IAVF_VLAN_DISABLE, /* filter needs to be deleted by PF, then marked INACTIVE */
165+
IAVF_VLAN_INACTIVE, /* filter is inactive, we are in IFF_DOWN */
166+
IAVF_VLAN_REMOVE, /* filter needs to be removed from list */
167+
};
168+
161169
struct iavf_vlan_filter {
162170
struct list_head list;
163171
struct iavf_vlan vlan;
164-
struct {
165-
u8 is_new_vlan:1; /* filter is new, wait for PF answer */
166-
u8 remove:1; /* filter needs to be removed */
167-
u8 add:1; /* filter needs to be added */
168-
u8 padding:5;
169-
};
172+
enum iavf_vlan_state_t state;
170173
};
171174

172175
#define IAVF_MAX_TRAFFIC_CLASS 4
@@ -258,6 +261,7 @@ struct iavf_adapter {
258261
wait_queue_head_t vc_waitqueue;
259262
struct iavf_q_vector *q_vectors;
260263
struct list_head vlan_filter_list;
264+
int num_vlan_filters;
261265
struct list_head mac_filter_list;
262266
struct mutex crit_lock;
263267
struct mutex client_lock;

0 commit comments

Comments
 (0)