Skip to content

Commit

Permalink
Merge tag 'net-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Including fixes from bpf and netfilter.

  Previous releases - regressions:

   - Revert "net: rtnetlink: Enslave device before bringing it up",
     breaks the case inverse to the one it was trying to fix

   - net: dsa: fix oob access in DSA's netdevice event handler
     dereference netdev_priv() before check its a DSA port

   - sched: track device in tcf_block_get/put_ext() only for clsact
     binder types

   - net: tls, fix WARNING in __sk_msg_free when record becomes full
     during splice and MORE hint set

   - sfp-bus: fix SFP mode detect from bitrate

   - drv: stmmac: prevent DSA tags from breaking COE

  Previous releases - always broken:

   - bpf: fix no forward progress in in bpf_iter_udp if output buffer is
     too small

   - bpf: reject variable offset alu on registers with a type of
     PTR_TO_FLOW_KEYS to prevent oob access

   - netfilter: tighten input validation

   - net: add more sanity check in virtio_net_hdr_to_skb()

   - rxrpc: fix use of Don't Fragment flag on RESPONSE packets, avoid
     infinite loop

   - amt: do not use the portion of skb->cb area which may get clobbered

   - mptcp: improve validation of the MPTCPOPT_MP_JOIN MCTCP option

  Misc:

   - spring cleanup of inactive maintainers"

* tag 'net-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (88 commits)
  i40e: Include types.h to some headers
  ipv6: mcast: fix data-race in ipv6_mc_down / mld_ifc_work
  selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes
  selftests: mlxsw: qos_pfc: Remove wrong description
  mlxsw: spectrum_router: Register netdevice notifier before nexthop
  mlxsw: spectrum_acl_tcam: Fix stack corruption
  mlxsw: spectrum_acl_tcam: Fix NULL pointer dereference in error path
  mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure
  ethtool: netlink: Add missing ethnl_ops_begin/complete
  selftests: bonding: Add more missing config options
  selftests: netdevsim: add a config file
  libbpf: warn on unexpected __arg_ctx type when rewriting BTF
  selftests/bpf: add tests confirming type logic in kernel for __arg_ctx
  bpf: enforce types for __arg_ctx-tagged arguments in global subprogs
  bpf: extract bpf_ctx_convert_map logic and make it more reusable
  libbpf: feature-detect arg:ctx tag support in kernel
  ipvs: avoid stat macros calls from preemptible context
  netfilter: nf_tables: reject NFT_SET_CONCAT with not field length description
  netfilter: nf_tables: skip dead set elements in netlink dump
  netfilter: nf_tables: do not allow mismatch field size and set key length
  ...
  • Loading branch information
torvalds committed Jan 19, 2024
2 parents ed8d845 + 925781a commit 736b554
Show file tree
Hide file tree
Showing 90 changed files with 1,366 additions and 235 deletions.
17 changes: 17 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ E: [email protected]
P: 1024/AF7B30C1 CF 97 C2 CC 6D AE A7 FE C8 BA 9C FC 88 DE 32 C3
D: Linux/MIPS port
D: Linux/68k hacker
D: AX25 maintainer
S: Hauptstrasse 19
S: 79837 St. Blasien
S: Germany
Expand Down Expand Up @@ -677,6 +678,10 @@ D: Media subsystem (V4L/DVB) drivers and core
D: EDAC drivers and EDAC 3.0 core rework
S: Brazil

N: Landen Chao
E: [email protected]
D: MT7531 Ethernet switch support

N: Raymond Chen
E: [email protected]
D: Author of Configure script
Expand Down Expand Up @@ -814,6 +819,10 @@ D: Support for Xircom PGSDB9 (firmware and host driver)
S: Bucharest
S: Romania

N: John Crispin
E: [email protected]
D: MediaTek MT7623 Gigabit ethernet support

N: Laurence Culhane
E: [email protected]
D: Wrote the initial alpha SLIP code
Expand Down Expand Up @@ -1538,6 +1547,10 @@ N: Andrew Haylett
E: [email protected]
D: Selection mechanism

N: Johan Hedberg
E: [email protected]
D: Bluetooth subsystem maintainer

N: Andre Hedrick
E: [email protected]
E: [email protected]
Expand Down Expand Up @@ -3052,6 +3065,10 @@ S: Demonstratsii 8-382
S: Tula 300000
S: Russia

N: Thomas Petazzoni
E: [email protected]
D: Driver for the Marvell Armada 370/XP network unit.

N: Gordon Peters
E: [email protected]
D: Isochronous receive for IEEE 1394 driver (OHCI module).
Expand Down
16 changes: 4 additions & 12 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3390,9 +3390,8 @@ F: Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml
F: drivers/iio/adc/hx711.c

AX.25 NETWORK LAYER
M: Ralf Baechle <[email protected]>
L: [email protected]
S: Maintained
S: Orphan
W: https://linux-ax25.in-berlin.de
F: include/net/ax25.h
F: include/uapi/linux/ax25.h
Expand Down Expand Up @@ -3631,7 +3630,6 @@ F: drivers/mtd/devices/block2mtd.c

BLUETOOTH DRIVERS
M: Marcel Holtmann <[email protected]>
M: Johan Hedberg <[email protected]>
M: Luiz Augusto von Dentz <[email protected]>
L: [email protected]
S: Supported
Expand Down Expand Up @@ -4726,11 +4724,8 @@ F: drivers/i2c/busses/i2c-octeon*
F: drivers/i2c/busses/i2c-thunderx*

CAVIUM LIQUIDIO NETWORK DRIVER
M: Derek Chickles <[email protected]>
M: Satanand Burla <[email protected]>
M: Felix Manlunas <[email protected]>
L: [email protected]
S: Supported
S: Orphan
W: http://www.marvell.com
F: drivers/net/ethernet/cavium/liquidio/

Expand Down Expand Up @@ -10239,7 +10234,6 @@ IBM Power SRIOV Virtual NIC Device Driver
M: Haren Myneni <[email protected]>
M: Rick Lindsley <[email protected]>
R: Nick Child <[email protected]>
R: Dany Madden <[email protected]>
R: Thomas Falcon <[email protected]>
L: [email protected]
S: Supported
Expand Down Expand Up @@ -13003,10 +12997,10 @@ S: Maintained
F: drivers/thermal/armada_thermal.c

MARVELL MVNETA ETHERNET DRIVER
M: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
M: Marcin Wojtas <marcin.s.wojtas@gmail.com>
L: [email protected]
S: Maintained
F: drivers/net/ethernet/marvell/mvneta.*
F: drivers/net/ethernet/marvell/mvneta*

MARVELL MVPP2 ETHERNET DRIVER
M: Marcin Wojtas <[email protected]>
Expand Down Expand Up @@ -13656,7 +13650,6 @@ F: drivers/dma/mediatek/

MEDIATEK ETHERNET DRIVER
M: Felix Fietkau <[email protected]>
M: John Crispin <[email protected]>
M: Sean Wang <[email protected]>
M: Mark Lee <[email protected]>
M: Lorenzo Bianconi <[email protected]>
Expand Down Expand Up @@ -13812,7 +13805,6 @@ F: include/soc/mediatek/smi.h
MEDIATEK SWITCH DRIVER
M: Arınç ÜNAL <[email protected]>
M: Daniel Golle <[email protected]>
M: Landen Chao <[email protected]>
M: DENG Qingfang <[email protected]>
M: Sean Wang <[email protected]>
L: [email protected]
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/amt.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <linux/net.h>
#include <linux/igmp.h>
#include <linux/workqueue.h>
#include <net/sch_generic.h>
#include <net/pkt_sched.h>
#include <net/net_namespace.h>
#include <net/ip.h>
#include <net/udp.h>
Expand Down Expand Up @@ -80,11 +80,11 @@ static struct mld2_grec mldv2_zero_grec;

static struct amt_skb_cb *amt_skb_cb(struct sk_buff *skb)
{
BUILD_BUG_ON(sizeof(struct amt_skb_cb) + sizeof(struct qdisc_skb_cb) >
BUILD_BUG_ON(sizeof(struct amt_skb_cb) + sizeof(struct tc_skb_cb) >
sizeof_field(struct sk_buff, cb));

return (struct amt_skb_cb *)((void *)skb->cb +
sizeof(struct qdisc_skb_cb));
sizeof(struct tc_skb_cb));
}

static void __amt_source_gc_work(void)
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/dsa/vitesse-vsc73xx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,8 @@ static int vsc73xx_gpio_probe(struct vsc73xx *vsc)

vsc->gc.label = devm_kasprintf(vsc->dev, GFP_KERNEL, "VSC%04x",
vsc->chipid);
if (!vsc->gc.label)
return -ENOMEM;
vsc->gc.ngpio = 4;
vsc->gc.owner = THIS_MODULE;
vsc->gc.parent = vsc->dev;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ int cn23xx_get_vf_stats(struct octeon_device *oct, int vfidx,
mbox_cmd.q_no = vfidx * oct->sriov_info.rings_per_vf;
mbox_cmd.recv_len = 0;
mbox_cmd.recv_status = 0;
mbox_cmd.fn = (octeon_mbox_callback_t)cn23xx_get_vf_stats_callback;
mbox_cmd.fn = cn23xx_get_vf_stats_callback;
ctx.stats = stats;
atomic_set(&ctx.status, 0);
mbox_cmd.fn_arg = (void *)&ctx;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ int cn23xx_octeon_pfvf_handshake(struct octeon_device *oct)
mbox_cmd.q_no = 0;
mbox_cmd.recv_len = 0;
mbox_cmd.recv_status = 0;
mbox_cmd.fn = (octeon_mbox_callback_t)octeon_pfvf_hs_callback;
mbox_cmd.fn = octeon_pfvf_hs_callback;
mbox_cmd.fn_arg = &status;

octeon_mbox_write(oct, &mbox_cmd);
Expand Down
5 changes: 4 additions & 1 deletion drivers/net/ethernet/cavium/liquidio/octeon_mailbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ union octeon_mbox_message {
} s;
};

typedef void (*octeon_mbox_callback_t)(void *, void *, void *);
struct octeon_mbox_cmd;

typedef void (*octeon_mbox_callback_t)(struct octeon_device *,
struct octeon_mbox_cmd *, void *);

struct octeon_mbox_cmd {
union octeon_mbox_message msg;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#define _I40E_ADMINQ_CMD_H_

#include <linux/bits.h>
#include <linux/types.h>

/* This header file defines the i40e Admin Queue commands and is shared between
* i40e Firmware and Software.
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/i40e/i40e_diag.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#ifndef _I40E_DIAG_H_
#define _I40E_DIAG_H_

#include <linux/types.h>
#include "i40e_adminq_cmd.h"

/* forward-declare the HW struct for the compiler */
Expand Down
7 changes: 6 additions & 1 deletion drivers/net/ethernet/marvell/octeontx2/af/rpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,14 +506,19 @@ u32 rpm2_get_lmac_fifo_len(void *rpmd, int lmac_id)
rpm_t *rpm = rpmd;
u8 num_lmacs;
u32 fifo_len;
u16 max_lmac;

lmac_info = rpm_read(rpm, 0, RPM2_CMRX_RX_LMACS);
/* LMACs are divided into two groups and each group
* gets half of the FIFO
* Group0 lmac_id range {0..3}
* Group1 lmac_id range {4..7}
*/
fifo_len = rpm->mac_ops->fifo_len / 2;
max_lmac = (rpm_read(rpm, 0, CGX_CONST) >> 24) & 0xFF;
if (max_lmac > 4)
fifo_len = rpm->mac_ops->fifo_len / 2;
else
fifo_len = rpm->mac_ops->fifo_len;

if (lmac_id < 4) {
num_lmacs = hweight8(lmac_info & 0xF);
Expand Down
8 changes: 5 additions & 3 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ mlxsw_sp_acl_erp_table_alloc(struct mlxsw_sp_acl_erp_core *erp_core,
unsigned long *p_index)
{
unsigned int num_rows, entry_size;
unsigned long index;

/* We only allow allocations of entire rows */
if (num_erps % erp_core->num_erp_banks != 0)
Expand All @@ -309,10 +310,11 @@ mlxsw_sp_acl_erp_table_alloc(struct mlxsw_sp_acl_erp_core *erp_core,
entry_size = erp_core->erpt_entries_size[region_type];
num_rows = num_erps / erp_core->num_erp_banks;

*p_index = gen_pool_alloc(erp_core->erp_tables, num_rows * entry_size);
if (*p_index == 0)
index = gen_pool_alloc(erp_core->erp_tables, num_rows * entry_size);
if (!index)
return -ENOBUFS;
*p_index -= MLXSW_SP_ACL_ERP_GENALLOC_OFFSET;

*p_index = index - MLXSW_SP_ACL_ERP_GENALLOC_OFFSET;

return 0;
}
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,13 +681,13 @@ static void
mlxsw_sp_acl_tcam_region_destroy(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_acl_tcam_region *region)
{
struct mlxsw_sp_acl_tcam *tcam = mlxsw_sp_acl_to_tcam(mlxsw_sp->acl);
const struct mlxsw_sp_acl_tcam_ops *ops = mlxsw_sp->acl_tcam_ops;

ops->region_fini(mlxsw_sp, region->priv);
mlxsw_sp_acl_tcam_region_disable(mlxsw_sp, region);
mlxsw_sp_acl_tcam_region_free(mlxsw_sp, region);
mlxsw_sp_acl_tcam_region_id_put(region->group->tcam,
region->id);
mlxsw_sp_acl_tcam_region_id_put(tcam, region->id);
kfree(region);
}

Expand Down Expand Up @@ -1564,6 +1564,8 @@ int mlxsw_sp_acl_tcam_init(struct mlxsw_sp *mlxsw_sp,
tcam->max_groups = max_groups;
tcam->max_group_size = MLXSW_CORE_RES_GET(mlxsw_sp->core,
ACL_MAX_GROUP_SIZE);
tcam->max_group_size = min_t(unsigned int, tcam->max_group_size,
MLXSW_REG_PAGT_ACL_MAX_NUM);

err = ops->init(mlxsw_sp, tcam->priv, tcam);
if (err)
Expand Down
24 changes: 12 additions & 12 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
Original file line number Diff line number Diff line change
Expand Up @@ -11472,6 +11472,13 @@ int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp,
if (err)
goto err_register_netevent_notifier;

mlxsw_sp->router->netdevice_nb.notifier_call =
mlxsw_sp_router_netdevice_event;
err = register_netdevice_notifier_net(mlxsw_sp_net(mlxsw_sp),
&mlxsw_sp->router->netdevice_nb);
if (err)
goto err_register_netdev_notifier;

mlxsw_sp->router->nexthop_nb.notifier_call =
mlxsw_sp_nexthop_obj_event;
err = register_nexthop_notifier(mlxsw_sp_net(mlxsw_sp),
Expand All @@ -11487,22 +11494,15 @@ int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp,
if (err)
goto err_register_fib_notifier;

mlxsw_sp->router->netdevice_nb.notifier_call =
mlxsw_sp_router_netdevice_event;
err = register_netdevice_notifier_net(mlxsw_sp_net(mlxsw_sp),
&mlxsw_sp->router->netdevice_nb);
if (err)
goto err_register_netdev_notifier;

return 0;

err_register_netdev_notifier:
unregister_fib_notifier(mlxsw_sp_net(mlxsw_sp),
&mlxsw_sp->router->fib_nb);
err_register_fib_notifier:
unregister_nexthop_notifier(mlxsw_sp_net(mlxsw_sp),
&mlxsw_sp->router->nexthop_nb);
err_register_nexthop_notifier:
unregister_netdevice_notifier_net(mlxsw_sp_net(mlxsw_sp),
&router->netdevice_nb);
err_register_netdev_notifier:
unregister_netevent_notifier(&mlxsw_sp->router->netevent_nb);
err_register_netevent_notifier:
unregister_inet6addr_validator_notifier(&router->inet6addr_valid_nb);
Expand Down Expand Up @@ -11550,11 +11550,11 @@ void mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp)
{
struct mlxsw_sp_router *router = mlxsw_sp->router;

unregister_netdevice_notifier_net(mlxsw_sp_net(mlxsw_sp),
&router->netdevice_nb);
unregister_fib_notifier(mlxsw_sp_net(mlxsw_sp), &router->fib_nb);
unregister_nexthop_notifier(mlxsw_sp_net(mlxsw_sp),
&router->nexthop_nb);
unregister_netdevice_notifier_net(mlxsw_sp_net(mlxsw_sp),
&router->netdevice_nb);
unregister_netevent_notifier(&router->netevent_nb);
unregister_inet6addr_validator_notifier(&router->inet6addr_valid_nb);
unregister_inetaddr_validator_notifier(&router->inetaddr_valid_nb);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/neterion/s2io.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ static const u64 fix_mac[] = {
END_SIGN
};

MODULE_DESCRIPTION("Neterion 10GbE driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static int rmnet_fill_info(struct sk_buff *skb, const struct net_device *dev)

struct rtnl_link_ops rmnet_link_ops __read_mostly = {
.kind = "rmnet",
.maxtype = __IFLA_RMNET_MAX,
.maxtype = IFLA_RMNET_MAX,
.priv_size = sizeof(struct rmnet_priv),
.setup = rmnet_vnd_setup,
.validate = rmnet_rtnl_validate,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/renesas/ravb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev)
struct ravb_tstamp_skb *ts_skb;
struct ravb_tx_desc *desc;
unsigned long flags;
u32 dma_addr;
dma_addr_t dma_addr;
void *buffer;
u32 entry;
u32 len;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/stmicro/stmmac/stmmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ struct stmmac_priv {
u32 msg_enable;
int wolopts;
int wol_irq;
bool wol_irq_disabled;
int clk_csr;
struct timer_list eee_ctrl_timer;
int lpi_irq;
Expand Down
20 changes: 14 additions & 6 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,9 @@ static int stmmac_ethtool_get_link_ksettings(struct net_device *dev,
{
struct stmmac_priv *priv = netdev_priv(dev);

if (priv->hw->pcs & STMMAC_PCS_RGMII ||
priv->hw->pcs & STMMAC_PCS_SGMII) {
if (!(priv->plat->flags & STMMAC_FLAG_HAS_INTEGRATED_PCS) &&
(priv->hw->pcs & STMMAC_PCS_RGMII ||
priv->hw->pcs & STMMAC_PCS_SGMII)) {
struct rgmii_adv adv;
u32 supported, advertising, lp_advertising;

Expand Down Expand Up @@ -407,8 +408,9 @@ stmmac_ethtool_set_link_ksettings(struct net_device *dev,
{
struct stmmac_priv *priv = netdev_priv(dev);

if (priv->hw->pcs & STMMAC_PCS_RGMII ||
priv->hw->pcs & STMMAC_PCS_SGMII) {
if (!(priv->plat->flags & STMMAC_FLAG_HAS_INTEGRATED_PCS) &&
(priv->hw->pcs & STMMAC_PCS_RGMII ||
priv->hw->pcs & STMMAC_PCS_SGMII)) {
/* Only support ANE */
if (cmd->base.autoneg != AUTONEG_ENABLE)
return -EINVAL;
Expand Down Expand Up @@ -830,10 +832,16 @@ static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
if (wol->wolopts) {
pr_info("stmmac: wakeup enable\n");
device_set_wakeup_enable(priv->device, 1);
enable_irq_wake(priv->wol_irq);
/* Avoid unbalanced enable_irq_wake calls */
if (priv->wol_irq_disabled)
enable_irq_wake(priv->wol_irq);
priv->wol_irq_disabled = false;
} else {
device_set_wakeup_enable(priv->device, 0);
disable_irq_wake(priv->wol_irq);
/* Avoid unbalanced disable_irq_wake calls */
if (!priv->wol_irq_disabled)
disable_irq_wake(priv->wol_irq);
priv->wol_irq_disabled = true;
}

mutex_lock(&priv->lock);
Expand Down
Loading

0 comments on commit 736b554

Please sign in to comment.