Skip to content

Commit 1d227fc

Browse files
committed
Merge tag 'net-6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth and netfilter. Current release - regressions: - dsa: sja1105: fix reception from VLAN-unaware bridges - Revert "net: stmmac: set PP_FLAG_DMA_SYNC_DEV only if XDP is enabled" - eth: fec: don't save PTP state if PTP is unsupported Current release - new code bugs: - smc: fix lack of icsk_syn_mss with IPPROTO_SMC, prevent null-deref - eth: airoha: update Tx CPU DMA ring idx at the end of xmit loop - phy: aquantia: AQR115c fix up PMA capabilities Previous releases - regressions: - tcp: 3 fixes for retrans_stamp and undo logic Previous releases - always broken: - net: do not delay dst_entries_add() in dst_release() - netfilter: restrict xtables extensions to families that are safe, syzbot found a way to combine ebtables with extensions that are never used by userspace tools - sctp: ensure sk_state is set to CLOSED if hashing fails in sctp_listen_start - mptcp: handle consistently DSS corruption, and prevent corruption due to large pmtu xmit" * tag 'net-6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (87 commits) MAINTAINERS: Add headers and mailing list to UDP section MAINTAINERS: consistently exclude wireless files from NETWORKING [GENERAL] slip: make slhc_remember() more robust against malicious packets net/smc: fix lacks of icsk_syn_mss with IPPROTO_SMC ppp: fix ppp_async_encode() illegal access docs: netdev: document guidance on cleanup patches phonet: Handle error of rtnl_register_module(). mpls: Handle error of rtnl_register_module(). mctp: Handle error of rtnl_register_module(). bridge: Handle error of rtnl_register_module(). vxlan: Handle error of rtnl_register_module(). rtnetlink: Add bulk registration helpers for rtnetlink message handlers. net: do not delay dst_entries_add() in dst_release() mptcp: pm: do not remove closing subflows mptcp: fallback when MPTCP opts are dropped after 1st data tcp: fix mptcp DSS corruption due to large pmtu xmit mptcp: handle consistently DSS corruption net: netconsole: fix wrong warning net: dsa: refuse cross-chip mirroring operations net: fec: don't save PTP state if PTP is unsupported ...
2 parents 0edab8d + 7b43ba6 commit 1d227fc

File tree

115 files changed

+1339
-488
lines changed

Some content is hidden

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

115 files changed

+1339
-488
lines changed

Documentation/networking/tcp_ao.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ segments between trusted peers. It adds a new TCP header option with
99
a Message Authentication Code (MAC). MACs are produced from the content
1010
of a TCP segment using a hashing function with a password known to both peers.
1111
The intent of TCP-AO is to deprecate TCP-MD5 providing better security,
12-
key rotation and support for variety of hashing algorithms.
12+
key rotation and support for a variety of hashing algorithms.
1313

1414
1. Introduction
1515
===============
@@ -164,9 +164,9 @@ A: It should not, no action needs to be performed [7.5.2.e]::
164164
is not available, no action is required (RNextKeyID of a received
165165
segment needs to match the MKT’s SendID).
166166

167-
Q: How current_key is set and when does it change? It is a user-triggered
168-
change, or is it by a request from the remote peer? Is it set by the user
169-
explicitly, or by a matching rule?
167+
Q: How is current_key set, and when does it change? Is it a user-triggered
168+
change, or is it triggered by a request from the remote peer? Is it set by the
169+
user explicitly, or by a matching rule?
170170

171171
A: current_key is set by RNextKeyID [6.1]::
172172

@@ -233,8 +233,8 @@ always have one current_key [3.3]::
233233

234234
Q: Can a non-TCP-AO connection become a TCP-AO-enabled one?
235235

236-
A: No: for already established non-TCP-AO connection it would be impossible
237-
to switch using TCP-AO as the traffic key generation requires the initial
236+
A: No: for an already established non-TCP-AO connection it would be impossible
237+
to switch to using TCP-AO, as the traffic key generation requires the initial
238238
sequence numbers. Paraphrasing, starting using TCP-AO would require
239239
re-establishing the TCP connection.
240240

@@ -292,7 +292,7 @@ no transparency is really needed and modern BGP daemons already have
292292

293293
Linux provides a set of ``setsockopt()s`` and ``getsockopt()s`` that let
294294
userspace manage TCP-AO on a per-socket basis. In order to add/delete MKTs
295-
``TCP_AO_ADD_KEY`` and ``TCP_AO_DEL_KEY`` TCP socket options must be used
295+
``TCP_AO_ADD_KEY`` and ``TCP_AO_DEL_KEY`` TCP socket options must be used.
296296
It is not allowed to add a key on an established non-TCP-AO connection
297297
as well as to remove the last key from TCP-AO connection.
298298

@@ -361,7 +361,7 @@ not implemented.
361361
4. ``setsockopt()`` vs ``accept()`` race
362362
========================================
363363

364-
In contrast with TCP-MD5 established connection which has just one key,
364+
In contrast with an established TCP-MD5 connection which has just one key,
365365
TCP-AO connections may have many keys, which means that accepted connections
366366
on a listen socket may have any amount of keys as well. As copying all those
367367
keys on a first properly signed SYN would make the request socket bigger, that
@@ -374,15 +374,15 @@ keys from sockets that were already established, but not yet ``accept()``'ed,
374374
hanging in the accept queue.
375375

376376
The reverse is valid as well: if userspace adds a new key for a peer on
377-
a listener socket, the established sockets in accept queue won't
377+
a listener socket, the established sockets in the accept queue won't
378378
have the new keys.
379379

380380
At this moment, the resolution for the two races:
381381
``setsockopt(TCP_AO_ADD_KEY)`` vs ``accept()``
382382
and ``setsockopt(TCP_AO_DEL_KEY)`` vs ``accept()`` is delegated to userspace.
383383
This means that it's expected that userspace would check the MKTs on the socket
384384
that was returned by ``accept()`` to verify that any key rotation that
385-
happened on listen socket is reflected on the newly established connection.
385+
happened on the listen socket is reflected on the newly established connection.
386386

387387
This is a similar "do-nothing" approach to TCP-MD5 from the kernel side and
388388
may be changed later by introducing new flags to ``tcp_ao_add``

Documentation/process/maintainer-netdev.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ just do it. As a result, a sequence of smaller series gets merged quicker and
355355
with better review coverage. Re-posting large series also increases the mailing
356356
list traffic.
357357

358+
.. _rcs:
359+
358360
Local variable ordering ("reverse xmas tree", "RCS")
359361
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
360362

@@ -391,6 +393,21 @@ APIs and helpers, especially scoped iterators. However, direct use of
391393
``__free()`` within networking core and drivers is discouraged.
392394
Similar guidance applies to declaring variables mid-function.
393395

396+
Clean-up patches
397+
~~~~~~~~~~~~~~~~
398+
399+
Netdev discourages patches which perform simple clean-ups, which are not in
400+
the context of other work. For example:
401+
402+
* Addressing ``checkpatch.pl`` warnings
403+
* Addressing :ref:`Local variable ordering<rcs>` issues
404+
* Conversions to device-managed APIs (``devm_`` helpers)
405+
406+
This is because it is felt that the churn that such changes produce comes
407+
at a greater cost than the value of such clean-ups.
408+
409+
Conversely, spelling and grammar fixes are not discouraged.
410+
394411
Resending after review
395412
~~~~~~~~~~~~~~~~~~~~~~
396413

MAINTAINERS

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10270,7 +10270,7 @@ F: Documentation/devicetree/bindings/arm/hisilicon/low-pin-count.yaml
1027010270
F: drivers/bus/hisi_lpc.c
1027110271

1027210272
HISILICON NETWORK SUBSYSTEM 3 DRIVER (HNS3)
10273-
M: Yisen Zhuang <yisen.zhuang@huawei.com>
10273+
M: Jian Shen <shenjian15@huawei.com>
1027410274
M: Salil Mehta <salil.mehta@huawei.com>
1027510275
M: Jijie Shao <shaojijie@huawei.com>
1027610276
L: netdev@vger.kernel.org
@@ -10279,7 +10279,7 @@ W: http://www.hisilicon.com
1027910279
F: drivers/net/ethernet/hisilicon/hns3/
1028010280

1028110281
HISILICON NETWORK SUBSYSTEM DRIVER
10282-
M: Yisen Zhuang <yisen.zhuang@huawei.com>
10282+
M: Jian Shen <shenjian15@huawei.com>
1028310283
M: Salil Mehta <salil.mehta@huawei.com>
1028410284
L: netdev@vger.kernel.org
1028510285
S: Maintained
@@ -16201,8 +16201,19 @@ F: lib/random32.c
1620116201
F: net/
1620216202
F: tools/net/
1620316203
F: tools/testing/selftests/net/
16204+
X: Documentation/networking/mac80211-injection.rst
16205+
X: Documentation/networking/mac80211_hwsim/
16206+
X: Documentation/networking/regulatory.rst
16207+
X: include/net/cfg80211.h
16208+
X: include/net/ieee80211_radiotap.h
16209+
X: include/net/iw_handler.h
16210+
X: include/net/mac80211.h
16211+
X: include/net/wext.h
1620416212
X: net/9p/
1620516213
X: net/bluetooth/
16214+
X: net/mac80211/
16215+
X: net/rfkill/
16216+
X: net/wireless/
1620616217

1620716218
NETWORKING [IPSEC]
1620816219
M: Steffen Klassert <steffen.klassert@secunet.com>
@@ -24177,8 +24188,12 @@ F: drivers/usb/host/xhci*
2417724188

2417824189
USER DATAGRAM PROTOCOL (UDP)
2417924190
M: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
24191+
L: netdev@vger.kernel.org
2418024192
S: Maintained
2418124193
F: include/linux/udp.h
24194+
F: include/net/udp.h
24195+
F: include/trace/events/udp.h
24196+
F: include/uapi/linux/udp.h
2418224197
F: net/ipv4/udp.c
2418324198
F: net/ipv6/udp.c
2418424199

drivers/bluetooth/btusb.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4038,23 +4038,37 @@ static void btusb_disconnect(struct usb_interface *intf)
40384038
static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
40394039
{
40404040
struct btusb_data *data = usb_get_intfdata(intf);
4041+
int err;
40414042

40424043
BT_DBG("intf %p", intf);
40434044

4044-
/* Don't suspend if there are connections */
4045-
if (hci_conn_count(data->hdev))
4045+
/* Don't auto-suspend if there are connections; external suspend calls
4046+
* shall never fail.
4047+
*/
4048+
if (PMSG_IS_AUTO(message) && hci_conn_count(data->hdev))
40464049
return -EBUSY;
40474050

40484051
if (data->suspend_count++)
40494052
return 0;
40504053

4054+
/* Notify Host stack to suspend; this has to be done before stopping
4055+
* the traffic since the hci_suspend_dev itself may generate some
4056+
* traffic.
4057+
*/
4058+
err = hci_suspend_dev(data->hdev);
4059+
if (err) {
4060+
data->suspend_count--;
4061+
return err;
4062+
}
4063+
40514064
spin_lock_irq(&data->txlock);
40524065
if (!(PMSG_IS_AUTO(message) && data->tx_in_flight)) {
40534066
set_bit(BTUSB_SUSPENDING, &data->flags);
40544067
spin_unlock_irq(&data->txlock);
40554068
} else {
40564069
spin_unlock_irq(&data->txlock);
40574070
data->suspend_count--;
4071+
hci_resume_dev(data->hdev);
40584072
return -EBUSY;
40594073
}
40604074

@@ -4175,6 +4189,8 @@ static int btusb_resume(struct usb_interface *intf)
41754189
spin_unlock_irq(&data->txlock);
41764190
schedule_work(&data->work);
41774191

4192+
hci_resume_dev(data->hdev);
4193+
41784194
return 0;
41794195

41804196
failed:

drivers/net/dsa/b53/b53_common.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/phylink.h>
2828
#include <linux/etherdevice.h>
2929
#include <linux/if_bridge.h>
30+
#include <linux/if_vlan.h>
3031
#include <net/dsa.h>
3132

3233
#include "b53_regs.h"
@@ -224,6 +225,9 @@ static const struct b53_mib_desc b53_mibs_58xx[] = {
224225

225226
#define B53_MIBS_58XX_SIZE ARRAY_SIZE(b53_mibs_58xx)
226227

228+
#define B53_MAX_MTU_25 (1536 - ETH_HLEN - VLAN_HLEN - ETH_FCS_LEN)
229+
#define B53_MAX_MTU (9720 - ETH_HLEN - VLAN_HLEN - ETH_FCS_LEN)
230+
227231
static int b53_do_vlan_op(struct b53_device *dev, u8 op)
228232
{
229233
unsigned int i;
@@ -2254,20 +2258,25 @@ static int b53_change_mtu(struct dsa_switch *ds, int port, int mtu)
22542258
bool allow_10_100;
22552259

22562260
if (is5325(dev) || is5365(dev))
2257-
return -EOPNOTSUPP;
2261+
return 0;
22582262

22592263
if (!dsa_is_cpu_port(ds, port))
22602264
return 0;
22612265

2262-
enable_jumbo = (mtu >= JMS_MIN_SIZE);
2263-
allow_10_100 = (dev->chip_id == BCM583XX_DEVICE_ID);
2266+
enable_jumbo = (mtu > ETH_DATA_LEN);
2267+
allow_10_100 = !is63xx(dev);
22642268

22652269
return b53_set_jumbo(dev, enable_jumbo, allow_10_100);
22662270
}
22672271

22682272
static int b53_get_max_mtu(struct dsa_switch *ds, int port)
22692273
{
2270-
return JMS_MAX_SIZE;
2274+
struct b53_device *dev = ds->priv;
2275+
2276+
if (is5325(dev) || is5365(dev))
2277+
return B53_MAX_MTU_25;
2278+
2279+
return B53_MAX_MTU;
22712280
}
22722281

22732282
static const struct phylink_mac_ops b53_phylink_mac_ops = {

drivers/net/dsa/lan9303-core.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <linux/module.h>
77
#include <linux/gpio/consumer.h>
88
#include <linux/regmap.h>
9+
#include <linux/iopoll.h>
910
#include <linux/mutex.h>
1011
#include <linux/mii.h>
1112
#include <linux/of.h>
@@ -839,6 +840,8 @@ static void lan9303_handle_reset(struct lan9303 *chip)
839840
if (!chip->reset_gpio)
840841
return;
841842

843+
gpiod_set_value_cansleep(chip->reset_gpio, 1);
844+
842845
if (chip->reset_duration != 0)
843846
msleep(chip->reset_duration);
844847

@@ -864,8 +867,34 @@ static int lan9303_disable_processing(struct lan9303 *chip)
864867
static int lan9303_check_device(struct lan9303 *chip)
865868
{
866869
int ret;
870+
int err;
867871
u32 reg;
868872

873+
/* In I2C-managed configurations this polling loop will clash with
874+
* switch's reading of EEPROM right after reset and this behaviour is
875+
* not configurable. While lan9303_read() already has quite long retry
876+
* timeout, seems not all cases are being detected as arbitration error.
877+
*
878+
* According to datasheet, EEPROM loader has 30ms timeout (in case of
879+
* missing EEPROM).
880+
*
881+
* Loading of the largest supported EEPROM is expected to take at least
882+
* 5.9s.
883+
*/
884+
err = read_poll_timeout(lan9303_read, ret,
885+
!ret && reg & LAN9303_HW_CFG_READY,
886+
20000, 6000000, false,
887+
chip->regmap, LAN9303_HW_CFG, &reg);
888+
if (ret) {
889+
dev_err(chip->dev, "failed to read HW_CFG reg: %pe\n",
890+
ERR_PTR(ret));
891+
return ret;
892+
}
893+
if (err) {
894+
dev_err(chip->dev, "HW_CFG not ready: 0x%08x\n", reg);
895+
return err;
896+
}
897+
869898
ret = lan9303_read(chip->regmap, LAN9303_CHIP_REV, &reg);
870899
if (ret) {
871900
dev_err(chip->dev, "failed to read chip revision register: %d\n",

drivers/net/dsa/sja1105/sja1105_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3158,7 +3158,6 @@ static int sja1105_setup(struct dsa_switch *ds)
31583158
* TPID is ETH_P_SJA1105, and the VLAN ID is the port pvid.
31593159
*/
31603160
ds->vlan_filtering_is_global = true;
3161-
ds->untag_bridge_pvid = true;
31623161
ds->fdb_isolation = true;
31633162
ds->max_num_bridges = DSA_TAG_8021Q_MAX_NUM_BRIDGES;
31643163

drivers/net/ethernet/adi/adin1110.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ static int adin1110_read_fifo(struct adin1110_port_priv *port_priv)
318318
* from the ADIN1110 frame header.
319319
*/
320320
if (frame_size < ADIN1110_FRAME_HEADER_LEN + ADIN1110_FEC_LEN)
321-
return ret;
321+
return -EINVAL;
322322

323323
round_len = adin1110_round_len(frame_size);
324324
if (round_len < 0)
325-
return ret;
325+
return -EINVAL;
326326

327327
frame_size_no_fcs = frame_size - ADIN1110_FRAME_HEADER_LEN - ADIN1110_FEC_LEN;
328328
memset(priv->data, 0, ADIN1110_RD_HEADER_LEN);

drivers/net/ethernet/amd/mvme147.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ static struct net_device * __init mvme147lance_probe(void)
105105
macaddr[3] = address&0xff;
106106
eth_hw_addr_set(dev, macaddr);
107107

108-
printk("%s: MVME147 at 0x%08lx, irq %d, Hardware Address %pM\n",
109-
dev->name, dev->base_addr, MVME147_LANCE_IRQ,
110-
dev->dev_addr);
111-
112108
lp = netdev_priv(dev);
113109
lp->ram = __get_dma_pages(GFP_ATOMIC, 3); /* 32K */
114110
if (!lp->ram) {
@@ -138,6 +134,9 @@ static struct net_device * __init mvme147lance_probe(void)
138134
return ERR_PTR(err);
139135
}
140136

137+
netdev_info(dev, "MVME147 at 0x%08lx, irq %d, Hardware Address %pM\n",
138+
dev->base_addr, MVME147_LANCE_IRQ, dev->dev_addr);
139+
141140
return dev;
142141
}
143142

drivers/net/ethernet/faraday/ftgmac100.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1906,7 +1906,12 @@ static int ftgmac100_probe(struct platform_device *pdev)
19061906
goto err_phy_connect;
19071907
}
19081908

1909-
phydev = fixed_phy_register(PHY_POLL, &ncsi_phy_status, NULL);
1909+
phydev = fixed_phy_register(PHY_POLL, &ncsi_phy_status, np);
1910+
if (IS_ERR(phydev)) {
1911+
dev_err(&pdev->dev, "failed to register fixed PHY device\n");
1912+
err = PTR_ERR(phydev);
1913+
goto err_phy_connect;
1914+
}
19101915
err = phy_connect_direct(netdev, phydev, ftgmac100_adjust_link,
19111916
PHY_INTERFACE_MODE_MII);
19121917
if (err) {

0 commit comments

Comments
 (0)