Skip to content

Commit 180f3bc

Browse files
committed
Merge tag 'net-5.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Networking fixes, including fixes from mac80211, wifi, bpf. Relatively large batches of fixes from BPF and the WiFi stack, calm in general networking. Current release - regressions: - dpaa2-eth: fix buffer overrun when reporting ethtool statistics Current release - new code bugs: - bpf: fix incorrect state pruning for <8B spill/fill - iavf: - add missing unlocks in iavf_watchdog_task() - do not override the adapter state in the watchdog task (again) - mlxsw: spectrum_router: consolidate MAC profiles when possible Previous releases - regressions: - mac80211 fixes: - rate control, avoid driver crash for retransmitted frames - regression in SSN handling of addba tx - a memory leak where sta_info is not freed - marking TX-during-stop for TX in in_reconfig, prevent stall - cfg80211: acquire wiphy mutex on regulatory work - wifi drivers: fix build regressions and LED config dependency - virtio_net: fix rx_drops stat for small pkts - dsa: mv88e6xxx: unforce speed & duplex in mac_link_down() Previous releases - always broken: - bpf fixes: - kernel address leakage in atomic fetch - kernel address leakage in atomic cmpxchg's r0 aux reg - signed bounds propagation after mov32 - extable fixup offset - extable address check - mac80211: - fix the size used for building probe request - send ADDBA requests using the tid/queue of the aggregation session - agg-tx: don't schedule_and_wake_txq() under sta->lock, avoid deadlocks - validate extended element ID is present - mptcp: - never allow the PM to close a listener subflow (null-defer) - clear 'kern' flag from fallback sockets, prevent crash - fix deadlock in __mptcp_push_pending() - inet_diag: fix kernel-infoleak for UDP sockets - xsk: do not sleep in poll() when need_wakeup set - smc: avoid very long waits in smc_release() - sch_ets: don't remove idle classes from the round-robin list - netdevsim: - zero-initialize memory for bpf map's value, prevent info leak - don't let user space overwrite read only (max) ethtool parms - ixgbe: set X550 MDIO speed before talking to PHY - stmmac: - fix null-deref in flower deletion w/ VLAN prio Rx steering - dwmac-rk: fix oob read in rk_gmac_setup - ice: time stamping fixes - systemport: add global locking for descriptor life cycle" * tag 'net-5.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (89 commits) bpf, selftests: Fix racing issue in btf_skc_cls_ingress test selftest/bpf: Add a test that reads various addresses. bpf: Fix extable address check. bpf: Fix extable fixup offset. bpf, selftests: Add test case trying to taint map value pointer bpf: Make 32->64 bounds propagation slightly more robust bpf: Fix signed bounds propagation after mov32 sit: do not call ipip6_dev_free() from sit_init_net() net: systemport: Add global locking for descriptor lifecycle net/smc: Prevent smc_release() from long blocking net: Fix double 0x prefix print in SKB dump virtio_net: fix rx_drops stat for small pkts dsa: mv88e6xxx: fix debug print for SPEED_UNFORCED sfc_ef100: potential dereference of null pointer net: stmmac: dwmac-rk: fix oob read in rk_gmac_setup net: usb: lan78xx: add Allied Telesis AT29M2-AF net/packet: rx_owner_map depends on pg_vec netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc dpaa2-eth: fix ethtool statistics ixgbe: set X550 MDIO speed before talking to PHY ...
2 parents 93db830 + 0c3e247 commit 180f3bc

Some content is hidden

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

81 files changed

+881
-198
lines changed

Documentation/networking/device_drivers/ethernet/intel/ixgbe.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,22 @@ NOTE: For 82599-based network connections, if you are enabling jumbo frames in
440440
a virtual function (VF), jumbo frames must first be enabled in the physical
441441
function (PF). The VF MTU setting cannot be larger than the PF MTU.
442442

443+
NBASE-T Support
444+
---------------
445+
The ixgbe driver supports NBASE-T on some devices. However, the advertisement
446+
of NBASE-T speeds is suppressed by default, to accommodate broken network
447+
switches which cannot cope with advertised NBASE-T speeds. Use the ethtool
448+
command to enable advertising NBASE-T speeds on devices which support it::
449+
450+
ethtool -s eth? advertise 0x1800000001028
451+
452+
On Linux systems with INTERFACES(5), this can be specified as a pre-up command
453+
in /etc/network/interfaces so that the interface is always brought up with
454+
NBASE-T support, e.g.::
455+
456+
iface eth? inet dhcp
457+
pre-up ethtool -s eth? advertise 0x1800000001028 || true
458+
443459
Generic Receive Offload, aka GRO
444460
--------------------------------
445461
The driver supports the in-kernel software implementation of GRO. GRO has

MAINTAINERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3066,7 +3066,7 @@ F: Documentation/devicetree/bindings/phy/phy-ath79-usb.txt
30663066
F: drivers/phy/qualcomm/phy-ath79-usb.c
30673067

30683068
ATHEROS ATH GENERIC UTILITIES
3069-
M: Kalle Valo <kvalo@codeaurora.org>
3069+
M: Kalle Valo <kvalo@kernel.org>
30703070
30713071
S: Supported
30723072
F: drivers/net/wireless/ath/*
@@ -3081,7 +3081,7 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/ath5k
30813081
F: drivers/net/wireless/ath/ath5k/
30823082

30833083
ATHEROS ATH6KL WIRELESS DRIVER
3084-
M: Kalle Valo <kvalo@codeaurora.org>
3084+
M: Kalle Valo <kvalo@kernel.org>
30853085
30863086
S: Supported
30873087
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
@@ -13248,7 +13248,7 @@ F: include/uapi/linux/if_*
1324813248
F: include/uapi/linux/netdevice.h
1324913249

1325013250
NETWORKING DRIVERS (WIRELESS)
13251-
M: Kalle Valo <kvalo@codeaurora.org>
13251+
M: Kalle Valo <kvalo@kernel.org>
1325213252
1325313253
S: Maintained
1325413254
Q: http://patchwork.kernel.org/project/linux-wireless/list/
@@ -15704,15 +15704,15 @@ T: git git://linuxtv.org/anttip/media_tree.git
1570415704
F: drivers/media/tuners/qt1010*
1570515705

1570615706
QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
15707-
M: Kalle Valo <kvalo@codeaurora.org>
15707+
M: Kalle Valo <kvalo@kernel.org>
1570815708
1570915709
S: Supported
1571015710
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
1571115711
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
1571215712
F: drivers/net/wireless/ath/ath10k/
1571315713

1571415714
QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
15715-
M: Kalle Valo <kvalo@codeaurora.org>
15715+
M: Kalle Valo <kvalo@kernel.org>
1571615716
1571715717
S: Supported
1571815718
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
@@ -15885,7 +15885,7 @@ F: Documentation/devicetree/bindings/media/*venus*
1588515885
F: drivers/media/platform/qcom/venus/
1588615886

1588715887
QUALCOMM WCN36XX WIRELESS DRIVER
15888-
M: Kalle Valo <kvalo@codeaurora.org>
15888+
M: Kalle Valo <kvalo@kernel.org>
1588915889
1589015890
S: Supported
1589115891
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx

arch/x86/net/bpf_jit_comp.c

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,19 +1252,54 @@ st: if (is_imm8(insn->off))
12521252
case BPF_LDX | BPF_MEM | BPF_DW:
12531253
case BPF_LDX | BPF_PROBE_MEM | BPF_DW:
12541254
if (BPF_MODE(insn->code) == BPF_PROBE_MEM) {
1255-
/* test src_reg, src_reg */
1256-
maybe_emit_mod(&prog, src_reg, src_reg, true); /* always 1 byte */
1257-
EMIT2(0x85, add_2reg(0xC0, src_reg, src_reg));
1258-
/* jne start_of_ldx */
1259-
EMIT2(X86_JNE, 0);
1255+
/* Though the verifier prevents negative insn->off in BPF_PROBE_MEM
1256+
* add abs(insn->off) to the limit to make sure that negative
1257+
* offset won't be an issue.
1258+
* insn->off is s16, so it won't affect valid pointers.
1259+
*/
1260+
u64 limit = TASK_SIZE_MAX + PAGE_SIZE + abs(insn->off);
1261+
u8 *end_of_jmp1, *end_of_jmp2;
1262+
1263+
/* Conservatively check that src_reg + insn->off is a kernel address:
1264+
* 1. src_reg + insn->off >= limit
1265+
* 2. src_reg + insn->off doesn't become small positive.
1266+
* Cannot do src_reg + insn->off >= limit in one branch,
1267+
* since it needs two spare registers, but JIT has only one.
1268+
*/
1269+
1270+
/* movabsq r11, limit */
1271+
EMIT2(add_1mod(0x48, AUX_REG), add_1reg(0xB8, AUX_REG));
1272+
EMIT((u32)limit, 4);
1273+
EMIT(limit >> 32, 4);
1274+
/* cmp src_reg, r11 */
1275+
maybe_emit_mod(&prog, src_reg, AUX_REG, true);
1276+
EMIT2(0x39, add_2reg(0xC0, src_reg, AUX_REG));
1277+
/* if unsigned '<' goto end_of_jmp2 */
1278+
EMIT2(X86_JB, 0);
1279+
end_of_jmp1 = prog;
1280+
1281+
/* mov r11, src_reg */
1282+
emit_mov_reg(&prog, true, AUX_REG, src_reg);
1283+
/* add r11, insn->off */
1284+
maybe_emit_1mod(&prog, AUX_REG, true);
1285+
EMIT2_off32(0x81, add_1reg(0xC0, AUX_REG), insn->off);
1286+
/* jmp if not carry to start_of_ldx
1287+
* Otherwise ERR_PTR(-EINVAL) + 128 will be the user addr
1288+
* that has to be rejected.
1289+
*/
1290+
EMIT2(0x73 /* JNC */, 0);
1291+
end_of_jmp2 = prog;
1292+
12601293
/* xor dst_reg, dst_reg */
12611294
emit_mov_imm32(&prog, false, dst_reg, 0);
12621295
/* jmp byte_after_ldx */
12631296
EMIT2(0xEB, 0);
12641297

1265-
/* populate jmp_offset for JNE above */
1266-
temp[4] = prog - temp - 5 /* sizeof(test + jne) */;
1298+
/* populate jmp_offset for JB above to jump to xor dst_reg */
1299+
end_of_jmp1[-1] = end_of_jmp2 - end_of_jmp1;
1300+
/* populate jmp_offset for JNC above to jump to start_of_ldx */
12671301
start_of_ldx = prog;
1302+
end_of_jmp2[-1] = start_of_ldx - end_of_jmp2;
12681303
}
12691304
emit_ldx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off);
12701305
if (BPF_MODE(insn->code) == BPF_PROBE_MEM) {
@@ -1305,7 +1340,7 @@ st: if (is_imm8(insn->off))
13051340
* End result: x86 insn "mov rbx, qword ptr [rax+0x14]"
13061341
* of 4 bytes will be ignored and rbx will be zero inited.
13071342
*/
1308-
ex->fixup = (prog - temp) | (reg2pt_regs[dst_reg] << 8);
1343+
ex->fixup = (prog - start_of_ldx) | (reg2pt_regs[dst_reg] << 8);
13091344
}
13101345
break;
13111346

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,10 @@ static void mv88e6xxx_mac_link_down(struct dsa_switch *ds, int port,
768768
if ((!mv88e6xxx_port_ppu_updates(chip, port) ||
769769
mode == MLO_AN_FIXED) && ops->port_sync_link)
770770
err = ops->port_sync_link(chip, port, mode, false);
771+
772+
if (!err && ops->port_set_speed_duplex)
773+
err = ops->port_set_speed_duplex(chip, port, SPEED_UNFORCED,
774+
DUPLEX_UNFORCED);
771775
mv88e6xxx_reg_unlock(chip);
772776

773777
if (err)

drivers/net/dsa/mv88e6xxx/port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ static int mv88e6xxx_port_set_speed_duplex(struct mv88e6xxx_chip *chip,
283283
if (err)
284284
return err;
285285

286-
if (speed)
286+
if (speed != SPEED_UNFORCED)
287287
dev_dbg(chip->dev, "p%d: Speed set to %d Mbps\n", port, speed);
288288
else
289289
dev_dbg(chip->dev, "p%d: Speed unforced\n", port);
@@ -516,7 +516,7 @@ int mv88e6393x_port_set_speed_duplex(struct mv88e6xxx_chip *chip, int port,
516516
if (err)
517517
return err;
518518

519-
if (speed)
519+
if (speed != SPEED_UNFORCED)
520520
dev_dbg(chip->dev, "p%d: Speed set to %d Mbps\n", port, speed);
521521
else
522522
dev_dbg(chip->dev, "p%d: Speed unforced\n", port);

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,11 +1309,11 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,
13091309
struct bcm_sysport_priv *priv = netdev_priv(dev);
13101310
struct device *kdev = &priv->pdev->dev;
13111311
struct bcm_sysport_tx_ring *ring;
1312+
unsigned long flags, desc_flags;
13121313
struct bcm_sysport_cb *cb;
13131314
struct netdev_queue *txq;
13141315
u32 len_status, addr_lo;
13151316
unsigned int skb_len;
1316-
unsigned long flags;
13171317
dma_addr_t mapping;
13181318
u16 queue;
13191319
int ret;
@@ -1373,8 +1373,10 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,
13731373
ring->desc_count--;
13741374

13751375
/* Ports are latched, so write upper address first */
1376+
spin_lock_irqsave(&priv->desc_lock, desc_flags);
13761377
tdma_writel(priv, len_status, TDMA_WRITE_PORT_HI(ring->index));
13771378
tdma_writel(priv, addr_lo, TDMA_WRITE_PORT_LO(ring->index));
1379+
spin_unlock_irqrestore(&priv->desc_lock, desc_flags);
13781380

13791381
/* Check ring space and update SW control flow */
13801382
if (ring->desc_count == 0)
@@ -2013,6 +2015,7 @@ static int bcm_sysport_open(struct net_device *dev)
20132015
}
20142016

20152017
/* Initialize both hardware and software ring */
2018+
spin_lock_init(&priv->desc_lock);
20162019
for (i = 0; i < dev->num_tx_queues; i++) {
20172020
ret = bcm_sysport_init_tx_ring(priv, i);
20182021
if (ret) {

drivers/net/ethernet/broadcom/bcmsysport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ struct bcm_sysport_priv {
711711
int wol_irq;
712712

713713
/* Transmit rings */
714+
spinlock_t desc_lock;
714715
struct bcm_sysport_tx_ring *tx_rings;
715716

716717
/* Receive queue */

drivers/net/ethernet/broadcom/genet/bcmmii.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,9 @@ static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv)
589589
* Internal or external PHY with MDIO access
590590
*/
591591
phydev = phy_attach(priv->dev, phy_name, pd->phy_interface);
592-
if (!phydev) {
592+
if (IS_ERR(phydev)) {
593593
dev_err(kdev, "failed to register PHY device\n");
594-
return -ENODEV;
594+
return PTR_ERR(phydev);
595595
}
596596
} else {
597597
/*

drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ struct dpaa2_eth_ch_stats {
388388
__u64 bytes_per_cdan;
389389
};
390390

391+
#define DPAA2_ETH_CH_STATS 7
392+
391393
/* Maximum number of queues associated with a DPNI */
392394
#define DPAA2_ETH_MAX_TCS 8
393395
#define DPAA2_ETH_MAX_RX_QUEUES_PER_TC 16

drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static void dpaa2_eth_get_ethtool_stats(struct net_device *net_dev,
278278
/* Per-channel stats */
279279
for (k = 0; k < priv->num_channels; k++) {
280280
ch_stats = &priv->channel[k]->stats;
281-
for (j = 0; j < sizeof(*ch_stats) / sizeof(__u64) - 1; j++)
281+
for (j = 0; j < DPAA2_ETH_CH_STATS; j++)
282282
*((__u64 *)data + i + j) += *((__u64 *)ch_stats + j);
283283
}
284284
i += j;

0 commit comments

Comments
 (0)