Skip to contentSkip to conversation

6.18.57-rc1 review

PATCH In review Greg Kroah-Hartman 14 participants 647 messages Oct 13 – Oct 26 Page 7 of 7

Subsystems (4)
lore
Share & tools
lore
author maintainer
#636 lore raw

PATCH 614/621 s390/zcrypt: Improve EP11 CPRB domain handling with ASN.1 parsing

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Harald Freudenberger <[email protected]>

commit 0864a163783bff109b548266921829ea794edc93 upstream.

The zcrypt_msgtype6_send_ep11_cprb() function uses fragile struct overlays to access and modify the domain field in the EP11 CPRB payload, creating maintainability and security concerns:
1. Struct overlay approach (pld_hdr) assumes fixed payload structure and doesn't validate the actual ASN.1 encoding.
2. Complex length format detection logic is error-prone and doesn't properly validate bounds at each parsing step.
3. Direct struct member access bypasses proper ASN.1 validation.

Fix by replacing struct overlays with explicit ASN.1 parsing that validates each field (payload tag/length, function tag/length/value, optional domain tag/length/value) with proper bounds checking at every step. Add asn1_int_encode() helper function to safely write integer values with correct endianness conversion. This makes the code consistent with the validation pattern introduced with the rework of the xcrb_msg_to_type6_ep11cprb_msgx() function.

Fixes e2c6d91eb8b1 ("s390/zcrypt: Rework domain processing within zcrypt device driver")
---
 drivers/s390/crypto/zcrypt_msgtype6.c |  127 +++++++++++++++++++++++++---------
 1 file changed, 96 insertions(+), 31 deletions(-)
drivers/s390/crypto/zcrypt_msgtype6.c +96 -31
@@ -1229,6 +1229,28 @@ int prep_ep11_ap_msg(bool userspace, str
 }
 
 /*
+ * Simple asn1 int writer/encoder helper function
+ * Returns number of bytes processed or < 0 on failure
+ * Only accepts int length values of 1, 2 or 4.
+ */
+static inline int asn1_int_encode(u8 *buf, size_t intlen, u32 u)
+{
+	switch (intlen) {
+	case 1:
+		*buf = (u8)u;
+		return 1;
+	case 2:
+		put_unaligned_be16((u16)u, buf);
+		return 2;
+	case 4:
+		put_unaligned_be32((u32)u, buf);
+		return 4;
+	default:
+		return -EINVAL;
+	}
+}
+
+/*
  * The request distributor calls this function if it picked the CEX4P
  * device to handle a send_ep11_cprb request.
  * @zq: pointer to zcrypt_queue structure that identifies the
@@ -1240,51 +1262,94 @@ static long zcrypt_msgtype6_send_ep11_cp
 					   struct ap_message *ap_msg)
 {
 	int rc;
-	unsigned int lfmt;
 	struct ap_response_type *resp_type = &ap_msg->response;
 	struct {
 		struct type6_hdr hdr;
 		struct ep11_cprb cprbx;
-		unsigned char	pld_tag;	/* fixed value 0x30 */
-		unsigned char	pld_lenfmt;	/* payload length format */
 	} __packed * msg = ap_msg->msg;
-	struct pld_hdr {
-		unsigned char	func_tag;	/* fixed value 0x4 */
-		unsigned char	func_len;	/* fixed value 0x4 */
-		unsigned int	func_val;	/* function ID	   */
-		unsigned char	dom_tag;	/* fixed value 0x4 */
-		unsigned char	dom_len;	/* fixed value 0x4 */
-		unsigned int	dom_val;	/* domain id	   */
-	} __packed * payload_hdr = NULL;
 
 	/*
 	 * The target domain field within the cprb body/payload block will be
 	 * replaced by the usage domain for non-management commands only.
 	 * Therefore we check the first bit of the 'flags' parameter for
 	 * management command indication.
-	 *   0 - non management command
-	 *   1 - management command
 	 */
-	if (!((msg->cprbx.flags & 0x80) == 0x80)) {
-		msg->cprbx.target_id = (unsigned int)
-					AP_QID_QUEUE(zq->queue->qid);
-
-		if ((msg->pld_lenfmt & 0x80) == 0x80) { /*ext.len.fmt 2 or 3*/
-			switch (msg->pld_lenfmt & 0x03) {
-			case 1:
-				lfmt = 2;
-				break;
-			case 2:
-				lfmt = 3;
-				break;
-			default:
+	if (!(msg->cprbx.flags & 0x80)) {
+		int i, offs = 0;
+		size_t pld_len;
+		u8 *pld;
+		u32 u;
+
+		/* update target field in ep11_cprb */
+		msg->cprbx.target_id = (u32)AP_QID_QUEUE(zq->queue->qid);
+
+		/* ptr and length to payload */
+		pld = ap_msg->msg +
+			sizeof(struct type6_hdr) + sizeof(struct ep11_cprb);
+		pld_len = msg->cprbx.payload_len;
+		if (pld_len < MIN_EP11_PAYLOAD_SIZE)
+			return -EINVAL;
+
+		/*
+		 * Parse the asn1 payload, at least we have
+		 *   pld tag (1 octet)
+		 *   payload length (1-5 octets)
+		 *   function tag (1 octet)
+		 *   function length (1-5 octets)
+		 *   function value (1-4 octets)
+		 *   ----- optional fields -----
+		 *   domain tag (1 octet)
+		 *   domain length (1-5 octets)
+		 *   domain value (1-4 octets)
+		 *   ... maybe much more data ...
+		 */
+
+		/* payload tag */
+		if (pld[offs++] != 0x30)
+			return -EINVAL;
+		/* payload length field */
+		i = asn1_length_decode(pld + offs, pld_len - offs, &u);
+		if (i < 0)
+			return -EINVAL;
+		offs += i;
+		if (offs >= pld_len || u > pld_len - offs)
+			return -EINVAL;
+		/* function tag */
+		if (pld[offs++] != 0x04)
+			return -EINVAL;
+		/* function length */
+		if (offs >= pld_len)
+			return -EINVAL;
+		i = asn1_length_decode(pld + offs, pld_len - offs, &u);
+		if (i < 0)
+			return -EINVAL;
+		offs += i;
+		if (u > pld_len - offs)
+			return -EINVAL;
+		/* skip over the function value */
+		offs += u;
+		/* is there some payload left which could hold a domain value ? */
+		if (offs < pld_len && pld_len - offs >= 3) {
+			/* domain tag */
+			if (pld[offs++] != 0x04)
+				return -EINVAL;
+			/* domain length */
+			i = asn1_length_decode(pld + offs, pld_len - offs, &u);
+			if (i < 0)
+				return -EINVAL;
+			offs += i;
+			if (offs >= pld_len || u > pld_len - offs)
+				return -EINVAL;
+			/*
+			 * pld[offs] is now at the start of the domain value
+			 * with the value sprawled in u octets.
+			 */
+			i = asn1_int_encode(pld + offs, u,
+					    AP_QID_QUEUE(zq->queue->qid));
+			if (i < 0)
 				return -EINVAL;
-			}
-		} else {
-			lfmt = 1; /* length format #1 */
+			offs += i;
 		}
-		payload_hdr = (struct pld_hdr *)((&msg->pld_lenfmt) + lfmt);
-		payload_hdr->dom_val = AP_QID_QUEUE(zq->queue->qid);
 	}
 
 	/*
author maintainer
#637 lore raw

PATCH 615/621 s390/zcrypt: Pad trailing CCA or EP11 message with zeros

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Harald Freudenberger <[email protected]>

commit eb363254472493e3458156fc11fd56dca92f4333 upstream.

The both functions xcrb_msg_to_type6cprb_msgx() and xcrb_msg_to_type6_ep11cprb_msgx() copy the user space message into a kernel buffer based on the message length. But on further processing the message is supposed to be 4 byte length adjusted. Thus up to 3 bytes of uninitialized kernel memory are forwarded to further processing steps and may unwanted expose kernel memory to the crypto card firmware.

This patch contains code to pad the gap between user space copied message and message buffer length sent down to further processing of the CCA or EP11 message to zeros.

Fixes e2c6d91eb8b1 ("s390/zcrypt: Rework domain processing within zcrypt device driver")
---
 drivers/s390/crypto/zcrypt_msgtype6.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/s390/crypto/zcrypt_msgtype6.c +8 -0
@@ -399,6 +399,10 @@ static int xcrb_msg_to_type6cprb_msgx(bo
 			     xcrb->request_control_blk_addr,
 			     xcrb->request_control_blk_length))
 		return -EFAULT;
+	/* pad tail with 0 up to req_cblen */
+	if (xcrb->request_control_blk_length < req_cblen)
+		memset(msg->userdata + xcrb->request_control_blk_length,
+		       0, req_cblen - xcrb->request_control_blk_length);
 	/* copy subfunction code into AP msg type 6 function code field */
 	if (msg->cprbx.cprb_len > req_cblen - sizeof(msg->hdr.function_code))
 		return -EINVAL;
@@ -544,6 +548,10 @@ static int xcrb_msg_to_type6_ep11cprb_ms
 	if (z_copy_from_user(userspace, msg->userdata,
 			     (char __force __user *)xcrb->req, xcrb->req_len))
 		return -EFAULT;
+	/* pad tail with 0 up to req_len */
+	if (xcrb->req_len < req_len)
+		memset(msg->userdata + xcrb->req_len, 0,
+		       req_len - xcrb->req_len);
 
 	pld = msg->userdata + sizeof(struct ep11_cprb);
 	pld_len = msg->cprbx.payload_len;
author maintainer
#595 lore raw

PATCH 580/621 flow_dissector: avoid u16 truncation of skb->len when computing thoff

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Eric Dumazet <[email protected]>

[ Upstream commit 99bda1ecbd56905f8bd934b9cdccd3bd251192b1 ]

__skb_flow_dissect() computes key_control->thoff using:

  key_control->thoff = min_t(u16, nhoff, skb ? skb->len : hlen);

min_t(u16, ...) casts both arguments to u16 before comparing them. Whenever skb->len (or hlen) modulo 65536 is smaller than nhoff, the truncated length wins and thoff is set to a bogus small value, even when the dissection succeeded. For example, an IPv4/TCP frame with skb->len == 65540 and nhoff == 34 gets thoff == 4, so callers such as skb_probe_transport_header() point the transport header inside the Ethernet header.

Such skbs are not exotic:
- At the time of commit d0c081b49137 ("flow_dissector: properly cap thoff field"), AF_PACKET with PACKET_VNET_HDR could already build GSO skbs larger than 64KB (MTU checks are skipped for GSO, and alloc_skb_with_frags() accepted up to MAX_SKB_FRAGS (17) order-0 pages on top of the linear part).
- BIG TCP now makes skbs larger than 64KB common.
- The following patch makes tun_get_user() dissect IFF_TAP frames before eth_type_trans() pulls the Ethernet header, so a GSO frame carrying a 65522..65535 byte L3 packet will be dissected with skb->len in [65536, 65549].

Compare as u32 instead. If the resulting offset cannot be represented in the u16 key_control->thoff, cap it to U16_MAX and report the dissection as failed rather than silently returning a wrong transport offset. thoff is still set on failure, as some callers (such as eth_get_headlen()) use it regardless of the return value.

---
 net/core/flow_dissector.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
net/core/flow_dissector.c +8 -1
index 8aa4f9b4df810..27d8a01bc9230 100644
@@ -1071,6 +1071,7 @@ bool __skb_flow_dissect(const struct net *net,
 	int mpls_lse = 0;
 	int num_hdrs = 0;
 	u8 ip_proto = 0;
+	u32 thoff;
 	bool ret;
 
 	if (!data) {
@@ -1692,7 +1693,13 @@ bool __skb_flow_dissect(const struct net *net,
 	ret = true;
 
 out:
-	key_control->thoff = min_t(u16, nhoff, skb ? skb->len : hlen);
+	thoff = min_t(u32, nhoff, skb ? skb->len : hlen);
+	if (unlikely(thoff > U16_MAX)) {
+		/* Cannot be represented in key_control->thoff. */
+		thoff = U16_MAX;
+		ret = false;
+	}
+	key_control->thoff = thoff;
 	key_basic->n_proto = proto;
 	key_basic->ip_proto = ip_proto;
 
Signature · 1 line
2.53.0
author maintainer
#638 lore raw

PATCH 616/621 accel/amdxdna: Resume power for creating and destroying hardware context

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lizhi Hou <[email protected]>

commit e00f78679f5a3d98b650fc9397c4d358ab570725 upstream.

When the hardware is powered down by auto-suspend, creating or destroying a hardware context without resuming power will fail.
Call amdxdna_pm_resume_get() before requesting the hardware to create or destroy a hardware context.

Fixes 063db451832b ("accel/amdxdna: Enhance runtime power management")
---
 drivers/accel/amdxdna/aie2_ctx.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/accel/amdxdna/aie2_ctx.c +8 -1
@@ -616,10 +616,14 @@ int aie2_hwctx_init(struct amdxdna_hwctx
 		goto free_entity;
 	}
 
+	ret = amdxdna_pm_resume_get(xdna);
+	if (ret)
+		goto free_col_list;
+
 	ret = aie2_alloc_resource(hwctx);
 	if (ret) {
 		XDNA_ERR(xdna, "Alloc hw resource failed, ret %d", ret);
-		goto free_col_list;
+		goto suspend_put;
 	}
 
 	ret = aie2_map_host_buf(xdna->dev_handle, hwctx->fw_ctx_id,
@@ -634,6 +638,7 @@ int aie2_hwctx_init(struct amdxdna_hwctx
 		XDNA_ERR(xdna, "Create syncobj failed, ret %d", ret);
 		goto release_resource;
 	}
+	amdxdna_pm_suspend_put(xdna);
 
 	hwctx->status = HWCTX_STAT_INIT;
 	ndev = xdna->dev_handle;
@@ -646,6 +651,8 @@ int aie2_hwctx_init(struct amdxdna_hwctx
 
 release_resource:
 	aie2_release_resource(hwctx);
+suspend_put:
+	amdxdna_pm_suspend_put(xdna);
 free_col_list:
 	kfree(hwctx->col_list);
 free_entity:
author maintainer
#639 lore raw

PATCH 617/621 accel/amdxdna: Fix race condition when checking rpm_on

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lizhi Hou <[email protected]>

commit 00ffe45ece80160aef446d74ded906352f21dd72 upstream.

When autosuspend is triggered, driver rpm_on flag is set to indicate that a suspend/resume is already in progress. However, when a userspace application submits a command during this narrow window, amdxdna_pm_resume_get() may incorrectly skip the resume operation because the rpm_on flag is still set. This results in commands being submitted while the device has not actually resumed, causing unexpected behavior.

The set_dpm() is called by suspend/resume, it relied on rpm_on flag to avoid calling into rpm suspend/resume recursivly. So to fix this, remove the use of the rpm_on flag entirely. Instead, introduce aie2_pm_set_dpm() which explicitly resumes the device before invoking set_dpm(). With this change, set_dpm() is called directly inside the suspend or resume execution path. Otherwise, aie2_pm_set_dpm() is called.

---
 drivers/accel/amdxdna/aie2_message.c    |    1 -
 drivers/accel/amdxdna/aie2_pci.c        |    2 +-
 drivers/accel/amdxdna/aie2_pci.h        |    1 +
 drivers/accel/amdxdna/aie2_pm.c         |   17 ++++++++++++++++-
 drivers/accel/amdxdna/aie2_smu.c        |   27 ++++-----------------------
 drivers/accel/amdxdna/amdxdna_pci_drv.h |    1 -
 drivers/accel/amdxdna/amdxdna_pm.c      |   22 ++--------------------
 7 files changed, 24 insertions(+), 47 deletions(-)
drivers/accel/amdxdna/aie2_message.c +0 -1
@@ -37,7 +37,6 @@ static int aie2_send_mgmt_msg_wait(struc
 	if (!ndev->mgmt_chann)
 		return -ENODEV;
 
-	drm_WARN_ON(&xdna->ddev, xdna->rpm_on && !mutex_is_locked(&xdna->dev_lock));
 	ret = xdna_send_msg_wait(xdna, ndev->mgmt_chann, msg);
 	if (ret == -ETIME)
 		aie2_destroy_mgmt_chann(ndev);
drivers/accel/amdxdna/aie2_pci.c +1 -1
@@ -306,7 +306,7 @@ static int aie2_xrs_set_dft_dpm_level(st
 	if (ndev->pw_mode != POWER_MODE_DEFAULT || ndev->dpm_level == dpm_level)
 		return 0;
 
-	return ndev->priv->hw_ops.set_dpm(ndev, dpm_level);
+	return aie2_pm_set_dpm(ndev, dpm_level);
 }
 
 static struct xrs_action_ops aie2_xrs_actions = {
drivers/accel/amdxdna/aie2_pci.h +1 -0
@@ -247,6 +247,7 @@ int npu4_set_dpm(struct amdxdna_dev_hdl
 /* aie2_pm.c */
 int aie2_pm_init(struct amdxdna_dev_hdl *ndev);
 int aie2_pm_set_mode(struct amdxdna_dev_hdl *ndev, enum amdxdna_power_mode_type target);
+int aie2_pm_set_dpm(struct amdxdna_dev_hdl *ndev, u32 dpm_level);
 
 /* aie2_psp.c */
 struct psp_device *aie2m_psp_create(struct drm_device *ddev, struct psp_config *conf);
drivers/accel/amdxdna/aie2_pm.c +16 -1
@@ -10,6 +10,7 @@
 
 #include "aie2_pci.h"
 #include "amdxdna_pci_drv.h"
+#include "amdxdna_pm.h"
 
 #define AIE2_CLK_GATING_ENABLE	1
 #define AIE2_CLK_GATING_DISABLE	0
@@ -26,6 +27,20 @@ static int aie2_pm_set_clk_gating(struct
 	return 0;
 }
 
+int aie2_pm_set_dpm(struct amdxdna_dev_hdl *ndev, u32 dpm_level)
+{
+	int ret;
+
+	ret = amdxdna_pm_resume_get(ndev->xdna);
+	if (ret)
+		return ret;
+
+	ret = ndev->priv->hw_ops.set_dpm(ndev, dpm_level);
+	amdxdna_pm_suspend_put(ndev->xdna);
+
+	return ret;
+}
+
 int aie2_pm_init(struct amdxdna_dev_hdl *ndev)
 {
 	int ret;
@@ -94,7 +109,7 @@ int aie2_pm_set_mode(struct amdxdna_dev_
 		return -EOPNOTSUPP;
 	}
 
-	ret = ndev->priv->hw_ops.set_dpm(ndev, dpm_level);
+	ret = aie2_pm_set_dpm(ndev, dpm_level);
 	if (ret)
 		return ret;
 
drivers/accel/amdxdna/aie2_smu.c +4 -23
@@ -11,7 +11,6 @@
 
 #include "aie2_pci.h"
 #include "amdxdna_pci_drv.h"
-#include "amdxdna_pm.h"
 
 #define SMU_RESULT_OK		1
 
@@ -67,16 +66,12 @@ int npu1_set_dpm(struct amdxdna_dev_hdl
 	u32 freq;
 	int ret;
 
-	ret = amdxdna_pm_resume_get(ndev->xdna);
-	if (ret)
-		return ret;
-
 	ret = aie2_smu_exec(ndev, AIE2_SMU_SET_MPNPUCLK_FREQ,
 			    ndev->priv->dpm_clk_tbl[dpm_level].npuclk, &freq);
 	if (ret) {
 		XDNA_ERR(ndev->xdna, "Set npu clock to %d failed, ret %d\n",
 			 ndev->priv->dpm_clk_tbl[dpm_level].npuclk, ret);
-		goto suspend_put;
+		return ret;
 	}
 	ndev->npuclk_freq = freq;
 
@@ -85,10 +80,9 @@ int npu1_set_dpm(struct amdxdna_dev_hdl
 	if (ret) {
 		XDNA_ERR(ndev->xdna, "Set h clock to %d failed, ret %d\n",
 			 ndev->priv->dpm_clk_tbl[dpm_level].hclk, ret);
-		goto suspend_put;
+		return ret;
 	}
 
-	amdxdna_pm_suspend_put(ndev->xdna);
 	ndev->hclk_freq = freq;
 	ndev->dpm_level = dpm_level;
 	ndev->max_tops = 2 * ndev->total_col;
@@ -98,35 +92,26 @@ int npu1_set_dpm(struct amdxdna_dev_hdl
 		 ndev->npuclk_freq, ndev->hclk_freq);
 
 	return 0;
-
-suspend_put:
-	amdxdna_pm_suspend_put(ndev->xdna);
-	return ret;
 }
 
 int npu4_set_dpm(struct amdxdna_dev_hdl *ndev, u32 dpm_level)
 {
 	int ret;
 
-	ret = amdxdna_pm_resume_get(ndev->xdna);
-	if (ret)
-		return ret;
-
 	ret = aie2_smu_exec(ndev, AIE2_SMU_SET_HARD_DPMLEVEL, dpm_level, NULL);
 	if (ret) {
 		XDNA_ERR(ndev->xdna, "Set hard dpm level %d failed, ret %d ",
 			 dpm_level, ret);
-		goto suspend_put;
+		return ret;
 	}
 
 	ret = aie2_smu_exec(ndev, AIE2_SMU_SET_SOFT_DPMLEVEL, dpm_level, NULL);
 	if (ret) {
 		XDNA_ERR(ndev->xdna, "Set soft dpm level %d failed, ret %d",
 			 dpm_level, ret);
-		goto suspend_put;
+		return ret;
 	}
 
-	amdxdna_pm_suspend_put(ndev->xdna);
 	ndev->npuclk_freq = ndev->priv->dpm_clk_tbl[dpm_level].npuclk;
 	ndev->hclk_freq = ndev->priv->dpm_clk_tbl[dpm_level].hclk;
 	ndev->dpm_level = dpm_level;
@@ -137,10 +122,6 @@ int npu4_set_dpm(struct amdxdna_dev_hdl
 		 ndev->npuclk_freq, ndev->hclk_freq);
 
 	return 0;
-
-suspend_put:
-	amdxdna_pm_suspend_put(ndev->xdna);
-	return ret;
 }
 
 int aie2_smu_init(struct amdxdna_dev_hdl *ndev)
drivers/accel/amdxdna/amdxdna_pci_drv.h +0 -1
@@ -100,7 +100,6 @@ struct amdxdna_dev {
 	struct amdxdna_fw_ver		fw_ver;
 	struct rw_semaphore		notifier_lock; /* for mmu notifier*/
 	struct workqueue_struct		*notifier_wq;
-	bool				rpm_on;
 };
 
 /*
drivers/accel/amdxdna/amdxdna_pm.c +2 -20
@@ -15,14 +15,9 @@ int amdxdna_pm_suspend(struct device *de
 {
 	struct amdxdna_dev *xdna = to_xdna_dev(dev_get_drvdata(dev));
 	int ret = -EOPNOTSUPP;
-	bool rpm;
 
-	if (xdna->dev_info->ops->suspend) {
-		rpm = xdna->rpm_on;
-		xdna->rpm_on = false;
+	if (xdna->dev_info->ops->suspend)
 		ret = xdna->dev_info->ops->suspend(xdna);
-		xdna->rpm_on = rpm;
-	}
 
 	XDNA_DBG(xdna, "Suspend done ret %d", ret);
 	return ret;
@@ -32,14 +27,9 @@ int amdxdna_pm_resume(struct device *dev
 {
 	struct amdxdna_dev *xdna = to_xdna_dev(dev_get_drvdata(dev));
 	int ret = -EOPNOTSUPP;
-	bool rpm;
 
-	if (xdna->dev_info->ops->resume) {
-		rpm = xdna->rpm_on;
-		xdna->rpm_on = false;
+	if (xdna->dev_info->ops->resume)
 		ret = xdna->dev_info->ops->resume(xdna);
-		xdna->rpm_on = rpm;
-	}
 
 	XDNA_DBG(xdna, "Resume done ret %d", ret);
 	return ret;
@@ -50,9 +40,6 @@ int amdxdna_pm_resume_get(struct amdxdna
 	struct device *dev = xdna->ddev.dev;
 	int ret;
 
-	if (!xdna->rpm_on)
-		return 0;
-
 	ret = pm_runtime_resume_and_get(dev);
 	if (ret) {
 		XDNA_ERR(xdna, "Resume failed: %d", ret);
@@ -66,9 +53,6 @@ void amdxdna_pm_suspend_put(struct amdxd
 {
 	struct device *dev = xdna->ddev.dev;
 
-	if (!xdna->rpm_on)
-		return;
-
 	pm_runtime_put_autosuspend(dev);
 }
 
@@ -81,14 +65,12 @@ void amdxdna_pm_init(struct amdxdna_dev
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_allow(dev);
 	pm_runtime_put_autosuspend(dev);
-	xdna->rpm_on = true;
 }
 
 void amdxdna_pm_fini(struct amdxdna_dev *xdna)
 {
 	struct device *dev = xdna->ddev.dev;
 
-	xdna->rpm_on = false;
 	pm_runtime_get_noresume(dev);
 	pm_runtime_forbid(dev);
 }
author maintainer
#640 lore raw

PATCH 618/621 accel/amdxdna: Fix crash when destroying a suspended hardware context

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lizhi Hou <[email protected]>

commit 8363c02863332992a1822688da41f881d88d1631 upstream.

If userspace issues an ioctl to destroy a hardware context that has already been automatically suspended, the driver may crash because the mailbox channel pointer is NULL for the suspended context.

Fix this by checking the mailbox channel pointer in aie2_destroy_context() before accessing it.

Fixes 97f27573837e ("accel/amdxdna: Fix potential NULL pointer dereference in context cleanup")
---
 drivers/accel/amdxdna/aie2_message.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/accel/amdxdna/aie2_message.c +3 -0
@@ -273,6 +273,9 @@ int aie2_destroy_context(struct amdxdna_
 	if (hwctx->fw_ctx_id == -1)
 		return 0;
 
+	if (!hwctx->priv->mbox_chann)
+		return 0;
+
 	xdna_mailbox_stop_channel(hwctx->priv->mbox_chann);
 	ret = aie2_destroy_context_req(ndev, hwctx->fw_ctx_id);
 	xdna_mailbox_destroy_channel(hwctx->priv->mbox_chann);
author maintainer
#641 lore raw

PATCH 619/621 workqueue: Annotate alloc_workqueue_va() with __printf(1, 0)

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Tejun Heo <[email protected]>

commit 20e81c64c905bd765e69ef07920d2b1130dc79b6 upstream.

alloc_workqueue_va() forwards its va_list to __alloc_workqueue() which ultimately feeds vsnprintf(). __alloc_workqueue() already carries __printf(1, 0); the new wrapper needs the same annotation so format string checking propagates through the forwarding.

Fixes 0de4cb473aed ("workqueue: fix devm_alloc_workqueue() va_list misuse")
---
 kernel/workqueue.c |    1 +
 1 file changed, 1 insertion(+)
kernel/workqueue.c +1 -0
@@ -5875,6 +5875,7 @@ err_destroy:
 	return NULL;
 }
 
+__printf(1, 0)
 static struct workqueue_struct *alloc_workqueue_va(const char *fmt,
 						   unsigned int flags,
 						   int max_active,
author maintainer
#642 lore raw

PATCH 620/621 ACPI: scan: Do not mark button ACPI devices as wakeup-capable

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit 91ba8de81bcb8cea922ee9427e54798a16dfd724 ]

It is generally questionable to mark struct acpi_device "devices" as wakeup-capable because they represent firmware entities that by themselves have no wakeup capabilities.

It was done for struct acpi_device "devices" corresponding to buttons because the ACPI button driver was binding to them directly, but now that corresponding platform devices are created for the buttons and they are marked as wakeup-capable by the ACPI button driver, there is no reason to continue doing it.

Update acpi_wakeup_gpe_init() accordingly.

Stable-dep-of: 57c31e6d620f ("ACPI: scan: Use acpi_setup_gpe_for_wake() for buttons")

---
 drivers/acpi/scan.c | 1 -
 1 file changed, 1 deletion(-)
drivers/acpi/scan.c +0 -1
index 32fa1c1ded601..31cd177bd9672 100644
@@ -1029,7 +1029,6 @@ static bool acpi_wakeup_gpe_init(struct acpi_device *device)
 		    wakeup->sleep_state == ACPI_STATE_S5)
 			wakeup->sleep_state = ACPI_STATE_S4;
 		acpi_mark_gpe_for_wake(wakeup->gpe_device, wakeup->gpe_number);
-		device_set_wakeup_capable(&device->dev, true);
 		return true;
 	}
 
Signature · 1 line
2.53.0
author maintainer
#643 lore raw

PATCH 621/621 ACPI: scan: Use acpi_setup_gpe_for_wake() for buttons

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit 57c31e6d620f132dcf610b2c52b4cdbd203c6f4a ]

After starting to use platform devices for representing buttons enumerated via ACPI, acpi_mark_gpe_for_wake() is insufficient for preparing their GPEs to wake up the system from sleep because it does not change the "dispatch type" of the given GPE to ACPI_GPE_DISPATCH_NOTIFY. Subsequently, this causes acpi_enable_gpe() in __acpi_device_wakeup_enable() to fail and system suspend transitions to be aborted.

Address this by updating acpi_wakeup_gpe_init() to use acpi_setup_gpe_for_wake() for buttons like for any other devices.

This allows acpi_setup_gpe_for_wake() to be simplified further because buttons are not a special case in it any more, so do that as well.

Fixes 52d864019636 ("ACPI: button: Convert the driver to a platform one")
---
 drivers/acpi/scan.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
drivers/acpi/scan.c +4 -14
index 31cd177bd9672..7f9dd2704f638 100644
@@ -1005,15 +1005,11 @@ static int acpi_bus_extract_wakeup_device_power_package(struct acpi_device *dev)
 	return err;
 }
 
-/* Do not use a button for S5 wakeup */
-#define ACPI_AVOID_WAKE_FROM_S5		BIT(0)
-
 static bool acpi_wakeup_gpe_init(struct acpi_device *device)
 {
 	static const struct acpi_device_id button_device_ids[] = {
-		{"PNP0C0C", 0},				/* Power button */
-		{"PNP0C0D", ACPI_AVOID_WAKE_FROM_S5},	/* Lid */
-		{"PNP0C0E", ACPI_AVOID_WAKE_FROM_S5},	/* Sleep button */
+		{"PNP0C0D", 0},	/* Lid */
+		{"PNP0C0E", 0},	/* Sleep button */
 		{"", 0},
 	};
 	struct acpi_device_wakeup *wakeup = &device->wakeup;
@@ -1022,15 +1018,9 @@ static bool acpi_wakeup_gpe_init(struct acpi_device *device)
 
 	wakeup->flags.notifier_present = 0;
 
-	/* Power button, Lid switch always enable wakeup */
 	match = acpi_match_acpi_device(button_device_ids, device);
-	if (match) {
-		if ((match->driver_data & ACPI_AVOID_WAKE_FROM_S5) &&
-		    wakeup->sleep_state == ACPI_STATE_S5)
-			wakeup->sleep_state = ACPI_STATE_S4;
-		acpi_mark_gpe_for_wake(wakeup->gpe_device, wakeup->gpe_number);
-		return true;
-	}
+	if (match && wakeup->sleep_state == ACPI_STATE_S5)
+		wakeup->sleep_state = ACPI_STATE_S4;
 
 	status = acpi_setup_gpe_for_wake(device->handle, wakeup->gpe_device,
 					 wakeup->gpe_number);
Signature · 1 line
2.53.0
author maintainer
#596 lore raw

PATCH 581/621 net: sparx5: start the TOD counters on non-PTP lan969x variants

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Quentin Freimanis <[email protected]>

[ Upstream commit ca5012757bf027df83d51593a07656cb8c80caee ]

Currently the base non-PTP-capable lan969x variants don't forward any Ethernet frames:

  $ ip link set eth10 up
  $ ip addr add 10.0.0.54/24 dev eth10
  $ ping 10.0.0.1
  PING 10.0.0.1 (10.0.0.1): 56 data bytes

--- 10.0.0.1 ping statistics ---
7 packets transmitted, 0 packets received, 100% packet loss

  $ cat /proc/interrupts | grep fdma
    20:          0  GIC-0  120 Level     sparx5-fdma
  $ ip -s link show dev eth10
      RX:  bytes packets errors dropped  missed   mcast
           20828     102      0       0       0      72
      TX:  bytes packets errors dropped carrier collsns
               0       0      0       0       0       0

Testing showed that starting the domain 0 TOD counter gets networking working again, but start all three for consistency with the PTP variants.

---
 .../ethernet/microchip/sparx5/sparx5_ptp.c    | 28 +++++++++++--------
 1 file changed, 16 insertions(+), 12 deletions(-)
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c +16 -12
index 5953e04ef14e6..2826e48af1033 100644
@@ -622,18 +622,9 @@ int sparx5_ptp_init(struct sparx5 *sparx5)
 		sparx5->ptp = 1;
 	}
 
-	if (!sparx5->ptp)
-		return 0;
-
-	for (i = 0; i < SPARX5_PHC_COUNT; ++i) {
-		err = sparx5_ptp_phc_init(sparx5, i, &sparx5_ptp_clock_info);
-		if (err)
-			return err;
-	}
-
-	spin_lock_init(&sparx5->ptp_clock_lock);
-	spin_lock_init(&sparx5->ptp_ts_id_lock);
-	mutex_init(&sparx5->ptp_lock);
+	/* The base, non-PTP-capable lan969x variants need the
+	 * first TOD counter running to forward frames.
+	 */
 
 	/* Disable master counters */
 	spx5_wr(PTP_PTP_DOM_CFG_PTP_ENA_SET(0), sparx5, PTP_PTP_DOM_CFG);
@@ -657,6 +648,19 @@ int sparx5_ptp_init(struct sparx5 *sparx5)
 	/* Enable master counters */
 	spx5_wr(PTP_PTP_DOM_CFG_PTP_ENA_SET(0x7), sparx5, PTP_PTP_DOM_CFG);
 
+	if (!sparx5->ptp)
+		return 0;
+
+	for (i = 0; i < SPARX5_PHC_COUNT; ++i) {
+		err = sparx5_ptp_phc_init(sparx5, i, &sparx5_ptp_clock_info);
+		if (err)
+			return err;
+	}
+
+	spin_lock_init(&sparx5->ptp_clock_lock);
+	spin_lock_init(&sparx5->ptp_ts_id_lock);
+	mutex_init(&sparx5->ptp_lock);
+
 	for (i = 0; i < sparx5->data->consts->n_ports; i++) {
 		port = sparx5->ports[i];
 		if (!port)
Signature · 1 line
2.53.0
author maintainer
#597 lore raw

PATCH 582/621 devlink: fix devlink_rel reference leak when notify work is pending

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Haishuang Yan <[email protected]>

[ Upstream commit c5381ae1cd1481cc431c2bd79460472c6f1d3ce3 ]

devlink_rel_nested_in_notify_work_schedule() takes a reference on the devlink_rel for the notify work and then queues the work, ignoring the return value of schedule_delayed_work(). If the work is already pending, nothing new is queued, the work runs only once and drops only one reference, so the extra one is leaked together with the devlink_rel and its index in devlink_rels.

This is easy to hit. devl_register() of a nested instance queues the work, and if the instance is unregistered before the work has run, devlink_rel_put() queues it again while it is still pending. The work also keeps rescheduling itself for as long as the parent devlink lock cannot be taken, which widens the window. Registering and unregistering a nested devlink instance 100 times while holding the parent lock leaks all 100 devlink_rel objects.

The reschedule path in devlink_rel_nested_in_notify_work() has the same
problem: if the work was queued again while it was running, the reference it holds is never dropped.

Drop the reference in both places when the work was already pending. The pending work holds its own reference, so this can not be the last one.

Fixes c137743bce02 ("devlink: introduce object and nested devlink relationship infra")
---
 net/devlink/core.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
net/devlink/core.c +8 -2
index d8f875b229897..0a31f28c8128c 100644
@@ -96,13 +96,19 @@ static void devlink_rel_nested_in_notify_work(struct work_struct *work)
 	return;
 
 reschedule_work:
-	schedule_delayed_work(&rel->nested_in.notify_work, 1);
+	/* The work may have been queued again meanwhile, which took its own
+	 * reference. Drop ours in that case.
+	 */
+	if (!schedule_delayed_work(&rel->nested_in.notify_work, 1))
+		__devlink_rel_put(rel);
 }
 
 static void devlink_rel_nested_in_notify_work_schedule(struct devlink_rel *rel)
 {
 	__devlink_rel_get(rel);
-	schedule_delayed_work(&rel->nested_in.notify_work, 0);
+	/* The pending work holds a reference already, drop the new one. */
+	if (!schedule_delayed_work(&rel->nested_in.notify_work, 0))
+		__devlink_rel_put(rel);
 }
 
 static struct devlink_rel *devlink_rel_alloc(void)
Signature · 1 line
2.53.0
author maintainer
#598 lore raw

PATCH 583/621 net/sched: cls_route: reject change with no routing attribute

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Victor Nogueira <[email protected]>

[ Upstream commit b72e025ac556984766392001e74b7587e145bcd0 ]

route4_change on a filter change that supplies no routing attribute at all (no to/from/iif) reaches route4_set_parms with fold set, so the handle-mismatch check -- which only fires when creating -- is skipped. nhandle is built as the all-wildcard bucket (0x8000 | 0xFFFF << 16) and the filter is rekeyed to 0xFFFF8000, so the handle userspace already stored no longer addresses the filter. (The netlink reply carries the new handle; what goes stale is the handle the caller holds.)

The rekey actually misclassifies the packets. The new handle's from_hash is the wildcard chain (route4_hash_wild), whose filters route4_classify applies without any id/iif comparison, and its bucket (256) is reached by every packet through the h < 256 restart. A filter that matched only a specific realm therefore becomes an unconditional catch-all that applies its classid and actions to all otherwise-unmatched traffic.

Reject a change that would rekey the filter this way, with the routing-attributes-required error. A change that names at least one of to/from/iif, and an in-place replace that keeps the routing identity via a supplied attribute, are unaffected. A change of a filter that already sits at the wildcard handle is a metadata-only update and remains valid, so only a change that actually moves the handle is rejected.

This is a follow-up to commit 41e85e54e564 ("net/sched: cls_route: Fix in-place replace"); this patch closes the no-routing-attribute variant that the parent series did not address.

Conditions to recreate the bug:
tc qdisc add dev lo clsact
tc filter add dev lo ingress protocol ip pref 100 route from 1 to 1 tc filter change dev lo ingress protocol ip pref 100 handle 0x10001 \
route classid 1:2
tc filter show dev lo ingress # handle became 0xffff8000; iproute2's

                                  # stored 0x10001 no longer addresses it

A change of a filter already at the wildcard handle, e.g. one created by "tc filter add dev lo ingress protocol ip pref 100 route classid 1:1" (iproute2 defaults the handle to 0xffff8000), stays a valid metadata-only update.

---
 net/sched/cls_route.c | 6 ++++++
 1 file changed, 6 insertions(+)
net/sched/cls_route.c +6 -0
index ac32c083f6335..1a41237d07aac 100644
@@ -434,6 +434,12 @@ static int route4_set_parms(struct net *net, struct tcf_proto *tp,
 	if (handle && (!fold || nhandle == (handle & ~0x7F00)))
 		nhandle |= handle & 0x7F00;
 
+	if (fold && !tb[TCA_ROUTE4_TO] && !tb[TCA_ROUTE4_FROM] &&
+	    !tb[TCA_ROUTE4_IIF] && nhandle != fold->handle) {
+		NL_SET_ERR_MSG(extack, "Routing attributes required");
+		return -EINVAL;
+	}
+
 	if (handle && !fold && nhandle != handle) {
 		NL_SET_ERR_MSG_FMT(extack,
 				   "Handle mismatch constructed: %x (expected: %x)",
Signature · 1 line
2.53.0
author maintainer
#599 lore raw

PATCH 584/621 Revert "net/mlx5: E-Switch, preserve max tx speed on vport state modification"

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Or Har-Toov <[email protected]>

[ Upstream commit 86b785b18f8f4a6b4a7392d1e2b29d6bb095011a ]

This reverts commit ad0ae7aefa7a ("net/mlx5: E-Switch, preserve max tx speed on vport state modification").

mlx5_modify_vport_admin_state() and mlx5_esw_adj_vport_modify() query the vport's current max_tx_speed before modifying its state, and write that value back, to avoid resetting it to 0 as a side effect of an unrelated admin-state change.

That's unnecessary: max_tx_speed is optional in MODIFY_VPORT_STATE - FW skips writing it whenever it's 0, treating that as "not provided" rather than "reset to zero". Leaving it unset already preserves FW's current value, with no query needed.

Fixes ad0ae7aefa7a ("net/mlx5: E-Switch, preserve max tx speed on vport state modification")
---
 .../mellanox/mlx5/core/esw/adj_vport.c        | 20 ----------------
 .../net/ethernet/mellanox/mlx5/core/vport.c   | 24 -------------------
 2 files changed, 44 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/esw/adj_vport.c +0 -20
index 8eaef73f3d77d..bdd07c1c68242 100644
@@ -11,26 +11,6 @@ int mlx5_esw_adj_vport_modify(struct mlx5_core_dev *dev, u16 vport,
 
 	lockdep_assert_held(&dev->priv.eswitch->state_lock);
 
-	if (MLX5_CAP_ESW(dev, esw_vport_state_max_tx_speed)) {
-		u8 op_mod = MLX5_VPORT_STATE_OP_MOD_ESW_VPORT;
-		struct mlx5_vport *esw_vport;
-		u32 speed = 0;
-		int err;
-
-		err = mlx5_query_vport_max_tx_speed(dev, op_mod, vport,
-						    true, &speed, NULL);
-		if (err) {
-			esw_vport = mlx5_eswitch_get_vport(dev->priv.eswitch,
-							   vport);
-			speed = IS_ERR(esw_vport) ? 0 :
-				esw_vport->agg_max_tx_speed;
-			mlx5_core_dbg(dev,
-				      "Failed to query vport %d max tx speed, err=%d, using cached %u\n",
-				      vport, err, speed);
-		}
-		MLX5_SET(modify_vport_state_in, in, max_tx_speed, speed);
-	}
-
 	MLX5_SET(modify_vport_state_in, in, opcode,
 		 MLX5_CMD_OP_MODIFY_VPORT_STATE);
 	MLX5_SET(modify_vport_state_in, in, op_mod,
drivers/net/ethernet/mellanox/mlx5/core/vport.c +0 -24
index 5d895287df54b..7dfaf3cb963c3 100644
@@ -93,30 +93,6 @@ int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
 	lockdep_assert_held(&mdev->priv.eswitch->state_lock);
 #endif
 
-	if (MLX5_CAP_ESW(mdev, esw_vport_state_max_tx_speed) &&
-	    opmod == MLX5_VPORT_STATE_OP_MOD_ESW_VPORT &&
-	    vport != MLX5_VPORT_UPLINK) {
-		u32 speed = 0;
-		int err;
-
-		err = mlx5_query_vport_max_tx_speed(mdev, opmod, vport,
-						    other_vport, &speed, NULL);
-		if (err) {
-#ifdef CONFIG_MLX5_ESWITCH
-			struct mlx5_vport *esw_vport;
-
-			esw_vport = mlx5_eswitch_get_vport(mdev->priv.eswitch,
-							   vport);
-			speed = IS_ERR(esw_vport) ? 0 :
-				esw_vport->agg_max_tx_speed;
-#endif
-			mlx5_core_dbg(mdev,
-				      "Failed to query vport %d max tx speed, err=%d, using cached %u\n",
-				      vport, err, speed);
-		}
-		MLX5_SET(modify_vport_state_in, in, max_tx_speed, speed);
-	}
-
 	MLX5_SET(modify_vport_state_in, in, opcode,
 		 MLX5_CMD_OP_MODIFY_VPORT_STATE);
 	MLX5_SET(modify_vport_state_in, in, op_mod, opmod);
Signature · 1 line
2.53.0
author maintainer
#600 lore raw

PATCH 585/621 net: bcmgenet: if UMAC was suspended in SW_RESET, restore it to SW_RESET

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Justin Chen <[email protected]>

[ Upstream commit 5857e5a196b069766a39ceb754736326a43bc6bc ]

When the revised suspend/resume sequence was introduced this led to an edge case where the TX is left disabled in the following sequence.

1. phy link is down, so UMAC is held in reset and then network interface is WoL enabled
2. Enter suspend, bcmgenet_wol_power_down_cfg() enables UMAC_RX since MAC is in SW_RESET
4. Enter resume, UMAC_RX is left enabled. Since we only enable UMAC_TX and UMAC_RX in SW_RESET. The UMAC_TX is never enabled again on link up.

The issue was hit in production and I verified the sequence keeps the TX disabled in my standalone test. I tested on an internal development board with bcm77122, but should be reproducible on any genet HW that supports power management.

---
 drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c +11 -0
index 96d5d4f7f51fe..984432952963a 100644
@@ -253,6 +253,17 @@ int bcmgenet_wol_power_up_cfg(struct bcmgenet_priv *priv,
 	reg = bcmgenet_umac_readl(priv, UMAC_CMD);
 	reg &= ~CMD_CRC_FWD;
 	bcmgenet_umac_writel(priv, reg, UMAC_CMD);
+
+	/*
+	 * Mirror wol_power_down_cfg(). If only UMAC_RX
+	 * is enabled, then we must place the UMAC back
+	 * into SW_RESET.
+	 */
+	reg = bcmgenet_umac_readl(priv, UMAC_CMD);
+	if ((reg & CMD_RX_EN) && !(reg & CMD_TX_EN)) {
+		reg |= CMD_SW_RESET;
+		bcmgenet_umac_writel(priv, reg, UMAC_CMD);
+	}
 	spin_unlock_bh(&priv->reg_lock);
 
 	/* Resume link status tracking */
Signature · 1 line
2.53.0
author maintainer
#591 lore raw

PATCH 576/621 ASoC: samsung: i2s: enable op_clk in probe to balance runtime PM

In reply to Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Marek Szyprowski <[email protected]>

[ Upstream commit 7529254014764ae0b8c33d5c61a58f36c65b1a1c ]

The probe function puts the device into the runtime PM active state with only the "iis" bus clock enabled, but it also sets priv->op_clk to the parent of the RCLK_SRC mux without enabling it. The runtime PM suspend callback disables both clocks, so the first runtime suspend after probe disables op_clk once more than it was enabled.

On Exynos5250 Arndale both clocks resolve to the same EXYNOS_I2S_BUS gate, so this triggers the following warning during boot:

 WARNING: drivers/clk/clk.c:1270 at clk_core_disable+0xe4/0x23c, CPU#0: kworker/u8:3/45
 i2s_bus already disabled
 ...
 Workqueue: pm pm_runtime_work
 Call trace:
  ...
  clk_core_disable from clk_disable+0x28/0x34
  clk_disable from i2s_runtime_suspend+0x58/0x68 [snd_soc_i2s]
  i2s_runtime_suspend [snd_soc_i2s] from genpd_runtime_suspend+0xc4/0x298
  genpd_runtime_suspend from __rpm_callback+0x48/0x18c
  __rpm_callback from rpm_callback+0x4c/0x50
  rpm_callback from rpm_suspend+0xf4/0x718
  rpm_suspend from pm_runtime_work+0x9c/0xa0
  ...

Fix this by enabling op_clk in probe right after getting it, so the clock state matches the runtime PM active state, and by disabling it in remove.

Fixes 48279c53fd1d ("ASoC: samsung: i2s: Prevent external abort on exynos5433 I2S1 access")
Assisted-by Claude Opus 5.5 <[email protected]>
---
 sound/soc/samsung/i2s.c | 8 ++++++++
 1 file changed, 8 insertions(+)
sound/soc/samsung/i2s.c +8 -0
index 140907a41a70d..7bb80d73bd661 100644
@@ -1543,9 +1543,16 @@ static int samsung_i2s_probe(struct platform_device *pdev)
 		goto err_disable_pm;
 
 	priv->op_clk = clk_get_parent(priv->clk_table[CLK_I2S_RCLK_SRC]);
+	ret = clk_prepare_enable(priv->op_clk);
+	if (ret < 0) {
+		priv->op_clk = NULL;
+		goto err_unregister_clk;
+	}
 
 	return 0;
 
+err_unregister_clk:
+	i2s_unregister_clock_provider(priv);
 err_disable_pm:
 	pm_runtime_disable(&pdev->dev);
 err_del_sec:
@@ -1568,6 +1575,7 @@ static void samsung_i2s_remove(struct platform_device *pdev)
 
 	i2s_unregister_clock_provider(priv);
 	i2s_delete_secondary_device(priv);
+	clk_disable_unprepare(priv->op_clk);
 	clk_disable_unprepare(priv->clk);
 
 	pm_runtime_put_noidle(&pdev->dev);
Signature · 1 line
2.53.0
#51 lore raw

Re: [PATCH 6.18 050/621] RISC-V: Clear HSTATUS.HU on CPU initialization

In reply to Greg Kroah-Hartman
Quoted 19 lines · On Tue, 13 Oct 2026 13:30:45 +0200 Greg Kroah-Hartman…

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yong-Xuan Wang <[email protected]>

commit 6694612317e5225086e39ca1ba97ada2b1942e48 upstream.

The RISC-V privileged specification does not mandate HSTATUS reset values, leaving the HU bit potentially set after hardware reset. When HU=1, hypervisor instructions (HLV/HLVX/HSV) can execute in U-mode to access guest memory, which may cause unintended behavior if not explicitly controlled.

Clear HSTATUS.HU during CPU initialization to ensure hypervisor instructions are only available in HS-mode, preventing unexpected guest memory access from U-mode code.

Quoted 7 lines

Please see:

https://lore.kernel.org/stable/[email protected]/

Cheers,
Miguel

#613 lore raw
In reply to Brett A C Sheffield
Quoted 11 lines · Brett A C Sheffield
Quoted 7 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.57 release. There are 621 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 15 Oct 2026 11:28:22 +0000. Anything received after that time might be too late.

Build failing on amd64:

Quoted 12 lines

/usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function `gss_krb5_get_mic_v2':
(.text+0xfc2762): undefined reference to crypto_krb5_get_mic' /usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function gss_krb5_verify_mic_v2':
(.text+0xfc293a): undefined reference to crypto_krb5_verify_mic' /usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function gss_krb5_aead_encrypt':
(.text+0xfc47a1): undefined reference to crypto_krb5_encrypt' /usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function gss_krb5_aead_decrypt':
(.text+0xfc48f8): undefined reference to `crypto_krb5_decrypt'
make[2]: *** [scripts/Makefile.vmlinux:72: vmlinux.unstripped] Error 1
make[1]: *** [/usr/src/linux-stable-rc/Makefile:1272: vmlinux] Error 2
make: *** [Makefile:248: __sub-make] Error 2

We see same problem here:

https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/jobs/17139116508

Best regards,
Pavel

#187 lore raw

Re: [PATCH 6.18 177/621] srcu: Use irq_work to start GP in tiny SRCU

In reply to Greg Kroah-Hartman

Hello,

Quoted 43 lines · On Tue, 13 Oct 2026 13:32:52 +0200 Greg Kroah-Hartman…

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Joel Fernandes <[email protected]>

[ Upstream commit a6fc88b22bc8d12ad52e8412c667ec0f5bf055af ]

Tiny SRCU's srcu_gp_start_if_needed() directly calls schedule_work(), which acquires the workqueue pool->lock.

This causes a lockdep splat when call_srcu() is called with a scheduler lock held, due to:

call_srcu() [holding pi_lock]

    srcu_gp_start_if_needed()
      schedule_work() -> pool->lock

workqueue_init() / create_worker() [holding pool->lock]

    wake_up_process() -> try_to_wake_up() -> pi_lock

Also add irq_work_sync() to cleanup_srcu_struct() to prevent a use-after-free if a queued irq_work fires after cleanup begins.

Tested with rcutorture SRCU-T and no lockdep warnings.

[ Thanks to Boqun for similar fix in patch "rcu: Use an intermediate irq_work to start process_srcu()" ]

---
 include/linux/srcutiny.h |  4 ++++
 kernel/rcu/srcutiny.c    | 19 ++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)
include/linux/srcutiny.h +0 -0
index 51ce25f07930e..1f9a226e6fd81 100644

include/linux/srcutiny.h line 14

Quoted 4 lines
include/linux/srcutiny.h +1 -0
@@ -11,6 +11,7 @@
 #ifndef _LINUX_SRCU_TINY_H
 #define _LINUX_SRCU_TINY_H
 
+#include <linux/irq_work_types.h>

I just found this makes UM build for kunit fails like below:

'''

$ ./tools/testing/kunit/kunit.py run --kunitconfig mm/damon/tests/
[07:00:33] Configuring KUnit Kernel ...
[07:00:33] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=14
ERROR:root:In file included from ../include/linux/srcu.h:59,
                 from ../include/linux/notifier.h:16,
                 from ../include/linux/memory_hotplug.h:7,
                 from ../include/linux/mmzone.h:1538,
                 from ../include/linux/gfp.h:7,
                 from ../include/linux/slab.h:17,
                 from ../include/linux/crypto.h:18,
                 from ../arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                 from ../arch/um/kernel/asm-offsets.c:3:
../include/linux/srcutiny.h:14:10: fatal error: linux/irq_work_types.h: No such file or directory
   14 | #include <linux/irq_work_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
'''

Seems commit c809f081fe40 ("irqwork: Move data struct to a types header") which made irq_work_types.h is not in the queue. Below simple change fixed the issue on my setup.

'''

include/linux/srcutiny.h +1 -1
index 1f9a226e6fd81..786693905accc 100644
@@ -11,7 +11,7 @@
 #ifndef _LINUX_SRCU_TINY_H
 #define _LINUX_SRCU_TINY_H
 
-#include <linux/irq_work_types.h>
+#include <linux/irq_work.h>
 #include <linux/swait.h>
 
 struct srcu_struct {

'''

Cherry-picking the commit c809f081fe40 ("irqwork: Move data struct to a types header") also fixed the issue on my setup.

Thanks,
SJ

[...]

#188 lore raw

Re: [PATCH 6.18 177/621] srcu: Use irq_work to start GP in tiny SRCU

Quoted 97 lines · SJ Park

Hello,

Quoted 43 lines · On Tue, 13 Oct 2026 13:32:52 +0200 Greg Kroah-Hartman…

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Joel Fernandes <[email protected]>

[ Upstream commit a6fc88b22bc8d12ad52e8412c667ec0f5bf055af ]

Tiny SRCU's srcu_gp_start_if_needed() directly calls schedule_work(), which acquires the workqueue pool->lock.

This causes a lockdep splat when call_srcu() is called with a scheduler lock held, due to:

call_srcu() [holding pi_lock]

    srcu_gp_start_if_needed()
      schedule_work() -> pool->lock

workqueue_init() / create_worker() [holding pool->lock]

    wake_up_process() -> try_to_wake_up() -> pi_lock

Also add irq_work_sync() to cleanup_srcu_struct() to prevent a use-after-free if a queued irq_work fires after cleanup begins.

Tested with rcutorture SRCU-T and no lockdep warnings.

[ Thanks to Boqun for similar fix in patch "rcu: Use an intermediate irq_work to start process_srcu()" ]

---
 include/linux/srcutiny.h |  4 ++++
 kernel/rcu/srcutiny.c    | 19 ++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)
include/linux/srcutiny.h +0 -0
index 51ce25f07930e..1f9a226e6fd81 100644

include/linux/srcutiny.h line 14

Quoted 4 lines
include/linux/srcutiny.h +1 -0
@@ -11,6 +11,7 @@
 #ifndef _LINUX_SRCU_TINY_H
 #define _LINUX_SRCU_TINY_H
 
+#include <linux/irq_work_types.h>

I just found this makes UM build for kunit fails like below:

'''

$ ./tools/testing/kunit/kunit.py run --kunitconfig mm/damon/tests/
[07:00:33] Configuring KUnit Kernel ...
[07:00:33] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=14
ERROR:root:In file included from ../include/linux/srcu.h:59,
                 from ../include/linux/notifier.h:16,
                 from ../include/linux/memory_hotplug.h:7,
                 from ../include/linux/mmzone.h:1538,
                 from ../include/linux/gfp.h:7,
                 from ../include/linux/slab.h:17,
                 from ../include/linux/crypto.h:18,
                 from ../arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                 from ../arch/um/kernel/asm-offsets.c:3:
../include/linux/srcutiny.h:14:10: fatal error: linux/irq_work_types.h: No such file or directory
   14 | #include <linux/irq_work_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
'''

Seems commit c809f081fe40 ("irqwork: Move data struct to a types header") which made irq_work_types.h is not in the queue. Below simple change fixed the issue on my setup.

'''

include/linux/srcutiny.h +1 -1
index 1f9a226e6fd81..786693905accc 100644
@@ -11,7 +11,7 @@
 #ifndef _LINUX_SRCU_TINY_H
 #define _LINUX_SRCU_TINY_H
 
-#include <linux/irq_work_types.h>
+#include <linux/irq_work.h>
 #include <linux/swait.h>
 
 struct srcu_struct {

'''

Quoted 3 lines

Cherry-picking the commit c809f081fe40 ("irqwork: Move data struct to a types header") also fixed the issue on my setup.

Thank you for spotting this. Both fixes look good to me. I will let stable team decide which one they want to proceed with, thanks!

Regards,
Boqun

Quoted 5 lines

Thanks,
SJ

[...]

#160 lore raw

Re: [PATCH 6.18 158/621] ice: drop page splitting and recycling

In reply to Greg Kroah-Hartman

From: Greg Kroah-Hartman <[email protected]>
Date: Tue, 13 Oct 2026 13:32:33 +0200

Quoted 4 lines

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

Quoted 8 lines

From: Michal Kubiak <[email protected]>

[ Upstream commit 3a4f419f750946181e3d6a339a1ef1942c5b5685 ]

As part of the transition toward Page Pool integration, remove the legacy page splitting and recycling logic from the ice driver. This mirrors the approach taken in commit 920d86f3c552 ("iavf: drop page splitting and recycling").

This is intermediate commit, if taken without 93f53db9f9dc ("ice: switch to Page Pool") there'll be huge performance regression on all ice cards.

Quoted 26 lines

The previous model attempted to reuse partially consumed pages by splitting them and tracking their usage across descriptors. While this was once a memory optimization, it introduced significant complexity and overhead in the Rx path, including:
- Manual refcount management and page reuse heuristics;
- Per-descriptor buffer shuffling, which could involve moving dozens of ice_rx_buf structures per NAPI cycle;
- Increased branching and cache pressure in the hotpath.

This change simplifies the Rx logic by always allocating fresh pages and letting the networking stack handle their lifecycle. Although this may temporarily reduce performance (up to ~98% in some XDP cases), it greatly improves maintainability and paves the way for Page Pool, which will restore and exceed previous performance levels.

The ice_rx_buf array is retained for now to minimize diffstat and ease future replacement with a shared buffer abstraction.

Quoted 2 lines

Stable-dep-of: e142dc4ef0f4 ("ice: change XDP RxQ frag_size from DMA write length to xdp.frame_sz")

Thanks,
Olek

#644 lore raw
In reply to Greg Kroah-Hartman
Quoted 8 lines · On Tue, 13 Oct 2026 13:29:55 +0200 Greg Kroah-Hartman…

This is the start of the stable review cycle for the 6.18.57 release. There are 621 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 15 Oct 2026 11:28:22 +0000. Anything received after that time might be too late.

For this one, like others, I am hitting the crypto_krb5_* everywhere plus, for riscv64, the RISCV_ISA_EXT_H issue I reported.

I hope that helps!

Cheers,
Miguel

#614 lore raw
In reply to Pavel Machek
Quoted 25 lines · Pavel Machek
Quoted 11 lines · Brett A C Sheffield
Quoted 7 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.57 release. There are 621 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 15 Oct 2026 11:28:22 +0000. Anything received after that time might be too late.

Build failing on amd64:

Quoted 12 lines

/usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function `gss_krb5_get_mic_v2':
(.text+0xfc2762): undefined reference to crypto_krb5_get_mic' /usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function gss_krb5_verify_mic_v2':
(.text+0xfc293a): undefined reference to crypto_krb5_verify_mic' /usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function gss_krb5_aead_encrypt':
(.text+0xfc47a1): undefined reference to crypto_krb5_encrypt' /usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function gss_krb5_aead_decrypt':
(.text+0xfc48f8): undefined reference to `crypto_krb5_decrypt'
make[2]: *** [scripts/Makefile.vmlinux:72: vmlinux.unstripped] Error 1
make[1]: *** [/usr/src/linux-stable-rc/Makefile:1272: vmlinux] Error 2
make: *** [Makefile:248: __sub-make] Error 2

Quoted 3 lines

We see same problem here:

https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/jobs/17139116508

And here as well.

Signature · 1 line
Florian
#615 lore raw

Am 13.10.2026 um 21:19 schrieb Florian Fainelli:

Quoted 26 lines · Pavel Machek
Quoted 25 lines · Brett A C Sheffield
Quoted 23 lines · Greg Kroah-Hartman
Quoted 7 lines

This is the start of the stable review cycle for the 6.18.57 release. There are 621 patches in this series, all will be posted as a response to this one.  If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 15 Oct 2026 11:28:22 +0000. Anything received after that time might be too late.

Build failing on amd64:

/usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function `gss_krb5_get_mic_v2':
(.text+0xfc2762): undefined reference to crypto_krb5_get_mic' /usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function gss_krb5_verify_mic_v2':
(.text+0xfc293a): undefined reference to crypto_krb5_verify_mic' /usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function gss_krb5_aead_encrypt':
(.text+0xfc47a1): undefined reference to crypto_krb5_encrypt' /usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function gss_krb5_aead_decrypt':
(.text+0xfc48f8): undefined reference to `crypto_krb5_decrypt'
make[2]: *** [scripts/Makefile.vmlinux:72: vmlinux.unstripped] Error 1
make[1]: *** [/usr/src/linux-stable-rc/Makefile:1272: vmlinux] Error 2
make: *** [Makefile:248: __sub-make] Error 2

Quoted 5 lines
Quoted 3 lines

We see same problem here:

https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/jobs/17139116508

And here as well.

Strangely, my build succeeded, and it booted, too. I built, as usual, on my 2-socket Ivy Bridge Xeon E5-2697v2 server, with "make olddefconfig" based on the config of the Proxmox VE kernel 6.17.13-21-pve. Also my dmesg output shows in the last lines:

[  101.288430] krb5:
[  101.288434] krb5: Running selftests
[  101.288435] krb5: Running aes128-cts-hmac-sha256-128 prf
[  101.288445] krb5: Running aes256-cts-hmac-sha384-192 prf
[  101.288452] krb5: Running aes128-cts-hmac-sha256-128 key
[  101.288460] krb5: Running aes256-cts-hmac-sha384-192 key
[  101.288469] krb5: Running camellia128-cts-cmac key
[  101.316448] AVX2 or AES-NI instructions are not detected.
[  101.359071] krb5: Running camellia256-cts-cmac key
[  101.359084] krb5: Running aes128-cts-hmac-sha256-128 enc no plain
[  101.372528] krb5: Running aes128-cts-hmac-sha256-128 enc plain<block
[  101.372540] krb5: Running aes128-cts-hmac-sha256-128 enc plain==block
[  101.372547] krb5: Running aes128-cts-hmac-sha256-128 enc plain>block
[  101.372555] krb5: Running aes256-cts-hmac-sha384-192 enc no plain
[  101.377075] krb5: Running aes256-cts-hmac-sha384-192 enc plain<block
[  101.377088] krb5: Running aes256-cts-hmac-sha384-192 enc plain==block
[  101.377098] krb5: Running aes256-cts-hmac-sha384-192 enc plain>block
[  101.377107] krb5: Running camellia128-cts-cmac enc no plain
[  101.394163] krb5: Running camellia128-cts-cmac enc 1 plain
[  101.394179] krb5: Running camellia128-cts-cmac enc 9 plain
[  101.394190] krb5: Running camellia128-cts-cmac enc 13 plain
[  101.394200] krb5: Running camellia128-cts-cmac enc 30 plain
[  101.394212] krb5: Running camellia256-cts-cmac enc no plain
[  101.394223] krb5: Running camellia256-cts-cmac enc 1 plain
[  101.394235] krb5: Running camellia256-cts-cmac enc 9 plain
[  101.394247] krb5: Running camellia256-cts-cmac enc 13 plain
[  101.394259] krb5: Running camellia256-cts-cmac enc 30 plain
[  101.394272] krb5: Running aes128-cts-hmac-sha256-128 mic
[  101.394282] krb5: Running aes256-cts-hmac-sha384-192 mic
[  101.394290] krb5: Running camellia128-cts-cmac mic abc
[  101.394297] krb5: Running camellia128-cts-cmac mic ABC
[  101.394303] krb5: Running camellia256-cts-cmac mic 123
[  101.394310] krb5: Running camellia256-cts-cmac mic !@#
[  101.394317] krb5: Selftests succeeded

so everything seems to be fine on my machine.

I wonder what triggered the build error for the other folks who encountered it? I'll attach my .config in case anyone wants to compare with theirs where the build failed.

Beste Grüße,
Peter Schneider

Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge,
enjoy the air and behold the view. Climb it so you can see the world,
not so the world can see you.                    -- David McCullough Jr.

OpenPGP:  0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244
Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc
https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Tested-by on the v1 series
#645 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.57 release. There are 621 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 15 Oct 2026 11:28:22 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 9 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.57-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.18.y
and the diffstat can be found below.

thanks,

greg k-h

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah

maintainer
#616 lore raw
In reply to Brett A C Sheffield
Quoted 4 lines

Build failing on amd64:

/usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function `gss_krb5_get_mic_v2':
(.text+0xfc2762): undefined reference to `crypto_krb5_get_mic'

Thanks for the report. The krb5 patches in the queue need a select of CRYPTO_KRB5 that was missing. Queued for 6.18.

Signature · 2 lines
Thanks,
Sasha
Tested-by on the v1 series
#646 lore raw
In reply to Greg Kroah-Hartman

Build tested in our x86,arm64,loongarch config successfully without error.

I met the same riscv 'RISCV_ISA_EXT_H' build issue others had reported.

Best Regards
Wentao Guan

Log:
arch/riscv/kernel/cpufeature.c: In function ‘riscv_clear_hypervisor_csr’:
arch/riscv/kernel/cpufeature.c:1140:43: error: ‘RISCV_ISA_EXT_H’ undeclared (first use in this function); did you mean ‘RISCV_ISA_EXT_h’?

 1140 |         if (!riscv_has_extension_unlikely(RISCV_ISA_EXT_H))
      |                                           ^~~~~~~~~~~~~~~
      |                                           RISCV_ISA_EXT_h
arch/riscv/kernel/cpufeature.c:1140:43: note: each undeclared identifier is reported only once for each function it appears in
  CC      arch/riscv/kernel/acpi.o
  CC      arch/riscv/kernel/pi/cmdline_early.o
  CC      arch/riscv/kernel/acpi_numa.o
#617 lore raw
In reply to Sasha Levin
Quoted 7 lines · Sasha Levin
Quoted 4 lines

Build failing on amd64:

/usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function `gss_krb5_get_mic_v2':
(.text+0xfc2762): undefined reference to `crypto_krb5_get_mic'

Thanks for the report. The krb5 patches in the queue need a select of CRYPTO_KRB5 that was missing. Queued for 6.18.

Thanks.

Will there be an RC2?

Brett

author maintainer
#618 lore raw
Quoted 6 lines · Brett A C Sheffield
Quoted 5 lines · Sasha Levin
Quoted 4 lines

Build failing on amd64:

/usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: vmlinux.o: in function `gss_krb5_get_mic_v2':
(.text+0xfc2762): undefined reference to `crypto_krb5_get_mic'

Quoted 6 lines
Quoted 2 lines

Thanks for the report. The krb5 patches in the queue need a select of CRYPTO_KRB5 that was missing. Queued for 6.18.

Thanks.

Will there be an RC2?

Yes, let me work on that today...

maintainer
#189 lore raw

Re: [PATCH 6.18 177/621] srcu: Use irq_work to start GP in tiny SRCU

In reply to SJ Park
Quoted 2 lines

Cherry-picking the commit c809f081fe40 ("irqwork: Move data struct to a types header") also fixed the issue on my setup.

Thanks for the report. I queued c809f081fe40 ("irqwork: Move data struct to a types header") for 6.18, ahead of this patch.

Signature · 2 lines
Thanks,
Sasha
maintainer
#161 lore raw

Re: [PATCH 6.18 158/621] ice: drop page splitting and recycling

In reply to Alexander Lobakin
Quoted 3 lines

This is intermediate commit, if taken without 93f53db9f9dc ("ice: switch to Page Pool") there'll be huge performance regression on all ice cards.

Thanks, that makes sense. This patch is dropped from the 6.18 queue, together with the other five ice patches queued with it:

9e314a3c525c ("ice: remove legacy Rx and construct SKB")
3a4f419f7509 ("ice: drop page splitting and recycling")
a9c354e65659 ("ice: fix crash in ethtool offline loopback test") 02852b47c706 ("ice: fix rxq info registering in mbuf packets") e142dc4ef0f4 ("ice: change XDP RxQ frag_size from DMA write length to xdp.frame_sz") 436fa8e7d1a1 ("ice: fix broken Rx on VFs")

That leaves 6.18 without the XDP frag_size fix (the fifth one above). Could someone from Intel send an adapted [PATCH 6.18.y] of it for the 6.18 Rx code, without Page Pool?

Signature · 2 lines
Thanks,
Sasha
#190 lore raw

Re: Re: [PATCH 6.18 177/621] srcu: Use irq_work to start GP in tiny SRCU

In reply to Sasha Levin
Quoted 3 lines · On Wed, 14 Oct 2026 12:53:05 -0400 Sasha Levin <[email protected]> wrote:

Thanks for the report. I queued c809f081fe40 ("irqwork: Move data struct to a types header") for 6.18, ahead of this patch.

Hmm... it see it in the queue, but not in -rc2.

By the way, for completeness: the same backported patch happened to trigger this same issue months ago in 6.18.y and 6.12.y (back then Greg dropped it):

https://lore.kernel.org/all/[email protected]/

Cheers,
Miguel

maintainer
#191 lore raw

Re: [PATCH 6.18 177/621] srcu: Use irq_work to start GP in tiny SRCU

Quoted 1 line

Hmm... it see it in the queue, but not in -rc2.

It was queued after -rc2 went out, and it is in the released 6.18.57, ahead of the srcu patch.

Quoted 3 lines

By the way, for completeness: the same backported patch happened to trigger this same issue months ago in 6.18.y and 6.12.y (back then Greg dropped it):

The srcu patch is queued again for 6.12 and 6.6, so both now get "irqwork:
Move data struct to a types header", along with "types: move struct rcuwait into types.h", which it needs on those trees.

Signature · 2 lines
Thanks,
Sasha
maintainer
#192 lore raw

Re: Re: [PATCH 6.18 177/621] srcu: Use irq_work to start GP in tiny SRCU

In reply to Miguel Ojeda
Quoted 4 lines · Miguel Ojeda

Hmm... it see it in the queue, but not in -rc2.

By the way, for completeness: the same backported patch happened to trigger this same issue months ago in 6.18.y and 6.12.y (back then Greg dropped it):

Thanks. I looked at all the older trees that carry this patch. The "linux/irq_work_types.h" include in srcutiny.h needs two prerequisites, 2c2bd11caba2 ("types: move struct rcuwait into types.h") and c809f081fe40 ("irqwork: Move data struct to a types header"):

- 6.1: the patch was queued without them, and UML (TINY_SRCU) builds fail the same way. I dropped it from the 6.1 queue.

- 6.12 and 6.6: both prerequisites were already queued, but after the srcu patch, so only the intermediate commits fail to build. I moved them to sit directly before it. The patch contents are unchanged.

6.18.y shipped the prerequisite together with the patch in 6.18.57.

Signature · 2 lines
Thanks,
Sasha
#162 lore raw

Re: [PATCH 6.18 158/621] ice: drop page splitting and recycling

In reply to Sasha Levin

Hi,

Just a follow-up on this one, as I just got burned by it a little.

These made it into 6.18.58-rc1, which I was still testing (I wasn't aware that some patches had been dropped from the final 6.18.58 without notice). After deploying it to a machine using the ice driver, I noticed a huge memory leak. It's easily reproducible:
running a flood ping eats about 1 GB of kernel memory per second, effectively killing the machine within minutes.

So I just wanted to report that these cause more than just a performance regression.

Anyway, I'd love to see these in 6.18, as some users have reported that this series fixes some nasty memory corruption.

For some time I've been using the following ice commits, backported to 6.18.44, without any issues:

e314a3c525c91c1e918546f472585cdbd44fbd1
3a4f419f750946181e3d6a339a1ef1942c5b5685
93f53db9f9dc4a16b40ecd18e6d338ad57e4b670
436fa8e7d1a119ec90f39e7c2ce0f3a146652899
a9c354e656597aededa027d63d2ff0973f6b033f

But since I was busy hunting the bug, and then found out that corruption was most likely caused by something else (a patch has already been posted for 6.18.59 by Yosry Ahmed), I never proposed submitting these to -stable. Later I saw them in 6.18.58-rc1 so I just scratched that..

BR

nik

Quoted 22 lines · Sasha Levin
Quoted 3 lines

This is intermediate commit, if taken without 93f53db9f9dc ("ice: switch to Page Pool") there'll be huge performance regression on all ice cards.

Thanks, that makes sense. This patch is dropped from the 6.18 queue, together with the other five ice patches queued with it:

9e314a3c525c ("ice: remove legacy Rx and construct SKB")
3a4f419f7509 ("ice: drop page splitting and recycling")
a9c354e65659 ("ice: fix crash in ethtool offline loopback test") 02852b47c706 ("ice: fix rxq info registering in mbuf packets") e142dc4ef0f4 ("ice: change XDP RxQ frag_size from DMA write length to xdp.frame_sz") 436fa8e7d1a1 ("ice: fix broken Rx on VFs")

That leaves 6.18 without the XDP frag_size fix (the fifth one above). Could someone from Intel send an adapted [PATCH 6.18.y] of it for the 6.18 Rx code, without Page Pool?

Signature · 2 lines
Thanks,
Sasha
Signature · 8 lines
Ing. Nikola CIPRICH
technický ředitel

+420 591 166 214
+420 777 093 799
[email protected]

www.linuxbox.cz
author maintainer Applied
#163 lore raw

Re: [PATCH 6.18 158/621] ice: drop page splitting and recycling

Quoted 26 lines · Nikola Ciprich

Hi,

Just a follow-up on this one, as I just got burned by it a little.

These made it into 6.18.58-rc1, which I was still testing (I wasn't aware that some patches had been dropped from the final 6.18.58 without notice). After deploying it to a machine using the ice driver, I noticed a huge memory leak. It's easily reproducible:
running a flood ping eats about 1 GB of kernel memory per second, effectively killing the machine within minutes.

So I just wanted to report that these cause more than just a performance regression.

Anyway, I'd love to see these in 6.18, as some users have reported that this series fixes some nasty memory corruption.

For some time I've been using the following ice commits, backported to 6.18.44, without any issues:

e314a3c525c91c1e918546f472585cdbd44fbd1
3a4f419f750946181e3d6a339a1ef1942c5b5685
93f53db9f9dc4a16b40ecd18e6d338ad57e4b670
436fa8e7d1a119ec90f39e7c2ce0f3a146652899
a9c354e656597aededa027d63d2ff0973f6b033f

Quoted 5 lines

But since I was busy hunting the bug, and then found out that corruption was most likely caused by something else (a patch has already been posted for 6.18.59 by Yosry Ahmed), I never proposed submitting these to -stable. Later I saw them in 6.18.58-rc1 so I just scratched that..

I've queued up all of the above now, thanks!

greg k-h

maintainer
#164 lore raw

Re: [PATCH 6.18 158/621] ice: drop page splitting and recycling

In reply to Nikola Ciprich
Quoted 4 lines

After deploying it to a machine using the ice
driver, I noticed a huge memory leak. It's easily reproducible:
running a flood ping eats about 1 GB of kernel memory per second, effectively killing the machine within minutes.

The partial series that leaked is out. Greg has now queued the full ice Page Pool conversion for 6.18 (remove legacy Rx, drop page splitting, switch to Page Pool, plus the two follow-up fixes), so please test the next 6.18 rc.

Signature · 2 lines
Thanks,
Sasha
#165 lore raw

Re: [PATCH 6.18 158/621] ice: drop page splitting and recycling

Quoted 4 lines

The partial series that leaked is out. Greg has now queued the full ice Page Pool conversion for 6.18 (remove legacy Rx, drop page splitting, switch to Page Pool, plus the two follow-up fixes), so please test the next 6.18 rc.

already testing :-) now it looks OK to me. thanks. n.

Quoted 5 lines
Signature · 3 lines
-- 
Thanks,
Sasha
maintainer
#166 lore raw

Re: [PATCH 6.18 158/621] ice: drop page splitting and recycling

In reply to Nikola Ciprich
Quoted 6 lines

02852b47c706 ("ice: fix rxq info registering in mbuf packets") e142dc4ef0f4 ("ice: change XDP RxQ frag_size from DMA write length to xdp.frame_sz")

That leaves 6.18 without the XDP frag_size fix (the fifth one above). Could someone from Intel send an adapted [PATCH 6.18.y] of it for the 6.18 Rx code, without Page Pool?

With the full Page Pool conversion back in the 6.18 queue, no adapted patch is needed. Queued the two XDP RxQ fixes quoted above for 6.18 as well, thanks.

Signature · 2 lines
Thanks,
Sasha
#167 lore raw

RE: [PATCH 6.18 158/621] ice: drop page splitting and recycling

Quoted 19 lines

-----Original Message-----
From: Sasha Levin <[email protected]>
Sent: Saturday, October 24, 2026 1:11 PM
To: Nikola Ciprich <[email protected]>
Cc: Sasha Levin <[email protected]>; Greg Kroah-Hartman <[email protected]>; [email protected]; [email protected]; Keller, Jacob E <[email protected]>; Michal Kubiak <[email protected]>; Nowlin, Alexander <[email protected]>; Nguyen, Anthony L <[email protected]>; Lobakin, Aleksander <[email protected]>
Subject: Re: [PATCH 6.18 158/621] ice: drop page splitting and recycling

Quoted 2 lines

02852b47c706 ("ice: fix rxq info registering in mbuf packets") e142dc4ef0f4 ("ice: change XDP RxQ frag_size from DMA write length to

xdp.frame_sz")

Quoted 1 line
Quoted 9 lines
Quoted 2 lines

That leaves 6.18 without the XDP frag_size fix (the fifth one above). Could someone from Intel send an adapted [PATCH 6.18.y] of it for the 6.18 Rx

code,

Quoted 1 line

without Page Pool?

With the full Page Pool conversion back in the 6.18 queue, no adapted patch is needed. Queued the two XDP RxQ fixes quoted above for 6.18 as well, thanks.

Yep that sounds correct. Thanks!

-Jake

Quoted 3 lines

--
Thanks,
Sasha