summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-11-26 09:32:41 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-11-26 09:32:41 -0800
commit9437ee8b6cf607e883b36e44bd755968daaebd48 (patch)
treecc98a27940a488ac03e56adb00d6d3c5539ee0b2 /include
parentdf99e82b36ff3c243ec3a06afc0ccaa4866a5a41 (diff)
parente1055cbfd6eb578417f3ce983cf44462e8465267 (diff)
Merge tag 'net-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netHEADmaster
Pull networking fixes from Paolo Abeni: "Including fixes from WiFi, Bluetooth and CAN. Current release - regressions: - eth: mlx5e: TC, fix a NULL pointer write in the peer flow error path Current release - new code bugs: - xfrm: interface: drop non-IP packets before pskb_inet_may_pull() - eth: b53: use the correct override register 2 Gbps bit Previous releases - regressions: - core: - do not run out of frags in alloc_skb_with_frags() - gso: cow head on tcp fraglist fallback to skb_segment - ipv6: - honor suppress_prefixlength in fib6_lookup() - mcast: do not pass uninitialized bytes to dev_mc_add() - tcp: - don't clear saddr before ->put_port(). - initialize ir_rmt_addr and ir_loc_addr in cookie_v6_check() - mptcp: fix dummy mapping of overlapping segments - bluetooth: - fix use-after-free in mgmt_powering_down() - fix NULL pointer dereference on failed init - wifi: - iwlwifi: fix FW crashes on old devices and with 320 MHz channels - ath10k: revert "stop unanswered temperature reads" - rtw89: fix connection drop on RTL8851BE - eth: - gve: fix checksum state of HW-GRO packets - mana: set a non-zero minimum interrupt moderation, fix TX timeouts - brcm: fix link-local detection with a prepended tag Previous releases - always broken: - core: - initialize sk_peer_lock in cloned sockets - release netpoll dev_lock when NETDEV_PRE_UP vetoes an open - gso: fall back to skb_segment when fraglist cannot satisfy checksum - tcp: fix negative sk_forward_alloc after MSG_ZEROCOPY append - udp: only quit inuse scan early on identical SO_REUSEPORT sockets - ipv4: fix conntrack defrag forwarding after ip_frag_reinit() - vsock/bpf: release sock lock while waiting for data in recvmsg, fix deadlock - mptcp: a bunch of fixes for send stalls after fallback and TFO - can: avoid RTNL stalls in CAN_RAW, CAN_ISOTP and CAN_BCM - eth: - tun: bound the NAPI receive queue - tg3: fix heap overflow in unbuffered NVRAM write path - mlx5: DR, fix out-of-bounds write when sync to HW fails - ionic: fix TX stalls on TSO skbs larger than the TX ring - bcm4908: a bunch of TX/RX ring fixes Misc: - add Willem de Bruijn to networking maintainers" * tag 'net-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (152 commits) udp: only quit inuse scan early on identical SO_REUSEPORT sockets net: dsa: tag_brcm: fix link-local detection with a prepended tag tg3: Fix heap overflow in unbuffered NVRAM write path tg3: Skip management FW version when APE firmware is not ready tg3: Don't fail probe if 31-bit coherent DMA mask is unsupported selftests: tls: add a poll test for a queued KeyUpdate tls: don't hide a queued KeyUpdate from poll() xfrm: interface: drop non-IP packets before pskb_inet_may_pull() net/tcp-ao: fix reset key lookup for IPv4 segments on IPv6 listeners tcp: fix negative sk_forward_alloc after MSG_ZEROCOPY append tcp: Don't clear saddr before ->put_port(). vhost/net: Fix receive queue test in busy poll ipv6: mcast: do not pass uninitialized bytes to dev_mc_add() tipc: restore write readiness when a socket's group goes away mptcp: gate diag sequence counters on CAP_NET_ADMIN net: dsa: felix: fix NULL pointer dereference in felix_port_enable() selftests: netfilter: cover IPv6 FIB prefix suppression ipv6: Honor suppress_prefixlength in fib6_lookup() ptp: vmclock: keep the device state until the last file is closed tun: bound the NAPI receive queue ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/linux/tcp.h3
-rw-r--r--include/net/bluetooth/hci_core.h7
-rw-r--r--include/net/bluetooth/l2cap.h5
-rw-r--r--include/net/gso.h33
-rw-r--r--include/net/inet_connection_sock.h5
-rw-r--r--include/net/mana/gdma.h6
-rw-r--r--include/net/mana/mana.h9
-rw-r--r--include/net/tcp.h23
9 files changed, 82 insertions, 10 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index adc61f5e3e85..cf6a8e64b403 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -3187,6 +3187,7 @@ static inline u32 skb_mac_header_len(const struct sk_buff *skb)
static inline void skb_unset_mac_header(struct sk_buff *skb)
{
skb->mac_header = (typeof(skb->mac_header))~0U;
+ skb->mac_len = 0;
}
static inline void skb_reset_mac_header(struct sk_buff *skb)
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index e6b79cf4798f..d4b07fbae2d5 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -516,6 +516,9 @@ struct tcp_sock {
#if IS_ENABLED(CONFIG_MPTCP)
bool is_mptcp;
#endif
+#if IS_ENABLED(CONFIG_AF_KCM)
+ bool kcm_attached;
+#endif
#if IS_ENABLED(CONFIG_SMC)
bool syn_smc; /* SYN includes SMC */
bool (*smc_hs_congested)(const struct sock *sk);
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index fd4da751a24f..7cf63bc0f466 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -561,6 +561,8 @@ struct hci_dev {
struct list_head accept_list;
struct list_head uuids;
struct list_head link_keys;
+ /* Serializes the writers of link_keys, see hci_add_link_key() */
+ struct mutex link_keys_lock;
struct list_head long_term_keys;
struct list_head identity_resolving_keys;
struct mutex remote_oob_lock;
@@ -1921,6 +1923,10 @@ struct hci_conn_params *hci_pend_le_action_lookup(struct list_head *list,
void hci_uuids_clear(struct hci_dev *hdev);
void hci_link_keys_clear(struct hci_dev *hdev);
+struct link_key *__hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn,
+ bdaddr_t *bdaddr, u8 *val, u8 type,
+ u8 pin_len, bool *persistent);
+void hci_del_link_key(struct hci_dev *hdev, struct link_key *key);
u8 *hci_conn_key_enc_size(struct hci_conn *conn);
struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr);
struct link_key *hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn,
@@ -2513,6 +2519,7 @@ void mgmt_index_removed(struct hci_dev *hdev);
void mgmt_set_powered_failed(struct hci_dev *hdev, int err);
void mgmt_power_on(struct hci_dev *hdev, int err);
void __mgmt_power_off(struct hci_dev *hdev);
+void mgmt_mesh_flush(struct hci_dev *hdev);
void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key,
bool persistent);
void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index bb2839972cf3..9f18e70f09bb 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -45,6 +45,11 @@
#define L2CAP_DEFAULT_ACC_LAT 0xFFFFFFFF
#define L2CAP_BREDR_MAX_PAYLOAD 1019 /* 3-DH5 packet */
#define L2CAP_LE_MIN_MTU 23
+
+/* Identifier used by L2CAP_LE_CREDITS, it has no response so it is not
+ * tracked in conn->tx_ida and is never allocated for any other command.
+ */
+#define L2CAP_IDENT_LE_CREDITS 255
#define L2CAP_ECRED_CONN_SCID_MAX 5
#define L2CAP_DISC_TIMEOUT msecs_to_jiffies(100)
diff --git a/include/net/gso.h b/include/net/gso.h
index 119fc4c170e1..6cf6a6dee234 100644
--- a/include/net/gso.h
+++ b/include/net/gso.h
@@ -3,6 +3,7 @@
#ifndef _NET_GSO_H
#define _NET_GSO_H
+#include <linux/netdevice.h>
#include <linux/skbuff.h>
/* Keeps track of mac header offset relative to skb->head.
@@ -39,6 +40,38 @@ static inline int skb_tnl_header_len(const struct sk_buff *inner_skb)
SKB_GSO_CB(inner_skb)->mac_offset;
}
+/**
+ * skb_gso_fraglist_ok - test whether skb_segment_list() can segment an skb
+ * @skb: SKB_GSO_FRAGLIST skb to segment
+ * @features: features for the output path
+ * @hdrlen: transport header length
+ * @proto: network protocol, for checksum offload
+ *
+ * Return: false if the skb must be passed to the more general skb_segment().
+ */
+static inline bool skb_gso_fraglist_ok(const struct sk_buff *skb,
+ netdev_features_t features,
+ unsigned int hdrlen, __be16 proto)
+{
+ /* Geometry modified, e.g., by a pull from frag_list */
+ if (skb_pagelen(skb) - hdrlen != skb_shinfo(skb)->gso_size)
+ return false;
+
+ if (skb_shinfo(skb)->gso_type & SKB_GSO_DODGY)
+ return false;
+
+ /* Tunnel headers and outer checksums are not rebuilt */
+ if (skb->encapsulation || skb_tnl_header_len(skb))
+ return false;
+
+ /* Checksums are not resolved in software */
+ if (skb->ip_summed == CHECKSUM_PARTIAL &&
+ !can_checksum_protocol(features, proto))
+ return false;
+
+ return true;
+}
+
static inline int gso_pskb_expand_head(struct sk_buff *skb, int extra)
{
int new_headroom, headroom;
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 903499581db7..562e12033a5d 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -255,9 +255,10 @@ static inline unsigned long
inet_csk_rto_backoff(const struct inet_connection_sock *icsk,
unsigned long max_when)
{
- u64 when = (u64)icsk->icsk_rto << icsk->icsk_backoff;
+ u8 backoff = min_t(u8, 32U, icsk->icsk_backoff);
+ u64 when = (u64)icsk->icsk_rto << backoff;
- return (unsigned long)min_t(u64, when, max_when);
+ return (unsigned long)min_t(u64, when, max_when);
}
struct sock *inet_csk_accept(struct sock *sk, struct proto_accept_arg *arg);
diff --git a/include/net/mana/gdma.h b/include/net/mana/gdma.h
index 29d152e18596..6191ddddc27f 100644
--- a/include/net/mana/gdma.h
+++ b/include/net/mana/gdma.h
@@ -776,6 +776,9 @@ enum {
/* Driver supports handling throttled EQEs */
#define GDMA_DRV_CAP_FLAG_1_THROTTLED_EVENT_QUEUE BIT_ULL(32)
+/* Enforce min 1 usec, 1 frames for Interrupt Moderation */
+#define GDMA_DRV_CAP_FLAG_1_SET_MIN_INTR_MOD_VALUE BIT_ULL(33)
+
/* Capabilities in the PCI-only group below rely on dynamic MSI-X allocation
* and on the servicing and reset paths reached through
* mana_schedule_serv_work(). Transports that provide neither leave
@@ -801,7 +804,8 @@ enum {
GDMA_DRV_CAP_FLAG_1_EQ_MSI_UNSHARE_MULTI_VPORT | \
GDMA_DRV_CAP_FLAG_1_DYN_INTERRUPT_MODERATION | \
GDMA_DRV_CAP_FLAG_1_NON_CONTIGUOUS_BUFFERS | \
- GDMA_DRV_CAP_FLAG_1_THROTTLED_EVENT_QUEUE)
+ GDMA_DRV_CAP_FLAG_1_THROTTLED_EVENT_QUEUE | \
+ GDMA_DRV_CAP_FLAG_1_SET_MIN_INTR_MOD_VALUE)
#define GDMA_DRV_CAP_FLAGS2 0
diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
index 218d540bc994..84afc4199e87 100644
--- a/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -74,9 +74,12 @@ enum mana_priv_flag_bits {
/* 8-pkt mode packs up to 2 packets per PPI entry */
#define MANA_CQE_COAL_PKTS_8 8
-/* Default/max interrupt moderation settings */
-#define MANA_INTR_MODR_USEC_DEF 0
-#define MANA_INTR_MODR_COMP_DEF 0
+/* Default/min interrupt moderation settings */
+#define MANA_INTR_MODR_USEC_DEF 1
+#define MANA_INTR_MODR_COMP_DEF 1
+
+#define MANA_INTR_MODR_USEC_MIN 1
+#define MANA_INTR_MODR_COMP_MIN 1
#define MANA_ADAPTIVE_RX_DEF true
#define MANA_ADAPTIVE_TX_DEF true
diff --git a/include/net/tcp.h b/include/net/tcp.h
index bb84b7f64be5..869e780fcb48 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -922,12 +922,18 @@ static inline u32 __tcp_set_rto(const struct tcp_sock *tp)
return max(rto, 1U);
}
-static inline unsigned long tcp_reqsk_timeout(struct request_sock *req)
+static inline unsigned long tcp_reqsk_timeout_sk(const struct sock *sk,
+ const struct request_sock *req)
{
- u64 timeout = (u64)req->timeout << req->num_timeout;
+ /* timeout << 32 is already above tcp_rto_max(). */
+ u64 timeout = (u64)req->timeout << min_t(u8, req->num_timeout, 32);
+
+ return (unsigned long)min_t(u64, timeout, tcp_rto_max(sk));
+}
- return (unsigned long)min_t(u64, timeout,
- tcp_rto_max(req->rsk_listener));
+static inline unsigned long tcp_reqsk_timeout(struct request_sock *req)
+{
+ return tcp_reqsk_timeout_sk(req->rsk_listener, req);
}
u32 tcp_delack_max(const struct sock *sk);
@@ -2898,6 +2904,15 @@ void tcp_cleanup_ulp(struct sock *sk);
void tcp_update_ulp(struct sock *sk, struct proto *p,
void (*write_space)(struct sock *sk));
+static inline bool tcp_kcm_attached(const struct sock *sk)
+{
+#if IS_ENABLED(CONFIG_AF_KCM)
+ return tcp_sk(sk)->kcm_attached;
+#else
+ return false;
+#endif
+}
+
#define MODULE_ALIAS_TCP_ULP(name) \
MODULE_INFO(alias, name); \
MODULE_INFO(alias, "tcp-ulp-" name)