Skip to contentSkip to conversation

6.14.9-rc1 review

PATCH In review Greg Kroah-Hartman 23 participants 817 messages May 27, 2025 – Jun 4, 2025 Page 1 of 7

Subsystems (5)
lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH 1/783 drm/amd/display: Do not enable replay when vtotal update is pending.

In reply to Greg Kroah-Hartman

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

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

From: Danny Wang <[email protected]>

[ Upstream commit bd00b29b5f236dce677089319176dee5872b5a7a ]

[Why&How]
Vtotal is not applied to HW when handling vsync interrupt. Make sure vtotal is aligned before enable replay.

Stable-dep-of: 874697e12793 ("drm/amd/display: Defer BW-optimization-blocked DRR adjustments")

---
 drivers/gpu/drm/amd/display/dc/core/dc.c          |  9 +++++++--
 .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 15 +++++++++++++++
 drivers/gpu/drm/amd/display/dc/dc_hw_types.h      |  1 +
 .../drm/amd/display/dc/hwss/dce110/dce110_hwseq.c |  7 ++-----
 .../drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c   |  7 ++-----
 .../drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c   |  8 ++------
 .../drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c   |  4 +---
 .../drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |  3 +--
 .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 10 +++-------
 .../gpu/drm/amd/display/dc/hwss/hw_sequencer.h    |  6 ++++++
 10 files changed, 40 insertions(+), 30 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +7 -2
index 4683c7ef4507f..a444fe1e0838a 100644
@@ -452,6 +452,7 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,
 
 	if (dc->caps.max_v_total != 0 &&
 		(adjust->v_total_max > dc->caps.max_v_total || adjust->v_total_min > dc->caps.max_v_total)) {
+		stream->adjust.timing_adjust_pending = false;
 		if (adjust->allow_otg_v_count_halt)
 			return set_long_vtotal(dc, stream, adjust);
 		else
@@ -465,7 +466,7 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,
 			dc->hwss.set_drr(&pipe,
 					1,
 					*adjust);
-
+			stream->adjust.timing_adjust_pending = false;
 			return true;
 		}
 	}
@@ -3127,8 +3128,12 @@ static void copy_stream_update_to_stream(struct dc *dc,
 	if (update->vrr_active_fixed)
 		stream->vrr_active_fixed = *update->vrr_active_fixed;
 
-	if (update->crtc_timing_adjust)
+	if (update->crtc_timing_adjust) {
+		if (stream->adjust.v_total_min != update->crtc_timing_adjust->v_total_min ||
+			stream->adjust.v_total_max != update->crtc_timing_adjust->v_total_max)
+			stream->adjust.timing_adjust_pending = true;
 		stream->adjust = *update->crtc_timing_adjust;
+	}
 
 	if (update->dpms_off)
 		stream->dpms_off = *update->dpms_off;
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +15 -0
index 6eb9bae3af912..a49604b7701f7 100644
@@ -609,6 +609,21 @@ void set_p_state_switch_method(
 	}
 }
 
+void set_drr_and_clear_adjust_pending(
+		struct pipe_ctx *pipe_ctx,
+		struct dc_stream_state *stream,
+		struct drr_params *params)
+{
+	/* params can be null.*/
+	if (pipe_ctx && pipe_ctx->stream_res.tg &&
+			pipe_ctx->stream_res.tg->funcs->set_drr)
+		pipe_ctx->stream_res.tg->funcs->set_drr(
+				pipe_ctx->stream_res.tg, params);
+
+	if (stream)
+		stream->adjust.timing_adjust_pending = false;
+}
+
 void get_fams2_visual_confirm_color(
 		struct dc *dc,
 		struct dc_state *context,
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +1 -0
index 5ac55601a6da1..37e381fc7f02a 100644
@@ -1015,6 +1015,7 @@ struct dc_crtc_timing_adjust {
 	uint32_t v_total_mid;
 	uint32_t v_total_mid_frame_num;
 	uint32_t allow_otg_v_count_halt;
+	uint8_t timing_adjust_pending;
 };
 
 
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +2 -5
index 81f4c386c2875..fc4fb4055ab00 100644
@@ -1654,9 +1654,7 @@ enum dc_status dce110_apply_single_controller_ctx_to_hw(
 
 	params.vertical_total_min = stream->adjust.v_total_min;
 	params.vertical_total_max = stream->adjust.v_total_max;
-	if (pipe_ctx->stream_res.tg->funcs->set_drr)
-		pipe_ctx->stream_res.tg->funcs->set_drr(
-			pipe_ctx->stream_res.tg, &params);
+	set_drr_and_clear_adjust_pending(pipe_ctx, stream, &params);
 
 	// DRR should set trigger event to monitor surface update event
 	if (stream->adjust.v_total_min != 0 && stream->adjust.v_total_max != 0)
@@ -2104,8 +2102,7 @@ static void set_drr(struct pipe_ctx **pipe_ctx,
 		struct timing_generator *tg = pipe_ctx[i]->stream_res.tg;
 
 		if ((tg != NULL) && tg->funcs) {
-			if (tg->funcs->set_drr)
-				tg->funcs->set_drr(tg, &params);
+			set_drr_and_clear_adjust_pending(pipe_ctx[i], pipe_ctx[i]->stream, &params);
 			if (adjust.v_total_max != 0 && adjust.v_total_min != 0)
 				if (tg->funcs->set_static_screen_control)
 					tg->funcs->set_static_screen_control(
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +2 -5
index 13f9e9b439f6a..4c89bf6725b3b 100644
@@ -1112,9 +1112,7 @@ static void dcn10_reset_back_end_for_pipe(
 		pipe_ctx->stream_res.tg->funcs->disable_crtc(pipe_ctx->stream_res.tg);
 
 		pipe_ctx->stream_res.tg->funcs->enable_optc_clock(pipe_ctx->stream_res.tg, false);
-		if (pipe_ctx->stream_res.tg->funcs->set_drr)
-			pipe_ctx->stream_res.tg->funcs->set_drr(
-					pipe_ctx->stream_res.tg, NULL);
+		set_drr_and_clear_adjust_pending(pipe_ctx, pipe_ctx->stream, NULL);
 		if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal))
 			pipe_ctx->stream->link->phy_state.symclk_ref_cnts.otg = 0;
 	}
@@ -3217,8 +3215,7 @@ void dcn10_set_drr(struct pipe_ctx **pipe_ctx,
 		struct timing_generator *tg = pipe_ctx[i]->stream_res.tg;
 
 		if ((tg != NULL) && tg->funcs) {
-			if (tg->funcs->set_drr)
-				tg->funcs->set_drr(tg, &params);
+			set_drr_and_clear_adjust_pending(pipe_ctx[i], pipe_ctx[i]->stream, &params);
 			if (adjust.v_total_max != 0 && adjust.v_total_min != 0)
 				if (tg->funcs->set_static_screen_control)
 					tg->funcs->set_static_screen_control(
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +2 -6
index b78096a7690ee..f7e31aec32058 100644
@@ -952,9 +952,7 @@ enum dc_status dcn20_enable_stream_timing(
 	params.vertical_total_max = stream->adjust.v_total_max;
 	params.vertical_total_mid = stream->adjust.v_total_mid;
 	params.vertical_total_mid_frame_num = stream->adjust.v_total_mid_frame_num;
-	if (pipe_ctx->stream_res.tg->funcs->set_drr)
-		pipe_ctx->stream_res.tg->funcs->set_drr(
-			pipe_ctx->stream_res.tg, &params);
+	set_drr_and_clear_adjust_pending(pipe_ctx, stream, &params);
 
 	// DRR should set trigger event to monitor surface update event
 	if (stream->adjust.v_total_min != 0 && stream->adjust.v_total_max != 0)
@@ -2849,9 +2847,7 @@ void dcn20_reset_back_end_for_pipe(
 			pipe_ctx->stream_res.tg->funcs->set_odm_bypass(
 					pipe_ctx->stream_res.tg, &pipe_ctx->stream->timing);
 
-		if (pipe_ctx->stream_res.tg->funcs->set_drr)
-			pipe_ctx->stream_res.tg->funcs->set_drr(
-					pipe_ctx->stream_res.tg, NULL);
+		set_drr_and_clear_adjust_pending(pipe_ctx, pipe_ctx->stream, NULL);
 		/* TODO - convert symclk_ref_cnts for otg to a bit map to solve
 		 * the case where the same symclk is shared across multiple otg
 		 * instances
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c +1 -3
index 03ba01f4ace18..38f8898266971 100644
@@ -538,9 +538,7 @@ static void dcn31_reset_back_end_for_pipe(
 	if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal))
 		pipe_ctx->stream->link->phy_state.symclk_ref_cnts.otg = 0;
 
-	if (pipe_ctx->stream_res.tg->funcs->set_drr)
-		pipe_ctx->stream_res.tg->funcs->set_drr(
-				pipe_ctx->stream_res.tg, NULL);
+	set_drr_and_clear_adjust_pending(pipe_ctx, pipe_ctx->stream, NULL);
 
 	/* DPMS may already disable or */
 	/* dpms_off status is incorrect due to fastboot
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +1 -2
index b907ad1acedd9..922b8d71cf1aa 100644
@@ -1473,8 +1473,7 @@ void dcn35_set_drr(struct pipe_ctx **pipe_ctx,
 					num_frames = 2 * (frame_rate % 60);
 				}
 			}
-			if (tg->funcs->set_drr)
-				tg->funcs->set_drr(tg, &params);
+			set_drr_and_clear_adjust_pending(pipe_ctx[i], pipe_ctx[i]->stream, &params);
 			if (adjust.v_total_max != 0 && adjust.v_total_min != 0)
 				if (tg->funcs->set_static_screen_control)
 					tg->funcs->set_static_screen_control(
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +3 -7
index 0d39d193dacfa..284f011f5643d 100644
@@ -830,10 +830,7 @@ enum dc_status dcn401_enable_stream_timing(
 	}
 
 	hws->funcs.wait_for_blank_complete(pipe_ctx->stream_res.opp);
-
-	if (pipe_ctx->stream_res.tg->funcs->set_drr)
-		pipe_ctx->stream_res.tg->funcs->set_drr(
-			pipe_ctx->stream_res.tg, &params);
+	set_drr_and_clear_adjust_pending(pipe_ctx, stream, &params);
 
 	/* Event triggers and num frames initialized for DRR, but can be
 	 * later updated for PSR use. Note DRR trigger events are generated
@@ -1866,9 +1863,8 @@ void dcn401_reset_back_end_for_pipe(
 			pipe_ctx->stream_res.tg->funcs->set_odm_bypass(
 					pipe_ctx->stream_res.tg, &pipe_ctx->stream->timing);
 
-		if (pipe_ctx->stream_res.tg->funcs->set_drr)
-			pipe_ctx->stream_res.tg->funcs->set_drr(
-					pipe_ctx->stream_res.tg, NULL);
+		set_drr_and_clear_adjust_pending(pipe_ctx, pipe_ctx->stream, NULL);
+
 		/* TODO - convert symclk_ref_cnts for otg to a bit map to solve
 		 * the case where the same symclk is shared across multiple otg
 		 * instances
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h +6 -0
index a7d66cfd93c91..16ef5250a02e1 100644
@@ -46,6 +46,7 @@ struct dce_hwseq;
 struct link_resource;
 struct dc_dmub_cmd;
 struct pg_block_update;
+struct drr_params;
 
 struct subvp_pipe_control_lock_fast_params {
 	struct dc *dc;
@@ -521,6 +522,11 @@ void set_p_state_switch_method(
 		struct dc_state *context,
 		struct pipe_ctx *pipe_ctx);
 
+void set_drr_and_clear_adjust_pending(
+		struct pipe_ctx *pipe_ctx,
+		struct dc_stream_state *stream,
+		struct drr_params *params);
+
 void hwss_execute_sequence(struct dc *dc,
 		struct block_sequence block_sequence[],
 		int num_steps);
Signature · 1 line
2.39.5
author maintainer
#10 lore raw

PATCH 10/783 nvmem: rockchip-otp: Move read-offset into variant-data

In reply to Greg Kroah-Hartman

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

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

From: Heiko Stuebner <[email protected]>

[ Upstream commit 6907e8093b3070d877ee607e5ceede60cfd08bde ]

The RK3588 has an offset into the OTP area where the readable area begins and automatically adds this to the start address.
Other variants are very much similar to rk3588, just with a different offset, so move that value into variant-data.

To match the size in bytes, store this value also in bytes and not in number of blocks.

---
 drivers/nvmem/rockchip-otp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/nvmem/rockchip-otp.c +3 -2
index ebc3f0b24166b..3edfbfc2d7220 100644
@@ -59,7 +59,6 @@
 #define RK3588_OTPC_AUTO_EN		0x08
 #define RK3588_OTPC_INT_ST		0x84
 #define RK3588_OTPC_DOUT0		0x20
-#define RK3588_NO_SECURE_OFFSET		0x300
 #define RK3588_NBYTES			4
 #define RK3588_BURST_NUM		1
 #define RK3588_BURST_SHIFT		8
@@ -69,6 +68,7 @@
 
 struct rockchip_data {
 	int size;
+	int read_offset;
 	const char * const *clks;
 	int num_clks;
 	nvmem_reg_read_t reg_read;
@@ -196,7 +196,7 @@ static int rk3588_otp_read(void *context, unsigned int offset,
 	addr_start = round_down(offset, RK3588_NBYTES) / RK3588_NBYTES;
 	addr_end = round_up(offset + bytes, RK3588_NBYTES) / RK3588_NBYTES;
 	addr_len = addr_end - addr_start;
-	addr_start += RK3588_NO_SECURE_OFFSET;
+	addr_start += otp->data->read_offset / RK3588_NBYTES;
 
 	buf = kzalloc(array_size(addr_len, RK3588_NBYTES), GFP_KERNEL);
 	if (!buf)
@@ -280,6 +280,7 @@ static const char * const rk3588_otp_clocks[] = {
 
 static const struct rockchip_data rk3588_data = {
 	.size = 0x400,
+	.read_offset = 0xc00,
 	.clks = rk3588_otp_clocks,
 	.num_clks = ARRAY_SIZE(rk3588_otp_clocks),
 	.reg_read = rk3588_otp_read,
Signature · 1 line
2.39.5
author maintainer
#11 lore raw

PATCH 11/783 nvmem: rockchip-otp: add rk3576 variant data

In reply to Greg Kroah-Hartman

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

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

From: Heiko Stuebner <[email protected]>

[ Upstream commit 50d75a13a9ce880a5ef07a4ccc63ba561cc2e69a ]

The variant works very similar to the rk3588, just with a different read-offset and size.

---
 drivers/nvmem/rockchip-otp.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/nvmem/rockchip-otp.c +12 -0
index 3edfbfc2d7220..d88f12c532426 100644
@@ -274,6 +274,14 @@ static const struct rockchip_data px30_data = {
 	.reg_read = px30_otp_read,
 };
 
+static const struct rockchip_data rk3576_data = {
+	.size = 0x100,
+	.read_offset = 0x700,
+	.clks = px30_otp_clocks,
+	.num_clks = ARRAY_SIZE(px30_otp_clocks),
+	.reg_read = rk3588_otp_read,
+};
+
 static const char * const rk3588_otp_clocks[] = {
 	"otp", "apb_pclk", "phy", "arb",
 };
@@ -295,6 +303,10 @@ static const struct of_device_id rockchip_otp_match[] = {
 		.compatible = "rockchip,rk3308-otp",
 		.data = &px30_data,
 	},
+	{
+		.compatible = "rockchip,rk3576-otp",
+		.data = &rk3576_data,
+	},
 	{
 		.compatible = "rockchip,rk3588-otp",
 		.data = &rk3588_data,
Signature · 1 line
2.39.5
author maintainer
#12 lore raw

PATCH 12/783 nvmem: core: fix bit offsets of more than one byte

In reply to Greg Kroah-Hartman

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

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit 7a06ef75107799675ea6e4d73b9df37e18e352a8 ]

If the NVMEM specifies a stride to access data, reading particular cell might require bit offset that is bigger than one byte. Rework NVMEM core code to support bit offsets of more than 8 bits.

---
 drivers/nvmem/core.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)
drivers/nvmem/core.c +17 -7
index fff85bbf0ecd0..7872903c08a11 100644
@@ -837,7 +837,9 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nod
 		if (addr && len == (2 * sizeof(u32))) {
 			info.bit_offset = be32_to_cpup(addr++);
 			info.nbits = be32_to_cpup(addr);
-			if (info.bit_offset >= BITS_PER_BYTE || info.nbits < 1) {
+			if (info.bit_offset >= BITS_PER_BYTE * info.bytes ||
+			    info.nbits < 1 ||
+			    info.bit_offset + info.nbits > BITS_PER_BYTE * info.bytes) {
 				dev_err(dev, "nvmem: invalid bits on %pOF\n", child);
 				of_node_put(child);
 				return -EINVAL;
@@ -1630,21 +1632,29 @@ EXPORT_SYMBOL_GPL(nvmem_cell_put);
 static void nvmem_shift_read_buffer_in_place(struct nvmem_cell_entry *cell, void *buf)
 {
 	u8 *p, *b;
-	int i, extra, bit_offset = cell->bit_offset;
+	int i, extra, bytes_offset;
+	int bit_offset = cell->bit_offset;
 
 	p = b = buf;
-	if (bit_offset) {
+
+	bytes_offset = bit_offset / BITS_PER_BYTE;
+	b += bytes_offset;
+	bit_offset %= BITS_PER_BYTE;
+
+	if (bit_offset % BITS_PER_BYTE) {
 		/* First shift */
-		*b++ >>= bit_offset;
+		*p = *b++ >> bit_offset;
 
 		/* setup rest of the bytes if any */
 		for (i = 1; i < cell->bytes; i++) {
 			/* Get bits from next byte and shift them towards msb */
-			*p |= *b << (BITS_PER_BYTE - bit_offset);
+			*p++ |= *b << (BITS_PER_BYTE - bit_offset);
 
-			p = b;
-			*b++ >>= bit_offset;
+			*p = *b++ >> bit_offset;
 		}
+	} else if (p != b) {
+		memmove(p, b, cell->bytes - bytes_offset);
+		p += cell->bytes - 1;
 	} else {
 		/* point to the msb */
 		p += cell->bytes - 1;
Signature · 1 line
2.39.5
author maintainer
#13 lore raw

PATCH 13/783 nvmem: core: verify cells raw_len

In reply to Greg Kroah-Hartman

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

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit 13bcd440f2ff38cd7e42a179c223d4b833158b33 ]

Check that the NVMEM cell's raw_len is a aligned to word_size. Otherwise Otherwise drivers might face incomplete read while accessing the last part of the NVMEM cell.

---
 drivers/nvmem/core.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/nvmem/core.c +12 -0
index 7872903c08a11..7b8c85f9e035c 100644
@@ -605,6 +605,18 @@ static int nvmem_cell_info_to_nvmem_cell_entry_nodup(struct nvmem_device *nvmem,
 		return -EINVAL;
 	}
 
+	if (!IS_ALIGNED(cell->raw_len, nvmem->word_size)) {
+		dev_err(&nvmem->dev,
+			"cell %s raw len %zd unaligned to nvmem word size %d\n",
+			cell->name ?: "<unknown>", cell->raw_len,
+			nvmem->word_size);
+
+		if (info->raw_len)
+			return -EINVAL;
+
+		cell->raw_len = ALIGN(cell->raw_len, nvmem->word_size);
+	}
+
 	return 0;
 }
 
Signature · 1 line
2.39.5
author maintainer
#14 lore raw

PATCH 14/783 nvmem: core: update raw_len if the bit reading is required

In reply to Greg Kroah-Hartman

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

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit 6786484223d5705bf7f919c1e5055d478ebeec32 ]

If NVMEM cell uses bit offset or specifies bit truncation, update raw_len manually (following the cell->bytes update), ensuring that the NVMEM access is still word-aligned.

---
 drivers/nvmem/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/nvmem/core.c +3 -1
index 7b8c85f9e035c..e206efc29a004 100644
@@ -594,9 +594,11 @@ static int nvmem_cell_info_to_nvmem_cell_entry_nodup(struct nvmem_device *nvmem,
 	cell->nbits = info->nbits;
 	cell->np = info->np;
 
-	if (cell->nbits)
+	if (cell->nbits) {
 		cell->bytes = DIV_ROUND_UP(cell->nbits + cell->bit_offset,
 					   BITS_PER_BYTE);
+		cell->raw_len = ALIGN(cell->bytes, nvmem->word_size);
+	}
 
 	if (!IS_ALIGNED(cell->offset, nvmem->stride)) {
 		dev_err(&nvmem->dev,
Signature · 1 line
2.39.5
author maintainer
#2 lore raw

PATCH 2/783 drm/amd/display: Correct timing_adjust_pending flag setting.

In reply to Greg Kroah-Hartman

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

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

From: Zhongwei Zhang <[email protected]>

[ Upstream commit 34935701b7ed1a1ef449310ba041f10964b23cf4 ]

[Why&How]
stream->adjust will be overwritten by update->crtc_timing_adjust. We should set update->crtc_timing_adjust->timing_adjust_pending and then overwrite stream->adjust.
Reset update->crtc_timing_adjust->timing_adjust_pending after the assignment.

Stable-dep-of: 874697e12793 ("drm/amd/display: Defer BW-optimization-blocked DRR adjustments")

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -1
index a444fe1e0838a..e70b097cf478d 100644
@@ -3131,8 +3131,9 @@ static void copy_stream_update_to_stream(struct dc *dc,
 	if (update->crtc_timing_adjust) {
 		if (stream->adjust.v_total_min != update->crtc_timing_adjust->v_total_min ||
 			stream->adjust.v_total_max != update->crtc_timing_adjust->v_total_max)
-			stream->adjust.timing_adjust_pending = true;
+			update->crtc_timing_adjust->timing_adjust_pending = true;
 		stream->adjust = *update->crtc_timing_adjust;
+		update->crtc_timing_adjust->timing_adjust_pending = false;
 	}
 
 	if (update->dpms_off)
Signature · 1 line
2.39.5
author maintainer
#3 lore raw

PATCH 3/783 drm/amd/display: Defer BW-optimization-blocked DRR adjustments

In reply to Greg Kroah-Hartman

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

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

From: John Olender <[email protected]>

[ Upstream commit 874697e127931bf50a37ce9d96ee80f3a08a0c38 ]

[Why & How]
Instead of dropping DRR updates, defer them. This fixes issues where monitor continues to see incorrect refresh rate after VRR was turned off by userspace.

Fixes 32953485c558 ("drm/amd/display: Do not update DRR while BW optimizations pending")
(cherry picked from commit 53761b7ecd83e6fbb9f2206f8c980a6aa308c844)
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  2 ++
 drivers/gpu/drm/amd/display/dc/core/dc.c          | 10 +++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
index 4a8d76a4f3ce6..ee79a54de6d19 100644
@@ -367,6 +367,8 @@ get_crtc_by_otg_inst(struct amdgpu_device *adev,
 static inline bool is_dc_timing_adjust_needed(struct dm_crtc_state *old_state,
 					      struct dm_crtc_state *new_state)
 {
+	if (new_state->stream->adjust.timing_adjust_pending)
+		return true;
 	if (new_state->freesync_config.state ==  VRR_STATE_ACTIVE_FIXED)
 		return true;
 	else if (amdgpu_dm_crtc_vrr_active(old_state) != amdgpu_dm_crtc_vrr_active(new_state))
drivers/gpu/drm/amd/display/dc/core/dc.c +7 -3
index e70b097cf478d..722175e347fdc 100644
@@ -438,9 +438,12 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,
 	 * Don't adjust DRR while there's bandwidth optimizations pending to
 	 * avoid conflicting with firmware updates.
 	 */
-	if (dc->ctx->dce_version > DCE_VERSION_MAX)
-		if (dc->optimized_required || dc->wm_optimized_required)
+	if (dc->ctx->dce_version > DCE_VERSION_MAX) {
+		if (dc->optimized_required || dc->wm_optimized_required) {
+			stream->adjust.timing_adjust_pending = true;
 			return false;
+		}
+	}
 
 	dc_exit_ips_for_hw_access(dc);
 
@@ -3130,7 +3133,8 @@ static void copy_stream_update_to_stream(struct dc *dc,
 
 	if (update->crtc_timing_adjust) {
 		if (stream->adjust.v_total_min != update->crtc_timing_adjust->v_total_min ||
-			stream->adjust.v_total_max != update->crtc_timing_adjust->v_total_max)
+			stream->adjust.v_total_max != update->crtc_timing_adjust->v_total_max ||
+			stream->adjust.timing_adjust_pending)
 			update->crtc_timing_adjust->timing_adjust_pending = true;
 		stream->adjust = *update->crtc_timing_adjust;
 		update->crtc_timing_adjust->timing_adjust_pending = false;
Signature · 1 line
2.39.5
author maintainer
#4 lore raw

PATCH 4/783 phy: renesas: rcar-gen3-usb2: Move IRQ request in probe

In reply to Greg Kroah-Hartman

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

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

From: Claudiu Beznea <[email protected]>

[ Upstream commit de76809f60cc938d3580bbbd5b04b7d12af6ce3a ]

Commit 08b0ad375ca6 ("phy: renesas: rcar-gen3-usb2: move IRQ registration to init") moved the IRQ request operation from probe to
struct phy_ops::phy_init API to avoid triggering interrupts (which lead to register accesses) while the PHY clocks (enabled through runtime PM APIs) are not active. If this happens, it results in a synchronous abort.

One way to reproduce this issue is by enabling CONFIG_DEBUG_SHIRQ, which calls free_irq() on driver removal.

Move the IRQ request and free operations back to probe, and take the runtime PM state into account in IRQ handler. This commit is preparatory for the subsequent fixes in this series.

Stable-dep-of: 9ce71e85b29e ("phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off")

---
 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 46 +++++++++++++-----------
 1 file changed, 26 insertions(+), 20 deletions(-)
drivers/phy/renesas/phy-rcar-gen3-usb2.c +26 -20
index 946dc2f184e87..aee33916b9073 100644
@@ -120,7 +120,6 @@ struct rcar_gen3_chan {
 	struct work_struct work;
 	struct mutex lock;	/* protects rphys[...].powered */
 	enum usb_dr_mode dr_mode;
-	int irq;
 	u32 obint_enable_bits;
 	bool extcon_host;
 	bool is_otg_channel;
@@ -428,16 +427,25 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
 {
 	struct rcar_gen3_chan *ch = _ch;
 	void __iomem *usb2_base = ch->base;
-	u32 status = readl(usb2_base + USB2_OBINTSTA);
+	struct device *dev = ch->dev;
 	irqreturn_t ret = IRQ_NONE;
+	u32 status;
 
+	pm_runtime_get_noresume(dev);
+
+	if (pm_runtime_suspended(dev))
+		goto rpm_put;
+
+	status = readl(usb2_base + USB2_OBINTSTA);
 	if (status & ch->obint_enable_bits) {
-		dev_vdbg(ch->dev, "%s: %08x\n", __func__, status);
+		dev_vdbg(dev, "%s: %08x\n", __func__, status);
 		writel(ch->obint_enable_bits, usb2_base + USB2_OBINTSTA);
 		rcar_gen3_device_recognition(ch);
 		ret = IRQ_HANDLED;
 	}
 
+rpm_put:
+	pm_runtime_put_noidle(dev);
 	return ret;
 }
 
@@ -447,17 +455,6 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
 	struct rcar_gen3_chan *channel = rphy->ch;
 	void __iomem *usb2_base = channel->base;
 	u32 val;
-	int ret;
-
-	if (!rcar_gen3_is_any_rphy_initialized(channel) && channel->irq >= 0) {
-		INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
-		ret = request_irq(channel->irq, rcar_gen3_phy_usb2_irq,
-				  IRQF_SHARED, dev_name(channel->dev), channel);
-		if (ret < 0) {
-			dev_err(channel->dev, "No irq handler (%d)\n", channel->irq);
-			return ret;
-		}
-	}
 
 	/* Initialize USB2 part */
 	val = readl(usb2_base + USB2_INT_ENABLE);
@@ -493,9 +490,6 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
 		val &= ~USB2_INT_ENABLE_UCOM_INTEN;
 	writel(val, usb2_base + USB2_INT_ENABLE);
 
-	if (channel->irq >= 0 && !rcar_gen3_is_any_rphy_initialized(channel))
-		free_irq(channel->irq, channel);
-
 	return 0;
 }
 
@@ -701,7 +695,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct rcar_gen3_chan *channel;
 	struct phy_provider *provider;
-	int ret = 0, i;
+	int ret = 0, i, irq;
 
 	if (!dev->of_node) {
 		dev_err(dev, "This driver needs device tree\n");
@@ -717,8 +711,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 		return PTR_ERR(channel->base);
 
 	channel->obint_enable_bits = USB2_OBINT_BITS;
-	/* get irq number here and request_irq for OTG in phy_init */
-	channel->irq = platform_get_irq_optional(pdev, 0);
 	channel->dr_mode = rcar_gen3_get_dr_mode(dev->of_node);
 	if (channel->dr_mode != USB_DR_MODE_UNKNOWN) {
 		channel->is_otg_channel = true;
@@ -787,6 +779,20 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 		channel->vbus = NULL;
 	}
 
+	irq = platform_get_irq_optional(pdev, 0);
+	if (irq < 0 && irq != -ENXIO) {
+		ret = irq;
+		goto error;
+	} else if (irq > 0) {
+		INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
+		ret = devm_request_irq(dev, irq, rcar_gen3_phy_usb2_irq,
+				       IRQF_SHARED, dev_name(dev), channel);
+		if (ret < 0) {
+			dev_err(dev, "Failed to request irq (%d)\n", irq);
+			goto error;
+		}
+	}
+
 	provider = devm_of_phy_provider_register(dev, rcar_gen3_phy_usb2_xlate);
 	if (IS_ERR(provider)) {
 		dev_err(dev, "Failed to register PHY provider\n");
Signature · 1 line
2.39.5
author maintainer
#5 lore raw

PATCH 5/783 phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data

In reply to Greg Kroah-Hartman

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

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

From: Claudiu Beznea <[email protected]>

[ Upstream commit 55a387ebb9219cbe4edfa8ba9996ccb0e7ad4932 ]

The phy-rcar-gen3-usb2 driver exposes four individual PHYs that are requested and configured by PHY users. The struct phy_ops APIs access the same set of registers to configure all PHYs. Additionally, PHY settings can be modified through sysfs or an IRQ handler. While some struct phy_ops APIs are protected by a driver-wide mutex, others rely on individual PHY-specific mutexes.

This approach can lead to various issues, including:
1/ the IRQ handler may interrupt PHY settings in progress, racing with
hardware configuration protected by a mutex lock
2/ due to msleep(20) in rcar_gen3_init_otg(), while a configuration thread
suspends to wait for the delay, another thread may try to configure another PHY (with phy_init() + phy_power_on()); re-running the phy_init() goes to the exact same configuration code, re-running the same hardware configuration on the same set of registers (and bits) which might impact the result of the msleep for the 1st configuring thread
3/ sysfs can configure the hardware (though role_store()) and it can
still race with the phy_init()/phy_power_on() APIs calling into the drivers struct phy_ops

To address these issues, add a spinlock to protect hardware register access and driver private data structures (e.g., calls to rcar_gen3_is_any_rphy_initialized()). Checking driver-specific data remains necessary as all PHY instances share common settings. With this change, the existing mutex protection is removed and the cleanup.h helpers are used.

While at it, to keep the code simpler, do not skip regulator_enable()/regulator_disable() APIs in rcar_gen3_phy_usb2_power_on()/rcar_gen3_phy_usb2_power_off() as the regulators enable/disable operations are reference counted anyway.

Stable-dep-of: 9ce71e85b29e ("phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off")

---
 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 49 +++++++++++++-----------
 1 file changed, 26 insertions(+), 23 deletions(-)
drivers/phy/renesas/phy-rcar-gen3-usb2.c +26 -23
index aee33916b9073..7d18bc549f17e 100644
@@ -9,6 +9,7 @@
  * Copyright (C) 2014 Cogent Embedded, Inc.
  */
 
+#include <linux/cleanup.h>
 #include <linux/extcon-provider.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
@@ -118,7 +119,7 @@ struct rcar_gen3_chan {
 	struct regulator *vbus;
 	struct reset_control *rstc;
 	struct work_struct work;
-	struct mutex lock;	/* protects rphys[...].powered */
+	spinlock_t lock;	/* protects access to hardware and driver data structure. */
 	enum usb_dr_mode dr_mode;
 	u32 obint_enable_bits;
 	bool extcon_host;
@@ -348,6 +349,8 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr,
 	bool is_b_device;
 	enum phy_mode cur_mode, new_mode;
 
+	guard(spinlock_irqsave)(&ch->lock);
+
 	if (!ch->is_otg_channel || !rcar_gen3_is_any_otg_rphy_initialized(ch))
 		return -EIO;
 
@@ -415,7 +418,7 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
 		val = readl(usb2_base + USB2_ADPCTRL);
 		writel(val | USB2_ADPCTRL_IDPULLUP, usb2_base + USB2_ADPCTRL);
 	}
-	msleep(20);
+	mdelay(20);
 
 	writel(0xffffffff, usb2_base + USB2_OBINTSTA);
 	writel(ch->obint_enable_bits, usb2_base + USB2_OBINTEN);
@@ -436,12 +439,14 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
 	if (pm_runtime_suspended(dev))
 		goto rpm_put;
 
-	status = readl(usb2_base + USB2_OBINTSTA);
-	if (status & ch->obint_enable_bits) {
-		dev_vdbg(dev, "%s: %08x\n", __func__, status);
-		writel(ch->obint_enable_bits, usb2_base + USB2_OBINTSTA);
-		rcar_gen3_device_recognition(ch);
-		ret = IRQ_HANDLED;
+	scoped_guard(spinlock, &ch->lock) {
+		status = readl(usb2_base + USB2_OBINTSTA);
+		if (status & ch->obint_enable_bits) {
+			dev_vdbg(dev, "%s: %08x\n", __func__, status);
+			writel(ch->obint_enable_bits, usb2_base + USB2_OBINTSTA);
+			rcar_gen3_device_recognition(ch);
+			ret = IRQ_HANDLED;
+		}
 	}
 
 rpm_put:
@@ -456,6 +461,8 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
 	void __iomem *usb2_base = channel->base;
 	u32 val;
 
+	guard(spinlock_irqsave)(&channel->lock);
+
 	/* Initialize USB2 part */
 	val = readl(usb2_base + USB2_INT_ENABLE);
 	val |= USB2_INT_ENABLE_UCOM_INTEN | rphy->int_enable_bits;
@@ -482,6 +489,8 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
 	void __iomem *usb2_base = channel->base;
 	u32 val;
 
+	guard(spinlock_irqsave)(&channel->lock);
+
 	rphy->initialized = false;
 
 	val = readl(usb2_base + USB2_INT_ENABLE);
@@ -501,16 +510,17 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
 	u32 val;
 	int ret = 0;
 
-	mutex_lock(&channel->lock);
-	if (!rcar_gen3_are_all_rphys_power_off(channel))
-		goto out;
-
 	if (channel->vbus) {
 		ret = regulator_enable(channel->vbus);
 		if (ret)
-			goto out;
+			return ret;
 	}
 
+	guard(spinlock_irqsave)(&channel->lock);
+
+	if (!rcar_gen3_are_all_rphys_power_off(channel))
+		goto out;
+
 	val = readl(usb2_base + USB2_USBCTR);
 	val |= USB2_USBCTR_PLL_RST;
 	writel(val, usb2_base + USB2_USBCTR);
@@ -520,7 +530,6 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
 out:
 	/* The powered flag should be set for any other phys anyway */
 	rphy->powered = true;
-	mutex_unlock(&channel->lock);
 
 	return 0;
 }
@@ -531,18 +540,12 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p)
 	struct rcar_gen3_chan *channel = rphy->ch;
 	int ret = 0;
 
-	mutex_lock(&channel->lock);
-	rphy->powered = false;
-
-	if (!rcar_gen3_are_all_rphys_power_off(channel))
-		goto out;
+	scoped_guard(spinlock_irqsave, &channel->lock)
+		rphy->powered = false;
 
 	if (channel->vbus)
 		ret = regulator_disable(channel->vbus);
 
-out:
-	mutex_unlock(&channel->lock);
-
 	return ret;
 }
 
@@ -753,7 +756,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 	if (phy_data->no_adp_ctrl)
 		channel->obint_enable_bits = USB2_OBINT_IDCHG_EN;
 
-	mutex_init(&channel->lock);
+	spin_lock_init(&channel->lock);
 	for (i = 0; i < NUM_OF_PHYS; i++) {
 		channel->rphys[i].phy = devm_phy_create(dev, NULL,
 							phy_data->phy_usb2_ops);
Signature · 1 line
2.39.5
author maintainer
#6 lore raw

PATCH 6/783 phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off

In reply to Greg Kroah-Hartman

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

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

From: Claudiu Beznea <[email protected]>

[ Upstream commit 9ce71e85b29eb63e48e294479742e670513f03a0 ]

Assert PLL reset on PHY power off. This saves power.

---
 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/phy/renesas/phy-rcar-gen3-usb2.c +9 -1
index 7d18bc549f17e..9fdf17e0848a2 100644
@@ -540,9 +540,17 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p)
 	struct rcar_gen3_chan *channel = rphy->ch;
 	int ret = 0;
 
-	scoped_guard(spinlock_irqsave, &channel->lock)
+	scoped_guard(spinlock_irqsave, &channel->lock) {
 		rphy->powered = false;
 
+		if (rcar_gen3_are_all_rphys_power_off(channel)) {
+			u32 val = readl(channel->base + USB2_USBCTR);
+
+			val |= USB2_USBCTR_PLL_RST;
+			writel(val, channel->base + USB2_USBCTR);
+		}
+	}
+
 	if (channel->vbus)
 		ret = regulator_disable(channel->vbus);
 
Signature · 1 line
2.39.5
author maintainer
#7 lore raw

PATCH 7/783 nvmet: pci-epf: Keep completion queues mapped

In reply to Greg Kroah-Hartman

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

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

From: Damien Le Moal <[email protected]>

[ Upstream commit ea7789c1541084a3dae65ffd36778348dd98f61b ]

Instead of mapping and unmapping the completion queues memory to the host PCI address space whenever nvmet_pci_epf_cq_work() is called, map a completion queue to the host PCI address space when the completion queue is created with nvmet_pci_epf_create_cq() and unmap it when the completion queue is deleted with nvmet_pci_epf_delete_cq().

This removes the completion queue mapping/unmapping from nvmet_pci_epf_cq_work() and significantly increases performance. For a single job 4K random read QD=1 workload, the IOPS is increased from 23 KIOPS to 25 KIOPS. Some significant throughput increasde for high queue depth and large IOs workloads can also be seen.

Since the functions nvmet_pci_epf_map_queue() and nvmet_pci_epf_unmap_queue() are called respectively only from nvmet_pci_epf_create_cq() and nvmet_pci_epf_delete_cq(), these functions are removed and open-coded in their respective call sites.

Stable-dep-of: 85adf2094abb ("nvmet: pci-epf: clear completion queue IRQ flag on delete")

---
 drivers/nvme/target/pci-epf.c | 63 ++++++++++++++---------------------
 1 file changed, 25 insertions(+), 38 deletions(-)
drivers/nvme/target/pci-epf.c +25 -38
index bc1daa9aede9d..81957b6e84986 100644
@@ -1264,6 +1264,7 @@ static u16 nvmet_pci_epf_create_cq(struct nvmet_ctrl *tctrl,
 	struct nvmet_pci_epf_ctrl *ctrl = tctrl->drvdata;
 	struct nvmet_pci_epf_queue *cq = &ctrl->cq[cqid];
 	u16 status;
+	int ret;
 
 	if (test_bit(NVMET_PCI_EPF_Q_LIVE, &cq->flags))
 		return NVME_SC_QID_INVALID | NVME_STATUS_DNR;
@@ -1298,6 +1299,24 @@ static u16 nvmet_pci_epf_create_cq(struct nvmet_ctrl *tctrl,
 	if (status != NVME_SC_SUCCESS)
 		goto err;
 
+	/*
+	 * Map the CQ PCI address space and since PCI endpoint controllers may
+	 * return a partial mapping, check that the mapping is large enough.
+	 */
+	ret = nvmet_pci_epf_mem_map(ctrl->nvme_epf, cq->pci_addr, cq->pci_size,
+				    &cq->pci_map);
+	if (ret) {
+		dev_err(ctrl->dev, "Failed to map CQ %u (err=%d)\n",
+			cq->qid, ret);
+		goto err_internal;
+	}
+
+	if (cq->pci_map.pci_size < cq->pci_size) {
+		dev_err(ctrl->dev, "Invalid partial mapping of queue %u\n",
+			cq->qid);
+		goto err_unmap_queue;
+	}
+
 	set_bit(NVMET_PCI_EPF_Q_LIVE, &cq->flags);
 
 	dev_dbg(ctrl->dev, "CQ[%u]: %u entries of %zu B, IRQ vector %u\n",
@@ -1305,6 +1324,10 @@ static u16 nvmet_pci_epf_create_cq(struct nvmet_ctrl *tctrl,
 
 	return NVME_SC_SUCCESS;
 
+err_unmap_queue:
+	nvmet_pci_epf_mem_unmap(ctrl->nvme_epf, &cq->pci_map);
+err_internal:
+	status = NVME_SC_INTERNAL | NVME_STATUS_DNR;
 err:
 	if (test_and_clear_bit(NVMET_PCI_EPF_Q_IRQ_ENABLED, &cq->flags))
 		nvmet_pci_epf_remove_irq_vector(ctrl, cq->vector);
@@ -1322,6 +1345,7 @@ static u16 nvmet_pci_epf_delete_cq(struct nvmet_ctrl *tctrl, u16 cqid)
 	cancel_delayed_work_sync(&cq->work);
 	nvmet_pci_epf_drain_queue(cq);
 	nvmet_pci_epf_remove_irq_vector(ctrl, cq->vector);
+	nvmet_pci_epf_mem_unmap(ctrl->nvme_epf, &cq->pci_map);
 
 	return NVME_SC_SUCCESS;
 }
@@ -1554,36 +1578,6 @@ static void nvmet_pci_epf_free_queues(struct nvmet_pci_epf_ctrl *ctrl)
 	ctrl->cq = NULL;
 }
 
-static int nvmet_pci_epf_map_queue(struct nvmet_pci_epf_ctrl *ctrl,
-				   struct nvmet_pci_epf_queue *queue)
-{
-	struct nvmet_pci_epf *nvme_epf = ctrl->nvme_epf;
-	int ret;
-
-	ret = nvmet_pci_epf_mem_map(nvme_epf, queue->pci_addr,
-				      queue->pci_size, &queue->pci_map);
-	if (ret) {
-		dev_err(ctrl->dev, "Failed to map queue %u (err=%d)\n",
-			queue->qid, ret);
-		return ret;
-	}
-
-	if (queue->pci_map.pci_size < queue->pci_size) {
-		dev_err(ctrl->dev, "Invalid partial mapping of queue %u\n",
-			queue->qid);
-		nvmet_pci_epf_mem_unmap(nvme_epf, &queue->pci_map);
-		return -ENOMEM;
-	}
-
-	return 0;
-}
-
-static inline void nvmet_pci_epf_unmap_queue(struct nvmet_pci_epf_ctrl *ctrl,
-					     struct nvmet_pci_epf_queue *queue)
-{
-	nvmet_pci_epf_mem_unmap(ctrl->nvme_epf, &queue->pci_map);
-}
-
 static void nvmet_pci_epf_exec_iod_work(struct work_struct *work)
 {
 	struct nvmet_pci_epf_iod *iod =
@@ -1749,11 +1743,7 @@ static void nvmet_pci_epf_cq_work(struct work_struct *work)
 	struct nvme_completion *cqe;
 	struct nvmet_pci_epf_iod *iod;
 	unsigned long flags;
-	int ret, n = 0;
-
-	ret = nvmet_pci_epf_map_queue(ctrl, cq);
-	if (ret)
-		goto again;
+	int ret = 0, n = 0;
 
 	while (test_bit(NVMET_PCI_EPF_Q_LIVE, &cq->flags) && ctrl->link_up) {
 
@@ -1809,8 +1799,6 @@ static void nvmet_pci_epf_cq_work(struct work_struct *work)
 		n++;
 	}
 
-	nvmet_pci_epf_unmap_queue(ctrl, cq);
-
 	/*
 	 * We do not support precise IRQ coalescing time (100ns units as per
 	 * NVMe specifications). So if we have posted completion entries without
@@ -1819,7 +1807,6 @@ static void nvmet_pci_epf_cq_work(struct work_struct *work)
 	if (n)
 		nvmet_pci_epf_raise_irq(ctrl, cq, true);
 
-again:
 	if (ret < 0)
 		queue_delayed_work(system_highpri_wq, &cq->work,
 				   NVMET_PCI_EPF_CQ_RETRY_INTERVAL);
Signature · 1 line
2.39.5
author maintainer
#8 lore raw

PATCH 8/783 nvmet: pci-epf: clear completion queue IRQ flag on delete

In reply to Greg Kroah-Hartman

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

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

From: Damien Le Moal <[email protected]>

[ Upstream commit 85adf2094abb9084770dc4ab302aaa9c5d26dd2d ]

The function nvmet_pci_epf_delete_cq() unconditionally calls nvmet_pci_epf_remove_irq_vector() even for completion queues that do not have interrupts enabled. Furthermore, for completion queues that do have IRQ enabled, deleting and re-creating the completion queue leaves the flag NVMET_PCI_EPF_Q_IRQ_ENABLED set, even if the completion queue is being re-created with IRQ disabled.

Fix these issues by calling nvmet_pci_epf_remove_irq_vector() only if NVMET_PCI_EPF_Q_IRQ_ENABLED is set and make sure to always clear that flag.

Fixes 0faa0fe6f90e ("nvmet: New NVMe PCI endpoint function target driver")
---
 drivers/nvme/target/pci-epf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/target/pci-epf.c +2 -1
index 81957b6e84986..fbc167f47d8a6 100644
@@ -1344,7 +1344,8 @@ static u16 nvmet_pci_epf_delete_cq(struct nvmet_ctrl *tctrl, u16 cqid)
 
 	cancel_delayed_work_sync(&cq->work);
 	nvmet_pci_epf_drain_queue(cq);
-	nvmet_pci_epf_remove_irq_vector(ctrl, cq->vector);
+	if (test_and_clear_bit(NVMET_PCI_EPF_Q_IRQ_ENABLED, &cq->flags))
+		nvmet_pci_epf_remove_irq_vector(ctrl, cq->vector);
 	nvmet_pci_epf_mem_unmap(ctrl->nvme_epf, &cq->pci_map);
 
 	return NVME_SC_SUCCESS;
Signature · 1 line
2.39.5
author maintainer
#9 lore raw

PATCH 9/783 cpufreq: Add SM8650 to cpufreq-dt-platdev blocklist

In reply to Greg Kroah-Hartman

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

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

From: Pengyu Luo <[email protected]>

[ Upstream commit fc5414a4774e14e51a93499a6adfdc45f2de82e0 ]

SM8650 have already been supported by qcom-cpufreq-hw driver, but never been added to cpufreq-dt-platdev. This makes noise

[    0.388525] cpufreq-dt cpufreq-dt: failed register driver: -17
[    0.388537] cpufreq-dt cpufreq-dt: probe with driver cpufreq-dt failed with error -17

So adding it to the cpufreq-dt-platdev driver's blocklist to fix it.

---
 drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/cpufreq-dt-platdev.c +1 -0
index 2aa00769cf09d..a010da0f6337f 100644
@@ -175,6 +175,7 @@ static const struct of_device_id blocklist[] __initconst = {
 	{ .compatible = "qcom,sm8350", },
 	{ .compatible = "qcom,sm8450", },
 	{ .compatible = "qcom,sm8550", },
+	{ .compatible = "qcom,sm8650", },
 
 	{ .compatible = "st,stih407", },
 	{ .compatible = "st,stih410", },
Signature · 1 line
2.39.5

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover 6.14.9-rc1 review

This is the start of the stable review cycle for the 6.14.9 release. There are 783 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, 29 May 2025 16:22:51 +0000. Anything received after that time might be too late.

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

	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.14.9-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.14.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>

    Linux 6.14.9-rc1

Nathan Chancellor <[email protected]>
kbuild: Properly disable -Wunterminated-string-initialization for clang

Linus Torvalds <[email protected]>
Fix mis-uses of 'cc-option' for warning disablement

Linus Torvalds <[email protected]>
gcc-15: disable '-Wunterminated-string-initialization' entirely for now

Linus Torvalds <[email protected]>
gcc-15: make 'unterminated string initialization' just a warning

David (Ming Qiang) Wu <[email protected]>
drm/amdgpu: read back register after written for VCN v4.0.5

Alex Deucher <[email protected]>
drm/amdgpu/vcn4.0.5: split code along instances

Imre Deak <[email protected]>
drm/i915/dp: Fix determining SST/MST mode during MTP TU state computation

Raag Jadav <[email protected]>
err.h: move IOMEM_ERR_PTR() to err.h

Shuicheng Lin <[email protected]>
drm/xe: Use xe_mmio_read32() to read mtcfg register

Larisa Grigore <[email protected]>
spi: spi-fsl-dspi: Reset SR flags before sending a new message

Bogdan-Gabriel Roman <[email protected]>
spi: spi-fsl-dspi: Halt the module after a new message transfer

Larisa Grigore <[email protected]>
spi: spi-fsl-dspi: restrict register range for regmap access

Greg Kroah-Hartman <[email protected]>
spi: use container_of_cont() for to_spi_device()

Mark Pearson <[email protected]>
platform/x86: think-lmi: Fix attribute name usage for non-compliant items

Namjae Jeon <[email protected]>
ksmbd: fix stream write failure

Jernej Skrabec <[email protected]>
Revert "arm64: dts: allwinner: h6: Use RSB for AXP805 PMIC connection"

Chris Lu <[email protected]>
Bluetooth: btmtksdio: Do close if SDIO card removed without close

Chris Lu <[email protected]>
Bluetooth: btmtksdio: Check function enabled before doing close

Ryusuke Konishi <[email protected]>
nilfs2: fix deadlock warnings caused by lock dependency in init_nilfs()

Johannes Berg <[email protected]>
wifi: mac80211: restore monitor for outgoing frames

Arnd Bergmann <[email protected]>
octeontx2: hide unused label

Kees Cook <[email protected]>
mm: vmalloc: only zero-init on vrealloc shrink

Kees Cook <[email protected]>
mm: vmalloc: actually use the in-place vrealloc region

Florent Revest <[email protected]>

    mm: fix VM_UFFD_MINOR == VM_SHADOW_STACK on USERFAULTFD=y && ARM64_GCS=y

Ignacio Moreno Gonzalez <[email protected]>
mm: mmap: map MAP_STACK to VM_NOHUGEPAGE only if THP is enabled

Wang Yaxin <[email protected]>
taskstats: fix struct taskstats breaks backward compatibility since version 15

David Wang <[email protected]>
module: release codetag section when module load fails

Tianyang Zhang <[email protected]>
mm/page_alloc.c: avoid infinite retries caused by cpuset race

Ge Yang <[email protected]>
mm/hugetlb: fix kernel NULL pointer dereference when replacing free hugetlb folios

Breno Leitao <[email protected]>
memcg: always call cond_resched() after fn()

Alexander Gordeev <[email protected]>
kasan: avoid sleepable page allocation from atomic context

Matthew Wilcox (Oracle) <[email protected]>
highmem: add folio_test_partial_kmap()

Suren Baghdasaryan <[email protected]>
alloc_tag: allocate percpu counters for module tags dynamically

Dmitry Torokhov <[email protected]>
Input: synaptics-rmi - fix crash with unsupported versions of F34

Vicki Pfau <[email protected]>
Input: xpad - add more controllers

Mario Limonciello <[email protected]>
Revert "drm/amd: Keep display off while going into S4"

Wang Zhaolong <[email protected]>
smb: client: Reset all search buffer pointers when releasing buffer

Gabor Juhos <[email protected]>
arm64: dts: marvell: uDPU: define pinctrl state for alarm LEDs

Wang Zhaolong <[email protected]>
smb: client: Fix use-after-free in cifs_fill_dirent

feijuan.li <[email protected]>
drm/edid: fixed the bug that hdr metadata was not reset

Zhang Rui <[email protected]>
thermal: intel: x86_pkg_temp_thermal: Fix bogus trip temperature

Vladimir Moskovkin <[email protected]>
platform/x86: dell-wmi-sysman: Avoid buffer overflow in current_password_store()

Dan Carpenter <[email protected]>
pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()

Geert Uytterhoeven <[email protected]>
pmdomain: renesas: rcar: Remove obsolete nullify checks

Judith Mendez <[email protected]>
mmc: sdhci_am654: Add SDHCI_QUIRK2_SUPPRESS_V1P8_ENA quirk to am62 compatible

Ronak Doshi <[email protected]>
vmxnet3: update MTU after device quiesce

Jakob Unterwurzacher <[email protected]>
net: dsa: microchip: linearize skb for tail-tagging switches

Jens Axboe <[email protected]>
io_uring/net: only retry recv bundle for a full transfer

Axel Forsman <[email protected]>
can: kvaser_pciefd: Fix echo_skb race

Axel Forsman <[email protected]>
can: kvaser_pciefd: Continue parsing DMA buf after dropped RX

Ilia Gavrilov <[email protected]>
llc: fix data loss when reading from a socket in llc_ui_recvmsg()

Ed Burcher <[email protected]>
ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ASP10

Takashi Iwai <[email protected]>
ALSA: pcm: Fix race of buffer access at PCM OSS layer

Peter Ujfalusi <[email protected]>
ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction

Kai Vehmanen <[email protected]>
ASoc: SOF: topology: connect DAI to a single DAI link

Peter Ujfalusi <[email protected]>
ASoC: SOF: Intel: hda-bus: Use PIO mode on ACE2+ platforms

Peter Ujfalusi <[email protected]>
ASoC: SOF: ipc4-control: Use SOF_CTRL_CMD_BINARY as numid for bytes_ext

Oliver Hartkopp <[email protected]>
can: bcm: add missing rcu read protection for procfs content

Oliver Hartkopp <[email protected]>
can: bcm: add locking for bcm_op runtime updates

Carlos Sanchez <[email protected]>
can: slcan: allow reception of short error messages

Dominik Grzegorzek <[email protected]>
padata: do not leak refcount in reorder_work

Ivan Pravdin <[email protected]>
crypto: algif_hash - fix double free in hash_accept

André Draszik <[email protected]>

    clk: s2mps11: initialise clk_hw_onecell_data::num before accessing ::hws[] in probe()

Geetha sowjanya <[email protected]>
octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG

Subbaraya Sundeep <[email protected]>
octeontx2-af: Set LMT_ENA bit for APR table entries

Wang Liang <[email protected]>
net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done

Suman Ghosh <[email protected]>
octeontx2-pf: Avoid adding dcbnl_ops for LBK and SDP vf

Suman Ghosh <[email protected]>
octeontx2-pf: AF_XDP zero copy receive support

Suman Ghosh <[email protected]>
octeontx2-pf: Add AF_XDP non-zero copy support

Suman Ghosh <[email protected]>
octeontx2-pf: use xdp_return_frame() to free xdp buffers

Cong Wang <[email protected]>
sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()

Eric Dumazet <[email protected]>
idpf: fix idpf_vport_splitq_napi_poll()

Pavel Begunkov <[email protected]>
io_uring: fix overflow resched cqe reordering

Samiullah Khawaja <[email protected]>
xsk: Bring back busy polling support in XDP_COPY

Thangaraj Samynathan <[email protected]>
net: lan743x: Restore SGMII CTRL register on resume

Paul Kocialkowski <[email protected]>
net: dwmac-sun8i: Use parsed internal PHY address instead of 1

Dmitry Baryshkov <[email protected]>
pinctrl: qcom: switch to devm_register_sys_off_handler()

Christoph Hellwig <[email protected]>

    loop: don't require ->write_iter for writable files in loop_configure

Pavan Kumar Linga <[email protected]>
idpf: fix null-ptr-deref in idpf_features_check

Dave Ertman <[email protected]>
ice: Fix LACP bonds without SRIOV environment

Jacob Keller <[email protected]>

    ice: fix vf->num_mac count with port representors

Paolo Abeni <[email protected]>
mr: consolidate the ipmr_can_free_table() checks.

Ido Schimmel <[email protected]>
bridge: netfilter: Fix forwarding of fragmented packets

Sagi Maimon <[email protected]>
ptp: ocp: Limit signal/freq counts in summary output functions

En-Wei Wu <[email protected]>
Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling

Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix not checking l2cap_chan security level

Adrian Hunter <[email protected]>
perf/x86/intel: Fix segfault with PEBS-via-PT with sample_freq

Andrew Bresticker <[email protected]>
irqchip/riscv-imsic: Start local sync timer on correct CPU

Tavian Barnes <[email protected]>
ASoC: SOF: Intel: hda: Fix UAF when reloading module

Raag Jadav <[email protected]>
devres: Introduce devm_kmemdup_array()

Andy Shevchenko <[email protected]>
driver core: Split devres APIs to device/devres.h

Stefan Wahren <[email protected]>
dmaengine: fsl-edma: Fix return code for unhandled interrupts

Dave Jiang <[email protected]>

    dmaengine: idxd: Fix ->poll() return value

Paul Chaignon <[email protected]>
xfrm: Sanitize marks before insert

Andre Przywara <[email protected]>
clk: sunxi-ng: d1: Add missing divider for MMC mod clocks

Matti Lehtimäki <[email protected]>
remoteproc: qcom_wcnss: Fix on platforms without fallback regulators

David Hildenbrand <[email protected]>
kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork()

Seongman Lee <[email protected]>
x86/sev: Fix operator precedence in GHCB_MSR_VMPL_REQ_LEVEL macro

Vinicius Costa Gomes <[email protected]>
dmaengine: idxd: Fix allowing write() from different address spaces

Tobias Brunner <[email protected]>
xfrm: Fix UDP GRO handling for some corner cases

Sabrina Dubroca <[email protected]>
espintcp: remove encap socket caching to avoid reference leak

Sabrina Dubroca <[email protected]>
espintcp: fix skb leaks

Charles Keepax <[email protected]>
soundwire: bus: Fix race on the creation of the IRQ domain

Al Viro <[email protected]>
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock

Austin Zheng <[email protected]>
drm/amd/display: Call FP Protect Before Mode Programming/Mode Support

Jason Andryuk <[email protected]>
xenbus: Allow PVH dom0 a non-local xenstore

Paweł Anikiel <[email protected]>
x86/Kconfig: make CFI_AUTO_DEFAULT depend on !RUST or Rust >= 1.88

Johannes Berg <[email protected]>
wifi: iwlwifi: add support for Killer on MTL

Johannes Thumshirn <[email protected]>
block: only update request sector if needed

David Wei <[email protected]>
tools: ynl-gen: validate 0 len strings from kernel

Qu Wenruo <[email protected]>
btrfs: avoid NULL pointer dereference if no valid csum tree

Boris Burkov <[email protected]>

    btrfs: handle empty eb->folios in num_extent_folios()

Goldwyn Rodrigues <[email protected]>
btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref

Kees Cook <[email protected]>

    btrfs: compression: adjust cb->compressed_folios allocation type

Krzysztof Kozlowski <[email protected]>
iio: imu: st_lsm6dsx: Fix wakeup source leaks on device unbind

Krzysztof Kozlowski <[email protected]>
iio: adc: qcom-spmi-iadc: Fix wakeup source leaks on device unbind

Krzysztof Kozlowski <[email protected]>
iio: accel: fxls8962af: Fix wakeup source leaks on device unbind

Stefan Binding <[email protected]>
ASoC: intel/sdw_utils: Add volume limit to cs35l56 speakers

Stefan Binding <[email protected]>
ASoC: intel/sdw_utils: Add volume limit to cs42l43 speakers

Pali Rohár <[email protected]>
cifs: Fix changing times and read-only attr over SMB1 smb_set_file_info() function

Pali Rohár <[email protected]>
cifs: Fix and improve cifs_query_path_info() and cifs_query_file_info()

Jens Axboe <[email protected]>
io_uring/fdinfo: annotate racy sq/cq head/tail reads

Alistair Francis <[email protected]>
nvmet-tcp: don't restore null sk_state_change

Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix duplicated name in MIDI substream names

Wentao Guan <[email protected]>

    nvme-pci: add quirks for WDC Blue SN550 15b7:5009

Wentao Guan <[email protected]>
nvme-pci: add quirks for device 126f:1001

Sunil Khatri <[email protected]>
drm/ttm: fix the warning for hit_low and evict_low

Takashi Iwai <[email protected]>
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx

Takashi Iwai <[email protected]>
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013

Charles Keepax <[email protected]>
ASoC: cs42l43: Disable headphone clamps during type detection

Gašper Nemgar <[email protected]>
platform/x86: ideapad-laptop: add support for some new buttons

Pavel Nikulin <[email protected]>
platform/x86: asus-wmi: Disable OOBE state after resume from hibernation

Saranya Gopal <[email protected]>
platform/x86/intel: hid: Add Pantherlake support

Salah Triki <[email protected]>
smb: server: smb2pdu: check return value of xa_store()

Martin Blumenstingl <[email protected]>
pinctrl: meson: define the pull up/down resistor value as 60 kOhm

Ritesh Harjani (IBM) <[email protected]>
book3s64/radix: Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n

Chenyuan Yang <[email protected]>
ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()

Eric Dumazet <[email protected]>
net-sysfs: restore behavior for not running devices

Kate Hsuan <[email protected]>
HID: Kconfig: Add LEDS_CLASS_MULTICOLOR dependency to HID_LOGITECH

Alexander Wetzel <[email protected]>
wifi: mac80211: Add counter for all monitor interfaces

Xiaogang Chen <[email protected]>
drm/amdkfd: Fix pasid value leak

Srinivasan Shanmugam <[email protected]>
drm/amdkfd: Fix error handling for missing PASID in 'kfd_process_device_init_vm'

Ovidiu Bunea <[email protected]>
drm/amd/display: Exit idle optimizations before accessing PHY

Geert Uytterhoeven <[email protected]>
serial: sh-sci: Save and restore more registers

Willem de Bruijn <[email protected]>
ipv6: remove leftover ip6 cookie initializer

Eduard Zingerman <[email protected]>

    bpf: abort verification if env->cur_state->loop_entry != NULL

Balbir Singh <[email protected]>
x86/mm/init: Handle the special case of device private pages in add_pages(), to not increase max_pfn and trigger dma_addressing_limited() bounce buffers

Michael S. Tsirkin <[email protected]>
virtgpu: don't reset on shutdown

Thomas Zimmermann <[email protected]>
drm/gem: Internally test import_attach for imported objects

Amber Lin <[email protected]>
drm/amdkfd: Correct F8_MODE for gfx950

Arnd Bergmann <[email protected]>
watchdog: aspeed: fix 64-bit division

Dan Carpenter <[email protected]>
pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group()

Dan Carpenter <[email protected]>
ASoC: sma1307: Fix error handling in sma1307_setting_loaded()

Nathan Chancellor <[email protected]>
i3c: master: svc: Fix implicit fallthrough in svc_i3c_master_ibi_work()

Jessica Zhang <[email protected]>
drm: Add valid clones check

Douglas Anderson <[email protected]>

    drm/panel-edp: Add Starry 116KHD024006

Vinay Belgaumkar <[email protected]>
drm/xe: Add locks in gtidle code

Lin.Cao <[email protected]>
drm/buddy: fix issue that force_merge cannot free all roots

Simona Vetter <[email protected]>

    drm/atomic: clarify the rules around drm_atomic_state->allow_modeset

Oak Zeng <[email protected]>
drm/xe: Reject BO eviction if BO is bound to current VM

John Harrison <[email protected]>
drm/xe/guc: Drop error messages about missing GuC logs

Michal Wajdeczko <[email protected]>
drm/xe: Always setup GT MMIO adjustment data

Michal Wajdeczko <[email protected]>
drm/xe/vf: Perform early GT MMIO initialization to read GMDID

Michal Wajdeczko <[email protected]>
drm/xe/sa: Always call drm_suballoc_manager_fini()

Ching-Te Ku <[email protected]>
wifi: rtw89: coex: Add protect to avoid A2DP lag while Wi-Fi connecting

Ching-Te Ku <[email protected]>
wifi: rtw89: coex: Separated Wi-Fi connecting event from Wi-Fi scan event

Maarten Lankhorst <[email protected]>
drm/xe: Do not attempt to bootstrap VF in execlists mode

Maarten Lankhorst <[email protected]>
drm/xe: Move suballocator init to after display init

Thomas Zimmermann <[email protected]>
drm/ast: Hide Gens 1 to 3 TX detection in branch

P Praneesh <[email protected]>
wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation

Zhi Wang <[email protected]>
drm/nouveau: fix the broken marco GSP_MSG_MAX_SIZE

Olivier Moysan <[email protected]>
drm: bridge: adv7511: fill stream capabilities

Lingbo Kong <[email protected]>
wifi: ath12k: report station mode transmit rate

Lingbo Kong <[email protected]>
wifi: ath12k: report station mode receive rate for IEEE 802.11be

P Praneesh <[email protected]>
wifi: ath12k: Fix end offset bit definition in monitor ring descriptor

Michal Wajdeczko <[email protected]>
drm/xe/pf: Move VFs reprovisioning to worker

Aaradhana Sahu <[email protected]>
wifi: ath12k: Fetch regdb.bin file from board-2.bin

Rosen Penev <[email protected]>
wifi: ath9k: return by of_get_mac_address

Michal Wajdeczko <[email protected]>
drm/xe/pf: Reset GuC VF config when unprovisioning critical resource

Youssef Samir <[email protected]>
accel/qaic: Mask out SR-IOV PCI resources

Nicolas Escande <[email protected]>
wifi: ath12k: fix ath12k_hal_tx_cmd_ext_desc_setup() info1 override

Isaac Scott <[email protected]>
regulator: ad5398: Add device tree support

Sean Anderson <[email protected]>
spi: zynqmp-gqspi: Always acknowledge interrupts

Ping-Ke Shih <[email protected]>
wifi: rtw89: add wiphy_lock() to work that isn't held wiphy_lock() yet

Bitterblue Smith <[email protected]>
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate

Soeren Moch <[email protected]>
wifi: rtl8xxxu: retry firmware download on error

Lad Prabhakar <[email protected]>
clk: renesas: rzg2l-cpg: Refactor Runtime PM clock validation

Ravi Bangoria <[email protected]>

    perf/amd/ibs: Fix ->config to sample period calculation for OP PMU

Ravi Bangoria <[email protected]>
perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt

Sudeep Holla <[email protected]>
firmware: arm_scmi: Relax duplicate name constraint across protocol ids

Viktor Malik <[email protected]>
bpftool: Fix readlink usage in get_fd_type

Martin KaFai Lau <[email protected]>
bpf: Use kallsyms to find the function name of a struct_ops's stub function

Thomas Zimmermann <[email protected]>
drm/ast: Find VBIOS mode from regular display size

Matthew Sakai <[email protected]>
dm vdo: use a short static string for thread name prefix

Chung Chung <[email protected]>
dm vdo indexer: prevent unterminated string warning

Ken Raeburn <[email protected]>
dm vdo vio-pool: allow variable-sized metadata vios

Vladimir Kondratiev <[email protected]>
irqchip/riscv-aplic: Add support for hart indexes

Charles Keepax <[email protected]>
ASoC: rt722-sdca: Add some missing readable registers

Cezary Rojewski <[email protected]>
ASoC: codecs: pcm3168a: Allow for 24-bit in provider mode

Naman Trivedi <[email protected]>
arm64: zynqmp: add clock-output-names property in clock nodes

junan <[email protected]>
HID: usbkbd: Fix the bit shift number for LED_KANA

Avula Sri Charan <[email protected]>
wifi: ath12k: Avoid napi_sync() before napi_enable()

Kai Mäkisara <[email protected]>
scsi: st: Restore some drive settings after reset

Justin Tee <[email protected]>
scsi: lpfc: Reduce log message generation during ELS ring clean up

Justin Tee <[email protected]>
scsi: lpfc: Free phba irq in lpfc_sli4_enable_msi() when pci_irq_vector() fails

Justin Tee <[email protected]>
scsi: lpfc: Ignore ndlp rport mismatch in dev_loss_tmo callbk

Justin Tee <[email protected]>
scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine

Konstantin Taranov <[email protected]>
net/mana: fix warning in the writer of client oob

Michal Wajdeczko <[email protected]>
drm/xe/relay: Don't use GFP_KERNEL for new transactions

Michal Swiatkowski <[email protected]>
ice: count combined queues using Rx/Tx count

Peter Zijlstra (Intel) <[email protected]>
perf: Avoid the read if the count is already updated

Ankur Arora <[email protected]>
rcu: fix header guard for rcu_all_qs()

Ankur Arora <[email protected]>
rcu: handle unstable rdp in rcu_read_unlock_strict()

Ankur Arora <[email protected]>
rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y

Michal Swiatkowski <[email protected]>
ice: treat dyn_allowed only as suggestion

Michal Swiatkowski <[email protected]>
ice: init flow director before RDMA

Petr Machata <[email protected]>
bridge: mdb: Allow replace of a host-joined group

Eric Dumazet <[email protected]>
net: flush_backlog() small changes

Heiner Kallweit <[email protected]>
r8169: don't scan PHY addresses > 0

Geert Uytterhoeven <[email protected]>
ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only

Ido Schimmel <[email protected]>
vxlan: Annotate FDB data races

Dhananjay Ugwekar <[email protected]>
cpufreq: amd-pstate: Remove unnecessary driver_lock in set_boost

Carolina Jubran <[email protected]>
net/mlx5e: Avoid WARN_ON when configuring MQPRIO with HTB offload enabled

Jakub Kicinski <[email protected]>
tools: ynl-gen: don't output external constants

Alexander Duyck <[email protected]>
eth: fbnic: set IFF_UNICAST_FLT to avoid enabling promiscuous mode when adding unicast addrs

Cristian Ciocaltea <[email protected]>
drm/rockchip: vop2: Improve display modes handling on RK3588 HDMI0

Depeng Shao <[email protected]>
media: qcom: camss: Add default case in vfe_src_pad_code

Depeng Shao <[email protected]>
media: qcom: camss: csid: Only add TPG v4l2 ctrl if TPG hardware is available

Jaegeuk Kim <[email protected]>
f2fs: introduce f2fs_base_attr for global sysfs entries

Rodrigo Vivi <[email protected]>
drm/xe: Fix PVC RPe and RPa information

Andrey Vatoropin <[email protected]>
hwmon: (xgene-hwmon) use appropriate type for the latency value

Len Brown <[email protected]>
tools/power turbostat: Clustered Uncore MHz counters should honor show/hide options

Jakub Kicinski <[email protected]>
net: page_pool: avoid false positive warning if NAPI was never added

Jakub Kicinski <[email protected]>
netdevsim: allow normal queue reset while down

Jordan Crouse <[email protected]>
clk: qcom: camcc-sm8250: Use clk_rcg2_shared_ops for some RCGs

Angelo Dureghello <[email protected]>
iio: dac: adi-axi-dac: add bus mode setup

Angelo Dureghello <[email protected]>
iio: dac: ad3552r-hs: use instruction mode for configuration

Ping-Ke Shih <[email protected]>
wifi: rtw89: call power_on ahead before selecting firmware

Ping-Ke Shih <[email protected]>
wifi: rtw89: fw: validate multi-firmware header before accessing

Ping-Ke Shih <[email protected]>
wifi: rtw89: fw: validate multi-firmware header before getting its size

Ching-Te Ku <[email protected]>
wifi: rtw89: coex: Assign value over than 0 to avoid firmware timer hang

Bitterblue Smith <[email protected]>
wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU

Bitterblue Smith <[email protected]>
wifi: rtw88: Fix download_firmware_validate() for RTL8814AU

Bitterblue Smith <[email protected]>

    wifi: rtw88: Extend rtw_fw_send_ra_info() for RTL8814AU

Bitterblue Smith <[email protected]>
wifi: rtw88: Fix rtw_update_sta_info() for RTL8814AU

Zhang Yi <[email protected]>
ext4: remove writable userspace mappings before truncating page cache

Zhang Yi <[email protected]>
ext4: don't write back data before punch hole in nojournal mode

Marek Vasut <[email protected]>
leds: trigger: netdev: Configure LED blink interval for HW offload

Kees Cook <[email protected]>
pstore: Change kmsg_bytes storage size to u32

Song Yoong Siang <[email protected]>
igc: Avoid unnecessary link down event in XDP_SETUP_PROG process

David Lechner <[email protected]>
iio: adc: ad7944: don't use storagebits for sizing

Akihiko Odaki <[email protected]>
s390/crash: Use note name macros

Aleksander Jan Bajkowski <[email protected]>
r8152: add vendor/device ID pair for Dell Alienware AW1022z

Kuniyuki Iwashima <[email protected]>
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().

Athira Rajeev <[email protected]>
arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src

Gaurav Batra <[email protected]>
powerpc/pseries/iommu: create DDW for devices with DMA mask less than 64-bits

Gaurav Batra <[email protected]>
powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

Csókás, Bence <[email protected]>
net: fec: Refactor MAC reset to function

Alexander Wetzel <[email protected]>
wifi: mac80211: Drop cooked monitor support

Benjamin Berg <[email protected]>
wifi: mac80211: add HT and VHT basic set verification

Emmanuel Grumbach <[email protected]>

    wifi: mac80211: set ieee80211_prep_tx_info::link_id upon Auth Rx

Johannes Berg <[email protected]>
wifi: mac80211: remove misplaced drv_mgd_complete_tx() call

Johannes Berg <[email protected]>
wifi: mac80211: don't unconditionally call drv_mgd_complete_tx()

Johannes Berg <[email protected]>
wifi: mac80211: always send max agg subframe num in strict mode

Miri Korenblit <[email protected]>
wifi: iwlwifi: don't warn during reprobe

Johannes Berg <[email protected]>
wifi: iwlwifi: use correct IMR dump variable

Matthieu Baerts (NGI0) <[email protected]>
mptcp: pm: userspace: flags: clearer msg if no remote addr

Karthikeyan Periyasamy <[email protected]>
wifi: ath12k: Update the peer id in PPDU end user stats TLV

P Praneesh <[email protected]>
wifi: ath12k: fix the ampdu id fetch in the HAL_RX_MPDU_START TLV

Aditya Kumar Singh <[email protected]>
wifi: ath12k: use arvif instead of link_conf in ath12k_mac_set_key()

Aaradhana Sahu <[email protected]>
wifi: ath12k: Enable MLO setup ready and teardown commands for single split-phy device

Angelo Dureghello <[email protected]>
iio: adc: ad7606: protect register access

Leon Romanovsky <[email protected]>
xfrm: prevent high SEQ input in non-ESN mode

Stefan Wahren <[email protected]>
drm/v3d: Add clock handling

William Tu <[email protected]>
net/mlx5e: reduce the max log mpwrq sz for ECPF and reps

William Tu <[email protected]>
net/mlx5e: reduce rep rxq depth to 256 for ECPF

William Tu <[email protected]>
net/mlx5e: set the tx_queue_len for pfifo_fast

Alexei Lazar <[email protected]>
net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB

Alexei Lazar <[email protected]>
net/mlx5: XDP, Enable TX side XDP multi-buffer support

Chaohai Chen <[email protected]>
scsi: target: spc: Fix loop traversal in spc_rsoc_get_descr()

Alex Deucher <[email protected]>
drm/amd/display/dm: drop hw_support check in amdgpu_dm_i2c_xfer()

Xiaogang Chen <[email protected]>
drm/amdkfd: Have kfd driver use same PASID values from graphic driver

Shiwu Zhang <[email protected]>
drm/amdgpu: enlarge the VBIOS binary size limit

Lijo Lazar <[email protected]>
drm/amdgpu: Use active umc info from discovery

Dillon Varone <[email protected]>
drm/amd/display: Populate register address for dentist for dcn401

Austin Zheng <[email protected]>
drm/amd/display: Use Nominal vBlank If Provided Instead Of Capping It

Joshua Aberback <[email protected]>
drm/amd/display: Increase block_sequence array size

Peterson Guo <[email protected]>
drm/amd/display: Reverse the visual confirm recouts

Jiang Liu <[email protected]>
amdgpu/soc15: enable asic reset for dGPU in case of suspend abort

Victor Skvortsov <[email protected]>
drm/amdgpu: Skip err_count sysfs creation on VF unsupported RAS blocks

Srinivasan Shanmugam <[email protected]>
drm/amdgpu/gfx10: Add cleaner shader for GFX10.1.10

Tom Chung <[email protected]>
drm/amd/display: Initial psr_version with correct setting

George Shen <[email protected]>
drm/amd/display: Update CR AUX RD interval interpretation

Austin Zheng <[email protected]>
drm/amd/display: Account For OTO Prefetch Bandwidth When Calculating Urgent Bandwidth

Dillon Varone <[email protected]>
drm/amd/display: Ammend DCPG IP control sequences to align with HW guidance

Dillon Varone <[email protected]>
drm/amd/display: Fixes for mcache programming in DML21

Brandon Syu <[email protected]>
Revert "drm/amd/display: Exit idle optimizations before attempt to access PHY"

Martin Tsai <[email protected]>
drm/amd/display: Support multiple options during psr entry.

Asad Kamal <[email protected]>

    drm/amd/pm: Skip P2S load for SMU v13.0.12

Jiang Liu <[email protected]>

    drm/amdgpu: reset psp->cmd to NULL after releasing the buffer

Ilya Bakoulin <[email protected]>
drm/amd/display: Don't try AUX transactions on disconnected link

Samson Tam <[email protected]>
drm/amd/display: remove TF check for LLS policy

Charlene Liu <[email protected]>
drm/amd/display: pass calculated dram_speed_mts to dml2

Harish Kasiviswanathan <[email protected]>
drm/amdgpu: Set snoop bit for SDMA for MI series

Eric Huang <[email protected]>
drm/amdkfd: fix missing L2 cache info in topology

Alex Deucher <[email protected]>
drm/amdgpu/mes11: fix set_hw_resources_1 calculation

Bart Van Assche <[email protected]>
scsi: usb: Rename the RESERVE and RELEASE constants

Huacai Chen <[email protected]>
net: stmmac: dwmac-loongson: Set correct {tx,rx}_fifo_size

Jan Kara <[email protected]>
jbd2: Avoid long replay times due to high number or revoke blocks

Bard Liao <[email protected]>
soundwire: cadence_master: set frame shape and divider based on actual clk freq

Vijendar Mukunda <[email protected]>
soundwire: amd: change the soundwire wake enable/disable sequence

André Draszik <[email protected]>
phy: exynos5-usbdrd: fix EDS distribution tuning (gs101)

Dmitry Baryshkov <[email protected]>
phy: core: don't require set_mode() callback for phy_get_mode() to work

Damon Ding <[email protected]>
phy: phy-rockchip-samsung-hdptx: Swap the definitions of LCPLL_REF and ROPLL_REF

Rodrigo Vivi <[email protected]>
drm/xe/display: Remove hpd cancel work sync from runtime pm path

Claudiu Beznea <[email protected]>
pinctrl: renesas: rzg2l: Add suspend/resume support for pull up/down

Claudiu Beznea <[email protected]>
serial: sh-sci: Update the suspend/resume support

zihan zhou <[email protected]>
sched: Reduce the default slice to avoid tasks getting an extra tick

Peter Zijlstra <[email protected]>
x86/boot: Mark start_secondary() with __noendbr

Peter Zijlstra <[email protected]>
x86/traps: Cleanup and robustify decode_bug()

Peter Zijlstra <[email protected]>
x86/ibt: Handle FineIBT in handle_cfi_failure()

Shuicheng Lin <[email protected]>
drm/xe/debugfs: Add missing xe_pm_runtime_put in wedge_mode_set

Xin Wang <[email protected]>
drm/xe/debugfs: fixed the return value of wedged_mode_set

Krzysztof Kozlowski <[email protected]>
clk: qcom: clk-alpha-pll: Do not use random stack value for recalc rate

Lizhi Hou <[email protected]>
accel/amdxdna: Refactor hardware context destroy routine

Karl Chan <[email protected]>
clk: qcom: ipq5018: allow it to be bulid on arm32

Lucas De Marchi <[email protected]>
drm/xe: Fix xe_tile_init_noalloc() error propagation

Lucas De Marchi <[email protected]>
drm/xe: Stop ignoring errors from xe_ttm_stolen_mgr_init()

Kees Cook <[email protected]>
net/mlx4_core: Avoid impossible mlx4_db_alloc() order value

Michael Chan <[email protected]>
bnxt_en: Set NPAR 1.2 support when registering with firmware

Sakari Ailus <[email protected]>
media: i2c: ov2740: Free control handler on error path

Alain Volmat <[email protected]>
media: stm32: csi: add missing pm_runtime_put on error

Alain Volmat <[email protected]>
media: stm32: csi: use ARRAY_SIZE to search D-PHY table

Sakari Ailus <[email protected]>
media: v4l: Memset argument to 0 before calling get_mbus_config pad op

David Plowman <[email protected]>
media: i2c: imx219: Correct the minimum vblanking value

Brendan Jackman <[email protected]>
kunit: tool: Use qboot on QEMU x86_64

Konstantin Andreev <[email protected]>
smack: Revert "smackfs: Added check catlen"

Michal Wajdeczko <[email protected]>
drm/xe/pf: Release all VFs configs on device removal

Konstantin Andreev <[email protected]>
smack: recognize ipv4 CIPSO w/o categories

Valentin Caron <[email protected]>
pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map

Kuninori Morimoto <[email protected]>
ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()

Hector Martin <[email protected]>
ASoC: tas2764: Power up/down amp on mute ops

Hector Martin <[email protected]>
ASoC: tas2764: Mark SW_RESET as volatile

Hector Martin <[email protected]>
ASoC: tas2764: Add reg defaults for TAS2764_INT_CLK_CFG

Martin Povišer <[email protected]>
ASoC: ops: Enforce platform maximum on initial value

Pavel Begunkov <[email protected]>
io_uring: sanitise ring params earlier

Caleb Sander Mateos <[email protected]>
io_uring: use IO_REQ_LINK_FLAGS more

Siva Durga Prasad Paladugu <[email protected]>
firmware: xilinx: Dont send linux address to get fpga config get status

Sudeep Holla <[email protected]>
firmware: arm_ffa: Handle the presence of host partition in the partition info

Sudeep Holla <[email protected]>
firmware: arm_ffa: Reject higher major version as incompatible

Shahar Shitrit <[email protected]>
net/mlx5: Apply rate-limiting to high temperature warning

Shahar Shitrit <[email protected]>
net/mlx5: Modify LSB bitmask in temperature event to include only the first bit

Amery Hung <[email protected]>
bpf: Make every prog keep a copy of ctx_arg_info

Hans Verkuil <[email protected]>
media: test-drivers: vivid: don't call schedule in loop

Andrew Jones <[email protected]>
irqchip/riscv-imsic: Set irq_set_affinity() for IMSIC base

Andy Shevchenko <[email protected]>
hrtimers: Replace hrtimer_clock_to_base_table with switch-case

Benjamin Segall <[email protected]>
posix-timers: Invoke cond_resched() during exit_itimers()

Brian Gerst <[email protected]>
x86/boot: Disable stack protector for early boot code

Petr Machata <[email protected]>
vxlan: Join / leave MC group after remote changes

Xiaofei Tan <[email protected]>
ACPI: HED: Always initialize before evged

Ilpo Järvinen <[email protected]>
PCI: Fix old_size lower bound in calculate_iosize() too

Jakub Kicinski <[email protected]>
eth: mlx4: don't try to complete XDP frames in netpoll

Eduard Zingerman <[email protected]>
bpf: copy_verifier_state() should copy 'loop_entry' field

Eduard Zingerman <[email protected]>

    bpf: don't do clean_live_states when state->loop_entry->branches > 0

Krzysztof Kozlowski <[email protected]>
can: c_can: Use of_property_present() to test existence of DT property

Ahmad Fatoum <[email protected]>
pmdomain: imx: gpcv2: use proper helper for property detection

Michael Margolin <[email protected]>
RDMA/core: Fix best page size finding when it can cross SG entries

Alexis Lothoré <[email protected]>
serial: mctrl_gpio: split disable_ms into sync and no_sync APIs

Harry Wentland <[email protected]>
drm/amd/display: Don't treat wb connector as physical in create_validate_stream_for_sink

Leo Zeng <[email protected]>
Revert "drm/amd/display: Request HW cursor on DCN3.2 with SubVP"

George Shen <[email protected]>
drm/amd/display: Read LTTPR ALPM caps during link cap retrieval

Ilya Bakoulin <[email protected]>
drm/amd/display: Fix BT2020 YCbCr limited/full range input

Nicholas Kazlauskas <[email protected]>
drm/amd/display: Guard against setting dispclk low when active

Harry VanZyllDeJong <[email protected]>
drm/amd/display: Add support for disconnected eDP streams

Lijo Lazar <[email protected]>
drm/amd/pm: Fetch current power limit from PMFW

Marcin Bernatowicz <[email protected]>
drm/xe/client: Skip show_run_ticks if unable to read timestamp

Anup Patel <[email protected]>
irqchip/riscv-imsic: Separate next and previous pointers in IMSIC vector

Eddie James <[email protected]>
eeprom: ee1004: Check chip before probing

Chris Morgan <[email protected]>

    mfd: axp20x: AXP717: Add AXP717_TS_PIN_CFG to writeable regs

Breno Leitao <[email protected]>
netdevsim: call napi_schedule from a timer context

Frank Li <[email protected]>
i3c: master: svc: Flush FIFO before sending Dynamic Address Assignment(DAA)

Arnd Bergmann <[email protected]>
EDAC/ie31200: work around false positive build warning

Chris Morgan <[email protected]>

    power: supply: axp20x_battery: Update temp sensor for AXP717 from device tree

Peter Seiderer <[email protected]>
net: pktgen: fix access outside of user given buffer in pktgen_thread_write()

Kuan-Chung Chen <[email protected]>
wifi: rtw89: 8922a: fix incorrect STA-ID in EHT MU PPDU

Ping-Ke Shih <[email protected]>
wifi: rtw89: fw: add blacklist to avoid obsolete secure firmware

Ping-Ke Shih <[email protected]>
wifi: rtw89: fw: get sb_sel_ver via get_unaligned_le32()

Ping-Ke Shih <[email protected]>
wifi: rtw89: fw: propagate error code from rtw89_h2c_tx()

Bitterblue Smith <[email protected]>
wifi: rtw88: Fix rtw_mac_power_switch() for RTL8814AU

Bitterblue Smith <[email protected]>
wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31

Bitterblue Smith <[email protected]>

    wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU

Bitterblue Smith <[email protected]>

    wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU

Shivasharan S <[email protected]>
scsi: mpt3sas: Send a diag reset if target reset fails

Mrinmay Sarkar <[email protected]>
PCI: epf-mhi: Update device ID for SA8775P

Paul Burton <[email protected]>
clocksource: mips-gic-timer: Enable counter when CPUs start

Paul Burton <[email protected]>
MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core

Subramanian Mohan <[email protected]>
pps: generators: replace copy of pps-gen info struct with const pointer

Jason Gunthorpe <[email protected]>
genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie

Uros Bizjak <[email protected]>

    x86/locking: Use ALT_OUTPUT_SP() for percpu_{,try_}cmpxchg{64,128}_op()

Rik van Riel <[email protected]>
x86/mm: Make MMU_GATHER_RCU_TABLE_FREE unconditional

Christian König <[email protected]>
drm/amdgpu: remove all KFD fences from the BO on release

Bibo Mao <[email protected]>
MIPS: Use arch specific syscall name match function

Umesh Nerlige Ramappa <[email protected]>
drm/xe/oa: Ensure that polled read returns latest data

Xiao Liang <[email protected]>
rtnetlink: Lookup device in target netns when creating link

Xiao Liang <[email protected]>
net: ipv6: Init tunnel link-netns before registering dev

Herbert Xu <[email protected]>
crypto: skcipher - Zap type in crypto_alloc_sync_skcipher

Herbert Xu <[email protected]>
crypto: ahash - Set default reqsize from ahash_alg

Balbir Singh <[email protected]>
x86/kaslr: Reduce KASLR entropy on most x86 systems

Patrisious Haddad <[email protected]>
net/mlx5: Change POOL_NEXT_SIZE define value and make it global

Philippe Simons <[email protected]>
clk: sunxi-ng: h616: Reparent GPU clock during frequency changes

Song Liu <[email protected]>
bpf: arm64: Silence "UBSAN: negation-overflow" warning

Kai Mäkisara <[email protected]>
scsi: scsi_debug: First fixes for tapes

Bartosz Golaszewski <[email protected]>
gpiolib: sanitize the return value of gpio_chip::set_config()

Jinliang Zheng <[email protected]>
dm: fix unconditional IO throttle caused by REQ_PREFLUSH

Michael S. Tsirkin <[email protected]>
virtio: break and reset virtio devices on device_shutdown()

Nandakumar Edamana <[email protected]>
libbpf: Fix out-of-bound read

Kunihiko Hayashi <[email protected]>
net: stmmac: Correct usage of maximum queue number macros

Christoph Hellwig <[email protected]>
loop: check in LO_FLAGS_DIRECT_IO in loop_default_blocksize

Ranjan Kumar <[email protected]>
scsi: mpi3mr: Update timestamp only for supervisor IOCs

Jianbo Liu <[email protected]>
net/mlx5e: Add correct match to check IPSec syndromes for switchdev mode

Matthias Fend <[email protected]>
media: tc358746: improve calculation of the D-PHY timing registers

Niklas Söderlund <[email protected]>
media: adv7180: Disable test-pattern control on adv7180

Rafael J. Wysocki <[email protected]>
cpuidle: menu: Avoid discarding useful information

Konstantin Shkolnyy <[email protected]>
vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines

Mike Christie <[email protected]>
vhost-scsi: Return queue full for page alloc failures during copy

Waiman Long <[email protected]>
x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()

Nícolas F. R. A. Prado <[email protected]>
ASoC: mediatek: mt8188: Add reference for dmic clocks

Nícolas F. R. A. Prado <[email protected]>
ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatile

Samson Tam <[email protected]>
drm/amd/display: Fix mismatch type comparison in custom_float

Navid Assadian <[email protected]>
drm/amd/display: Add opp recout adjustment

Assadian, Navid <[email protected]>
drm/amd/display: Fix mismatch type comparison

Samson Tam <[email protected]>
drm/amd/display: fix check for identity ratio

Charlene Liu <[email protected]>
drm/amd/display: fix dcn4x init failed

Yihan Zhu <[email protected]>
drm/amd/display: handle max_downscale_src_width fail check

Nir Lichtman <[email protected]>
x86/build: Fix broken copy command in genimage.sh when making isoimage

Hariprasad Kelam <[email protected]>
Octeontx2-af: RPM: Register driver with PCI subsys IDs

Amery Hung <[email protected]>
bpf: Search and add kfuncs in struct_ops prologue and epilogue

Andrew Davis <[email protected]>
soc: ti: k3-socinfo: Do not use syscon helper to build regmap

Ramasamy Kaliappan <[email protected]>
wifi: ath12k: Improve BSS discovery with hidden SSID in 6 GHz band

Dang Huynh <[email protected]>
pinctrl: qcom: msm8917: Add MSM8937 wsa_reset pin

Eric Dumazet <[email protected]>
tcp: be less liberal in TSEcr received while in SYN_RECV state

Hangbin Liu <[email protected]>
bonding: report duplicate MAC address in all situations

Chih-Kang Chang <[email protected]>
wifi: rtw89: Parse channel from IE to correct invalid hardware reports during scanning

Roger Quadros <[email protected]>
dmaengine: ti: k3-udma-glue: Drop skip_fdq argument from k3_udma_glue_reset_rx_chn

Arnd Bergmann <[email protected]>
net: xgene-v2: remove incorrect ACPI_PTR annotation

Eric Woudstra <[email protected]>
net: ethernet: mtk_ppe_offload: Allow QinQ, double ETH_P_8021Q only

Lizhi Hou <[email protected]>
accel/amdxdna: Check interrupt register before mailbox_rx_worker exits

Yuanjun Gong <[email protected]>
leds: pwm-multicolor: Add check for fwnode_property_read_u32

Daniel Gomez <[email protected]>
drm/xe: xe_gen_wa_oob: replace program_invocation_short_name

Philip Yang <[email protected]>
drm/amdkfd: KFD release_work possible circular locking

Inochi Amaoto <[email protected]>
pinctrl: sophgo: avoid to modify untouched bit when setting cv1800 pinconf

Greg Kroah-Hartman <[email protected]>
driver core: faux: only create the device if probe() succeeds

Kevin Krakauer <[email protected]>
selftests/net: have gro.sh -t return a correct exit code

Moshe Shemesh <[email protected]>
net/mlx5: Avoid report two health errors on same syndrome

Satyanarayana K V P <[email protected]>
drm/xe/pf: Create a link between PF and VF devices

Satyanarayana K V P <[email protected]>
drm/xe/vf: Retry sending MMIO request to GUC on timeout error

Viresh Kumar <[email protected]>
firmware: arm_ffa: Set dma_mask for ffa devices

Stanimir Varbanov <[email protected]>
PCI: brcmstb: Add a softdep to MIP MSI-X driver

Stanimir Varbanov <[email protected]>
PCI: brcmstb: Expand inbound window size up to 64GB

Vinith Kumar R <[email protected]>
wifi: ath12k: Report proper tx completion status to mac80211

Hector Martin <[email protected]>
soc: apple: rtkit: Implement OSLog buffers properly

Janne Grunau <[email protected]>
soc: apple: rtkit: Use high prio work queue

Rob Herring (Arm) <[email protected]>
perf: arm_pmuv3: Call kvm_vcpu_pmu_resync_el0() before enabling counters

Kuhanh Murugasen Krishnan <[email protected]>
fpga: altera-cvp: Increase credit timeout

AngeloGioacchino Del Regno <[email protected]>
drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence

Li Bin <[email protected]>
ARM: at91: pm: fix at91_suspend_finish for ZQ calibration

Alexander Stein <[email protected]>
hwmon: (gpio-fan) Add missing mutex locks

Huisong Li <[email protected]>
hwmon: (acpi_power_meter) Fix the fake power alarm reporting

Breno Leitao <[email protected]>
x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2

Xu Yang <[email protected]>
PM: sleep: Suppress sleeping parent warning in special case

Ahmad Fatoum <[email protected]>
clk: imx8mp: inform CCF of maximum frequency of clocks

Ricardo Ribalda <[email protected]>
media: uvcvideo: Handle uvc menu translation inside uvc_get_le_value

Ricardo Ribalda <[email protected]>
media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map

Caleb Sander Mateos <[email protected]>
ublk: complete command synchronously on error

Shin'ichiro Kawasaki <[email protected]>
null_blk: generate null_blk configfs features string

Christoph Hellwig <[email protected]>
block: mark bounce buffering as incompatible with integrity

Andy Yan <[email protected]>
drm/rockchip: vop2: Add uv swap for cluster window

Kuniyuki Iwashima <[email protected]>
ipv4: fib: Hold rtnl_net_lock() in ip_rt_ioctl().

Kuniyuki Iwashima <[email protected]>
ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config().

Nicolas Bouchinet <[email protected]>
scsi: logging: Fix scsi_logging_level bounds

Maciej S. Szmigiero <[email protected]>
ALSA: hda/realtek: Enable PC beep passthrough for HP EliteBook 855 G7

Saket Kumar Bhaskar <[email protected]>
perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type

Peter Zijlstra <[email protected]>
perf/core: Fix perf_mmap() failure path

Peter Seiderer <[email protected]>
net: pktgen: fix mpls maximum labels list parsing

Paul Elder <[email protected]>
media: imx335: Set vblank immediately

Yi Liu <[email protected]>
iommufd: Disallow allocating nested parent domain with fault ID

Uday Shankar <[email protected]>
ublk: enforce ublks_max only for unprivileged devices

Jiasheng Jiang <[email protected]>
dpll: Add an assertion to check freq_supported_num

Andrei Botila <[email protected]>

    net: phy: nxp-c45-tja11xx: add match_phy_device to TJA1103/TJA1104

Lee Trager <[email protected]>
eth: fbnic: Prepend TSENE FW fields with FBNIC_FW

Alexander Sverdlin <[email protected]>
net: ethernet: ti: cpsw_new: populate netdev of_node

Jessica Zhang <[email protected]>
drm/msm/dpu: Set possible clones for all encoders

Paul E. McKenney <[email protected]>
rcu: Fix get_state_synchronize_rcu_full() GP-start detection

Artur Weber <[email protected]>
pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned"

Hans Verkuil <[email protected]>
media: cx231xx: set device_caps for 417

Peter Zijlstra <[email protected]>
perf/core: Clean up perf_try_init_event()

Lijo Lazar <[email protected]>
drm/amdgpu: Add offset normalization in VCN v5.0.1

Lijo Lazar <[email protected]>
drm/amdgpu: Avoid HDP flush on JPEG v5.0.1

Aric Cyr <[email protected]>
drm/amd/display: Request HW cursor on DCN3.2 with SubVP

Dillon Varone <[email protected]>
drm/amd/display: Fix p-state type when p-state is unsupported

Dillon Varone <[email protected]>
drm/amd/display: Fix DMUB reset sequence for DCN401

George Shen <[email protected]>
drm/amd/display: Skip checking FRL_MODE bit for PCON BW determination

Nicholas Kazlauskas <[email protected]>
drm/amd/display: Ensure DMCUB idle before reset on DCN31/DCN35

Lijo Lazar <[email protected]>
drm/amdgpu: Reinit FW shared flags on VCN v5.0.1

Victor Lu <[email protected]>
drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c

Gustavo Sousa <[email protected]>
drm/xe: Disambiguate GMDID-based IP names

Matti Lehtimäki <[email protected]>
remoteproc: qcom_wcnss: Handle platforms with only single power domain

Ming Lei <[email protected]>
blk-throttle: don't take carryover for prioritized processing of metadata

Choong Yong Liang <[email protected]>

    net: phylink: use pl->link_interface in phylink_expects_phy()

Thomas Zimmermann <[email protected]>
drm/gem: Test for imported GEM buffers with helper

Matthew Wilcox (Oracle) <[email protected]>
orangefs: Do not truncate file size

AngeloGioacchino Del Regno <[email protected]>
soc: mediatek: mtk-mutex: Add DPI1 SOF/EOF to MT8188 mutex tables

Ming-Hung Tsai <[email protected]>
dm cache: prevent BUG_ON by blocking retries on failed device resumes

Niklas Neronin <[email protected]>
usb: xhci: set page size to the xHCI-supported size

Vitaliy Shevtsov <[email protected]>
media: cec: use us_to_ktime() where appropriate

Markus Elfring <[email protected]>
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()

Svyatoslav Ryhel <[email protected]>
ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114

Arnd Bergmann <[email protected]>
soc: samsung: include linux/array_size.h where needed

Matthew Brost <[email protected]>
drm/xe: Retry BO allocation

Matthew Brost <[email protected]>
drm/xe: Nuke VM's mapping upon close

Andy Shevchenko <[email protected]>
ieee802154: ca8210: Use proper setters and getters for bitwise types

Alexandre Belloni <[email protected]>
rtc: ds1307: stop disabling alarms on probe

Michael Jeanson <[email protected]>
rseq: Fix segfault on registration when rseq_cs is non-zero

Eric Dumazet <[email protected]>
tcp: bring back NUMA dispersion in inet_ehash_locks_alloc()

Takashi Iwai <[email protected]>
ALSA: seq: Improve data consistency at polling

Andreas Schwab <[email protected]>
powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7

Jon Hunter <[email protected]>
arm64: tegra: Resize aperture for the IGX PCIe C5 slot

Diogo Ivo <[email protected]>
arm64: tegra: p2597: Fix gpio for vdd-1v8-dis regulator

Emily Deng <[email protected]>
drm/amdgpu: Fix missing drain retry fault the last entry

Tao Zhou <[email protected]>
drm/amdgpu: increase RAS bad page threshold

Alex Sierra <[email protected]>
drm/amdkfd: clear F8_MODE for gfx950

Harish Kasiviswanathan <[email protected]>
drm/amdkfd: Set per-process flags only once cik/vi

Harish Kasiviswanathan <[email protected]>
drm/amdkfd: Set per-process flags only once for gfx9/10/11/12

Sven Schwermer <[email protected]>
crypto: mxs-dcp - Only set OTP_KEY bit for OTP key

Herbert Xu <[email protected]>
crypto: lzo - Fix compression buffer overrun

Niklas Cassel <[email protected]>
selftests: pci_endpoint: Skip disabled BARs

Niklas Cassel <[email protected]>
misc: pci_endpoint_test: Give disabled BARs a distinct error code

Christian Bruel <[email protected]>
PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops

Chin-Ting Kuo <[email protected]>
watchdog: aspeed: Update bootstatus handling

Kyunghwan Seo <[email protected]>
watchdog: s3c2410_wdt: Fix PMU register bits for ExynosAutoV920 SoC

Aaron Kling <[email protected]>
cpufreq: tegra186: Share policy per cluster

K Prateek Nayak <[email protected]>
fs/pipe: Limit the slots in pipe_resize_ring()

Vasant Hegde <[email protected]>
iommu/amd/pgtbl_v2: Improve error handling

Jason Gunthorpe <[email protected]>
iommu/vt-d: Check if SVA is supported when attaching the SVA domain

Yeoreum Yun <[email protected]>
coresight: change coresight_trace_id_map's lock type to raw_spinlock_t

Yeoreum Yun <[email protected]>
coresight-etb10: change etb_drvdata spinlock's type to raw_spinlock_t

Nilay Shroff <[email protected]>

    block: acquire q->limits_lock while reading sysfs attributes

Coly Li <[email protected]>
badblocks: Fix a nonsense WARN_ON() which checks whether a u64 variable < 0

Alexey Klimov <[email protected]>
ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()

Andy Shevchenko <[email protected]>
auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common"

Andreas Gruenbacher <[email protected]>
gfs2: Check for empty queue in run_queue

Leon Huang <[email protected]>
drm/amd/display: Fix incorrect DPCD configs while Replay/PSR switch

Peichen Huang <[email protected]>
drm/amd/display: not abort link train when bw is low

Zhikai Zhai <[email protected]>
drm/amd/display: calculate the remain segments for all pipes

Charlene Liu <[email protected]>
drm/amd/display: remove minimum Dispclk and apply oem panel timing.

Willem de Bruijn <[email protected]>
ipv6: save dontfrag in cork

Heiner Kallweit <[email protected]>
r8169: increase max jumbo packet size on RTL8125/RTL8126

Anjaneyulu <[email protected]>
wifi: cfg80211: allow IR in 20 MHz configurations

Johannes Berg <[email protected]>
wifi: mac80211: fix U-APSD check in ML reconfiguration

Ilan Peer <[email protected]>
wifi: mac80211_hwsim: Fix MLD address translation

Johannes Berg <[email protected]>
wifi: mac80211: fix warning on disconnect during failed ML reconf

Ilan Peer <[email protected]>
wifi: cfg80211: Update the link address when a link is added

Johannes Berg <[email protected]>
wifi: mac80211: don't include MLE in ML reconf per-STA profile

Emmanuel Grumbach <[email protected]>
wifi: iwlwifi: fix the ECKV UEFI variable name

Johannes Berg <[email protected]>
wifi: iwlwifi: mark Br device not integrated

Johannes Berg <[email protected]>
wifi: iwlwifi: fix debug actions order

Daniel Gabay <[email protected]>
wifi: iwlwifi: w/a FW SMPS mode selection

Miri Korenblit <[email protected]>
wifi: iwlwifi: don't warn when if there is a FW error

Marcos Paulo de Souza <[email protected]>
printk: Check CON_SUSPEND when unblanking a console

Robin Murphy <[email protected]>

    iommu: Keep dev->iommu state consistent

Kurt Borja <[email protected]>
hwmon: (dell-smm) Increment the number of fans

Avraham Stern <[email protected]>
wifi: iwlwifi: mvm: fix setting the TK when associated

Michal Pecio <[email protected]>
usb: xhci: Don't change the status of stalled TDs on failed Stop EP

Erick Shepherd <[email protected]>
mmc: sdhci: Disable SD card clock before changing parameters

Kaustabh Chakraborty <[email protected]>
mmc: dw_mmc: add exynos7870 DW MMC support

Ryan Roberts <[email protected]>
arm64/mm: Check PUD_TYPE_TABLE in pud_bad()

Ryan Roberts <[email protected]>
arm64/mm: Check pmd_table() in pmd_trans_huge()

Andy Yan <[email protected]>
phy: rockchip: usbdp: Only verify link rates/lanes/voltage when the corresponding set flags are set

Kees Cook <[email protected]>
PNP: Expand length of fixup id string

Nicolas Bouchinet <[email protected]>
netfilter: conntrack: Bound nf_conntrack sysctl writes

Dian-Syuan Yang <[email protected]>
wifi: rtw89: set force HE TB mode when connecting to 11ax AP

Ching-Te Ku <[email protected]>
wifi: rtw89: coex: Fix coexistence report not show as expected

Thomas Weißschuh <[email protected]>
timer_list: Don't use %pK through printk()

Jaakko Karrenpalo <[email protected]>
net: hsr: Fix PRP duplicate detection

Jonas Karlman <[email protected]>
net: stmmac: dwmac-rk: Validate GRF and peripheral GRF during probe

Thomas Gleixner <[email protected]>
posix-timers: Ensure that timer initialization is fully visible

Eric Dumazet <[email protected]>
posix-timers: Add cond_resched() to posix_timer_add() search loop

Maher Sanalla <[email protected]>
RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject()

Baokun Li <[email protected]>
ext4: do not convert the unwritten extents if data writeback fails

Baokun Li <[email protected]>
ext4: reject the 'data_err=abort' option in nojournal mode

Manuel Fombuena <[email protected]>
leds: leds-st1202: Initialize hardware before DT node child operations

Manuel Fombuena <[email protected]>
leds: Kconfig: leds-st1202: Add select for required LEDS_TRIGGER_PATTERN

Taniya Das <[email protected]>
clk: qcom: lpassaudiocc-sc7280: Add support for LPASS resets for QCM6490

Ryan Walklin <[email protected]>
ASoC: sun4i-codec: correct dapm widgets and controls for h616

Ryan Walklin <[email protected]>
ASoC: sun4i-codec: support hp-det-gpios property

David Rosca <[email protected]>
drm/amdgpu: Update SRIOV video codec caps

Alex Deucher <[email protected]>
drm/amdgpu/gfx11: don't read registers in mqd init

Alex Deucher <[email protected]>
drm/amdgpu/gfx12: don't read registers in mqd init

Shree Ramamoorthy <[email protected]>

    mfd: tps65219: Remove TPS65219_REG_TI_DEV_ID check

Eder Zulian <[email protected]>
mfd: syscon: Add check for invalid resource size

Prathamesh Shete <[email protected]>
pinctrl-tegra: Restore SFSEL bit when freeing pins

Frediano Ziglio <[email protected]>
xen: Add support for XenServer 6.1 platform device

Guangguan Wang <[email protected]>
net/smc: use the correct ndev to find pnetid by pnetid table

Mikulas Patocka <[email protected]>
dm: restrict dm device size to 2^63-512 bytes

Shashank Gupta <[email protected]>
crypto: octeontx2 - suppress auth failure screaming due to negative tests

Masahiro Yamada <[email protected]>
kconfig: do not clear SYMBOL_VALID when reading include/config/auto.conf

Seyediman Seyedarab <[email protected]>
kbuild: fix argument parsing in scripts/config

Yonghong Song <[email protected]>
bpf: Allow pre-ordering for bpf cgroup progs

Rae Moar <[email protected]>
kunit: tool: Fix bug in parsing test plan

Nícolas F. R. A. Prado <[email protected]>
ASoC: mediatek: mt6359: Add stub for mt6359_accdet_enable_jack_detect

Linus Walleij <[email protected]>
ASoC: pcm6240: Drop bogus code handling IRQ as GPIO

Chenyuan Yang <[email protected]>
ASoC: sma1307: Add NULL check in sma1307_setting_loaded()

Sergio Perez Gonzalez <[email protected]>
spi: spi-mux: Fix coverity issue, unchecked return value

Gao Xiang <[email protected]>
erofs: initialize decompression early

Mika Westerberg <[email protected]>
thunderbolt: Do not add non-active NVM if NVM upgrade is disabled for retimer

Josh Poimboeuf <[email protected]>
objtool: Fix error handling inconsistencies in check()

Alexandre Belloni <[email protected]>
rtc: rv3032: fix EERD location

Ilpo Järvinen <[email protected]>
tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()

Jan Kara <[email protected]>
jbd2: do not try to recover wiped journal

Frank Li <[email protected]>
PCI: dwc: Use resource start as ioremap() input in dw_pcie_pme_turn_off()

Mykyta Yatsenko <[email protected]>
bpf: Return prog btf_id without capable check

Jiayuan Chen <[email protected]>
bpftool: Using the right format specifiers

Alex Williamson <[email protected]>
vfio/pci: Handle INTx IRQ_NOTCONNECTED

Kai Mäkisara <[email protected]>
scsi: st: ERASE does not change tape location

Kai Mäkisara <[email protected]>
scsi: st: Tighten the page format heuristics with MODE SELECT

Al Viro <[email protected]>
hypfs_create_cpu_files(): add missing check for hypfs_mkdir() failure

Christian Göttsche <[email protected]>
ext4: reorder capability check last

Alexandre Ghiti <[email protected]>
riscv: Call secondary mmu notifier when flushing the tlb

Jedrzej Jagielski <[email protected]>
ixgbe: add support for thermal sensor event reception

shantiprasad shettar <[email protected]>
bnxt_en: Query FW parameters when the CAPS_CHANGE bit is set

Jeff Chen <[email protected]>
wifi: mwifiex: Fix HT40 bandwidth issue.

Carolina Jubran <[email protected]>
net/mlx5: Preserve rate settings when creating a rate node

Tiwei Bie <[email protected]>
um: Update min_low_pfn to match changes in uml_reserved

Benjamin Berg <[email protected]>
um: Store full CSGSFS and SS register from mcontext

Nick Hu <[email protected]>
clocksource/drivers/timer-riscv: Stop stimecmp when cpu hotplug

Ming Lei <[email protected]>
loop: move vfs_fsync() out of loop_update_dio()

Heming Zhao <[email protected]>
dlm: make tcp still work in multi-link env

Heiko Carstens <[email protected]>
s390/tlb: Use mm_has_pgste() instead of mm_alloc_pgste()

Stanley Chu <[email protected]>
i3c: master: svc: Fix missing STOP for master request

Alex Deucher <[email protected]>
drm/amdgpu: adjust drm_firmware_drivers_only() handling

Alex Deucher <[email protected]>
drm/amdgpu: don't free conflicting apertures for non-display devices

Jing Zhou <[email protected]>
drm/amd/display: Guard against setting dispclk low for dcn31x

Flora Cui <[email protected]>
drm/amdgpu: release xcp_mgr on exit

Chen Linxuan <[email protected]>
blk-cgroup: improve policy registration error handling

Filipe Manana <[email protected]>
btrfs: send: return -ENAMETOOLONG when attempting a path that is too long

Filipe Manana <[email protected]>
btrfs: get zone unusable bytes while holding lock at btrfs_reclaim_bgs_work()

Filipe Manana <[email protected]>
btrfs: fix non-empty delayed iputs list on unmount due to async workers

Qu Wenruo <[email protected]>
btrfs: run btrfs_error_commit_super() early

Mark Harmstone <[email protected]>
btrfs: avoid linker error in btrfs_find_create_tree_block()

Boris Burkov <[email protected]>
btrfs: make btrfs_discard_workfn() block_group ref explicit

Vitalii Mordan <[email protected]>

    i2c: pxa: fix call balance of i2c->clk handling routines

Shyam Sundar S K <[email protected]>
i2c: amd-asf: Set cmd variable when encountering an error

Stephan Gerhold <[email protected]>
i2c: qup: Vote for interconnect bandwidth to DRAM

Philip Redkin <[email protected]>
x86/mm: Check return value from memblock_phys_alloc_range()

Mario Limonciello <[email protected]>
x86/amd_node: Add SMN offsets to exclusive region access

Sohil Mehta <[email protected]>
x86/microcode: Update the Intel processor flag scan check

Sohil Mehta <[email protected]>
x86/smpboot: Fix INIT delay assignment for extended Intel Families

Ingo Molnar <[email protected]>
x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP

Thomas Huth <[email protected]>
x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers

Thomas Huth <[email protected]>
x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-UAPI headers

Quan Zhou <[email protected]>
wifi: mt76: mt7925: fix fails to enter low power mode in suspend state

Quan Zhou <[email protected]>
wifi: mt76: mt7925: Simplify HIF suspend handling to avoid suspend fail

Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7925: load the appropriate CLC data based on hardware type

Benjamin Lin <[email protected]>

    wifi: mt76: mt7996: revise TXS size

Rex Lu <[email protected]>
wifi: mt76: mt7996: fix SER reset trigger on WED reset

Felix Fietkau <[email protected]>
wifi: mt76: scan: set vif offchannel link for scanning/roc

Felix Fietkau <[email protected]>
wifi: mt76: mt7996: use the correct vif link for scanning/roc

Felix Fietkau <[email protected]>
wifi: mt76: only mark tx-status-failed frames as ACKed on mt76x0/2

Felix Fietkau <[email protected]>
wifi: mt76: mt7996: implement driver specific get_txpower function

Felix Fietkau <[email protected]>
wifi: mt76: scan: fix setting tx_info fields

Shayne Chen <[email protected]>
wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()

Eric Dumazet <[email protected]>
cgroup/rstat: avoid disabling irqs for O(num_cpu)

Victor Skvortsov <[email protected]>
drm/amdgpu: Skip pcie_replay_count sysfs creation for VF

Erick Shepherd <[email protected]>
mmc: host: Wait for Vdd to settle on card power off

Stefan Wahren <[email protected]>
staging: vchiq_arm: Create keep-alive thread during probe

Christian Brauner <[email protected]>
pidfs: improve multi-threaded exec and premature thread-group leader exit polling

Robert Richter <[email protected]>
libnvdimm/labels: Fix divide error in nd_label_data_init()

Nicolas Bretz <[email protected]>
ext4: on a remount, only log the ro or r/w state when it has changed

Roger Pau Monne <[email protected]>

    xen/pci: Do not register devices with segments >= 0x10000

Roger Pau Monne <[email protected]>
PCI: vmd: Disable MSI remapping bypass under Xen

Jonathan Kim <[email protected]>
drm/amdkfd: set precise mem ops caps to disabled for gfx 11 and 12

Christian König <[email protected]>
drm/amdgpu: use GFP_NOWAIT for memory allocations

Christian König <[email protected]>
drm/amdgpu: rework how isolation is enforced v2

Christian König <[email protected]>
drm/amdgpu: rework how the cleaner shader is emitted v3

Flora Cui <[email protected]>
drm/amdgpu/discovery: check ip_discovery fw file available

Trond Myklebust <[email protected]>
pNFS/flexfiles: Report ENETDOWN as a connection error

Mukesh Kumar Savaliya <[email protected]>
i2c: qcom-geni: Update i2c frequency table to match hardware guidance

Thippeswamy Havalige <[email protected]>
PCI: xilinx-cpm: Add cpm_csr register mapping for CPM5_HOST1 variant

Ian Rogers <[email protected]>
tools/build: Don't pass test log files to linker

ChunHao Lin <[email protected]>

    r8169: disable RTL8126 ZRX-DC timeout

Frank Li <[email protected]>
PCI: dwc: ep: Ensure proper iteration over outbound map windows

Mark Zhang <[email protected]>
net/mlx5e: Use right API to free bitmap memory

Josh Poimboeuf <[email protected]>
objtool: Properly disable uaccess validation

Ryo Takakura <[email protected]>
lockdep: Fix wait context check on softirq for PREEMPT_RT

Jing Su <[email protected]>

    dql: Fix dql->limit value when reset.

Conor Dooley <[email protected]>
RISC-V: add vector extension validation checks

Pedro Nishiyama <[email protected]>
Bluetooth: Disable SCO support if READ_VOICE_SETTING is unsupported/broken

Sean Wang <[email protected]>
Bluetooth: btmtksdio: Prevent enabling interrupts after IRQ handler removal

Alice Guo <[email protected]>
thermal/drivers/qoriq: Power down TMU on system suspend

Nícolas F. R. A. Prado <[email protected]>
thermal/drivers/mediatek/lvts: Start sensor interrupts disabled

Hans-Frieder Vogt <[email protected]>

    net: tn40xx: create swnode for mdio and aqr105 phy and add to mdiobus

Hans-Frieder Vogt <[email protected]>

    net: tn40xx: add pci-id of the aqr105-based Tehuti TN4010 cards

Daniel Hsu <[email protected]>
mctp: Fix incorrect tx flow invalidation condition in mctp-i2c

Krzysztof Kozlowski <[email protected]>
ASoC: codecs: wsa883x: Correct VI sense channel mask

Krzysztof Kozlowski <[email protected]>
ASoC: codecs: wsa884x: Correct VI sense channel mask

Luis de Arquer <[email protected]>
spi-rockchip: Fix register out of bounds access

Trond Myklebust <[email protected]>
SUNRPC: rpcbind should never reset the port to the value '0'

Trond Myklebust <[email protected]>
SUNRPC: rpc_clnt_set_transport() must not change the autobind setting

Trond Myklebust <[email protected]>
NFSv4: Treat ENETUNREACH errors as fatal for state recovery

Pali Rohár <[email protected]>
cifs: Check if server supports reparse points before using them

Pali Rohár <[email protected]>
cifs: Fix getting DACL-only xattr system.cifs_acl and system.smb3_acl

Pali Rohár <[email protected]>
cifs: Fix establishing NetBIOS session for SMB2+ connection

Namjae Jeon <[email protected]>
cifs: add validation check for the fields in smb_aces

Pali Rohár <[email protected]>
cifs: Set default Netbios RFC1001 server name to hostname in UNC

Zsolt Kajtar <[email protected]>
fbdev: core: tileblit: Implement missing margin clearing for tileblit

Zsolt Kajtar <[email protected]>
fbcon: Use correct erase colour for clearing in fbcon

Shixiong Ou <[email protected]>
fbdev: fsl-diu-fb: add missing device_remove_file()

Samuel Holland <[email protected]>
riscv: Allow NOMMU kernels to access all of RAM

Tudor Ambarus <[email protected]>
mailbox: use error ret code of of_parse_phandle_with_args()

Sudeep Holla <[email protected]>
mailbox: pcc: Use acpi_os_ioremap() instead of ioremap()

Jonathan McDowell <[email protected]>
tpm: Convert warn to dbg in tpm2_start_auth_session()

Diogo Ivo <[email protected]>
ACPI: PNP: Add Intel OC Watchdog IDs to non-PNP device list

Andy Shevchenko <[email protected]>
tracing: Mark binary printing functions with __printf() attribute

Steven Rostedt <[email protected]>
ring-buffer: Use kaslr address instead of text delta

Yi Liu <[email protected]>
iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability

Jinqian Yang <[email protected]>
arm64: Add support for HIP09 Spectre-BHB mitigation

Trond Myklebust <[email protected]>
SUNRPC: Don't allow waiting for exiting tasks

Trond Myklebust <[email protected]>
NFS: Don't allow waiting for exiting tasks

Trond Myklebust <[email protected]>
NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()

Pavel Begunkov <[email protected]>
io_uring/msg: initialise msg request opcode

Sungjong Seo <[email protected]>
exfat: call bh_read in get_block only when necessary

Matt Johnston <[email protected]>
fuse: Return EPERM rather than ENOSYS from link()

Wang Zhaolong <[email protected]>
smb: client: Store original IO parameters and prevent zero IO sizes

Pali Rohár <[email protected]>
cifs: Fix negotiate retry functionality

Pali Rohár <[email protected]>
cifs: Fix access_flags_to_smbopen_mode

Pali Rohár <[email protected]>
cifs: Fix querying and creating MF symlinks over SMB1

Pali Rohár <[email protected]>
cifs: Add fallback for SMB2 CREATE without FILE_READ_ATTRIBUTES

Anthony Krowiak <[email protected]>
s390/vfio-ap: Fix no AP queue sharing allowed message written to kernel log

Xin Li (Intel) <[email protected]>
x86/fred: Fix system hang during S4 resume with FRED enabled

Daniel Gomez <[email protected]>
kconfig: merge_config: use an empty file as initfile

Haoran Jiang <[email protected]>
samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora

Brandon Kammerdiener <[email protected]>
bpf: fix possible endless loop in BPF map iteration

Pavel Begunkov <[email protected]>
io_uring: don't duplicate flushing in io_req_post_cqe

Darrick J. Wong <[email protected]>
block: hoist block size validation code to a separate function

Darrick J. Wong <[email protected]>
block: fix race between set_blocksize and read paths

Ihor Solodrai <[email protected]>
selftests/bpf: Mitigate sockmap_ktls disconnect_after_delete failure

Felix Kuehling <[email protected]>
drm/amdgpu: Allow P2P access through XGMI

Nicholas Susanto <[email protected]>
drm/amd/display: Enable urgent latency adjustment on DCN35

Davidlohr Bueso <[email protected]>
fs/ext4: use sleeping version of sb_find_get_block()

Davidlohr Bueso <[email protected]>
fs/jbd2: use sleeping version of __find_get_block()

Davidlohr Bueso <[email protected]>
fs/ocfs2: use sleeping version of __find_get_block()

Davidlohr Bueso <[email protected]>
fs/buffer: use sleeping version of __find_get_block()

Davidlohr Bueso <[email protected]>
fs/buffer: introduce sleeping flavors for pagecache lookups

Davidlohr Bueso <[email protected]>
fs/buffer: split locking for pagecache lookups

Frederick Lawler <[email protected]>
ima: process_measurement() needlessly takes inode_lock() on MAY_READ

Balbir Singh <[email protected]>
dma-mapping: Fix warning reported for missing prototype

Ranjan Kumar <[email protected]>
scsi: mpi3mr: Add level check to control event logging

Dongli Zhang <[email protected]>

    vhost-scsi: protect vq->log_used with vq->mutex

Stefano Garzarella <[email protected]>
vhost_task: fix vhost_task_create() documentation

gaoxu <[email protected]>
cgroup: Fix compilation issue due to cgroup_mutex not being exported

David Sterba <[email protected]>
btrfs: tree-checker: adjust error code for header level check

Marek Szyprowski <[email protected]>
dma-mapping: avoid potential unused data compilation warning

Hans de Goede <[email protected]>
mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type

Lorenzo Stoakes <[email protected]>

    intel_th: avoid using deprecated page->mapping, index fields

Balbir Singh <[email protected]>
dma/mapping.c: dev_dbg support for dma_addressing_limited

Zhongqiu Han <[email protected]>
virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN

Manish Pandey <[email protected]>
scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices

Dmitry Bogdanov <[email protected]>
scsi: target: iscsi: Fix timeout on deleted connection

Dmitry Baryshkov <[email protected]>
nvmem: qfprom: switch to 4-byte aligned reads

Dmitry Baryshkov <[email protected]>
nvmem: core: update raw_len if the bit reading is required

Dmitry Baryshkov <[email protected]>
nvmem: core: verify cell's raw_len

Dmitry Baryshkov <[email protected]>
nvmem: core: fix bit offsets of more than one byte

Heiko Stuebner <[email protected]>
nvmem: rockchip-otp: add rk3576 variant data

Heiko Stuebner <[email protected]>
nvmem: rockchip-otp: Move read-offset into variant-data

Pengyu Luo <[email protected]>
cpufreq: Add SM8650 to cpufreq-dt-platdev blocklist

Damien Le Moal <[email protected]>
nvmet: pci-epf: clear completion queue IRQ flag on delete

Damien Le Moal <[email protected]>
nvmet: pci-epf: Keep completion queues mapped

Claudiu Beznea <[email protected]>
phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off

Claudiu Beznea <[email protected]>
phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data

Claudiu Beznea <[email protected]>
phy: renesas: rcar-gen3-usb2: Move IRQ request in probe

John Olender <[email protected]>
drm/amd/display: Defer BW-optimization-blocked DRR adjustments

Zhongwei Zhang <[email protected]>
drm/amd/display: Correct timing_adjust_pending flag setting.

Danny Wang <[email protected]>
drm/amd/display: Do not enable replay when vtotal update is pending.

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

Diffstat:

 Documentation/admin-guide/kernel-parameters.txt    |   2 +
 Documentation/driver-api/pps.rst                   |   3 +-
 Documentation/driver-api/serial/driver.rst         |   2 +-
 Documentation/hwmon/dell-smm-hwmon.rst             |  14 +-
 Documentation/networking/net_cachelines/snmp.rst   |   1 +
 Makefile                                           |   8 +-
 arch/arm/boot/dts/nvidia/tegra114.dtsi             |   2 +-
 arch/arm/mach-at91/pm.c                            |  21 +-
 .../boot/dts/allwinner/sun50i-h6-beelink-gs1.dts   |  38 +-
 .../boot/dts/allwinner/sun50i-h6-orangepi-3.dts    |  14 +-
 .../boot/dts/allwinner/sun50i-h6-orangepi.dtsi     |  22 +-
 arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi  |   8 +-
 arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi     |   2 +-
 .../dts/nvidia/tegra234-p3740-0002+p3701-0008.dts  |  10 +
 arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi     |  15 +-
 arch/arm64/include/asm/cputype.h                   |   2 +
 arch/arm64/include/asm/pgtable.h                   |  27 +-
 arch/arm64/kernel/proton-pack.c                    |   1 +
 arch/arm64/net/bpf_jit_comp.c                      |   6 +-
 arch/loongarch/kernel/Makefile                     |   8 +-
 arch/loongarch/kvm/Makefile                        |   2 +-
 arch/mips/include/asm/ftrace.h                     |  16 +
 arch/mips/kernel/pm-cps.c                          |  30 +-
 arch/powerpc/include/asm/mmzone.h                  |   1 +
 arch/powerpc/kernel/prom_init.c                    |   4 +-
 arch/powerpc/mm/book3s64/radix_pgtable.c           |   3 +-
 arch/powerpc/mm/numa.c                             |   2 +-
 arch/powerpc/perf/core-book3s.c                    |  20 +
 arch/powerpc/perf/isa207-common.c                  |   4 +-
 arch/powerpc/platforms/pseries/iommu.c             | 139 ++++--
 arch/riscv/include/asm/cpufeature.h                |   3 +
 arch/riscv/include/asm/page.h                      |  12 +-
 arch/riscv/include/asm/pgtable.h                   |   2 +-
 arch/riscv/kernel/Makefile                         |   4 +-
 arch/riscv/kernel/cpufeature.c                     |  60 ++-
 arch/riscv/mm/tlbflush.c                           |  37 +-
 arch/s390/hypfs/hypfs_diag_fs.c                    |   2 +
 arch/s390/include/asm/tlb.h                        |   2 +-
 arch/s390/kernel/crash_dump.c                      |  62 +--
 arch/um/kernel/mem.c                               |   1 +
 arch/x86/Kconfig                                   |   3 +-
 arch/x86/boot/boot.h                               |   4 +-
 arch/x86/boot/genimage.sh                          |   5 +-
 arch/x86/entry/entry.S                             |   2 +-
 arch/x86/entry/vdso/extable.h                      |   2 +-
 arch/x86/events/amd/ibs.c                          |  20 +-
 arch/x86/events/intel/ds.c                         |   9 +-
 arch/x86/include/asm/alternative.h                 |   6 +-
 arch/x86/include/asm/asm.h                         |  10 +-
 arch/x86/include/asm/boot.h                        |   2 +-
 arch/x86/include/asm/bug.h                         |   5 +-
 arch/x86/include/asm/cfi.h                         |  11 +
 arch/x86/include/asm/cpufeature.h                  |   4 +-
 arch/x86/include/asm/cpumask.h                     |   4 +-
 arch/x86/include/asm/current.h                     |   4 +-
 arch/x86/include/asm/desc_defs.h                   |   4 +-
 arch/x86/include/asm/dwarf2.h                      |   2 +-
 arch/x86/include/asm/fixmap.h                      |   4 +-
 arch/x86/include/asm/frame.h                       |  10 +-
 arch/x86/include/asm/fred.h                        |   4 +-
 arch/x86/include/asm/fsgsbase.h                    |   4 +-
 arch/x86/include/asm/ftrace.h                      |   8 +-
 arch/x86/include/asm/hw_irq.h                      |   4 +-
 arch/x86/include/asm/ibt.h                         |  16 +-
 arch/x86/include/asm/idtentry.h                    |   6 +-
 arch/x86/include/asm/inst.h                        |   2 +-
 arch/x86/include/asm/intel-family.h                |   1 +
 arch/x86/include/asm/irqflags.h                    |  10 +-
 arch/x86/include/asm/jump_label.h                  |   4 +-
 arch/x86/include/asm/kasan.h                       |   2 +-
 arch/x86/include/asm/kexec.h                       |   4 +-
 arch/x86/include/asm/linkage.h                     |   6 +-
 arch/x86/include/asm/mem_encrypt.h                 |   4 +-
 arch/x86/include/asm/msr.h                         |   4 +-
 arch/x86/include/asm/nmi.h                         |   2 +
 arch/x86/include/asm/nops.h                        |   2 +-
 arch/x86/include/asm/nospec-branch.h               |   6 +-
 arch/x86/include/asm/orc_types.h                   |   4 +-
 arch/x86/include/asm/page.h                        |   4 +-
 arch/x86/include/asm/page_32.h                     |   4 +-
 arch/x86/include/asm/page_32_types.h               |   4 +-
 arch/x86/include/asm/page_64.h                     |   4 +-
 arch/x86/include/asm/page_64_types.h               |   2 +-
 arch/x86/include/asm/page_types.h                  |   4 +-
 arch/x86/include/asm/paravirt.h                    |  14 +-
 arch/x86/include/asm/paravirt_types.h              |   4 +-
 arch/x86/include/asm/percpu.h                      |  32 +-
 arch/x86/include/asm/perf_event.h                  |   1 +
 arch/x86/include/asm/pgtable-2level_types.h        |   4 +-
 arch/x86/include/asm/pgtable-3level_types.h        |   4 +-
 arch/x86/include/asm/pgtable-invert.h              |   4 +-
 arch/x86/include/asm/pgtable.h                     |  12 +-
 arch/x86/include/asm/pgtable_32.h                  |   4 +-
 arch/x86/include/asm/pgtable_32_areas.h            |   2 +-
 arch/x86/include/asm/pgtable_64.h                  |   6 +-
 arch/x86/include/asm/pgtable_64_types.h            |   4 +-
 arch/x86/include/asm/pgtable_types.h               |  10 +-
 arch/x86/include/asm/prom.h                        |   4 +-
 arch/x86/include/asm/pti.h                         |   4 +-
 arch/x86/include/asm/ptrace.h                      |   4 +-
 arch/x86/include/asm/purgatory.h                   |   4 +-
 arch/x86/include/asm/pvclock-abi.h                 |   4 +-
 arch/x86/include/asm/realmode.h                    |   4 +-
 arch/x86/include/asm/segment.h                     |   8 +-
 arch/x86/include/asm/setup.h                       |   6 +-
 arch/x86/include/asm/setup_data.h                  |   4 +-
 arch/x86/include/asm/sev-common.h                  |   2 +-
 arch/x86/include/asm/shared/tdx.h                  |   4 +-
 arch/x86/include/asm/shstk.h                       |   4 +-
 arch/x86/include/asm/signal.h                      |   8 +-
 arch/x86/include/asm/smap.h                        |   6 +-
 arch/x86/include/asm/smp.h                         |   4 +-
 arch/x86/include/asm/tdx.h                         |   4 +-
 arch/x86/include/asm/thread_info.h                 |  12 +-
 arch/x86/include/asm/unwind_hints.h                |   4 +-
 arch/x86/include/asm/vdso/getrandom.h              |   4 +-
 arch/x86/include/asm/vdso/gettimeofday.h           |   4 +-
 arch/x86/include/asm/vdso/processor.h              |   4 +-
 arch/x86/include/asm/vdso/vsyscall.h               |   4 +-
 arch/x86/include/asm/xen/interface.h               |  10 +-
 arch/x86/include/asm/xen/interface_32.h            |   4 +-
 arch/x86/include/asm/xen/interface_64.h            |   4 +-
 arch/x86/include/uapi/asm/bootparam.h              |   4 +-
 arch/x86/include/uapi/asm/e820.h                   |   4 +-
 arch/x86/include/uapi/asm/ldt.h                    |   4 +-
 arch/x86/include/uapi/asm/msr.h                    |   4 +-
 arch/x86/include/uapi/asm/ptrace-abi.h             |   6 +-
 arch/x86/include/uapi/asm/ptrace.h                 |   4 +-
 arch/x86/include/uapi/asm/setup_data.h             |   4 +-
 arch/x86/include/uapi/asm/signal.h                 |   8 +-
 arch/x86/kernel/Makefile                           |   2 +
 arch/x86/kernel/alternative.c                      |  30 ++
 arch/x86/kernel/amd_node.c                         |  41 ++
 arch/x86/kernel/cfi.c                              |  22 +-
 arch/x86/kernel/cpu/bugs.c                         |  10 +-
 arch/x86/kernel/cpu/microcode/intel.c              |   2 +-
 arch/x86/kernel/nmi.c                              |  42 ++
 arch/x86/kernel/paravirt.c                         |  17 +-
 arch/x86/kernel/reboot.c                           |  10 +-
 arch/x86/kernel/smpboot.c                          |   9 +-
 arch/x86/kernel/traps.c                            |  82 +++-
 arch/x86/math-emu/control_w.h                      |   2 +-
 arch/x86/math-emu/exception.h                      |   6 +-
 arch/x86/math-emu/fpu_emu.h                        |   6 +-
 arch/x86/math-emu/status_w.h                       |   6 +-
 arch/x86/mm/init.c                                 |   9 +-
 arch/x86/mm/init_64.c                              |  15 +-
 arch/x86/mm/kaslr.c                                |  10 +-
 arch/x86/mm/pgtable.c                              |  27 +-
 arch/x86/power/cpu.c                               |  14 +
 arch/x86/realmode/rm/realmode.h                    |   4 +-
 arch/x86/realmode/rm/wakeup.h                      |   2 +-
 arch/x86/um/os-Linux/mcontext.c                    |   3 +-
 block/badblocks.c                                  |   5 +-
 block/bdev.c                                       |  50 ++-
 block/blk-cgroup.c                                 |  30 +-
 block/blk-settings.c                               |   5 +
 block/blk-sysfs.c                                  | 102 +++--
 block/blk-throttle.c                               |  15 +-
 block/blk-zoned.c                                  |   5 +-
 block/blk.h                                        |   3 +-
 block/bounce.c                                     |   2 -
 block/fops.c                                       |  16 +
 block/ioctl.c                                      |   6 +
 crypto/ahash.c                                     |   4 +
 crypto/algif_hash.c                                |   4 -
 crypto/lzo-rle.c                                   |   2 +-
 crypto/lzo.c                                       |   2 +-
 crypto/skcipher.c                                  |   1 +
 drivers/accel/amdxdna/aie2_ctx.c                   |  37 +-
 drivers/accel/amdxdna/amdxdna_ctx.c                |   2 +
 drivers/accel/amdxdna/amdxdna_ctx.h                |   3 +
 drivers/accel/amdxdna/amdxdna_mailbox.c            |  17 +-
 drivers/accel/qaic/qaic_drv.c                      |   2 +-
 drivers/acpi/Kconfig                               |   2 +-
 drivers/acpi/acpi_pnp.c                            |   2 +
 drivers/acpi/hed.c                                 |   7 +-
 drivers/auxdisplay/charlcd.c                       |   5 +-
 drivers/auxdisplay/charlcd.h                       |   5 +-
 drivers/auxdisplay/hd44780.c                       |   2 +-
 drivers/auxdisplay/lcd2s.c                         |   2 +-
 drivers/auxdisplay/panel.c                         |   2 +-
 drivers/base/faux.c                                |  15 +-
 drivers/base/power/main.c                          |   7 +
 drivers/block/loop.c                               |  25 +-
 drivers/block/null_blk/main.c                      |  90 ++--
 drivers/block/ublk_drv.c                           |  53 ++-
 drivers/bluetooth/btmtksdio.c                      |  15 +-
 drivers/bluetooth/btusb.c                          |  98 ++---
 drivers/char/tpm/tpm2-sessions.c                   |   2 +-
 drivers/clk/clk-s2mps11.c                          |   3 +-
 drivers/clk/imx/clk-imx8mp.c                       | 151 +++++++
 drivers/clk/qcom/Kconfig                           |   2 +-
 drivers/clk/qcom/camcc-sm8250.c                    |  56 +--
 drivers/clk/qcom/clk-alpha-pll.c                   |  52 ++-
 drivers/clk/qcom/lpassaudiocc-sc7280.c             |  23 +-
 drivers/clk/renesas/rzg2l-cpg.c                    | 106 ++---
 drivers/clk/sunxi-ng/ccu-sun20i-d1.c               |  42 +-
 drivers/clk/sunxi-ng/ccu-sun50i-h616.c             |  36 +-
 drivers/clk/sunxi-ng/ccu_mp.h                      |  22 +
 drivers/clocksource/mips-gic-timer.c               |   6 +-
 drivers/clocksource/timer-riscv.c                  |   6 +
 drivers/cpufreq/amd-pstate.c                       |   1 -
 drivers/cpufreq/cpufreq-dt-platdev.c               |   1 +
 drivers/cpufreq/tegra186-cpufreq.c                 |   7 +
 drivers/cpuidle/governors/menu.c                   |  13 +-
 .../crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c   |   7 +-
 drivers/crypto/mxs-dcp.c                           |   8 +-
 drivers/dma/fsl-edma-main.c                        |   2 +-
 drivers/dma/idxd/cdev.c                            |   9 +
 drivers/dma/ti/k3-udma-glue.c                      |  15 +-
 drivers/dpll/dpll_core.c                           |   5 +-
 drivers/edac/ie31200_edac.c                        |  28 +-
 drivers/firmware/arm_ffa/bus.c                     |   1 +
 drivers/firmware/arm_ffa/driver.c                  |  12 +
 drivers/firmware/arm_scmi/bus.c                    |  19 +-
 drivers/firmware/xilinx/zynqmp.c                   |   6 +-
 drivers/fpga/altera-cvp.c                          |   2 +-
 drivers/gpio/gpiolib.c                             |   3 +
 drivers/gpu/drm/amd/amdgpu/amdgpu.h                |  13 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h         |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c   | 102 ++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c             |  18 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c         | 143 ++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c      |  31 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c        |  30 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c            |  14 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c            |  54 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h             |   3 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c            |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c            |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c         |  38 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c            |   7 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c            |   3 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c     |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c           |  30 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h           |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c            |  42 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c           |  17 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h           |   2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c             |  41 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h             |   1 -
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c             |  14 +
 .../gpu/drm/amd/amdgpu/gfx_v10_0_cleaner_shader.h  |  35 ++
 .../drm/amd/amdgpu/gfx_v10_1_10_cleaner_shader.asm | 126 ++++++
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c             |  47 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c             |  48 ++-
 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c           |  10 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c              |   1 -
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c           |   2 +-
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.h           |   1 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c           |   1 +
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c             |   2 +-
 drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c            |  25 ++
 drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c            |  27 ++
 drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c            |  31 ++
 drivers/gpu/drm/amd/amdgpu/nv.c                    |  16 +-
 drivers/gpu/drm/amd/amdgpu/soc15.c                 |   8 +-
 drivers/gpu/drm/amd/amdgpu/soc21.c                 |  10 +-
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c            |  14 +-
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.h            |   9 +
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c            | 474 +++++++++++----------
 drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c            |  48 ++-
 drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c   |  18 +-
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c           |  25 +-
 drivers/gpu/drm/amd/amdkfd/kfd_debug.c             |  14 +-
 drivers/gpu/drm/amd/amdkfd/kfd_device.c            |   2 +-
 .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c  | 126 ++----
 .../drm/amd/amdkfd/kfd_device_queue_manager_cik.c  |  69 ++-
 .../drm/amd/amdkfd/kfd_device_queue_manager_v10.c  |  43 +-
 .../drm/amd/amdkfd/kfd_device_queue_manager_v11.c  |  45 +-
 .../drm/amd/amdkfd/kfd_device_queue_manager_v12.c  |  45 +-
 .../drm/amd/amdkfd/kfd_device_queue_manager_v9.c   |  38 +-
 .../drm/amd/amdkfd/kfd_device_queue_manager_vi.c   |  77 ++--
 drivers/gpu/drm/amd/amdkfd/kfd_events.c            |  43 +-
 drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c   |   2 +-
 drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c    |   2 +-
 drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c |   4 +-
 drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_vi.c |   3 +-
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h              |  11 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c           | 137 +++---
 .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c |  10 +-
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c               |  21 +-
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c          |  23 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |  41 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h  |   2 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c  |   2 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c    |   6 +-
 drivers/gpu/drm/amd/display/dc/basics/dc_common.c  |   3 +-
 .../gpu/drm/amd/display/dc/bios/command_table2.c   |   9 -
 .../amd/display/dc/bios/command_table_helper2.c    |   3 +-
 .../amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c |  22 +-
 .../amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c |  15 +-
 .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c   |  13 +-
 .../amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c |   2 +
 drivers/gpu/drm/amd/display/dc/core/dc.c           |  22 +-
 .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c  |  21 +-
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  |  71 ++-
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c       |  50 +--
 drivers/gpu/drm/amd/display/dc/dc_dp_types.h       |  12 +
 drivers/gpu/drm/amd/display/dc/dc_hw_types.h       |   5 +-
 drivers/gpu/drm/amd/display/dc/dc_types.h          |   7 +
 .../drm/amd/display/dc/dce/dce_stream_encoder.c    |   3 +-
 drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c      |   4 +
 .../display/dc/dio/dcn10/dcn10_stream_encoder.c    |   3 +-
 .../dc/dio/dcn401/dcn401_dio_stream_encoder.c      |   3 +-
 .../gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c   |   6 +-
 .../gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c |   1 +
 .../drm/amd/display/dc/dml2/dml21/dml21_utils.c    |   1 -
 .../drm/amd/display/dc/dml2/dml21/dml21_wrapper.c  |  22 +-
 .../amd/display/dc/dml2/dml21/inc/dml_top_types.h  |   1 +
 .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c   |  30 +-
 .../dml21/src/dml2_core/dml2_core_dcn4_calcs.c     |  33 +-
 .../dml21/src/dml2_core/dml2_core_shared_types.h   |   5 +
 .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  |  21 +
 .../dc/dml2/dml21/src/dml2_top/dml2_top_soc15.c    |   8 -
 drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h |   1 +
 .../gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c   |  11 +-
 .../dc/hpo/dcn31/dcn31_hpo_dp_stream_encoder.c     |   3 +-
 .../drm/amd/display/dc/hwss/dce110/dce110_hwseq.c  |  10 +-
 .../drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c    |  55 +--
 .../drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c    |  22 +-
 .../drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c    |   4 +-
 .../drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c    |   3 +-
 .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c  |  92 ++--
 .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h  |   3 +
 .../drm/amd/display/dc/hwss/dcn401/dcn401_init.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h |   6 +
 drivers/gpu/drm/amd/display/dc/inc/core_types.h    |   2 +-
 .../drm/amd/display/dc/inc/hw/clk_mgr_internal.h   |   1 +
 drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h        |   6 +-
 drivers/gpu/drm/amd/display/dc/inc/resource.h      |   2 +
 .../display/dc/link/protocols/link_dp_capability.c |  42 +-
 .../amd/display/dc/link/protocols/link_dp_phy.c    |   8 +-
 .../display/dc/link/protocols/link_dp_training.c   |   5 +-
 .../dc/link/protocols/link_dp_training_8b_10b.c    |   7 +-
 .../dc/link/protocols/link_edp_panel_control.c     |  25 +-
 .../display/dc/resource/dcn315/dcn315_resource.c   |  40 +-
 drivers/gpu/drm/amd/display/dc/spl/dc_spl.c        |  87 ++--
 drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h  |  12 +-
 .../gpu/drm/amd/display/dc/spl/spl_fixpt31_32.c    |   2 +-
 .../gpu/drm/amd/display/dc/spl/spl_fixpt31_32.h    |   4 +-
 drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h    |   6 +
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c  |  17 +-
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c  |   4 +-
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c |  47 +-
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.h |   3 +-
 .../amd/display/modules/info_packet/info_packet.c  |   4 +-
 .../include/asic_reg/mmhub/mmhub_9_4_1_offset.h    |  32 ++
 .../include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h   |  48 +++
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c          |   1 +
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c   |   5 +-
 drivers/gpu/drm/ast/ast_main.c                     |  30 +-
 drivers/gpu/drm/ast/ast_mode.c                     |  10 +-
 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c     |   2 +
 drivers/gpu/drm/drm_atomic_helper.c                |  28 ++
 drivers/gpu/drm/drm_buddy.c                        |   5 +-
 drivers/gpu/drm/drm_edid.c                         |   1 +
 drivers/gpu/drm/drm_gem.c                          |   4 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c        |   3 +-
 drivers/gpu/drm/mediatek/mtk_dpi.c                 |   5 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        |  32 ++
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h        |   2 +
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |   7 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c     |   2 +-
 drivers/gpu/drm/panel/panel-edp.c                  |   1 +
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c       |  40 +-
 drivers/gpu/drm/ttm/ttm_bo.c                       |   3 +-
 drivers/gpu/drm/v3d/v3d_drv.c                      |  25 +-
 drivers/gpu/drm/virtio/virtgpu_drv.c               |   9 +
 drivers/gpu/drm/xe/display/xe_display.c            |   3 +-
 drivers/gpu/drm/xe/xe_bo.c                         |  22 +
 drivers/gpu/drm/xe/xe_debugfs.c                    |   3 +-
 drivers/gpu/drm/xe/xe_device.c                     |  10 +-
 drivers/gpu/drm/xe/xe_drm_client.c                 |   8 +
 drivers/gpu/drm/xe/xe_gen_wa_oob.c                 |   6 +-
 drivers/gpu/drm/xe/xe_gt.c                         |   3 +
 drivers/gpu/drm/xe/xe_gt_idle.c                    |  23 +-
 drivers/gpu/drm/xe/xe_gt_idle.h                    |   1 +
 drivers/gpu/drm/xe/xe_gt_idle_types.h              |   3 +
 drivers/gpu/drm/xe/xe_gt_sriov_pf.c                |  49 ++-
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c         |  66 ++-
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h         |   1 +
 drivers/gpu/drm/xe/xe_gt_sriov_pf_types.h          |  10 +
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c                |  12 +-
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c        |  22 +
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h        |   2 +
 drivers/gpu/drm/xe/xe_guc_log.c                    |   8 +-
 drivers/gpu/drm/xe/xe_guc_pc.c                     |  22 +-
 drivers/gpu/drm/xe/xe_guc_relay.c                  |   2 +-
 drivers/gpu/drm/xe/xe_mmio.c                       |  10 +-
 drivers/gpu/drm/xe/xe_oa.c                         |   1 +
 drivers/gpu/drm/xe/xe_pci.c                        |  37 +-
 drivers/gpu/drm/xe/xe_pci_sriov.c                  |  51 +++
 drivers/gpu/drm/xe/xe_pci_types.h                  |   1 +
 drivers/gpu/drm/xe/xe_pt.c                         |  14 +
 drivers/gpu/drm/xe/xe_pt.h                         |   3 +
 drivers/gpu/drm/xe/xe_sa.c                         |   3 +-
 drivers/gpu/drm/xe/xe_tile.c                       |  12 +-
 drivers/gpu/drm/xe/xe_tile.h                       |   1 +
 drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c             |  17 +-
 drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h             |   2 +-
 drivers/gpu/drm/xe/xe_vm.c                         |  32 ++
 drivers/hid/Kconfig                                |   1 +
 drivers/hid/usbhid/usbkbd.c                        |   2 +-
 drivers/hwmon/acpi_power_meter.c                   |   8 +-
 drivers/hwmon/dell-smm-hwmon.c                     |   5 +-
 drivers/hwmon/gpio-fan.c                           |  16 +-
 drivers/hwmon/xgene-hwmon.c                        |   2 +-
 drivers/hwtracing/coresight/coresight-core.c       |   2 +-
 drivers/hwtracing/coresight/coresight-etb10.c      |  26 +-
 drivers/hwtracing/coresight/coresight-trace-id.c   |  22 +-
 drivers/hwtracing/intel_th/Kconfig                 |   1 +
 drivers/hwtracing/intel_th/msu.c                   |  31 +-
 drivers/i2c/busses/i2c-amd-asf-plat.c              |   2 +-
 drivers/i2c/busses/i2c-pxa.c                       |   5 +-
 drivers/i2c/busses/i2c-qcom-geni.c                 |   6 +-
 drivers/i2c/busses/i2c-qup.c                       |  36 ++
 drivers/i3c/master/svc-i3c-master.c                |   4 +
 drivers/iio/accel/fxls8962af-core.c                |   7 +-
 drivers/iio/adc/ad7606.c                           |  10 +
 drivers/iio/adc/ad7944.c                           |  16 +-
 drivers/iio/adc/qcom-spmi-iadc.c                   |   4 +-
 drivers/iio/dac/ad3552r-hs.c                       |  29 +-
 drivers/iio/dac/ad3552r-hs.h                       |   8 +
 drivers/iio/dac/adi-axi-dac.c                      |  22 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c       |   7 +-
 drivers/infiniband/core/umem.c                     |  36 +-
 drivers/infiniband/core/uverbs_cmd.c               | 144 ++++---
 drivers/infiniband/core/verbs.c                    |  11 +-
 drivers/input/joystick/xpad.c                      |   3 +
 drivers/input/rmi4/rmi_f34.c                       | 133 +++---
 drivers/iommu/amd/io_pgtable_v2.c                  |   2 +-
 drivers/iommu/dma-iommu.c                          |  28 +-
 drivers/iommu/intel/iommu.c                        |  37 +-
 drivers/iommu/intel/svm.c                          |  43 ++
 drivers/iommu/iommu-priv.h                         |   2 +
 drivers/iommu/iommu.c                              |   2 +-
 drivers/iommu/iommufd/device.c                     |  34 +-
 drivers/iommu/iommufd/hw_pagetable.c               |   3 +
 drivers/iommu/of_iommu.c                           |   6 +-
 drivers/irqchip/irq-riscv-aplic-direct.c           |  24 +-
 drivers/irqchip/irq-riscv-imsic-early.c            |   8 +-
 drivers/irqchip/irq-riscv-imsic-platform.c         |  16 +-
 drivers/irqchip/irq-riscv-imsic-state.c            |  96 +++--
 drivers/irqchip/irq-riscv-imsic-state.h            |   7 +-
 drivers/leds/Kconfig                               |   1 +
 drivers/leds/leds-st1202.c                         |   4 +-
 drivers/leds/rgb/leds-pwm-multicolor.c             |   5 +-
 drivers/leds/trigger/ledtrig-netdev.c              |  16 +-
 drivers/mailbox/mailbox.c                          |   7 +-
 drivers/mailbox/pcc.c                              |   8 +-
 drivers/md/dm-cache-target.c                       |  24 ++
 drivers/md/dm-table.c                              |   4 +
 drivers/md/dm-vdo/indexer/index-layout.c           |   5 +-
 drivers/md/dm-vdo/io-submitter.c                   |   6 +-
 drivers/md/dm-vdo/io-submitter.h                   |  18 +-
 drivers/md/dm-vdo/types.h                          |   3 +
 drivers/md/dm-vdo/vdo.c                            |  11 +-
 drivers/md/dm-vdo/vio.c                            |  36 +-
 drivers/md/dm-vdo/vio.h                            |   2 +
 drivers/md/dm.c                                    |   8 +-
 drivers/media/cec/core/cec-pin.c                   |  11 +-
 drivers/media/i2c/adv7180.c                        |  34 +-
 drivers/media/i2c/imx219.c                         |   2 +-
 drivers/media/i2c/imx335.c                         |  21 +-
 drivers/media/i2c/ov2740.c                         |   4 +-
 drivers/media/i2c/tc358746.c                       |  19 +-
 drivers/media/platform/qcom/camss/camss-csid.c     |  64 +--
 drivers/media/platform/qcom/camss/camss-vfe.c      |   4 +
 .../platform/st/sti/c8sectpfe/c8sectpfe-core.c     |   3 +-
 drivers/media/platform/st/stm32/stm32-csi.c        |  36 +-
 .../media/test-drivers/vivid/vivid-kthread-cap.c   |  11 +-
 .../media/test-drivers/vivid/vivid-kthread-out.c   |  11 +-
 .../media/test-drivers/vivid/vivid-kthread-touch.c |  11 +-
 drivers/media/test-drivers/vivid/vivid-sdr-cap.c   |  11 +-
 drivers/media/usb/cx231xx/cx231xx-417.c            |   2 +
 drivers/media/usb/uvc/uvc_ctrl.c                   |  77 ++--
 drivers/media/usb/uvc/uvc_v4l2.c                   |   6 +
 drivers/media/v4l2-core/v4l2-subdev.c              |   2 +
 drivers/message/fusion/mptscsih.c                  |   4 +-
 drivers/mfd/axp20x.c                               |   1 +
 drivers/mfd/syscon.c                               |   9 +-
 drivers/mfd/tps65219.c                             |   7 -
 drivers/misc/eeprom/ee1004.c                       |   4 +
 drivers/misc/mei/vsc-tp.c                          |  14 +-
 drivers/misc/pci_endpoint_test.c                   |   6 +-
 drivers/mmc/host/dw_mmc-exynos.c                   |  41 +-
 drivers/mmc/host/sdhci-pci-core.c                  |   6 +-
 drivers/mmc/host/sdhci.c                           |   9 +-
 drivers/mmc/host/sdhci_am654.c                     |  35 +-
 drivers/net/bonding/bond_main.c                    |   2 +-
 drivers/net/can/c_can/c_can_platform.c             |   2 +-
 drivers/net/can/kvaser_pciefd.c                    | 101 +++--
 drivers/net/can/slcan/slcan-core.c                 |  26 +-
 drivers/net/ethernet/apm/xgene-v2/main.c           |   4 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.c          |  13 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.h          |   1 +
 drivers/net/ethernet/freescale/fec_main.c          |  52 ++-
 drivers/net/ethernet/intel/ice/ice_ethtool.c       |   3 +-
 drivers/net/ethernet/intel/ice/ice_irq.c           |  25 +-
 drivers/net/ethernet/intel/ice/ice_lag.c           |   6 +
 drivers/net/ethernet/intel/ice/ice_lib.c           |   2 +
 drivers/net/ethernet/intel/ice/ice_main.c          |   6 +-
 drivers/net/ethernet/intel/ice/ice_virtchnl.c      |   1 -
 drivers/net/ethernet/intel/idpf/idpf.h             |   2 +
 drivers/net/ethernet/intel/idpf/idpf_lib.c         |  10 +-
 drivers/net/ethernet/intel/idpf/idpf_txrx.c        |  18 +-
 drivers/net/ethernet/intel/igc/igc_xdp.c           |  19 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |   4 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h |   3 +
 drivers/net/ethernet/marvell/octeontx2/af/cgx.c    |  14 +-
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h    |   2 +
 .../net/ethernet/marvell/octeontx2/af/rvu_cn10k.c  |  24 +-
 .../ethernet/marvell/octeontx2/af/rvu_debugfs.c    |  11 +-
 .../net/ethernet/marvell/octeontx2/nic/Makefile    |   2 +-
 drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c |   7 +-
 .../ethernet/marvell/octeontx2/nic/otx2_common.c   | 114 +++--
 .../ethernet/marvell/octeontx2/nic/otx2_common.h   |  10 +-
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |  34 +-
 .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 124 ++++--
 .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.h |   7 +
 .../net/ethernet/marvell/octeontx2/nic/otx2_vf.c   |  21 +-
 .../net/ethernet/marvell/octeontx2/nic/otx2_xsk.c  | 182 ++++++++
 .../net/ethernet/marvell/octeontx2/nic/otx2_xsk.h  |  21 +
 .../net/ethernet/marvell/octeontx2/nic/qos_sq.c    |   2 +-
 drivers/net/ethernet/mediatek/mtk_ppe_offload.c    |  22 +-
 drivers/net/ethernet/mellanox/mlx4/alloc.c         |   6 +-
 drivers/net/ethernet/mellanox/mlx4/en_tx.c         |   2 +
 drivers/net/ethernet/mellanox/mlx5/core/en.h       |   3 -
 .../net/ethernet/mellanox/mlx5/core/en/params.c    |  16 +-
 .../net/ethernet/mellanox/mlx5/core/en/params.h    |   1 -
 .../ethernet/mellanox/mlx5/core/en/reporter_tx.c   |   1 -
 drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c   |  53 +--
 .../mellanox/mlx5/core/en_accel/ipsec_fs.c         |  28 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |  40 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c   |   5 +
 .../net/ethernet/mellanox/mlx5/core/en_selftest.c  |   3 +
 .../net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.c |  13 +
 .../net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.h |   5 +
 .../net/ethernet/mellanox/mlx5/core/esw/legacy.c   |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c  |  13 +-
 drivers/net/ethernet/mellanox/mlx5/core/events.c   |  11 +-
 .../net/ethernet/mellanox/mlx5/core/fs_ft_pool.c   |   6 +-
 .../net/ethernet/mellanox/mlx5/core/fs_ft_pool.h   |   2 -
 drivers/net/ethernet/mellanox/mlx5/core/health.c   |   1 +
 .../ethernet/mellanox/mlx5/core/lib/fs_chains.c    |   3 +-
 drivers/net/ethernet/meta/fbnic/fbnic_fw.c         |  16 +-
 drivers/net/ethernet/meta/fbnic/fbnic_fw.h         |   8 +-
 drivers/net/ethernet/meta/fbnic/fbnic_netdev.c     |   2 +
 drivers/net/ethernet/microchip/lan743x_main.c      |  19 +-
 drivers/net/ethernet/microsoft/mana/gdma_main.c    |   2 +-
 drivers/net/ethernet/realtek/r8169_main.c          |  32 ++
 drivers/net/ethernet/stmicro/stmmac/common.h       |   4 +-
 .../net/ethernet/stmicro/stmmac/dwmac-loongson.c   |   3 +
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c     |  21 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c  |   2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |   7 +-
 drivers/net/ethernet/tehuti/tn40.c                 |   9 +-
 drivers/net/ethernet/tehuti/tn40.h                 |  33 ++
 drivers/net/ethernet/tehuti/tn40_mdio.c            |  82 +++-
 drivers/net/ethernet/ti/am65-cpsw-nuss.c           |   4 +-
 drivers/net/ethernet/ti/cpsw_new.c                 |   1 +
 drivers/net/ethernet/ti/icssg/icssg_common.c       |   2 +-
 drivers/net/ieee802154/ca8210.c                    |   9 +-
 drivers/net/mctp/mctp-i2c.c                        |   2 +-
 drivers/net/netdevsim/netdev.c                     |  31 +-
 drivers/net/netdevsim/netdevsim.h                  |   1 +
 drivers/net/phy/nxp-c45-tja11xx.c                  |  54 ++-
 drivers/net/phy/phylink.c                          |   2 +-
 drivers/net/usb/r8152.c                            |   1 +
 drivers/net/vmxnet3/vmxnet3_drv.c                  |   5 +-
 drivers/net/vxlan/vxlan_core.c                     |  36 +-
 drivers/net/wireless/ath/ath11k/dp.h               |   6 +-
 drivers/net/wireless/ath/ath11k/dp_rx.c            | 117 +++--
 drivers/net/wireless/ath/ath12k/core.c             |  45 +-
 drivers/net/wireless/ath/ath12k/core.h             |   4 +
 drivers/net/wireless/ath/ath12k/dp_mon.c           |  19 +-
 drivers/net/wireless/ath/ath12k/dp_rx.c            |  22 +-
 drivers/net/wireless/ath/ath12k/dp_rx.h            |   5 +-
 drivers/net/wireless/ath/ath12k/dp_tx.c            | 145 ++++++-
 drivers/net/wireless/ath/ath12k/hal_desc.h         |   2 +-
 drivers/net/wireless/ath/ath12k/hal_rx.h           |   8 +-
 drivers/net/wireless/ath/ath12k/hal_tx.h           |  10 +-
 drivers/net/wireless/ath/ath12k/mac.c              | 102 ++++-
 drivers/net/wireless/ath/ath12k/mac.h              |   5 +-
 drivers/net/wireless/ath/ath12k/pci.c              |  13 +-
 drivers/net/wireless/ath/ath12k/rx_desc.h          |   5 +-
 drivers/net/wireless/ath/ath12k/wmi.c              |   4 +-
 drivers/net/wireless/ath/ath9k/init.c              |   4 +-
 drivers/net/wireless/intel/iwlwifi/cfg/dr.c        |   2 -
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c        |   4 +-
 drivers/net/wireless/intel/iwlwifi/fw/uefi.c       |   8 +-
 drivers/net/wireless/intel/iwlwifi/fw/uefi.h       |   4 +-
 drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c   |  10 +-
 drivers/net/wireless/intel/iwlwifi/iwl-trans.c     |   8 +-
 .../net/wireless/intel/iwlwifi/mvm/ftm-initiator.c |   4 +
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |  15 +
 .../net/wireless/intel/iwlwifi/mvm/mld-mac80211.c  |   3 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h       |   3 +
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      |   2 +
 drivers/net/wireless/marvell/mwifiex/11n.c         |   6 +-
 drivers/net/wireless/mediatek/mt76/channel.c       |   3 +
 drivers/net/wireless/mediatek/mt76/mt76.h          |   3 +
 .../net/wireless/mediatek/mt76/mt76_connac3_mac.h  |   3 +
 .../net/wireless/mediatek/mt76/mt76_connac_mcu.c   |   2 +-
 drivers/net/wireless/mediatek/mt76/mt76x0/pci.c    |   3 +-
 drivers/net/wireless/mediatek/mt76/mt76x0/usb.c    |   3 +-
 drivers/net/wireless/mediatek/mt76/mt76x2/pci.c    |   3 +-
 drivers/net/wireless/mediatek/mt76/mt76x2/usb.c    |   3 +-
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c    |  76 +++-
 drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h |   3 +
 drivers/net/wireless/mediatek/mt76/mt7996/mac.c    |  44 +-
 drivers/net/wireless/mediatek/mt76/mt7996/main.c   |  30 +-
 drivers/net/wireless/mediatek/mt76/mt7996/mcu.h    |   3 +-
 drivers/net/wireless/mediatek/mt76/mt7996/mmio.c   |   2 +-
 drivers/net/wireless/mediatek/mt76/scan.c          |  21 +-
 drivers/net/wireless/mediatek/mt76/tx.c            |   3 +-
 drivers/net/wireless/realtek/rtl8xxxu/core.c       |  17 +-
 drivers/net/wireless/realtek/rtw88/fw.c            |  15 +
 drivers/net/wireless/realtek/rtw88/fw.h            |   1 +
 drivers/net/wireless/realtek/rtw88/mac.c           |   7 +-
 drivers/net/wireless/realtek/rtw88/main.c          |  54 ++-
 drivers/net/wireless/realtek/rtw88/main.h          |   1 +
 drivers/net/wireless/realtek/rtw88/reg.h           |   3 +-
 drivers/net/wireless/realtek/rtw88/rtw8822b.c      |  14 +-
 drivers/net/wireless/realtek/rtw88/util.c          |   3 +-
 drivers/net/wireless/realtek/rtw89/coex.c          | 107 +++--
 drivers/net/wireless/realtek/rtw89/coex.h          |   2 +
 drivers/net/wireless/realtek/rtw89/core.c          |  67 ++-
 drivers/net/wireless/realtek/rtw89/core.h          |   6 +-
 drivers/net/wireless/realtek/rtw89/fw.c            | 101 ++++-
 drivers/net/wireless/realtek/rtw89/fw.h            |  12 +
 drivers/net/wireless/realtek/rtw89/mac.c           |  55 ++-
 drivers/net/wireless/realtek/rtw89/mac.h           |   3 +
 drivers/net/wireless/realtek/rtw89/mac80211.c      |   1 +
 drivers/net/wireless/realtek/rtw89/reg.h           |   4 +
 drivers/net/wireless/realtek/rtw89/regd.c          |   2 +
 drivers/net/wireless/realtek/rtw89/rtw8851b.c      |   8 +
 drivers/net/wireless/realtek/rtw89/rtw8852a.c      |   8 +
 drivers/net/wireless/realtek/rtw89/rtw8852b.c      |   8 +
 drivers/net/wireless/realtek/rtw89/rtw8852bt.c     |   8 +
 drivers/net/wireless/realtek/rtw89/rtw8852c.c      |   8 +
 drivers/net/wireless/realtek/rtw89/rtw8922a.c      |   2 +
 drivers/net/wireless/realtek/rtw89/ser.c           |   4 +
 drivers/net/wireless/virtual/mac80211_hwsim.c      |  14 +-
 drivers/nvdimm/label.c                             |   3 +-
 drivers/nvme/host/pci.c                            |   6 +
 drivers/nvme/target/pci-epf.c                      |  66 ++-
 drivers/nvme/target/tcp.c                          |   3 +
 drivers/nvmem/core.c                               |  40 +-
 drivers/nvmem/qfprom.c                             |  26 +-
 drivers/nvmem/rockchip-otp.c                       |  17 +-
 drivers/pci/Kconfig                                |   6 +
 drivers/pci/ats.c                                  |  33 ++
 drivers/pci/controller/dwc/pcie-designware-ep.c    |   2 +-
 drivers/pci/controller/dwc/pcie-designware-host.c  |   2 +-
 drivers/pci/controller/pcie-brcmstb.c              |   5 +-
 drivers/pci/controller/pcie-xilinx-cpm.c           |   3 +-
 drivers/pci/controller/vmd.c                       |  20 +
 drivers/pci/endpoint/functions/pci-epf-mhi.c       |   2 +-
 drivers/pci/endpoint/functions/pci-epf-test.c      |   2 +
 drivers/pci/setup-bus.c                            |   6 +-
 drivers/perf/arm_pmuv3.c                           |   4 +-
 drivers/phy/phy-core.c                             |   7 +-
 drivers/phy/renesas/phy-rcar-gen3-usb2.c           |  95 +++--
 drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c  |   4 +-
 drivers/phy/rockchip/phy-rockchip-usbdp.c          | 105 +++--
 drivers/phy/samsung/phy-exynos5-usbdrd.c           |   7 +-
 drivers/pinctrl/bcm/pinctrl-bcm281xx.c             |  44 +-
 drivers/pinctrl/devicetree.c                       |  10 +-
 drivers/pinctrl/meson/pinctrl-meson.c              |   2 +-
 drivers/pinctrl/qcom/Kconfig.msm                   |   4 +-
 drivers/pinctrl/qcom/pinctrl-msm.c                 |  23 +-
 drivers/pinctrl/qcom/pinctrl-msm8917.c             |   8 +-
 drivers/pinctrl/renesas/pinctrl-rzg2l.c            |  19 +-
 drivers/pinctrl/sophgo/pinctrl-cv18xx.c            |  33 +-
 drivers/pinctrl/tegra/pinctrl-tegra.c              |  59 ++-
 drivers/pinctrl/tegra/pinctrl-tegra.h              |   6 +
 drivers/platform/x86/asus-wmi.c                    |  11 +-
 .../x86/dell/dell-wmi-sysman/passobj-attributes.c  |   2 +-
 drivers/platform/x86/ideapad-laptop.c              |  16 +
 drivers/platform/x86/intel/hid.c                   |  21 +-
 drivers/platform/x86/think-lmi.c                   |  26 +-
 drivers/platform/x86/think-lmi.h                   |   1 +
 drivers/pmdomain/core.c                            |   2 +-
 drivers/pmdomain/imx/gpcv2.c                       |   2 +-
 drivers/pmdomain/renesas/rcar-gen4-sysc.c          |   5 -
 drivers/pmdomain/renesas/rcar-sysc.c               |   5 -
 drivers/power/supply/axp20x_battery.c              |  21 +
 drivers/pps/generators/pps_gen-dummy.c             |   2 +-
 drivers/pps/generators/pps_gen.c                   |  14 +-
 drivers/pps/generators/sysfs.c                     |   6 +-
 drivers/ptp/ptp_ocp.c                              |  24 +-
 drivers/regulator/ad5398.c                         |  12 +-
 drivers/remoteproc/qcom_wcnss.c                    |  34 +-
 drivers/rtc/rtc-ds1307.c                           |   4 +-
 drivers/rtc/rtc-rv3032.c                           |   2 +-
 drivers/s390/crypto/vfio_ap_ops.c                  |  72 ++--
 drivers/scsi/aacraid/aachba.c                      |   4 +-
 drivers/scsi/arm/acornscsi.c                       |   2 +-
 drivers/scsi/ips.c                                 |   8 +-
 drivers/scsi/lpfc/lpfc_els.c                       |  16 +-
 drivers/scsi/lpfc/lpfc_hbadisc.c                   |  29 +-
 drivers/scsi/lpfc/lpfc_init.c                      |   2 +
 drivers/scsi/megaraid.c                            |  10 +-
 drivers/scsi/megaraid/megaraid_mbox.c              |  10 +-
 drivers/scsi/mpi3mr/mpi3mr_fw.c                    |   8 +-
 drivers/scsi/mpt3sas/mpt3sas_ctl.c                 |  12 +-
 drivers/scsi/scsi_debug.c                          |  55 ++-
 drivers/scsi/scsi_sysctl.c                         |   4 +-
 drivers/scsi/st.c                                  |  29 +-
 drivers/scsi/st.h                                  |   2 +
 drivers/soc/apple/rtkit-internal.h                 |   1 +
 drivers/soc/apple/rtkit.c                          |  58 ++-
 drivers/soc/mediatek/mtk-mutex.c                   |   6 +
 drivers/soc/samsung/exynos-asv.c                   |   1 +
 drivers/soc/samsung/exynos-chipid.c                |   1 +
 drivers/soc/samsung/exynos-pmu.c                   |   1 +
 drivers/soc/samsung/exynos-usi.c                   |   1 +
 drivers/soc/samsung/exynos3250-pmu.c               |   1 +
 drivers/soc/samsung/exynos5250-pmu.c               |   1 +
 drivers/soc/samsung/exynos5420-pmu.c               |   1 +
 drivers/soc/ti/k3-socinfo.c                        |  13 +-
 drivers/soundwire/amd_manager.c                    |   2 +
 drivers/soundwire/bus.c                            |   9 +-
 drivers/soundwire/cadence_master.c                 |  22 +-
 drivers/spi/spi-fsl-dspi.c                         |  46 +-
 drivers/spi/spi-mux.c                              |   4 +-
 drivers/spi/spi-rockchip.c                         |   2 +-
 drivers/spi/spi-zynqmp-gqspi.c                     |  22 +-
 .../vc04_services/interface/vchiq_arm/vchiq_arm.c  |  69 ++-
 drivers/target/iscsi/iscsi_target.c                |   2 +-
 drivers/target/target_core_device.c                |   8 +-
 drivers/target/target_core_pr.c                    |   6 +-
 drivers/target/target_core_spc.c                   |  34 +-
 drivers/thermal/intel/x86_pkg_temp_thermal.c       |   1 +
 drivers/thermal/mediatek/lvts_thermal.c            |   3 +-
 drivers/thermal/qoriq_thermal.c                    |  13 +
 drivers/thunderbolt/retimer.c                      |   8 +-
 drivers/tty/serial/8250/8250_port.c                |   2 +-
 drivers/tty/serial/atmel_serial.c                  |   2 +-
 drivers/tty/serial/imx.c                           |   2 +-
 drivers/tty/serial/serial_mctrl_gpio.c             |  34 +-
 drivers/tty/serial/serial_mctrl_gpio.h             |  17 +-
 drivers/tty/serial/sh-sci.c                        |  98 ++++-
 drivers/tty/serial/stm32-usart.c                   |   2 +-
 drivers/ufs/core/ufshcd.c                          |  29 ++
 drivers/usb/gadget/function/f_mass_storage.c       |   4 +-
 drivers/usb/host/xhci-mem.c                        |  34 +-
 drivers/usb/host/xhci-ring.c                       |  12 +-
 drivers/usb/host/xhci.h                            |   8 +-
 drivers/usb/storage/debug.c                        |   4 +-
 drivers/vdpa/mlx5/net/mlx5_vnet.c                  |   3 +
 drivers/vfio/pci/vfio_pci_config.c                 |   3 +-
 drivers/vfio/pci/vfio_pci_core.c                   |  10 +-
 drivers/vfio/pci/vfio_pci_intrs.c                  |   2 +-
 drivers/vhost/scsi.c                               |  23 +-
 drivers/video/fbdev/core/bitblit.c                 |   5 +-
 drivers/video/fbdev/core/fbcon.c                   |  10 +-
 drivers/video/fbdev/core/fbcon.h                   |  38 +-
 drivers/video/fbdev/core/fbcon_ccw.c               |   5 +-
 drivers/video/fbdev/core/fbcon_cw.c                |   5 +-
 drivers/video/fbdev/core/fbcon_ud.c                |   5 +-
 drivers/video/fbdev/core/tileblit.c                |  45 +-
 drivers/video/fbdev/fsl-diu-fb.c                   |   1 +
 drivers/virtio/virtio.c                            |  35 ++
 drivers/virtio/virtio_ring.c                       |   2 +-
 drivers/watchdog/aspeed_wdt.c                      |  81 +++-
 drivers/watchdog/s3c2410_wdt.c                     |  10 +-
 drivers/xen/pci.c                                  |  32 ++
 drivers/xen/platform-pci.c                         |   4 +
 drivers/xen/xenbus/xenbus_probe.c                  |  14 +-
 fs/btrfs/block-group.c                             |  18 +-
 fs/btrfs/compression.c                             |   2 +-
 fs/btrfs/discard.c                                 |  34 +-
 fs/btrfs/disk-io.c                                 |  28 +-
 fs/btrfs/extent_io.c                               |   7 +-
 fs/btrfs/extent_io.h                               |   2 +
 fs/btrfs/scrub.c                                   |   4 +-
 fs/btrfs/send.c                                    |   6 +-
 fs/btrfs/tree-checker.c                            |   2 +-
 fs/buffer.c                                        |  61 ++-
 fs/dlm/lowcomms.c                                  |   4 +-
 fs/erofs/internal.h                                |   4 +-
 fs/erofs/super.c                                   |  46 +-
 fs/erofs/zdata.c                                   |   4 +-
 fs/exfat/inode.c                                   | 169 ++++----
 fs/ext4/balloc.c                                   |   4 +-
 fs/ext4/ext4.h                                     |   5 +-
 fs/ext4/extents.c                                  |  19 +-
 fs/ext4/inode.c                                    |  81 +++-
 fs/ext4/mballoc.c                                  |   3 +-
 fs/ext4/page-io.c                                  |  16 +-
 fs/ext4/super.c                                    |  19 +-
 fs/f2fs/sysfs.c                                    |  74 +++-
 fs/fuse/dir.c                                      |   2 +
 fs/gfs2/glock.c                                    |  11 +-
 fs/jbd2/recovery.c                                 |  69 ++-
 fs/jbd2/revoke.c                                   |  23 +-
 fs/namespace.c                                     |   6 +-
 fs/nfs/delegation.c                                |   3 +-
 fs/nfs/flexfilelayout/flexfilelayout.c             |   1 +
 fs/nfs/inode.c                                     |   2 +
 fs/nfs/internal.h                                  |   5 +
 fs/nfs/nfs3proc.c                                  |   2 +-
 fs/nfs/nfs4proc.c                                  |   9 +-
 fs/nfs/nfs4state.c                                 |  10 +-
 fs/nilfs2/the_nilfs.c                              |   3 -
 fs/ocfs2/journal.c                                 |   2 +-
 fs/orangefs/inode.c                                |   7 +-
 fs/pidfs.c                                         |   9 +-
 fs/pipe.c                                          |   4 +
 fs/pstore/inode.c                                  |   2 +-
 fs/pstore/internal.h                               |   4 +-
 fs/pstore/platform.c                               |  11 +-
 fs/smb/client/cifsacl.c                            |  21 +-
 fs/smb/client/cifspdu.h                            |   5 +-
 fs/smb/client/cifsproto.h                          |   7 +
 fs/smb/client/cifssmb.c                            |  93 +++-
 fs/smb/client/connect.c                            |  30 +-
 fs/smb/client/fs_context.c                         |  13 +
 fs/smb/client/fs_context.h                         |   3 +
 fs/smb/client/link.c                               |  11 +-
 fs/smb/client/readdir.c                            |   7 +-
 fs/smb/client/smb1ops.c                            | 228 ++++++++--
 fs/smb/client/smb2file.c                           |  11 +-
 fs/smb/client/smb2inode.c                          |   8 +
 fs/smb/client/smb2ops.c                            |  34 +-
 fs/smb/client/smb2pdu.c                            |   4 +-
 fs/smb/client/transport.c                          |   2 +-
 fs/smb/client/xattr.c                              |  15 +-
 fs/smb/common/smb2pdu.h                            |   3 +
 fs/smb/server/smb2pdu.c                            |   9 +-
 fs/smb/server/vfs.c                                |  14 +-
 include/crypto/hash.h                              |   3 +
 include/drm/drm_atomic.h                           |  23 +-
 include/drm/drm_gem.h                              |  13 +
 include/linux/alloc_tag.h                          |  12 +
 include/linux/blkdev.h                             |   1 +
 include/linux/bpf-cgroup.h                         |   1 +
 include/linux/bpf.h                                |   7 +-
 include/linux/buffer_head.h                        |   8 +
 include/linux/codetag.h                            |   8 +-
 include/linux/coresight.h                          |   2 +-
 include/linux/device.h                             | 119 +-----
 include/linux/device/devres.h                      | 129 ++++++
 include/linux/dma-mapping.h                        |  12 +-
 include/linux/dma/k3-udma-glue.h                   |   3 +-
 include/linux/err.h                                |   3 +
 include/linux/gpio/driver.h                        |   3 +-
 include/linux/highmem.h                            |  10 +-
 include/linux/io.h                                 |   2 -
 include/linux/ipv6.h                               |   1 +
 include/linux/jbd2.h                               |   2 +
 include/linux/lzo.h                                |   8 +
 include/linux/mfd/axp20x.h                         |   1 +
 include/linux/mlx4/device.h                        |   2 +-
 include/linux/mlx5/eswitch.h                       |   2 +
 include/linux/mlx5/fs.h                            |   2 +
 include/linux/mm.h                                 |   2 +-
 include/linux/mman.h                               |   2 +
 include/linux/mroute_base.h                        |   5 +
 include/linux/msi.h                                |  33 +-
 include/linux/objtool.h                            |   4 +-
 include/linux/page-flags.h                         |   7 +
 include/linux/pci-ats.h                            |   3 +
 include/linux/percpu.h                             |   4 -
 include/linux/perf_event.h                         |   8 +-
 include/linux/pnp.h                                |   2 +-
 include/linux/pps_gen_kernel.h                     |   4 +-
 include/linux/rcupdate.h                           |   2 +-
 include/linux/rcutree.h                            |   2 +-
 include/linux/ring_buffer.h                        |   3 +-
 include/linux/spi/spi.h                            |   5 +-
 include/linux/tcp.h                                |   2 +
 include/linux/trace.h                              |   4 +-
 include/linux/trace_seq.h                          |   8 +-
 include/linux/usb/r8152.h                          |   1 +
 include/linux/virtio.h                             |   3 +
 include/media/v4l2-subdev.h                        |   4 +-
 include/net/cfg80211.h                             |   4 +
 include/net/dropreason.h                           |   6 -
 include/net/mac80211.h                             |   4 +-
 include/net/xfrm.h                                 |   1 -
 include/rdma/uverbs_std_types.h                    |   2 +-
 include/scsi/scsi_proto.h                          |   4 +-
 include/sound/hda_codec.h                          |   1 +
 include/sound/pcm.h                                |   2 +
 include/sound/soc_sdw_utils.h                      |   1 +
 include/trace/events/btrfs.h                       |   2 +-
 include/trace/events/scsi.h                        |   4 +-
 include/trace/events/target.h                      |   4 +-
 include/uapi/linux/bpf.h                           |   1 +
 include/uapi/linux/iommufd.h                       |  14 +-
 include/uapi/linux/nl80211.h                       |  52 ++-
 include/uapi/linux/snmp.h                          |   1 +
 include/uapi/linux/taskstats.h                     |  47 +-
 include/ufs/ufs_quirks.h                           |   6 +
 io_uring/fdinfo.c                                  |   4 +-
 io_uring/io_uring.c                                |  96 +++--
 io_uring/msg_ring.c                                |   1 +
 io_uring/net.c                                     |  14 +-
 kernel/bpf/bpf_iter.c                              |  13 +-
 kernel/bpf/bpf_struct_ops.c                        |  98 ++---
 kernel/bpf/cgroup.c                                |  33 +-
 kernel/bpf/disasm.c                                |   4 +-
 kernel/bpf/hashtab.c                               |   2 +-
 kernel/bpf/syscall.c                               |   8 +-
 kernel/bpf/verifier.c                              |  56 ++-
 kernel/cgroup/cgroup.c                             |   2 +-
 kernel/cgroup/rstat.c                              |  12 +-
 kernel/dma/mapping.c                               |  27 +-
 kernel/events/core.c                               | 104 +++--
 kernel/events/hw_breakpoint.c                      |   5 +-
 kernel/events/ring_buffer.c                        |   1 +
 kernel/exit.c                                      |   6 +-
 kernel/fork.c                                      |   9 +-
 kernel/module/main.c                               |   1 +
 kernel/padata.c                                    |   3 +-
 kernel/printk/printk.c                             |  14 +-
 kernel/rcu/rcu.h                                   |   2 +-
 kernel/rcu/tree.c                                  |  15 +-
 kernel/rcu/tree_plugin.h                           |  22 +-
 kernel/rseq.c                                      |  60 ++-
 kernel/sched/fair.c                                |   6 +-
 kernel/signal.c                                    |   3 +-
 kernel/softirq.c                                   |  18 +
 kernel/time/hrtimer.c                              |  29 +-
 kernel/time/posix-timers.c                         |  26 +-
 kernel/time/timer_list.c                           |   4 +-
 kernel/trace/ring_buffer.c                         |  31 +-
 kernel/trace/trace.c                               |  41 +-
 kernel/trace/trace.h                               |  25 +-
 kernel/vhost_task.c                                |   2 +-
 lib/alloc_tag.c                                    |  87 +++-
 lib/codetag.c                                      |   5 +-
 lib/dynamic_queue_limits.c                         |   2 +-
 lib/lzo/Makefile                                   |   2 +-
 lib/lzo/lzo1x_compress.c                           | 102 +++--
 lib/lzo/lzo1x_compress_safe.c                      |  18 +
 mm/hugetlb.c                                       |   8 +
 mm/kasan/shadow.c                                  |  92 +++-
 mm/memcontrol.c                                    |   6 +-
 mm/page_alloc.c                                    |   8 +
 mm/vmalloc.c                                       |  13 +-
 net/bluetooth/hci_event.c                          |   3 +
 net/bluetooth/l2cap_core.c                         |  15 +-
 net/bridge/br_mdb.c                                |   2 +-
 net/bridge/br_nf_core.c                            |   7 +-
 net/bridge/br_private.h                            |   1 +
 net/can/bcm.c                                      |  79 ++--
 net/core/dev.c                                     |  12 +-
 net/core/dev.h                                     |  12 +
 net/core/net-sysfs.c                               |   5 +-
 net/core/page_pool.c                               |   7 +-
 net/core/pktgen.c                                  |  13 +-
 net/core/rtnetlink.c                               |  10 +-
 net/dsa/tag_ksz.c                                  |  19 +-
 net/hsr/hsr_device.c                               |   2 +
 net/hsr/hsr_forward.c                              |   4 +-
 net/hsr/hsr_framereg.c                             |  95 ++++-
 net/hsr/hsr_framereg.h                             |   8 +-
 net/hsr/hsr_main.h                                 |   2 +
 net/ipv4/esp4.c                                    |  53 +--
 net/ipv4/fib_frontend.c                            |  28 +-
 net/ipv4/fib_rules.c                               |   4 +-
 net/ipv4/fib_trie.c                                |  22 -
 net/ipv4/inet_hashtables.c                         |  37 +-
 net/ipv4/ip_gre.c                                  |  16 +-
 net/ipv4/ipmr.c                                    |  12 +-
 net/ipv4/proc.c                                    |   1 +
 net/ipv4/syncookies.c                              |   1 +
 net/ipv4/tcp_input.c                               |  57 +--
 net/ipv4/tcp_minisocks.c                           |  26 +-
 net/ipv4/tcp_output.c                              |   6 +
 net/ipv4/xfrm4_input.c                             |  18 +-
 net/ipv6/esp6.c                                    |  53 +--
 net/ipv6/fib6_rules.c                              |   4 +-
 net/ipv6/ip6_gre.c                                 |   2 -
 net/ipv6/ip6_output.c                              |  11 +-
 net/ipv6/ip6_tunnel.c                              |   3 +-
 net/ipv6/ip6_vti.c                                 |   3 +-
 net/ipv6/ip6mr.c                                   |  12 +-
 net/ipv6/sit.c                                     |   8 +-
 net/ipv6/xfrm6_input.c                             |  18 +-
 net/llc/af_llc.c                                   |   8 +-
 net/mac80211/agg-tx.c                              |   5 +-
 net/mac80211/cfg.c                                 |  14 +-
 net/mac80211/driver-ops.h                          |   3 +-
 net/mac80211/drop.h                                |  21 +-
 net/mac80211/ethtool.c                             |   2 +-
 net/mac80211/ieee80211_i.h                         |  13 +-
 net/mac80211/iface.c                               |  60 ++-
 net/mac80211/main.c                                |  16 +-
 net/mac80211/mlme.c                                | 150 ++++++-
 net/mac80211/rx.c                                  | 194 +++------
 net/mac80211/status.c                              |  32 +-
 net/mac80211/tx.c                                  |   2 +-
 net/mac80211/util.c                                |   3 +-
 net/mptcp/pm_userspace.c                           |   8 +-
 net/netfilter/nf_conntrack_standalone.c            |  12 +-
 net/sched/sch_hfsc.c                               |   6 +-
 net/smc/smc_pnet.c                                 |   8 +-
 net/sunrpc/clnt.c                                  |   3 -
 net/sunrpc/rpcb_clnt.c                             |   5 +-
 net/sunrpc/sched.c                                 |   2 +
 net/tipc/crypto.c                                  |   5 +
 net/wireless/chan.c                                |   8 +-
 net/wireless/mlme.c                                |   4 +
 net/wireless/nl80211.c                             |   4 +
 net/wireless/reg.c                                 |   4 +-
 net/xdp/xsk.c                                      |   2 +-
 net/xfrm/espintcp.c                                |   4 +-
 net/xfrm/xfrm_policy.c                             |   3 +
 net/xfrm/xfrm_state.c                              |   6 +-
 net/xfrm/xfrm_user.c                               |  12 +
 samples/bpf/Makefile                               |   2 +-
 scripts/Makefile.extrawarn                         |  11 +-
 scripts/config                                     |  26 +-
 scripts/kconfig/confdata.c                         |  19 +-
 scripts/kconfig/merge_config.sh                    |   4 +-
 security/integrity/ima/ima_main.c                  |   4 +-
 security/smack/smackfs.c                           |  21 +-
 sound/core/oss/pcm_oss.c                           |   3 +-
 sound/core/pcm_native.c                            |  11 +
 sound/core/seq/seq_clientmgr.c                     |   5 +-
 sound/core/seq/seq_memory.c                        |   1 +
 sound/pci/hda/hda_beep.c                           |  15 +-
 sound/pci/hda/patch_realtek.c                      |  77 +++-
 sound/soc/codecs/cs42l43-jack.c                    |   7 +
 sound/soc/codecs/mt6359-accdet.h                   |   9 +
 sound/soc/codecs/pcm3168a.c                        |   6 +-
 sound/soc/codecs/pcm6240.c                         |  28 +-
 sound/soc/codecs/pcm6240.h                         |   7 +-
 sound/soc/codecs/rt722-sdca-sdw.c                  |  49 ++-
 sound/soc/codecs/sma1307.c                         |  27 +-
 sound/soc/codecs/tas2764.c                         |  53 +--
 sound/soc/codecs/wsa883x.c                         |   2 +-
 sound/soc/codecs/wsa884x.c                         |   2 +-
 sound/soc/fsl/imx-card.c                           |   2 +-
 sound/soc/intel/boards/bytcr_rt5640.c              |  13 +
 sound/soc/mediatek/mt8188/mt8188-afe-clk.c         |   8 +
 sound/soc/mediatek/mt8188/mt8188-afe-clk.h         |   8 +
 sound/soc/mediatek/mt8188/mt8188-afe-pcm.c         |   4 -
 sound/soc/qcom/sm8250.c                            |   3 +
 sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c       |   4 +
 sound/soc/sdw_utils/soc_sdw_cs42l43.c              |  10 +
 sound/soc/sdw_utils/soc_sdw_cs_amp.c               |  24 ++
 sound/soc/soc-dai.c                                |   8 +-
 sound/soc/soc-ops.c                                |  29 +-
 sound/soc/sof/intel/hda-bus.c                      |   2 +-
 sound/soc/sof/intel/hda.c                          |  16 +-
 sound/soc/sof/ipc4-control.c                       |  11 +-
 sound/soc/sof/ipc4-pcm.c                           |   3 +-
 sound/soc/sof/topology.c                           |  18 +-
 sound/soc/sunxi/sun4i-codec.c                      |  56 ++-
 sound/usb/midi.c                                   |  16 +-
 tools/arch/x86/include/asm/asm.h                   |   8 +-
 tools/arch/x86/include/asm/nops.h                  |   2 +-
 tools/arch/x86/include/asm/orc_types.h             |   4 +-
 tools/arch/x86/include/asm/pvclock-abi.h           |   4 +-
 tools/bpf/bpftool/btf.c                            |  14 +-
 tools/bpf/bpftool/btf_dumper.c                     |   2 +-
 tools/bpf/bpftool/cgroup.c                         |   2 +-
 tools/bpf/bpftool/common.c                         |   7 +-
 tools/bpf/bpftool/jit_disasm.c                     |   3 +-
 tools/bpf/bpftool/map_perf_ring.c                  |   6 +-
 tools/bpf/bpftool/net.c                            |   4 +-
 tools/bpf/bpftool/netlink_dumper.c                 |   6 +-
 tools/bpf/bpftool/prog.c                           |  12 +-
 tools/bpf/bpftool/tracelog.c                       |   2 +-
 tools/bpf/bpftool/xlated_dumper.c                  |   6 +-
 tools/build/Makefile.build                         |   6 +-
 tools/include/uapi/linux/bpf.h                     |   1 +
 tools/lib/bpf/libbpf.c                             |   2 +-
 tools/net/ynl/lib/ynl.c                            |   2 +-
 tools/net/ynl/pyynl/ynl_gen_c.py                   |   3 +
 tools/objtool/check.c                              |  21 +-
 tools/power/x86/turbostat/turbostat.8              |   1 +
 tools/power/x86/turbostat/turbostat.c              |  13 +-
 tools/testing/kunit/kunit_parser.py                |   9 +-
 tools/testing/kunit/qemu_configs/x86_64.py         |   4 +-
 .../selftests/bpf/prog_tests/sockmap_ktls.c        |   1 -
 tools/testing/selftests/iommu/iommufd.c            |   4 +
 .../testing/selftests/net/forwarding/bridge_mdb.sh |   2 +-
 tools/testing/selftests/net/gro.sh                 |   3 +-
 tools/testing/selftests/net/nl_netdev.py           |  18 +-
 .../selftests/pci_endpoint/pci_endpoint_test.c     |   2 +
 1089 files changed, 12544 insertions(+), 5911 deletions(-)
author maintainer
#16 lore raw

PATCH 16/783 scsi: target: iscsi: Fix timeout on deleted connection

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

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

From: Dmitry Bogdanov <[email protected]>

[ Upstream commit 7f533cc5ee4c4436cee51dc58e81dfd9c3384418 ]

NOPIN response timer may expire on a deleted connection and crash with such logs:

Did not receive response to NOPIN on CID: 0, failing connection for I_T Nexus (null),i,0x00023d000125,iqn.2017-01.com.iscsi.target,t,0x3d

BUG: Kernel NULL pointer dereference on read at 0x00000000
NIP  strlcpy+0x8/0xb0
LR iscsit_fill_cxn_timeout_err_stats+0x5c/0xc0 [iscsi_target_mod]
Call Trace:
 iscsit_handle_nopin_response_timeout+0xfc/0x120 [iscsi_target_mod]
 call_timer_fn+0x58/0x1f0
 run_timer_softirq+0x740/0x860
 __do_softirq+0x16c/0x420
 irq_exit+0x188/0x1c0
 timer_interrupt+0x184/0x410

That is because nopin response timer may be re-started on nopin timer expiration.

Stop nopin timer before stopping the nopin response timer to be sure that no one of them will be re-started.

---
 drivers/target/iscsi/iscsi_target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/target/iscsi/iscsi_target.c +1 -1
index 1244ef3aa86c1..620ba6e0ab075 100644
@@ -4263,8 +4263,8 @@ int iscsit_close_connection(
 	spin_unlock(&iscsit_global->ts_bitmap_lock);
 
 	iscsit_stop_timers_for_cmds(conn);
-	iscsit_stop_nopin_response_timer(conn);
 	iscsit_stop_nopin_timer(conn);
+	iscsit_stop_nopin_response_timer(conn);
 
 	if (conn->conn_transport->iscsit_wait_conn)
 		conn->conn_transport->iscsit_wait_conn(conn);
Signature · 1 line
2.39.5
author maintainer
#25 lore raw

PATCH 25/783 vhost_task: fix vhost_task_create() documentation

In reply to Greg Kroah-Hartman

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

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

From: Stefano Garzarella <[email protected]>

[ Upstream commit fec0abf52609c20279243699d08b660c142ce0aa ]

Commit cb380909ae3b ("vhost: return task creation error instead of NULL") changed the return value of vhost_task_create(), but did not update the documentation.

Reflect the change in the documentation: on an error, vhost_task_create() returns an ERR_PTR() and no longer NULL.

Message-Id: <[email protected]>

---
 kernel/vhost_task.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/vhost_task.c +1 -1
index 2ef2e1b800916..2f844c279a3e0 100644
@@ -111,7 +111,7 @@ EXPORT_SYMBOL_GPL(vhost_task_stop);
  * @arg: data to be passed to fn and handled_kill
  * @name: the thread's name
  *
- * This returns a specialized task for use by the vhost layer or NULL on
+ * This returns a specialized task for use by the vhost layer or ERR_PTR() on
  * failure. The returned task is inactive, and the caller must fire it up
  * through vhost_task_start().
  */
Signature · 1 line
2.39.5
author maintainer
#26 lore raw

PATCH 26/783 vhost-scsi: protect vq->log_used with vq->mutex

In reply to Greg Kroah-Hartman

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

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

From: Dongli Zhang <[email protected]>

[ Upstream commit f591cf9fce724e5075cc67488c43c6e39e8cbe27 ]

The vhost-scsi completion path may access vq->log_base when vq->log_used is already set to false.

vhost-thread QEMU-thread

vhost_scsi_complete_cmd_work()
-> vhost_add_used()
-> vhost_add_used_n()

      if (unlikely(vq->log_used))
                                      QEMU disables vq->log_used
                                      via VHOST_SET_VRING_ADDR.
                                      mutex_lock(&vq->mutex);
                                      vq->log_used = false now!
                                      mutex_unlock(&vq->mutex);

				      QEMU gfree(vq->log_base)
        log_used()
        -> log_write(vq->log_base)

Assuming the VMM is QEMU. The vq->log_base is from QEMU userpace and can be reclaimed via gfree(). As a result, this causes invalid memory writes to QEMU userspace.

The control queue path has the same issue.

Message-Id: <[email protected]>

---
 drivers/vhost/scsi.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/vhost/scsi.c +8 -0
index 35a03306d1345..ecad2f53b7635 100644
@@ -571,6 +571,9 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
 	int ret;
 
 	llnode = llist_del_all(&svq->completion_list);
+
+	mutex_lock(&svq->vq.mutex);
+
 	llist_for_each_entry_safe(cmd, t, llnode, tvc_completion_list) {
 		se_cmd = &cmd->tvc_se_cmd;
 
@@ -604,6 +607,8 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
 		vhost_scsi_release_cmd_res(se_cmd);
 	}
 
+	mutex_unlock(&svq->vq.mutex);
+
 	if (signal)
 		vhost_signal(&svq->vs->dev, &svq->vq);
 }
@@ -1346,8 +1351,11 @@ static void vhost_scsi_tmf_resp_work(struct vhost_work *work)
 	else
 		resp_code = VIRTIO_SCSI_S_FUNCTION_REJECTED;
 
+	mutex_lock(&tmf->svq->vq.mutex);
 	vhost_scsi_send_tmf_resp(tmf->vhost, &tmf->svq->vq, tmf->in_iovs,
 				 tmf->vq_desc, &tmf->resp_iov, resp_code);
+	mutex_unlock(&tmf->svq->vq.mutex);
+
 	vhost_scsi_release_tmf_res(tmf);
 }
 
Signature · 1 line
2.39.5
author maintainer
#27 lore raw

PATCH 27/783 scsi: mpi3mr: Add level check to control event logging

In reply to Greg Kroah-Hartman

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

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

From: Ranjan Kumar <[email protected]>

[ Upstream commit b0b7ee3b574a72283399b9232f6190be07f220c0 ]

Ensure event logs are only generated when the debug logging level MPI3_DEBUG_EVENT is enabled. This prevents unnecessary logging.

---
 drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/mpi3mr/mpi3mr_fw.c +3 -0
index c0a372868e1d7..f6d3db3fd0d8e 100644
@@ -174,6 +174,9 @@ static void mpi3mr_print_event_data(struct mpi3mr_ioc *mrioc,
 	char *desc = NULL;
 	u16 event;
 
+	if (!(mrioc->logging_level & MPI3_DEBUG_EVENT))
+		return;
+
 	event = event_reply->event;
 
 	switch (event) {
Signature · 1 line
2.39.5
author maintainer
#28 lore raw

PATCH 28/783 dma-mapping: Fix warning reported for missing prototype

In reply to Greg Kroah-Hartman

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

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

From: Balbir Singh <[email protected]>

[ Upstream commit cae5572ec9261f752af834cdaaf5a0ba0afcf256 ]

lkp reported a warning about missing prototype for a recent patch.

The kernel-doc style comments are out of sync, move them to the right function.

Cc Marek Szyprowski <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 kernel/dma/mapping.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
kernel/dma/mapping.c +8 -8
index 67da08fa67237..051a32988040f 100644
@@ -910,14 +910,6 @@ int dma_set_coherent_mask(struct device *dev, u64 mask)
 }
 EXPORT_SYMBOL(dma_set_coherent_mask);
 
-/**
- * dma_addressing_limited - return if the device is addressing limited
- * @dev:	device to check
- *
- * Return %true if the devices DMA mask is too small to address all memory in
- * the system, else %false.  Lack of addressing bits is the prime reason for
- * bounce buffering, but might not be the only one.
- */
 static bool __dma_addressing_limited(struct device *dev)
 {
 	const struct dma_map_ops *ops = get_dma_ops(dev);
@@ -931,6 +923,14 @@ static bool __dma_addressing_limited(struct device *dev)
 	return !dma_direct_all_ram_mapped(dev);
 }
 
+/**
+ * dma_addressing_limited - return if the device is addressing limited
+ * @dev:	device to check
+ *
+ * Return %true if the devices DMA mask is too small to address all memory in
+ * the system, else %false.  Lack of addressing bits is the prime reason for
+ * bounce buffering, but might not be the only one.
+ */
 bool dma_addressing_limited(struct device *dev)
 {
 	if (!__dma_addressing_limited(dev))
Signature · 1 line
2.39.5
author maintainer
#29 lore raw

PATCH 29/783 ima: process_measurement() needlessly takes inode_lock() on MAY_READ

In reply to Greg Kroah-Hartman

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

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

From: Frederick Lawler <[email protected]>

[ Upstream commit 30d68cb0c37ebe2dc63aa1d46a28b9163e61caa2 ]

On IMA policy update, if a measure rule exists in the policy, IMA_MEASURE is set for ima_policy_flags which makes the violation_check variable always true. Coupled with a no-action on MAY_READ for a FILE_CHECK call, we're always taking the inode_lock().

This becomes a performance problem for extremely heavy read-only workloads. Therefore, prevent this only in the case there's no action to be taken.

---
 security/integrity/ima/ima_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
security/integrity/ima/ima_main.c +3 -1
index f3e7ac513db3f..f99ab1a3b0f09 100644
@@ -245,7 +245,9 @@ static int process_measurement(struct file *file, const struct cred *cred,
 				&allowed_algos);
 	violation_check = ((func == FILE_CHECK || func == MMAP_CHECK ||
 			    func == MMAP_CHECK_REQPROT) &&
-			   (ima_policy_flag & IMA_MEASURE));
+			   (ima_policy_flag & IMA_MEASURE) &&
+			   ((action & IMA_MEASURE) ||
+			    (file->f_mode & FMODE_WRITE)));
 	if (!action && !violation_check)
 		return 0;
 
Signature · 1 line
2.39.5
author maintainer
#30 lore raw

PATCH 30/783 fs/buffer: split locking for pagecache lookups

In reply to Greg Kroah-Hartman

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

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

From: Davidlohr Bueso <[email protected]>

[ Upstream commit 7ffe3de53a885dbb5836541c2178bd07d1bad7df ]

Callers of __find_get_block() may or may not allow for blocking semantics, and is currently assumed that it will not. Layout two paths based on this. The the private_lock scheme will continued to be used for atomic contexts. Otherwise take the folio lock instead, which protects the buffers, such as vs migration and try_to_free_buffers().

Per the "hack idea", the latter can alleviate contention on the private_lock for bdev mappings. For reasons of determinism and avoid making bugs hard to reproduce, the trylocking is not attempted.

No change in semantics. All lookup users still take the spinlock.

---
 fs/buffer.c | 41 +++++++++++++++++++++++++----------------
 1 file changed, 25 insertions(+), 16 deletions(-)
fs/buffer.c +25 -16
index cc8452f602516..a03c245022dcf 100644
@@ -176,18 +176,8 @@ void end_buffer_write_sync(struct buffer_head *bh, int uptodate)
 }
 EXPORT_SYMBOL(end_buffer_write_sync);
 
-/*
- * Various filesystems appear to want __find_get_block to be non-blocking.
- * But it's the page lock which protects the buffers.  To get around this,
- * we get exclusion from try_to_free_buffers with the blockdev mapping's
- * i_private_lock.
- *
- * Hack idea: for the blockdev mapping, i_private_lock contention
- * may be quite high.  This code could TryLock the page, and if that
- * succeeds, there is no need to take i_private_lock.
- */
 static struct buffer_head *
-__find_get_block_slow(struct block_device *bdev, sector_t block)
+__find_get_block_slow(struct block_device *bdev, sector_t block, bool atomic)
 {
 	struct address_space *bd_mapping = bdev->bd_mapping;
 	const int blkbits = bd_mapping->host->i_blkbits;
@@ -204,7 +194,16 @@ __find_get_block_slow(struct block_device *bdev, sector_t block)
 	if (IS_ERR(folio))
 		goto out;
 
-	spin_lock(&bd_mapping->i_private_lock);
+	/*
+	 * Folio lock protects the buffers. Callers that cannot block
+	 * will fallback to serializing vs try_to_free_buffers() via
+	 * the i_private_lock.
+	 */
+	if (atomic)
+		spin_lock(&bd_mapping->i_private_lock);
+	else
+		folio_lock(folio);
+
 	head = folio_buffers(folio);
 	if (!head)
 		goto out_unlock;
@@ -236,7 +235,10 @@ __find_get_block_slow(struct block_device *bdev, sector_t block)
 		       1 << blkbits);
 	}
 out_unlock:
-	spin_unlock(&bd_mapping->i_private_lock);
+	if (atomic)
+		spin_unlock(&bd_mapping->i_private_lock);
+	else
+		folio_unlock(folio);
 	folio_put(folio);
 out:
 	return ret;
@@ -1388,14 +1390,15 @@ lookup_bh_lru(struct block_device *bdev, sector_t block, unsigned size)
  * it in the LRU and mark it as accessed.  If it is not present then return
  * NULL
  */
-struct buffer_head *
-__find_get_block(struct block_device *bdev, sector_t block, unsigned size)
+static struct buffer_head *
+find_get_block_common(struct block_device *bdev, sector_t block,
+			unsigned size, bool atomic)
 {
 	struct buffer_head *bh = lookup_bh_lru(bdev, block, size);
 
 	if (bh == NULL) {
 		/* __find_get_block_slow will mark the page accessed */
-		bh = __find_get_block_slow(bdev, block);
+		bh = __find_get_block_slow(bdev, block, atomic);
 		if (bh)
 			bh_lru_install(bh);
 	} else
@@ -1403,6 +1406,12 @@ __find_get_block(struct block_device *bdev, sector_t block, unsigned size)
 
 	return bh;
 }
+
+struct buffer_head *
+__find_get_block(struct block_device *bdev, sector_t block, unsigned size)
+{
+	return find_get_block_common(bdev, block, size, true);
+}
 EXPORT_SYMBOL(__find_get_block);
 
 /**
Signature · 1 line
2.39.5
author maintainer
#32 lore raw

PATCH 31/783 fs/buffer: introduce sleeping flavors for pagecache lookups

In reply to Greg Kroah-Hartman

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

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

From: Davidlohr Bueso <[email protected]>

[ Upstream commit 2814a7d3d2ff5d2cdd22936f641f758fdb971fa0 ]

Add __find_get_block_nonatomic() and sb_find_get_block_nonatomic() calls for which users will be converted where safe. These versions will take the folio lock instead of the mapping's private_lock.

---
 fs/buffer.c                 | 9 +++++++++
 include/linux/buffer_head.h | 8 ++++++++
 2 files changed, 17 insertions(+)
fs/buffer.c +9 -0
index a03c245022dcf..7981097c846d4 100644
@@ -1414,6 +1414,15 @@ __find_get_block(struct block_device *bdev, sector_t block, unsigned size)
 }
 EXPORT_SYMBOL(__find_get_block);
 
+/* same as __find_get_block() but allows sleeping contexts */
+struct buffer_head *
+__find_get_block_nonatomic(struct block_device *bdev, sector_t block,
+			   unsigned size)
+{
+	return find_get_block_common(bdev, block, size, false);
+}
+EXPORT_SYMBOL(__find_get_block_nonatomic);
+
 /**
  * bdev_getblk - Get a buffer_head in a block device's buffer cache.
  * @bdev: The block device.
include/linux/buffer_head.h +8 -0
index 932139c5d46f5..ffcd76d977703 100644
@@ -223,6 +223,8 @@ void __wait_on_buffer(struct buffer_head *);
 wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
 struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
 			unsigned size);
+struct buffer_head *__find_get_block_nonatomic(struct block_device *bdev,
+			sector_t block, unsigned size);
 struct buffer_head *bdev_getblk(struct block_device *bdev, sector_t block,
 		unsigned size, gfp_t gfp);
 void __brelse(struct buffer_head *);
@@ -398,6 +400,12 @@ sb_find_get_block(struct super_block *sb, sector_t block)
 	return __find_get_block(sb->s_bdev, block, sb->s_blocksize);
 }
 
+static inline struct buffer_head *
+sb_find_get_block_nonatomic(struct super_block *sb, sector_t block)
+{
+	return __find_get_block_nonatomic(sb->s_bdev, block, sb->s_blocksize);
+}
+
 static inline void
 map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block)
 {
Signature · 1 line
2.39.5
author maintainer
#33 lore raw

PATCH 32/783 fs/buffer: use sleeping version of __find_get_block()

In reply to Greg Kroah-Hartman

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

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

From: Davidlohr Bueso <[email protected]>

[ Upstream commit 5b67d43976828dea2394eae2556b369bb7a61f64 ]

Convert to the new nonatomic flavor to benefit from potential performance benefits and adapt in the future vs migration such that semantics are kept.

Convert write_boundary_block() which already takes the buffer lock as well as bdev_getblk() depending on the respective gpf flags. There are no changes in semantics.

---
 fs/buffer.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
fs/buffer.c +9 -2
index 7981097c846d4..2494fe3a5e69e 100644
@@ -658,7 +658,9 @@ EXPORT_SYMBOL(generic_buffers_fsync);
 void write_boundary_block(struct block_device *bdev,
 			sector_t bblock, unsigned blocksize)
 {
-	struct buffer_head *bh = __find_get_block(bdev, bblock + 1, blocksize);
+	struct buffer_head *bh;
+
+	bh = __find_get_block_nonatomic(bdev, bblock + 1, blocksize);
 	if (bh) {
 		if (buffer_dirty(bh))
 			write_dirty_buffer(bh, 0);
@@ -1440,7 +1442,12 @@ EXPORT_SYMBOL(__find_get_block_nonatomic);
 struct buffer_head *bdev_getblk(struct block_device *bdev, sector_t block,
 		unsigned size, gfp_t gfp)
 {
-	struct buffer_head *bh = __find_get_block(bdev, block, size);
+	struct buffer_head *bh;
+
+	if (gfpflags_allow_blocking(gfp))
+		bh = __find_get_block_nonatomic(bdev, block, size);
+	else
+		bh = __find_get_block(bdev, block, size);
 
 	might_alloc(gfp);
 	if (bh)
Signature · 1 line
2.39.5
author maintainer
#34 lore raw

PATCH 33/783 fs/ocfs2: use sleeping version of __find_get_block()

In reply to Greg Kroah-Hartman

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

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

From: Davidlohr Bueso <[email protected]>

[ Upstream commit a0b5ff07491010789fcb012bc8f9dad9d26f9a8b ]

This is a path that allows for blocking as it does IO. Convert to the new nonatomic flavor to benefit from potential performance benefits and adapt in the future vs migration such that semantics are kept.

---
 fs/ocfs2/journal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/journal.c +1 -1
index f37831d5f95a1..e5f58ff2175f4 100644
@@ -1271,7 +1271,7 @@ static int ocfs2_force_read_journal(struct inode *inode)
 		}
 
 		for (i = 0; i < p_blocks; i++, p_blkno++) {
-			bh = __find_get_block(osb->sb->s_bdev, p_blkno,
+			bh = __find_get_block_nonatomic(osb->sb->s_bdev, p_blkno,
 					osb->sb->s_blocksize);
 			/* block not cached. */
 			if (!bh)
Signature · 1 line
2.39.5
author maintainer
#35 lore raw

PATCH 34/783 fs/jbd2: use sleeping version of __find_get_block()

In reply to Greg Kroah-Hartman

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

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

From: Davidlohr Bueso <[email protected]>

[ Upstream commit f76d4c28a46a9260d85e00dafc8f46d369365d33 ]

Convert to the new nonatomic flavor to benefit from potential performance benefits and adapt in the future vs migration such that semantics are kept.

- jbd2_journal_revoke(): can sleep (has might_sleep() in the beginning)

- jbd2_journal_cancel_revoke(): only used from do_get_write_access() and do_get_create_access() which do sleep. So can sleep.

- jbd2_clear_buffer_revoked_flags() - only called from journal commit code which sleeps. So can sleep.

---
 fs/jbd2/revoke.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
fs/jbd2/revoke.c +9 -6
index ce63d5fde9c3a..f68fc8c255f00 100644
@@ -345,7 +345,8 @@ int jbd2_journal_revoke(handle_t *handle, unsigned long long blocknr,
 	bh = bh_in;
 
 	if (!bh) {
-		bh = __find_get_block(bdev, blocknr, journal->j_blocksize);
+		bh = __find_get_block_nonatomic(bdev, blocknr,
+						journal->j_blocksize);
 		if (bh)
 			BUFFER_TRACE(bh, "found on hash");
 	}
@@ -355,7 +356,8 @@ int jbd2_journal_revoke(handle_t *handle, unsigned long long blocknr,
 
 		/* If there is a different buffer_head lying around in
 		 * memory anywhere... */
-		bh2 = __find_get_block(bdev, blocknr, journal->j_blocksize);
+		bh2 = __find_get_block_nonatomic(bdev, blocknr,
+						 journal->j_blocksize);
 		if (bh2) {
 			/* ... and it has RevokeValid status... */
 			if (bh2 != bh && buffer_revokevalid(bh2))
@@ -466,7 +468,8 @@ int jbd2_journal_cancel_revoke(handle_t *handle, struct journal_head *jh)
 	 * state machine will get very upset later on. */
 	if (need_cancel) {
 		struct buffer_head *bh2;
-		bh2 = __find_get_block(bh->b_bdev, bh->b_blocknr, bh->b_size);
+		bh2 = __find_get_block_nonatomic(bh->b_bdev, bh->b_blocknr,
+						 bh->b_size);
 		if (bh2) {
 			if (bh2 != bh)
 				clear_buffer_revoked(bh2);
@@ -495,9 +498,9 @@ void jbd2_clear_buffer_revoked_flags(journal_t *journal)
 			struct jbd2_revoke_record_s *record;
 			struct buffer_head *bh;
 			record = (struct jbd2_revoke_record_s *)list_entry;
-			bh = __find_get_block(journal->j_fs_dev,
-					      record->blocknr,
-					      journal->j_blocksize);
+			bh = __find_get_block_nonatomic(journal->j_fs_dev,
+							record->blocknr,
+							journal->j_blocksize);
 			if (bh) {
 				clear_buffer_revoked(bh);
 				__brelse(bh);
Signature · 1 line
2.39.5
author maintainer
#17 lore raw

PATCH 17/783 scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices

In reply to Greg Kroah-Hartman

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

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

From: Manish Pandey <[email protected]>

[ Upstream commit 569330a34a31a52c904239439984a59972c11d28 ]

Samsung UFS devices require additional time in hibern8 mode before exiting, beyond the negotiated handshaking phase between the host and device. Introduce a quirk to increase the PA_HIBERN8TIME parameter by 100 µs, a value derived from experiments, to ensure a proper hibernation process.

---
 drivers/ufs/core/ufshcd.c | 29 +++++++++++++++++++++++++++++
 include/ufs/ufs_quirks.h  |  6 ++++++
 2 files changed, 35 insertions(+)
drivers/ufs/core/ufshcd.c +29 -0
index 99e7e4a570f0e..47ec4e4e4a2a0 100644
@@ -278,6 +278,7 @@ static const struct ufs_dev_quirk ufs_fixups[] = {
 	  .model = UFS_ANY_MODEL,
 	  .quirk = UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM |
 		   UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE |
+		   UFS_DEVICE_QUIRK_PA_HIBER8TIME |
 		   UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS },
 	{ .wmanufacturerid = UFS_VENDOR_SKHYNIX,
 	  .model = UFS_ANY_MODEL,
@@ -8384,6 +8385,31 @@ static int ufshcd_quirk_tune_host_pa_tactivate(struct ufs_hba *hba)
 	return ret;
 }
 
+/**
+ * ufshcd_quirk_override_pa_h8time - Ensures proper adjustment of PA_HIBERN8TIME.
+ * @hba: per-adapter instance
+ *
+ * Some UFS devices require specific adjustments to the PA_HIBERN8TIME parameter
+ * to ensure proper hibernation timing. This function retrieves the current
+ * PA_HIBERN8TIME value and increments it by 100us.
+ */
+static void ufshcd_quirk_override_pa_h8time(struct ufs_hba *hba)
+{
+	u32 pa_h8time;
+	int ret;
+
+	ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_HIBERN8TIME), &pa_h8time);
+	if (ret) {
+		dev_err(hba->dev, "Failed to get PA_HIBERN8TIME: %d\n", ret);
+		return;
+	}
+
+	/* Increment by 1 to increase hibernation time by 100 µs */
+	ret = ufshcd_dme_set(hba, UIC_ARG_MIB(PA_HIBERN8TIME), pa_h8time + 1);
+	if (ret)
+		dev_err(hba->dev, "Failed updating PA_HIBERN8TIME: %d\n", ret);
+}
+
 static void ufshcd_tune_unipro_params(struct ufs_hba *hba)
 {
 	ufshcd_vops_apply_dev_quirks(hba);
@@ -8394,6 +8420,9 @@ static void ufshcd_tune_unipro_params(struct ufs_hba *hba)
 
 	if (hba->dev_quirks & UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE)
 		ufshcd_quirk_tune_host_pa_tactivate(hba);
+
+	if (hba->dev_quirks & UFS_DEVICE_QUIRK_PA_HIBER8TIME)
+		ufshcd_quirk_override_pa_h8time(hba);
 }
 
 static void ufshcd_clear_dbg_ufs_stats(struct ufs_hba *hba)
include/ufs/ufs_quirks.h +6 -0
index 41ff44dfa1db3..f52de5ed1b3b6 100644
@@ -107,4 +107,10 @@ struct ufs_dev_quirk {
  */
 #define UFS_DEVICE_QUIRK_DELAY_AFTER_LPM        (1 << 11)
 
+/*
+ * Some ufs devices may need more time to be in hibern8 before exiting.
+ * Enable this quirk to give it an additional 100us.
+ */
+#define UFS_DEVICE_QUIRK_PA_HIBER8TIME          (1 << 12)
+
 #endif /* UFS_QUIRKS_H_ */
Signature · 1 line
2.39.5
author maintainer
#36 lore raw

PATCH 35/783 fs/ext4: use sleeping version of sb_find_get_block()

In reply to Greg Kroah-Hartman

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

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

From: Davidlohr Bueso <[email protected]>

[ Upstream commit 6e8f57fd09c9fb569d10b2ccc3878155b702591a ]

Enable ext4_free_blocks() to use it, which has a cond_resched to begin with. Convert to the new nonatomic flavor to benefit from potential performance benefits and adapt in the future vs migration such that semantics are kept.

---
 fs/ext4/mballoc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/ext4/mballoc.c +2 -1
index b25a27c866969..d6f1e61c6dc82 100644
@@ -6644,7 +6644,8 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
 		for (i = 0; i < count; i++) {
 			cond_resched();
 			if (is_metadata)
-				bh = sb_find_get_block(inode->i_sb, block + i);
+				bh = sb_find_get_block_nonatomic(inode->i_sb,
+								 block + i);
 			ext4_forget(handle, is_metadata, inode, bh, block + i);
 		}
 	}
Signature · 1 line
2.39.5
author maintainer
#37 lore raw

PATCH 36/783 drm/amd/display: Enable urgent latency adjustment on DCN35

In reply to Greg Kroah-Hartman

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

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

From: Nicholas Susanto <[email protected]>

[ Upstream commit 756c85e4d0ddc497b4ad5b1f41ad54e838e06188 ]

[Why]

Urgent latency adjustment was disabled on DCN35 due to issues with P0 enablement on some platforms. Without urgent latency, underflows occur when doing certain high timing configurations. After testing, we found that reenabling urgent latency didn't reintroduce p0 support on multiple platforms.

[How]

renable urgent latency on DCN35 and setting it to 3000 Mhz.

This reverts commit 3412860cc4c0c484f53f91b371483e6e4440c3e5.

(cherry picked from commit cd74ce1f0cddffb3f36d0995d0f61e89f0010738)
---
 drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +2 -2
index 47d785204f29c..beed7adbbd43e 100644
@@ -195,9 +195,9 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_5_soc = {
 	.dcn_downspread_percent = 0.5,
 	.gpuvm_min_page_size_bytes = 4096,
 	.hostvm_min_page_size_bytes = 4096,
-	.do_urgent_latency_adjustment = 0,
+	.do_urgent_latency_adjustment = 1,
 	.urgent_latency_adjustment_fabric_clock_component_us = 0,
-	.urgent_latency_adjustment_fabric_clock_reference_mhz = 0,
+	.urgent_latency_adjustment_fabric_clock_reference_mhz = 3000,
 };
 
 void dcn35_build_wm_range_table_fpu(struct clk_mgr *clk_mgr)
Signature · 1 line
2.39.5
author maintainer
#38 lore raw

PATCH 37/783 drm/amdgpu: Allow P2P access through XGMI

In reply to Greg Kroah-Hartman

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

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

From: Felix Kuehling <[email protected]>

[ Upstream commit a92741e72f91b904c1d8c3d409ed8dbe9c1f2b26 ]

If peer memory is accessible through XGMI, allow leaving it in VRAM rather than forcing its migration to GTT on DMABuf attachment.

(cherry picked from commit 372c8d72c3680fdea3fbb2d6b089f76b4a6d596a)
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 30 ++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +29 -1
index c9842a0e2a1cd..cb043296f9aec 100644
@@ -43,6 +43,29 @@
 #include <linux/dma-fence-array.h>
 #include <linux/pci-p2pdma.h>
 
+static const struct dma_buf_attach_ops amdgpu_dma_buf_attach_ops;
+
+/**
+ * dma_buf_attach_adev - Helper to get adev of an attachment
+ *
+ * @attach: attachment
+ *
+ * Returns:
+ * A struct amdgpu_device * if the attaching device is an amdgpu device or
+ * partition, NULL otherwise.
+ */
+static struct amdgpu_device *dma_buf_attach_adev(struct dma_buf_attachment *attach)
+{
+	if (attach->importer_ops == &amdgpu_dma_buf_attach_ops) {
+		struct drm_gem_object *obj = attach->importer_priv;
+		struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
+
+		return amdgpu_ttm_adev(bo->tbo.bdev);
+	}
+
+	return NULL;
+}
+
 /**
  * amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation
  *
@@ -54,11 +77,13 @@
 static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
 				 struct dma_buf_attachment *attach)
 {
+	struct amdgpu_device *attach_adev = dma_buf_attach_adev(attach);
 	struct drm_gem_object *obj = dmabuf->priv;
 	struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
 	struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
 
-	if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
+	if (!amdgpu_dmabuf_is_xgmi_accessible(attach_adev, bo) &&
+	    pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
 		attach->peer2peer = false;
 
 	amdgpu_vm_bo_update_shared(bo);
@@ -459,6 +484,9 @@ bool amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device *adev,
 	struct drm_gem_object *obj = &bo->tbo.base;
 	struct drm_gem_object *gobj;
 
+	if (!adev)
+		return false;
+
 	if (obj->import_attach) {
 		struct dma_buf *dma_buf = obj->import_attach->dmabuf;
 
Signature · 1 line
2.39.5
author maintainer
#39 lore raw

PATCH 38/783 selftests/bpf: Mitigate sockmap_ktls disconnect_after_delete failure

In reply to Greg Kroah-Hartman

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

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

From: Ihor Solodrai <[email protected]>

[ Upstream commit f2858f308131a09e33afb766cd70119b5b900569 ]

"sockmap_ktls disconnect_after_delete" test has been failing on BPF CI after recent merges from netdev:
* https://github.com/kernel-patches/bpf/actions/runs/14458537639
* https://github.com/kernel-patches/bpf/actions/runs/14457178732

It happens because disconnect has been disabled for TLS [1], and it renders the test case invalid.

Removing all the test code creates a conflict between bpf and bpf-next, so for now only remove the offending assert [2].

The test will be removed later on bpf-next.

[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/bpf/[email protected]/

---
 tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c | 1 -
 1 file changed, 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c +0 -1
index 2d0796314862a..0a99fd404f6dc 100644
@@ -68,7 +68,6 @@ static void test_sockmap_ktls_disconnect_after_delete(int family, int map)
 		goto close_cli;
 
 	err = disconnect(cli);
-	ASSERT_OK(err, "disconnect");
 
 close_cli:
 	close(cli);
Signature · 1 line
2.39.5
author maintainer
#40 lore raw

PATCH 39/783 block: fix race between set_blocksize and read paths

In reply to Greg Kroah-Hartman

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

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

From: Darrick J. Wong <[email protected]>

[ Upstream commit c0e473a0d226479e8e925d5ba93f751d8df628e9 ]

With the new large sector size support, it's now the case that set_blocksize can change i_blksize and the folio order in a manner that conflicts with a concurrent reader and causes a kernel crash.

Specifically, let's say that udev-worker calls libblkid to detect the labels on a block device. The read call can create an order-0 folio to read the first 4096 bytes from the disk. But then udev is preempted.

Next, someone tries to mount an 8k-sectorsize filesystem from the same block device. The filesystem calls set_blksize, which sets i_blksize to 8192 and the minimum folio order to 1.

Now udev resumes, still holding the order-0 folio it allocated. It then tries to schedule a read bio and do_mpage_readahead tries to create bufferheads for the folio. Unfortunately, blocks_per_folio == 0 because the page size is 4096 but the blocksize is 8192 so no bufferheads are attached and the bh walk never sets bdev. We then submit the bio with a NULL block device and crash.

Therefore, truncate the page cache after flushing but before updating i_blksize. However, that's not enough -- we also need to lock out file IO and page faults during the update. Take both the i_rwsem and the invalidate_lock in exclusive mode for invalidations, and in shared mode for read/write operations.

I don't know if this is the correct fix, but xfs/259 found it.

---
 block/bdev.c      | 17 +++++++++++++++++
 block/blk-zoned.c |  5 ++++-
 block/fops.c      | 16 ++++++++++++++++
 block/ioctl.c     |  6 ++++++
 4 files changed, 43 insertions(+), 1 deletion(-)
block/bdev.c +17 -0
index 5aebcf437f17c..74f2fe8aa1604 100644
@@ -167,9 +167,26 @@ int set_blocksize(struct file *file, int size)
 
 	/* Don't change the size if it is same as current */
 	if (inode->i_blkbits != blksize_bits(size)) {
+		/*
+		 * Flush and truncate the pagecache before we reconfigure the
+		 * mapping geometry because folio sizes are variable now.  If a
+		 * reader has already allocated a folio whose size is smaller
+		 * than the new min_order but invokes readahead after the new
+		 * min_order becomes visible, readahead will think there are
+		 * "zero" blocks per folio and crash.  Take the inode and
+		 * invalidation locks to avoid racing with
+		 * read/write/fallocate.
+		 */
+		inode_lock(inode);
+		filemap_invalidate_lock(inode->i_mapping);
+
 		sync_blockdev(bdev);
+		kill_bdev(bdev);
+
 		inode->i_blkbits = blksize_bits(size);
 		kill_bdev(bdev);
+		filemap_invalidate_unlock(inode->i_mapping);
+		inode_unlock(inode);
 	}
 	return 0;
 }
block/blk-zoned.c +4 -1
index 0c77244a35c92..8f15d1aa6eb89 100644
@@ -343,6 +343,7 @@ int blkdev_zone_mgmt_ioctl(struct block_device *bdev, blk_mode_t mode,
 		op = REQ_OP_ZONE_RESET;
 
 		/* Invalidate the page cache, including dirty pages. */
+		inode_lock(bdev->bd_mapping->host);
 		filemap_invalidate_lock(bdev->bd_mapping);
 		ret = blkdev_truncate_zone_range(bdev, mode, &zrange);
 		if (ret)
@@ -364,8 +365,10 @@ int blkdev_zone_mgmt_ioctl(struct block_device *bdev, blk_mode_t mode,
 	ret = blkdev_zone_mgmt(bdev, op, zrange.sector, zrange.nr_sectors);
 
 fail:
-	if (cmd == BLKRESETZONE)
+	if (cmd == BLKRESETZONE) {
 		filemap_invalidate_unlock(bdev->bd_mapping);
+		inode_unlock(bdev->bd_mapping->host);
+	}
 
 	return ret;
 }
block/fops.c +16 -0
index d23ddb2dc1138..82b672d15ea4f 100644
@@ -746,7 +746,14 @@ static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
 			ret = direct_write_fallback(iocb, from, ret,
 					blkdev_buffered_write(iocb, from));
 	} else {
+		/*
+		 * Take i_rwsem and invalidate_lock to avoid racing with
+		 * set_blocksize changing i_blkbits/folio order and punching
+		 * out the pagecache.
+		 */
+		inode_lock_shared(bd_inode);
 		ret = blkdev_buffered_write(iocb, from);
+		inode_unlock_shared(bd_inode);
 	}
 
 	if (ret > 0)
@@ -757,6 +764,7 @@ static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
 
 static ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)
 {
+	struct inode *bd_inode = bdev_file_inode(iocb->ki_filp);
 	struct block_device *bdev = I_BDEV(iocb->ki_filp->f_mapping->host);
 	loff_t size = bdev_nr_bytes(bdev);
 	loff_t pos = iocb->ki_pos;
@@ -793,7 +801,13 @@ static ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)
 			goto reexpand;
 	}
 
+	/*
+	 * Take i_rwsem and invalidate_lock to avoid racing with set_blocksize
+	 * changing i_blkbits/folio order and punching out the pagecache.
+	 */
+	inode_lock_shared(bd_inode);
 	ret = filemap_read(iocb, to, ret);
+	inode_unlock_shared(bd_inode);
 
 reexpand:
 	if (unlikely(shorted))
@@ -836,6 +850,7 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start,
 	if ((start | len) & (bdev_logical_block_size(bdev) - 1))
 		return -EINVAL;
 
+	inode_lock(inode);
 	filemap_invalidate_lock(inode->i_mapping);
 
 	/*
@@ -868,6 +883,7 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start,
 
  fail:
 	filemap_invalidate_unlock(inode->i_mapping);
+	inode_unlock(inode);
 	return error;
 }
 
block/ioctl.c +6 -0
index 6554b728bae6a..919066b4bb49c 100644
@@ -141,6 +141,7 @@ static int blk_ioctl_discard(struct block_device *bdev, blk_mode_t mode,
 	if (err)
 		return err;
 
+	inode_lock(bdev->bd_mapping->host);
 	filemap_invalidate_lock(bdev->bd_mapping);
 	err = truncate_bdev_range(bdev, mode, start, start + len - 1);
 	if (err)
@@ -173,6 +174,7 @@ static int blk_ioctl_discard(struct block_device *bdev, blk_mode_t mode,
 	blk_finish_plug(&plug);
 fail:
 	filemap_invalidate_unlock(bdev->bd_mapping);
+	inode_unlock(bdev->bd_mapping->host);
 	return err;
 }
 
@@ -198,12 +200,14 @@ static int blk_ioctl_secure_erase(struct block_device *bdev, blk_mode_t mode,
 	    end > bdev_nr_bytes(bdev))
 		return -EINVAL;
 
+	inode_lock(bdev->bd_mapping->host);
 	filemap_invalidate_lock(bdev->bd_mapping);
 	err = truncate_bdev_range(bdev, mode, start, end - 1);
 	if (!err)
 		err = blkdev_issue_secure_erase(bdev, start >> 9, len >> 9,
 						GFP_KERNEL);
 	filemap_invalidate_unlock(bdev->bd_mapping);
+	inode_unlock(bdev->bd_mapping->host);
 	return err;
 }
 
@@ -235,6 +239,7 @@ static int blk_ioctl_zeroout(struct block_device *bdev, blk_mode_t mode,
 		return -EINVAL;
 
 	/* Invalidate the page cache, including dirty pages */
+	inode_lock(bdev->bd_mapping->host);
 	filemap_invalidate_lock(bdev->bd_mapping);
 	err = truncate_bdev_range(bdev, mode, start, end);
 	if (err)
@@ -245,6 +250,7 @@ static int blk_ioctl_zeroout(struct block_device *bdev, blk_mode_t mode,
 
 fail:
 	filemap_invalidate_unlock(bdev->bd_mapping);
+	inode_unlock(bdev->bd_mapping->host);
 	return err;
 }
 
Signature · 1 line
2.39.5
author maintainer
#41 lore raw

PATCH 40/783 block: hoist block size validation code to a separate function

In reply to Greg Kroah-Hartman

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

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

From: Darrick J. Wong <[email protected]>

[ Upstream commit e03463d247ddac66e71143468373df3d74a3a6bd ]

Hoist the block size validation code to bdev_validate_blocksize so that we can call it from filesystems that don't care about the bdev pagecache manipulations of set_blocksize.

---
 block/bdev.c           | 33 +++++++++++++++++++++++++++------
 include/linux/blkdev.h |  1 +
 2 files changed, 28 insertions(+), 6 deletions(-)
block/bdev.c +27 -6
index 74f2fe8aa1604..9bb7e041bd9ce 100644
@@ -150,18 +150,39 @@ static void set_init_blocksize(struct block_device *bdev)
 	BD_INODE(bdev)->i_blkbits = blksize_bits(bsize);
 }
 
-int set_blocksize(struct file *file, int size)
+/**
+ * bdev_validate_blocksize - check that this block size is acceptable
+ * @bdev:	blockdevice to check
+ * @block_size:	block size to check
+ *
+ * For block device users that do not use buffer heads or the block device
+ * page cache, make sure that this block size can be used with the device.
+ *
+ * Return: On success zero is returned, negative error code on failure.
+ */
+int bdev_validate_blocksize(struct block_device *bdev, int block_size)
 {
-	struct inode *inode = file->f_mapping->host;
-	struct block_device *bdev = I_BDEV(inode);
-
-	if (blk_validate_block_size(size))
+	if (blk_validate_block_size(block_size))
 		return -EINVAL;
 
 	/* Size cannot be smaller than the size supported by the device */
-	if (size < bdev_logical_block_size(bdev))
+	if (block_size < bdev_logical_block_size(bdev))
 		return -EINVAL;
 
+	return 0;
+}
+EXPORT_SYMBOL_GPL(bdev_validate_blocksize);
+
+int set_blocksize(struct file *file, int size)
+{
+	struct inode *inode = file->f_mapping->host;
+	struct block_device *bdev = I_BDEV(inode);
+	int ret;
+
+	ret = bdev_validate_blocksize(bdev, size);
+	if (ret)
+		return ret;
+
 	if (!file->private_data)
 		return -EINVAL;
 
include/linux/blkdev.h +1 -0
index 0fec27d6b986c..844af92bea1e4 100644
@@ -1616,6 +1616,7 @@ static inline void bio_end_io_acct(struct bio *bio, unsigned long start_time)
 	return bio_end_io_acct_remapped(bio, start_time, bio->bi_bdev);
 }
 
+int bdev_validate_blocksize(struct block_device *bdev, int block_size);
 int set_blocksize(struct file *file, int size);
 
 int lookup_bdev(const char *pathname, dev_t *dev);
Signature · 1 line
2.39.5
author maintainer
#42 lore raw

PATCH 41/783 io_uring: dont duplicate flushing in io_req_post_cqe

In reply to Greg Kroah-Hartman

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

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

From: Pavel Begunkov <[email protected]>

[ Upstream commit 5e16f1a68d28965c12b6fa227a306fef8a680f84 ]

io_req_post_cqe() sets submit_state.cq_flush so that *flush_completions() can take care of batch commiting CQEs. Don't commit it twice by using __io_cq_unlock_post().

---
 io_uring/io_uring.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
io_uring/io_uring.c +8 -3
index a60cb9d30cc0d..f1c09e2b53022 100644
@@ -864,10 +864,15 @@ bool io_req_post_cqe(struct io_kiocb *req, s32 res, u32 cflags)
 	lockdep_assert(!io_wq_current_is_worker());
 	lockdep_assert_held(&ctx->uring_lock);
 
-	__io_cq_lock(ctx);
-	posted = io_fill_cqe_aux(ctx, req->cqe.user_data, res, cflags);
+	if (!ctx->lockless_cq) {
+		spin_lock(&ctx->completion_lock);
+		posted = io_fill_cqe_aux(ctx, req->cqe.user_data, res, cflags);
+		spin_unlock(&ctx->completion_lock);
+	} else {
+		posted = io_fill_cqe_aux(ctx, req->cqe.user_data, res, cflags);
+	}
+
 	ctx->submit_state.cq_flush = true;
-	__io_cq_unlock_post(ctx);
 	return posted;
 }
 
Signature · 1 line
2.39.5
author maintainer
#43 lore raw

PATCH 42/783 bpf: fix possible endless loop in BPF map iteration

In reply to Greg Kroah-Hartman

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

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

From: Brandon Kammerdiener <[email protected]>

[ Upstream commit 75673fda0c557ae26078177dd14d4857afbf128d ]

The _safe variant used here gets the next element before running the callback, avoiding the endless loop condition.

---
 kernel/bpf/hashtab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/hashtab.c +1 -1
index c308300fc72f6..c620ffb2b6629 100644
@@ -2224,7 +2224,7 @@ static long bpf_for_each_hash_elem(struct bpf_map *map, bpf_callback_t callback_
 		b = &htab->buckets[i];
 		rcu_read_lock();
 		head = &b->head;
-		hlist_nulls_for_each_entry_rcu(elem, n, head, hash_node) {
+		hlist_nulls_for_each_entry_safe(elem, n, head, hash_node) {
 			key = elem->key;
 			if (is_percpu) {
 				/* current cpu value for percpu map */
Signature · 1 line
2.39.5
author maintainer
#44 lore raw

PATCH 43/783 samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora

In reply to Greg Kroah-Hartman

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

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

From: Haoran Jiang <[email protected]>

[ Upstream commit 548762f05d19c5542db7590bcdfb9be1fb928376 ]

When building the latest samples/bpf on LoongArch Fedora

make M=samples/bpf

There are compilation errors as follows:

In file included from ./linux/samples/bpf/sockex2_kern.c:2:
In file included from ./include/uapi/linux/in.h:25:
In file included from ./include/linux/socket.h:8:
In file included from ./include/linux/uio.h:9:
In file included from ./include/linux/thread_info.h:60:
In file included from ./arch/loongarch/include/asm/thread_info.h:15:
In file included from ./arch/loongarch/include/asm/processor.h:13:
In file included from ./arch/loongarch/include/asm/cpu-info.h:11:
./arch/loongarch/include/asm/loongarch.h:13:10: fatal error: 'larchintrin.h' file not found

         ^~~~~~~~~~~~~~~

1 error generated.

larchintrin.h is included in /usr/lib64/clang/14.0.6/include, and the header file location is specified at compile time.

Test on LoongArch Fedora:
https://github.com/fedora-remix-loongarch/releases-info

---
 samples/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
samples/bpf/Makefile +1 -1
index 5b632635e00dd..95a4fa1f1e447 100644
@@ -376,7 +376,7 @@ $(obj)/%.o: $(src)/%.c
 	@echo "  CLANG-bpf " $@
 	$(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \
 		-I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \
-		-I$(LIBBPF_INCLUDE) \
+		-I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \
 		-D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \
 		-D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \
 		-Wno-gnu-variable-sized-type-not-at-end \
Signature · 1 line
2.39.5
author maintainer
#45 lore raw

PATCH 44/783 kconfig: merge_config: use an empty file as initfile

In reply to Greg Kroah-Hartman

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

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

From: Daniel Gomez <[email protected]>

[ Upstream commit a26fe287eed112b4e21e854f173c8918a6a8596d ]

The scripts/kconfig/merge_config.sh script requires an existing $INITFILE (or the $1 argument) as a base file for merging Kconfig fragments. However, an empty $INITFILE can serve as an initial starting point, later referenced by the KCONFIG_ALLCONFIG Makefile variable if -m is not used. This variable can point to any configuration file containing preset config symbols (the merged output) as stated in Documentation/kbuild/kconfig.rst. When -m is used $INITFILE will contain just the merge output requiring the user to run make (i.e. KCONFIG_ALLCONFIG=<$INITFILE> make <allnoconfig/alldefconfig> or make olddefconfig).

Instead of failing when $INITFILE is missing, create an empty file and use it as the starting point for merges.

---
 scripts/kconfig/merge_config.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/kconfig/merge_config.sh +2 -2
index 0b7952471c18f..79c09b378be81 100755
@@ -112,8 +112,8 @@ INITFILE=$1
 shift;
 
 if [ ! -r "$INITFILE" ]; then
-	echo "The base file '$INITFILE' does not exist.  Exit." >&2
-	exit 1
+	echo "The base file '$INITFILE' does not exist. Creating one..." >&2
+	touch "$INITFILE"
 fi
 
 MERGE_LIST=$*
Signature · 1 line
2.39.5
author maintainer
#18 lore raw

PATCH 18/783 virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN

In reply to Greg Kroah-Hartman

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

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

From: Zhongqiu Han <[email protected]>

[ Upstream commit 2e2f925fe737576df2373931c95e1a2b66efdfef ]

syzbot reports a data-race when accessing the event_triggered, here is the simplified stack when the issue occurred:

==================================================================

BUG: KCSAN: data-race in virtqueue_disable_cb / virtqueue_enable_cb_delayed

write to 0xffff8881025bc452 of 1 bytes by task 3288 on cpu 0:

 virtqueue_enable_cb_delayed+0x42/0x3c0 drivers/virtio/virtio_ring.c:2653
 start_xmit+0x230/0x1310 drivers/net/virtio_net.c:3264
 __netdev_start_xmit include/linux/netdevice.h:5151 [inline]
 netdev_start_xmit include/linux/netdevice.h:5160 [inline]
 xmit_one net/core/dev.c:3800 [inline]

read to 0xffff8881025bc452 of 1 bytes by interrupt on cpu 1:

 virtqueue_disable_cb_split drivers/virtio/virtio_ring.c:880 [inline]
 virtqueue_disable_cb+0x92/0x180 drivers/virtio/virtio_ring.c:2566
 skb_xmit_done+0x5f/0x140 drivers/net/virtio_net.c:777
 vring_interrupt+0x161/0x190 drivers/virtio/virtio_ring.c:2715
 __handle_irq_event_percpu+0x95/0x490 kernel/irq/handle.c:158
 handle_irq_event_percpu kernel/irq/handle.c:193 [inline]

value changed: 0x01 -> 0x00
==================================================================

When the data race occurs, the function virtqueue_enable_cb_delayed() sets event_triggered to false, and virtqueue_disable_cb_split/packed() reads it as false due to the race condition. Since event_triggered is an unreliable hint used for optimization, this should only cause the driver temporarily suggest that the device not send an interrupt notification when the event index is used.

Fix this KCSAN reported data-race issue by explicitly tagging the access as data_racy.

Message-Id: <[email protected]>

---
 drivers/virtio/virtio_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/virtio_ring.c +1 -1
index fdd2d2b07b5a2..b784aab668670 100644
@@ -2650,7 +2650,7 @@ bool virtqueue_enable_cb_delayed(struct virtqueue *_vq)
 	struct vring_virtqueue *vq = to_vvq(_vq);
 
 	if (vq->event_triggered)
-		vq->event_triggered = false;
+		data_race(vq->event_triggered = false);
 
 	return vq->packed_ring ? virtqueue_enable_cb_delayed_packed(_vq) :
 				 virtqueue_enable_cb_delayed_split(_vq);
Signature · 1 line
2.39.5
author maintainer
#46 lore raw

PATCH 45/783 x86/fred: Fix system hang during S4 resume with FRED enabled

In reply to Greg Kroah-Hartman

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

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

From: Xin Li (Intel) <[email protected]>

[ Upstream commit e5f1e8af9c9e151ecd665f6d2e36fb25fec3b110 ]

Upon a wakeup from S4, the restore kernel starts and initializes the FRED MSRs as needed from its perspective. It then loads a hibernation image, including the image kernel, and attempts to load image pages directly into their original page frames used before hibernation unless those frames are currently in use. Once all pages are moved to their original locations, it jumps to a "trampoline" page in the image kernel.

At this point, the image kernel takes control, but the FRED MSRs still contain values set by the restore kernel, which may differ from those set by the image kernel before hibernation. Therefore, the image kernel must ensure the FRED MSRs have the same values as before hibernation. Since these values depend only on the location of the kernel text and data, they can be recomputed from scratch.

---
 arch/x86/power/cpu.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/x86/power/cpu.c +14 -0
index 63230ff8cf4f0..08e76a5ca1553 100644
@@ -27,6 +27,7 @@
 #include <asm/mmu_context.h>
 #include <asm/cpu_device_id.h>
 #include <asm/microcode.h>
+#include <asm/fred.h>
 
 #ifdef CONFIG_X86_32
 __visible unsigned long saved_context_ebx;
@@ -231,6 +232,19 @@ static void notrace __restore_processor_state(struct saved_context *ctxt)
 	 */
 #ifdef CONFIG_X86_64
 	wrmsrl(MSR_GS_BASE, ctxt->kernelmode_gs_base);
+
+	/*
+	 * Reinitialize FRED to ensure the FRED MSRs contain the same values
+	 * as before hibernation.
+	 *
+	 * Note, the setup of FRED RSPs requires access to percpu data
+	 * structures.  Therefore, FRED reinitialization can only occur after
+	 * the percpu access pointer (i.e., MSR_GS_BASE) is restored.
+	 */
+	if (ctxt->cr4 & X86_CR4_FRED) {
+		cpu_init_fred_exceptions();
+		cpu_init_fred_rsps();
+	}
 #else
 	loadsegment(fs, __KERNEL_PERCPU);
 #endif
Signature · 1 line
2.39.5
author maintainer
#47 lore raw

PATCH 46/783 s390/vfio-ap: Fix no AP queue sharing allowed message written to kernel log

In reply to Greg Kroah-Hartman

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

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

From: Anthony Krowiak <[email protected]>

[ Upstream commit d33d729afcc8ad2148d99f9bc499b33fd0c0d73b ]

An erroneous message is written to the kernel log when either of the following actions are taken by a user:

1. Assign an adapter or domain to a vfio_ap mediated device via its sysfs assign_adapter or assign_domain attributes that would result in one or more AP queues being assigned that are already assigned to a different mediated device. Sharing of queues between mdevs is not allowed.

2. Reserve an adapter or domain for the host device driver via the AP bus driver's sysfs apmask or aqmask attribute that would result in providing host access to an AP queue that is in use by a vfio_ap mediated device. Reserving a queue for a host driver that is in use by an mdev is not allowed.

In both cases, the assignment will return an error; however, a message like the following is written to the kernel log:

vfio_ap_mdev e1839397-51a0-4e3c-91e0-c3b9c3d3047d: Userspace may not re-assign queue 00.0028 already assigned to \
e1839397-51a0-4e3c-91e0-c3b9c3d3047d

Notice the mdev reporting the error is the same as the mdev identified in the message as the one to which the queue is being assigned. It is perfectly okay to assign a queue to an mdev to which it is already assigned; the assignment is simply ignored by the vfio_ap device driver.

This patch logs more descriptive and accurate messages for both 1 and 2 above to the kernel log:

Example for 1:
vfio_ap_mdev 0fe903a0-a323-44db-9daf-134c68627d61: Userspace may not assign queue 00.0033 to mdev: already assigned to \
62177883-f1bb-47f0-914d-32a22e3a8804

Example for 2:
vfio_ap_mdev 62177883-f1bb-47f0-914d-32a22e3a8804: Can not reserve queue 00.0033 for host driver: in use by mdev

---
 drivers/s390/crypto/vfio_ap_ops.c | 72 ++++++++++++++++++++-----------
 1 file changed, 46 insertions(+), 26 deletions(-)
drivers/s390/crypto/vfio_ap_ops.c +46 -26
index a52c2690933fd..a6a0628979555 100644
@@ -863,48 +863,66 @@ static void vfio_ap_mdev_remove(struct mdev_device *mdev)
 	vfio_put_device(&matrix_mdev->vdev);
 }
 
-#define MDEV_SHARING_ERR "Userspace may not re-assign queue %02lx.%04lx " \
-			 "already assigned to %s"
+#define MDEV_SHARING_ERR "Userspace may not assign queue %02lx.%04lx to mdev: already assigned to %s"
 
-static void vfio_ap_mdev_log_sharing_err(struct ap_matrix_mdev *matrix_mdev,
-					 unsigned long *apm,
-					 unsigned long *aqm)
+#define MDEV_IN_USE_ERR "Can not reserve queue %02lx.%04lx for host driver: in use by mdev"
+
+static void vfio_ap_mdev_log_sharing_err(struct ap_matrix_mdev *assignee,
+					 struct ap_matrix_mdev *assigned_to,
+					 unsigned long *apm, unsigned long *aqm)
 {
 	unsigned long apid, apqi;
-	const struct device *dev = mdev_dev(matrix_mdev->mdev);
-	const char *mdev_name = dev_name(dev);
 
-	for_each_set_bit_inv(apid, apm, AP_DEVICES)
+	for_each_set_bit_inv(apid, apm, AP_DEVICES) {
+		for_each_set_bit_inv(apqi, aqm, AP_DOMAINS) {
+			dev_warn(mdev_dev(assignee->mdev), MDEV_SHARING_ERR,
+				 apid, apqi, dev_name(mdev_dev(assigned_to->mdev)));
+		}
+	}
+}
+
+static void vfio_ap_mdev_log_in_use_err(struct ap_matrix_mdev *assignee,
+					unsigned long *apm, unsigned long *aqm)
+{
+	unsigned long apid, apqi;
+
+	for_each_set_bit_inv(apid, apm, AP_DEVICES) {
 		for_each_set_bit_inv(apqi, aqm, AP_DOMAINS)
-			dev_warn(dev, MDEV_SHARING_ERR, apid, apqi, mdev_name);
+			dev_warn(mdev_dev(assignee->mdev), MDEV_IN_USE_ERR, apid, apqi);
+	}
 }
 
 /**
  * vfio_ap_mdev_verify_no_sharing - verify APQNs are not shared by matrix mdevs
  *
+ * @assignee: the matrix mdev to which @mdev_apm and @mdev_aqm are being
+ *	      assigned; or, NULL if this function was called by the AP bus
+ *	      driver in_use callback to verify none of the APQNs being reserved
+ *	      for the host device driver are in use by a vfio_ap mediated device
  * @mdev_apm: mask indicating the APIDs of the APQNs to be verified
  * @mdev_aqm: mask indicating the APQIs of the APQNs to be verified
  *
- * Verifies that each APQN derived from the Cartesian product of a bitmap of
- * AP adapter IDs and AP queue indexes is not configured for any matrix
- * mediated device. AP queue sharing is not allowed.
+ * Verifies that each APQN derived from the Cartesian product of APIDs
+ * represented by the bits set in @mdev_apm and the APQIs of the bits set in
+ * @mdev_aqm is not assigned to a mediated device other than the mdev to which
+ * the APQN is being assigned (@assignee). AP queue sharing is not allowed.
  *
  * Return: 0 if the APQNs are not shared; otherwise return -EADDRINUSE.
  */
-static int vfio_ap_mdev_verify_no_sharing(unsigned long *mdev_apm,
+static int vfio_ap_mdev_verify_no_sharing(struct ap_matrix_mdev *assignee,
+					  unsigned long *mdev_apm,
 					  unsigned long *mdev_aqm)
 {
-	struct ap_matrix_mdev *matrix_mdev;
+	struct ap_matrix_mdev *assigned_to;
 	DECLARE_BITMAP(apm, AP_DEVICES);
 	DECLARE_BITMAP(aqm, AP_DOMAINS);
 
-	list_for_each_entry(matrix_mdev, &matrix_dev->mdev_list, node) {
+	list_for_each_entry(assigned_to, &matrix_dev->mdev_list, node) {
 		/*
-		 * If the input apm and aqm are fields of the matrix_mdev
-		 * object, then move on to the next matrix_mdev.
+		 * If the mdev to which the mdev_apm and mdev_aqm is being
+		 * assigned is the same as the mdev being verified
 		 */
-		if (mdev_apm == matrix_mdev->matrix.apm &&
-		    mdev_aqm == matrix_mdev->matrix.aqm)
+		if (assignee == assigned_to)
 			continue;
 
 		memset(apm, 0, sizeof(apm));
@@ -914,15 +932,16 @@ static int vfio_ap_mdev_verify_no_sharing(unsigned long *mdev_apm,
 		 * We work on full longs, as we can only exclude the leftover
 		 * bits in non-inverse order. The leftover is all zeros.
 		 */
-		if (!bitmap_and(apm, mdev_apm, matrix_mdev->matrix.apm,
-				AP_DEVICES))
+		if (!bitmap_and(apm, mdev_apm, assigned_to->matrix.apm,	AP_DEVICES))
 			continue;
 
-		if (!bitmap_and(aqm, mdev_aqm, matrix_mdev->matrix.aqm,
-				AP_DOMAINS))
+		if (!bitmap_and(aqm, mdev_aqm, assigned_to->matrix.aqm,	AP_DOMAINS))
 			continue;
 
-		vfio_ap_mdev_log_sharing_err(matrix_mdev, apm, aqm);
+		if (assignee)
+			vfio_ap_mdev_log_sharing_err(assignee, assigned_to, apm, aqm);
+		else
+			vfio_ap_mdev_log_in_use_err(assigned_to, apm, aqm);
 
 		return -EADDRINUSE;
 	}
@@ -951,7 +970,8 @@ static int vfio_ap_mdev_validate_masks(struct ap_matrix_mdev *matrix_mdev)
 					       matrix_mdev->matrix.aqm))
 		return -EADDRNOTAVAIL;
 
-	return vfio_ap_mdev_verify_no_sharing(matrix_mdev->matrix.apm,
+	return vfio_ap_mdev_verify_no_sharing(matrix_mdev,
+					      matrix_mdev->matrix.apm,
 					      matrix_mdev->matrix.aqm);
 }
 
@@ -2458,7 +2478,7 @@ int vfio_ap_mdev_resource_in_use(unsigned long *apm, unsigned long *aqm)
 
 	mutex_lock(&matrix_dev->guests_lock);
 	mutex_lock(&matrix_dev->mdevs_lock);
-	ret = vfio_ap_mdev_verify_no_sharing(apm, aqm);
+	ret = vfio_ap_mdev_verify_no_sharing(NULL, apm, aqm);
 	mutex_unlock(&matrix_dev->mdevs_lock);
 	mutex_unlock(&matrix_dev->guests_lock);
 
Signature · 1 line
2.39.5
author maintainer
#48 lore raw

PATCH 47/783 cifs: Add fallback for SMB2 CREATE without FILE_READ_ATTRIBUTES

In reply to Greg Kroah-Hartman

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

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

From: Pali Rohár <[email protected]>

[ Upstream commit e255612b5ed9f179abe8196df7c2ba09dd227900 ]

Some operations, like WRITE, does not require FILE_READ_ATTRIBUTES access.

So when FILE_READ_ATTRIBUTES is not explicitly requested for smb2_open_file() then first try to do SMB2 CREATE with FILE_READ_ATTRIBUTES access (like it was before) and then fallback to SMB2 CREATE without FILE_READ_ATTRIBUTES access (less common case).

This change allows to complete WRITE operation to a file when it does not grant FILE_READ_ATTRIBUTES permission and its parent directory does not grant READ_DATA permission (parent directory READ_DATA is implicit grant of child FILE_READ_ATTRIBUTES permission).

---
 fs/smb/client/smb2file.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
fs/smb/client/smb2file.c +10 -1
index d609a20fb98a9..2d726e9b950cf 100644
@@ -152,16 +152,25 @@ int smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms, __u32
 	int err_buftype = CIFS_NO_BUFFER;
 	struct cifs_fid *fid = oparms->fid;
 	struct network_resiliency_req nr_ioctl_req;
+	bool retry_without_read_attributes = false;
 
 	smb2_path = cifs_convert_path_to_utf16(oparms->path, oparms->cifs_sb);
 	if (smb2_path == NULL)
 		return -ENOMEM;
 
-	oparms->desired_access |= FILE_READ_ATTRIBUTES;
+	if (!(oparms->desired_access & FILE_READ_ATTRIBUTES)) {
+		oparms->desired_access |= FILE_READ_ATTRIBUTES;
+		retry_without_read_attributes = true;
+	}
 	smb2_oplock = SMB2_OPLOCK_LEVEL_BATCH;
 
 	rc = SMB2_open(xid, oparms, smb2_path, &smb2_oplock, smb2_data, NULL, &err_iov,
 		       &err_buftype);
+	if (rc == -EACCES && retry_without_read_attributes) {
+		oparms->desired_access &= ~FILE_READ_ATTRIBUTES;
+		rc = SMB2_open(xid, oparms, smb2_path, &smb2_oplock, smb2_data, NULL, &err_iov,
+			       &err_buftype);
+	}
 	if (rc && data) {
 		struct smb2_hdr *hdr = err_iov.iov_base;
 
Signature · 1 line
2.39.5
author maintainer
#19 lore raw

PATCH 19/783 dma/mapping.c: dev_dbg support for dma_addressing_limited

In reply to Greg Kroah-Hartman

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

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

From: Balbir Singh <[email protected]>

[ Upstream commit 2042c352e21d19eaf5f9e22fb6afce72293ef28c ]

In the debug and resolution of an issue involving forced use of bounce buffers, 7170130e4c72 ("x86/mm/init: Handle the special case of device private pages in add_pages(), to not increase max_pfn and trigger dma_addressing_limited() bounce buffers"). It would have been easier to debug the issue if dma_addressing_limited() had debug information about the device not being able to address all of memory and thus forcing all accesses through a bounce buffer. Please see[2]

Implement dev_dbg to debug the potential use of bounce buffers when we hit the condition. When swiotlb is used, dma_addressing_limited() is used to determine the size of maximum dma buffer size in dma_direct_max_mapping_size(). The debug prints could be triggered in that check as well (when enabled).

Cc Marek Szyprowski <[email protected]>
Cc Robin Murphy <[email protected]>
Cc "Christian König" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Kees Cook <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Alex Deucher <[email protected]>
Cc Bert Karwatzki <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 kernel/dma/mapping.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
kernel/dma/mapping.c +10 -1
index cda127027e48a..67da08fa67237 100644
@@ -918,7 +918,7 @@ EXPORT_SYMBOL(dma_set_coherent_mask);
  * the system, else %false.  Lack of addressing bits is the prime reason for
  * bounce buffering, but might not be the only one.
  */
-bool dma_addressing_limited(struct device *dev)
+static bool __dma_addressing_limited(struct device *dev)
 {
 	const struct dma_map_ops *ops = get_dma_ops(dev);
 
@@ -930,6 +930,15 @@ bool dma_addressing_limited(struct device *dev)
 		return false;
 	return !dma_direct_all_ram_mapped(dev);
 }
+
+bool dma_addressing_limited(struct device *dev)
+{
+	if (!__dma_addressing_limited(dev))
+		return false;
+
+	dev_dbg(dev, "device is DMA addressing limited\n");
+	return true;
+}
 EXPORT_SYMBOL_GPL(dma_addressing_limited);
 
 size_t dma_max_mapping_size(struct device *dev)
Signature · 1 line
2.39.5
author maintainer
#20 lore raw

PATCH 20/783 intel_th: avoid using deprecated page->mapping, index fields

In reply to Greg Kroah-Hartman

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

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

From: Lorenzo Stoakes <[email protected]>

[ Upstream commit 8e553520596bbd5ce832e26e9d721e6a0c797b8b ]

The struct page->mapping, index fields are deprecated and soon to be only available as part of a folio.

It is likely the intel_th code which sets page->mapping, index is was implemented out of concern that some aspect of the page fault logic may encounter unexpected problems should they not.

However, the appropriate interface for inserting kernel-allocated memory is vm_insert_page() in a VM_MIXEDMAP. By using the helper function vmf_insert_mixed() we can do this with minimal churn in the existing fault handler.

By doing so, we bypass the remainder of the faulting logic. The pages are still pinned so there is no possibility of anything unexpected being done with the pages once established.

It would also be reasonable to pre-map everything on fault, however to minimise churn we retain the fault handler.

We also eliminate all code which clears page->mapping on teardown as this has now become unnecessary.

The MSU code relies on faulting to function correctly, so is by definition dependent on CONFIG_MMU. We avoid spurious reports about compilation failure for unsupported platforms by making this requirement explicit in Kconfig as part of this change too.

---
 drivers/hwtracing/intel_th/Kconfig |  1 +
 drivers/hwtracing/intel_th/msu.c   | 31 +++++++-----------------------
 2 files changed, 8 insertions(+), 24 deletions(-)
drivers/hwtracing/intel_th/Kconfig +1 -0
index 4b6359326ede9..4f7d2b6d79e29 100644
@@ -60,6 +60,7 @@ config INTEL_TH_STH
 
 config INTEL_TH_MSU
 	tristate "Intel(R) Trace Hub Memory Storage Unit"
+	depends on MMU
 	help
 	  Memory Storage Unit (MSU) trace output device enables
 	  storing STP traces to system memory. It supports single
drivers/hwtracing/intel_th/msu.c +7 -24
index bf99d79a41920..7163950eb3719 100644
@@ -19,6 +19,7 @@
 #include <linux/io.h>
 #include <linux/workqueue.h>
 #include <linux/dma-mapping.h>
+#include <linux/pfn_t.h>
 
 #ifdef CONFIG_X86
 #include <asm/set_memory.h>
@@ -976,7 +977,6 @@ static void msc_buffer_contig_free(struct msc *msc)
 	for (off = 0; off < msc->nr_pages << PAGE_SHIFT; off += PAGE_SIZE) {
 		struct page *page = virt_to_page(msc->base + off);
 
-		page->mapping = NULL;
 		__free_page(page);
 	}
 
@@ -1158,9 +1158,6 @@ static void __msc_buffer_win_free(struct msc *msc, struct msc_window *win)
 	int i;
 
 	for_each_sg(win->sgt->sgl, sg, win->nr_segs, i) {
-		struct page *page = msc_sg_page(sg);
-
-		page->mapping = NULL;
 		dma_free_coherent(msc_dev(win->msc)->parent->parent, PAGE_SIZE,
 				  sg_virt(sg), sg_dma_address(sg));
 	}
@@ -1601,22 +1598,10 @@ static void msc_mmap_close(struct vm_area_struct *vma)
 {
 	struct msc_iter *iter = vma->vm_file->private_data;
 	struct msc *msc = iter->msc;
-	unsigned long pg;
 
 	if (!atomic_dec_and_mutex_lock(&msc->mmap_count, &msc->buf_mutex))
 		return;
 
-	/* drop page _refcounts */
-	for (pg = 0; pg < msc->nr_pages; pg++) {
-		struct page *page = msc_buffer_get_page(msc, pg);
-
-		if (WARN_ON_ONCE(!page))
-			continue;
-
-		if (page->mapping)
-			page->mapping = NULL;
-	}
-
 	/* last mapping -- drop user_count */
 	atomic_dec(&msc->user_count);
 	mutex_unlock(&msc->buf_mutex);
@@ -1626,16 +1611,14 @@ static vm_fault_t msc_mmap_fault(struct vm_fault *vmf)
 {
 	struct msc_iter *iter = vmf->vma->vm_file->private_data;
 	struct msc *msc = iter->msc;
+	struct page *page;
 
-	vmf->page = msc_buffer_get_page(msc, vmf->pgoff);
-	if (!vmf->page)
+	page = msc_buffer_get_page(msc, vmf->pgoff);
+	if (!page)
 		return VM_FAULT_SIGBUS;
 
-	get_page(vmf->page);
-	vmf->page->mapping = vmf->vma->vm_file->f_mapping;
-	vmf->page->index = vmf->pgoff;
-
-	return 0;
+	get_page(page);
+	return vmf_insert_mixed(vmf->vma, vmf->address, page_to_pfn_t(page));
 }
 
 static const struct vm_operations_struct msc_mmap_ops = {
@@ -1676,7 +1659,7 @@ static int intel_th_msc_mmap(struct file *file, struct vm_area_struct *vma)
 		atomic_dec(&msc->user_count);
 
 	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-	vm_flags_set(vma, VM_DONTEXPAND | VM_DONTCOPY);
+	vm_flags_set(vma, VM_DONTEXPAND | VM_DONTCOPY | VM_MIXEDMAP);
 	vma->vm_ops = &msc_mmap_ops;
 	return ret;
 }
Signature · 1 line
2.39.5
author maintainer
#21 lore raw

PATCH 21/783 mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type

In reply to Greg Kroah-Hartman

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

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

From: Hans de Goede <[email protected]>

[ Upstream commit f88c0c72ffb014e5eba676ee337c4eb3b1d6a119 ]

vsc_tp.tx_buf and vsc_tp.rx_buf point to a struct vsc_tp_packet, use the correct type instead of "void *" and use sizeof(*ptr) when allocating memory for these buffers.

---
 drivers/misc/mei/vsc-tp.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/misc/mei/vsc-tp.c +7 -7
index fa553d4914b6e..da26a080916c5 100644
@@ -71,8 +71,8 @@ struct vsc_tp {
 	u32 seq;
 
 	/* command buffer */
-	void *tx_buf;
-	void *rx_buf;
+	struct vsc_tp_packet *tx_buf;
+	struct vsc_tp_packet *rx_buf;
 
 	atomic_t assert_cnt;
 	wait_queue_head_t xfer_wait;
@@ -164,7 +164,7 @@ static int vsc_tp_xfer_helper(struct vsc_tp *tp, struct vsc_tp_packet *pkt,
 {
 	int ret, offset = 0, cpy_len, src_len, dst_len = sizeof(struct vsc_tp_packet_hdr);
 	int next_xfer_len = VSC_TP_PACKET_SIZE(pkt) + VSC_TP_XFER_TIMEOUT_BYTES;
-	u8 *src, *crc_src, *rx_buf = tp->rx_buf;
+	u8 *src, *crc_src, *rx_buf = (u8 *)tp->rx_buf;
 	int count_down = VSC_TP_MAX_XFER_COUNT;
 	u32 recv_crc = 0, crc = ~0;
 	struct vsc_tp_packet_hdr ack;
@@ -324,7 +324,7 @@ int vsc_tp_rom_xfer(struct vsc_tp *tp, const void *obuf, void *ibuf, size_t len)
 	guard(mutex)(&tp->mutex);
 
 	/* rom xfer is big endian */
-	cpu_to_be32_array(tp->tx_buf, obuf, words);
+	cpu_to_be32_array((u32 *)tp->tx_buf, obuf, words);
 
 	ret = read_poll_timeout(gpiod_get_value_cansleep, ret,
 				!ret, VSC_TP_ROM_XFER_POLL_DELAY_US,
@@ -340,7 +340,7 @@ int vsc_tp_rom_xfer(struct vsc_tp *tp, const void *obuf, void *ibuf, size_t len)
 		return ret;
 
 	if (ibuf)
-		be32_to_cpu_array(ibuf, tp->rx_buf, words);
+		be32_to_cpu_array(ibuf, (u32 *)tp->rx_buf, words);
 
 	return ret;
 }
@@ -494,11 +494,11 @@ static int vsc_tp_probe(struct spi_device *spi)
 	if (!tp)
 		return -ENOMEM;
 
-	tp->tx_buf = devm_kzalloc(dev, VSC_TP_MAX_XFER_SIZE, GFP_KERNEL);
+	tp->tx_buf = devm_kzalloc(dev, sizeof(*tp->tx_buf), GFP_KERNEL);
 	if (!tp->tx_buf)
 		return -ENOMEM;
 
-	tp->rx_buf = devm_kzalloc(dev, VSC_TP_MAX_XFER_SIZE, GFP_KERNEL);
+	tp->rx_buf = devm_kzalloc(dev, sizeof(*tp->rx_buf), GFP_KERNEL);
 	if (!tp->rx_buf)
 		return -ENOMEM;
 
Signature · 1 line
2.39.5
author maintainer
#22 lore raw

PATCH 22/783 dma-mapping: avoid potential unused data compilation warning

In reply to Greg Kroah-Hartman

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

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

From: Marek Szyprowski <[email protected]>

[ Upstream commit c9b19ea63036fc537a69265acea1b18dabd1cbd3 ]

When CONFIG_NEED_DMA_MAP_STATE is not defined, dma-mapping clients might report unused data compilation warnings for dma_unmap_*() calls arguments. Redefine macros for those calls to let compiler to notice that it is okay when the provided arguments are not used.

---
 include/linux/dma-mapping.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
include/linux/dma-mapping.h +8 -4
index b79925b1c4333..85ab710ec0e72 100644
@@ -629,10 +629,14 @@ static inline int dma_mmap_wc(struct device *dev,
 #else
 #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME)
 #define DEFINE_DMA_UNMAP_LEN(LEN_NAME)
-#define dma_unmap_addr(PTR, ADDR_NAME)           (0)
-#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL)  do { } while (0)
-#define dma_unmap_len(PTR, LEN_NAME)             (0)
-#define dma_unmap_len_set(PTR, LEN_NAME, VAL)    do { } while (0)
+#define dma_unmap_addr(PTR, ADDR_NAME)           \
+	({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL)  \
+	do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
+#define dma_unmap_len(PTR, LEN_NAME)             \
+	({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_len_set(PTR, LEN_NAME, VAL)    \
+	do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
 #endif
 
 #endif /* _LINUX_DMA_MAPPING_H */
Signature · 1 line
2.39.5
author maintainer
#23 lore raw

PATCH 23/783 btrfs: tree-checker: adjust error code for header level check

In reply to Greg Kroah-Hartman

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

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

From: David Sterba <[email protected]>

[ Upstream commit f1ab0171e9be96fd530329fa54761cff5e09ea95 ]

The whole tree checker returns EUCLEAN, except the one check in btrfs_verify_level_key(). This was inherited from the function that was moved from disk-io.c in 2cac5af16537 ("btrfs: move btrfs_verify_level_key into tree-checker.c") but this should be unified with the rest.

---
 fs/btrfs/tree-checker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/tree-checker.c +1 -1
index 43979891f7c89..2b66a6130269a 100644
@@ -2235,7 +2235,7 @@ int btrfs_verify_level_key(struct extent_buffer *eb,
 		btrfs_err(fs_info,
 "tree level mismatch detected, bytenr=%llu level expected=%u has=%u",
 			  eb->start, check->level, found_level);
-		return -EIO;
+		return -EUCLEAN;
 	}
 
 	if (!check->has_first_key)
Signature · 1 line
2.39.5
author maintainer
#24 lore raw

PATCH 24/783 cgroup: Fix compilation issue due to cgroup_mutex not being exported

In reply to Greg Kroah-Hartman

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

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

From: gaoxu <[email protected]>

[ Upstream commit 87c259a7a359e73e6c52c68fcbec79988999b4e6 ]

When adding folio_memcg function call in the zram module for Android16-6.12, the following error occurs during compilation:
ERROR: modpost: "cgroup_mutex" [../soc-repo/zram.ko] undefined!

This error is caused by the indirect call to lockdep_is_held(&cgroup_mutex) within folio_memcg. The export setting for cgroup_mutex is controlled by the CONFIG_PROVE_RCU macro. If CONFIG_LOCKDEP is enabled while CONFIG_PROVE_RCU is not, this compilation error will occur.

To resolve this issue, add a parallel macro CONFIG_LOCKDEP control to ensure cgroup_mutex is properly exported when needed.

---
 kernel/cgroup/cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/cgroup/cgroup.c +1 -1
index 68d58753c75c3..660d27a0cb3d4 100644
@@ -90,7 +90,7 @@
 DEFINE_MUTEX(cgroup_mutex);
 DEFINE_SPINLOCK(css_set_lock);
 
-#ifdef CONFIG_PROVE_RCU
+#if (defined CONFIG_PROVE_RCU || defined CONFIG_LOCKDEP)
 EXPORT_SYMBOL_GPL(cgroup_mutex);
 EXPORT_SYMBOL_GPL(css_set_lock);
 #endif
Signature · 1 line
2.39.5
author maintainer
#15 lore raw

PATCH 15/783 nvmem: qfprom: switch to 4-byte aligned reads

In reply to Greg Kroah-Hartman

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

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit 3566a737db87a9bf360c2fd36433c5149f805f2e ]

All platforms since Snapdragon 8 Gen1 (SM8450) require using 4-byte reads to access QFPROM data. While older platforms were more than happy with 1-byte reads, change the qfprom driver to use 4-byte reads for all the platforms. Specify stride and word size of 4 bytes. To retain compatibility with the existing DT and to simplify porting data from vendor kernels, use fixup_dt_cell_info in order to bump alignment requirements.

---
 drivers/nvmem/qfprom.c | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)
drivers/nvmem/qfprom.c +20 -6
index 116a39e804c70..a872c640b8c5a 100644
@@ -321,19 +321,32 @@ static int qfprom_reg_read(void *context,
 			unsigned int reg, void *_val, size_t bytes)
 {
 	struct qfprom_priv *priv = context;
-	u8 *val = _val;
-	int i = 0, words = bytes;
+	u32 *val = _val;
 	void __iomem *base = priv->qfpcorrected;
+	int words = DIV_ROUND_UP(bytes, sizeof(u32));
+	int i;
 
 	if (read_raw_data && priv->qfpraw)
 		base = priv->qfpraw;
 
-	while (words--)
-		*val++ = readb(base + reg + i++);
+	for (i = 0; i < words; i++)
+		*val++ = readl(base + reg + i * sizeof(u32));
 
 	return 0;
 }
 
+/* Align reads to word boundary */
+static void qfprom_fixup_dt_cell_info(struct nvmem_device *nvmem,
+				      struct nvmem_cell_info *cell)
+{
+	unsigned int byte_offset = cell->offset % sizeof(u32);
+
+	cell->bit_offset += byte_offset * BITS_PER_BYTE;
+	cell->offset -= byte_offset;
+	if (byte_offset && !cell->nbits)
+		cell->nbits = cell->bytes * BITS_PER_BYTE;
+}
+
 static void qfprom_runtime_disable(void *data)
 {
 	pm_runtime_disable(data);
@@ -358,10 +371,11 @@ static int qfprom_probe(struct platform_device *pdev)
 	struct nvmem_config econfig = {
 		.name = "qfprom",
 		.add_legacy_fixed_of_cells = true,
-		.stride = 1,
-		.word_size = 1,
+		.stride = 4,
+		.word_size = 4,
 		.id = NVMEM_DEVID_AUTO,
 		.reg_read = qfprom_reg_read,
+		.fixup_dt_cell_info = qfprom_fixup_dt_cell_info,
 	};
 	struct device *dev = &pdev->dev;
 	struct resource *res;
Signature · 1 line
2.39.5
author maintainer
#50 lore raw

PATCH 49/783 cifs: Fix access_flags_to_smbopen_mode

In reply to Greg Kroah-Hartman

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

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

From: Pali Rohár <[email protected]>

[ Upstream commit 6aa9f1c9cd09c1c39a35da4fe5f43446ec18ce1e ]

When converting access_flags to SMBOPEN mode, check for all possible access flags, not only GENERIC_READ and GENERIC_WRITE flags.

---
 fs/smb/client/cifssmb.c | 32 ++++++++++++++++++++++++--------
 1 file changed, 24 insertions(+), 8 deletions(-)
fs/smb/client/cifssmb.c +24 -8
index 4fc9485c5d91a..c2abe79f0dd3b 100644
@@ -1038,15 +1038,31 @@ static __u16 convert_disposition(int disposition)
 static int
 access_flags_to_smbopen_mode(const int access_flags)
 {
-	int masked_flags = access_flags & (GENERIC_READ | GENERIC_WRITE);
-
-	if (masked_flags == GENERIC_READ)
-		return SMBOPEN_READ;
-	else if (masked_flags == GENERIC_WRITE)
+	/*
+	 * SYSTEM_SECURITY grants both read and write access to SACL, treat is as read/write.
+	 * MAXIMUM_ALLOWED grants as many access as possible, so treat it as read/write too.
+	 * SYNCHRONIZE as is does not grant any specific access, so do not check its mask.
+	 * If only SYNCHRONIZE bit is specified then fallback to read access.
+	 */
+	bool with_write_flags = access_flags & (FILE_WRITE_DATA | FILE_APPEND_DATA | FILE_WRITE_EA |
+						FILE_DELETE_CHILD | FILE_WRITE_ATTRIBUTES | DELETE |
+						WRITE_DAC | WRITE_OWNER | SYSTEM_SECURITY |
+						MAXIMUM_ALLOWED | GENERIC_WRITE | GENERIC_ALL);
+	bool with_read_flags = access_flags & (FILE_READ_DATA | FILE_READ_EA | FILE_EXECUTE |
+						FILE_READ_ATTRIBUTES | READ_CONTROL |
+						SYSTEM_SECURITY | MAXIMUM_ALLOWED | GENERIC_ALL |
+						GENERIC_EXECUTE | GENERIC_READ);
+	bool with_execute_flags = access_flags & (FILE_EXECUTE | MAXIMUM_ALLOWED | GENERIC_ALL |
+						GENERIC_EXECUTE);
+
+	if (with_write_flags && with_read_flags)
+		return SMBOPEN_READWRITE;
+	else if (with_write_flags)
 		return SMBOPEN_WRITE;
-
-	/* just go for read/write */
-	return SMBOPEN_READWRITE;
+	else if (with_execute_flags)
+		return SMBOPEN_EXECUTE;
+	else
+		return SMBOPEN_READ;
 }
 
 int
Signature · 1 line
2.39.5
author maintainer
#59 lore raw

PATCH 58/783 arm64: Add support for HIP09 Spectre-BHB mitigation

In reply to Greg Kroah-Hartman

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

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

From: Jinqian Yang <[email protected]>

[ Upstream commit e18c09b204e81702ea63b9f1a81ab003b72e3174 ]

The HIP09 processor is vulnerable to the Spectre-BHB (Branch History Buffer) attack, which can be exploited to leak information through branch prediction side channels. This commit adds the MIDR of HIP09 to the list for software mitigation.

---
 arch/arm64/include/asm/cputype.h | 2 ++
 arch/arm64/kernel/proton-pack.c  | 1 +
 2 files changed, 3 insertions(+)
arch/arm64/include/asm/cputype.h +2 -0
index 8c6bd9da3b1ba..3381fdc081ad2 100644
@@ -133,6 +133,7 @@
 #define FUJITSU_CPU_PART_A64FX		0x001
 
 #define HISI_CPU_PART_TSV110		0xD01
+#define HISI_CPU_PART_HIP09			0xD02
 
 #define APPLE_CPU_PART_M1_ICESTORM	0x022
 #define APPLE_CPU_PART_M1_FIRESTORM	0x023
@@ -210,6 +211,7 @@
 #define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL)
 #define MIDR_FUJITSU_A64FX MIDR_CPU_MODEL(ARM_CPU_IMP_FUJITSU, FUJITSU_CPU_PART_A64FX)
 #define MIDR_HISI_TSV110 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV110)
+#define MIDR_HISI_HIP09 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_HIP09)
 #define MIDR_APPLE_M1_ICESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM)
 #define MIDR_APPLE_M1_FIRESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM)
 #define MIDR_APPLE_M1_ICESTORM_PRO MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_PRO)
arch/arm64/kernel/proton-pack.c +1 -0
index 8ef3335ecff72..31eaf15d2079a 100644
@@ -904,6 +904,7 @@ static u8 spectre_bhb_loop_affected(void)
 		MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
 		MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
 		MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD),
+		MIDR_ALL_VERSIONS(MIDR_HISI_HIP09),
 		{},
 	};
 	static const struct midr_range spectre_bhb_k11_list[] = {
Signature · 1 line
2.39.5
author maintainer
#60 lore raw

PATCH 59/783 iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability

In reply to Greg Kroah-Hartman

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

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

From: Yi Liu <[email protected]>

[ Upstream commit 803f97298e7de9242eb677a1351dcafbbcc9117e ]

PASID usage requires PASID support in both device and IOMMU. Since the iommu drivers always enable the PASID capability for the device if it is supported, this extends the IOMMU_GET_HW_INFO to report the PASID capability to userspace. Also, enhances the selftest accordingly.

---
 drivers/iommu/iommufd/device.c | 34 +++++++++++++++++++++++++++++++++-
 drivers/pci/ats.c              | 33 +++++++++++++++++++++++++++++++++
 include/linux/pci-ats.h        |  3 +++
 include/uapi/linux/iommufd.h   | 14 +++++++++++++-
 4 files changed, 82 insertions(+), 2 deletions(-)
drivers/iommu/iommufd/device.c +33 -1
index 3c7800d4ab622..66a6b7466820d 100644
@@ -3,6 +3,7 @@
  */
 #include <linux/iommu.h>
 #include <linux/iommufd.h>
+#include <linux/pci-ats.h>
 #include <linux/slab.h>
 #include <uapi/linux/iommufd.h>
 
@@ -1304,7 +1305,8 @@ int iommufd_get_hw_info(struct iommufd_ucmd *ucmd)
 	void *data;
 	int rc;
 
-	if (cmd->flags || cmd->__reserved)
+	if (cmd->flags || cmd->__reserved[0] || cmd->__reserved[1] ||
+	    cmd->__reserved[2])
 		return -EOPNOTSUPP;
 
 	idev = iommufd_get_device(ucmd, cmd->dev_id);
@@ -1361,6 +1363,36 @@ int iommufd_get_hw_info(struct iommufd_ucmd *ucmd)
 	if (device_iommu_capable(idev->dev, IOMMU_CAP_DIRTY_TRACKING))
 		cmd->out_capabilities |= IOMMU_HW_CAP_DIRTY_TRACKING;
 
+	cmd->out_max_pasid_log2 = 0;
+	/*
+	 * Currently, all iommu drivers enable PASID in the probe_device()
+	 * op if iommu and device supports it. So the max_pasids stored in
+	 * dev->iommu indicates both PASID support and enable status. A
+	 * non-zero dev->iommu->max_pasids means PASID is supported and
+	 * enabled. The iommufd only reports PASID capability to userspace
+	 * if it's enabled.
+	 */
+	if (idev->dev->iommu->max_pasids) {
+		cmd->out_max_pasid_log2 = ilog2(idev->dev->iommu->max_pasids);
+
+		if (dev_is_pci(idev->dev)) {
+			struct pci_dev *pdev = to_pci_dev(idev->dev);
+			int ctrl;
+
+			ctrl = pci_pasid_status(pdev);
+
+			WARN_ON_ONCE(ctrl < 0 ||
+				     !(ctrl & PCI_PASID_CTRL_ENABLE));
+
+			if (ctrl & PCI_PASID_CTRL_EXEC)
+				cmd->out_capabilities |=
+						IOMMU_HW_CAP_PCI_PASID_EXEC;
+			if (ctrl & PCI_PASID_CTRL_PRIV)
+				cmd->out_capabilities |=
+						IOMMU_HW_CAP_PCI_PASID_PRIV;
+		}
+	}
+
 	rc = iommufd_ucmd_respond(ucmd, sizeof(*cmd));
 out_free:
 	kfree(data);
drivers/pci/ats.c +33 -0
index c6b266c772c81..ec6c8dbdc5e9c 100644
@@ -538,4 +538,37 @@ int pci_max_pasids(struct pci_dev *pdev)
 	return (1 << FIELD_GET(PCI_PASID_CAP_WIDTH, supported));
 }
 EXPORT_SYMBOL_GPL(pci_max_pasids);
+
+/**
+ * pci_pasid_status - Check the PASID status
+ * @pdev: PCI device structure
+ *
+ * Returns a negative value when no PASID capability is present.
+ * Otherwise the value of the control register is returned.
+ * Status reported are:
+ *
+ * PCI_PASID_CTRL_ENABLE - PASID enabled
+ * PCI_PASID_CTRL_EXEC - Execute permission enabled
+ * PCI_PASID_CTRL_PRIV - Privileged mode enabled
+ */
+int pci_pasid_status(struct pci_dev *pdev)
+{
+	int pasid;
+	u16 ctrl;
+
+	if (pdev->is_virtfn)
+		pdev = pci_physfn(pdev);
+
+	pasid = pdev->pasid_cap;
+	if (!pasid)
+		return -EINVAL;
+
+	pci_read_config_word(pdev, pasid + PCI_PASID_CTRL, &ctrl);
+
+	ctrl &= PCI_PASID_CTRL_ENABLE | PCI_PASID_CTRL_EXEC |
+		PCI_PASID_CTRL_PRIV;
+
+	return ctrl;
+}
+EXPORT_SYMBOL_GPL(pci_pasid_status);
 #endif /* CONFIG_PCI_PASID */
include/linux/pci-ats.h +3 -0
index 0e8b74e63767a..75c6c86cf09dc 100644
@@ -42,6 +42,7 @@ int pci_enable_pasid(struct pci_dev *pdev, int features);
 void pci_disable_pasid(struct pci_dev *pdev);
 int pci_pasid_features(struct pci_dev *pdev);
 int pci_max_pasids(struct pci_dev *pdev);
+int pci_pasid_status(struct pci_dev *pdev);
 #else /* CONFIG_PCI_PASID */
 static inline int pci_enable_pasid(struct pci_dev *pdev, int features)
 { return -EINVAL; }
@@ -50,6 +51,8 @@ static inline int pci_pasid_features(struct pci_dev *pdev)
 { return -EINVAL; }
 static inline int pci_max_pasids(struct pci_dev *pdev)
 { return -EINVAL; }
+static inline int pci_pasid_status(struct pci_dev *pdev)
+{ return -EINVAL; }
 #endif /* CONFIG_PCI_PASID */
 
 #endif /* LINUX_PCI_ATS_H */
include/uapi/linux/iommufd.h +13 -1
index 78747b24bd0fb..9495604e40b06 100644
@@ -608,9 +608,17 @@ enum iommu_hw_info_type {
  *                                   IOMMU_HWPT_GET_DIRTY_BITMAP
  *                                   IOMMU_HWPT_SET_DIRTY_TRACKING
  *
+ * @IOMMU_HW_CAP_PCI_PASID_EXEC: Execute Permission Supported, user ignores it
+ *                               when the struct
+ *                               iommu_hw_info::out_max_pasid_log2 is zero.
+ * @IOMMU_HW_CAP_PCI_PASID_PRIV: Privileged Mode Supported, user ignores it
+ *                               when the struct
+ *                               iommu_hw_info::out_max_pasid_log2 is zero.
  */
 enum iommufd_hw_capabilities {
 	IOMMU_HW_CAP_DIRTY_TRACKING = 1 << 0,
+	IOMMU_HW_CAP_PCI_PASID_EXEC = 1 << 1,
+	IOMMU_HW_CAP_PCI_PASID_PRIV = 1 << 2,
 };
 
 /**
@@ -626,6 +634,9 @@ enum iommufd_hw_capabilities {
  *                 iommu_hw_info_type.
  * @out_capabilities: Output the generic iommu capability info type as defined
  *                    in the enum iommu_hw_capabilities.
+ * @out_max_pasid_log2: Output the width of PASIDs. 0 means no PASID support.
+ *                      PCI devices turn to out_capabilities to check if the
+ *                      specific capabilities is supported or not.
  * @__reserved: Must be 0
  *
  * Query an iommu type specific hardware information data from an iommu behind
@@ -649,7 +660,8 @@ struct iommu_hw_info {
 	__u32 data_len;
 	__aligned_u64 data_uptr;
 	__u32 out_data_type;
-	__u32 __reserved;
+	__u8 out_max_pasid_log2;
+	__u8 __reserved[3];
 	__aligned_u64 out_capabilities;
 };
 #define IOMMU_GET_HW_INFO _IO(IOMMUFD_TYPE, IOMMUFD_CMD_GET_HW_INFO)
Signature · 1 line
2.39.5
author maintainer
#61 lore raw

PATCH 60/783 ring-buffer: Use kaslr address instead of text delta

In reply to Greg Kroah-Hartman

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

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

From: Steven Rostedt <[email protected]>

[ Upstream commit bcba8d4dbe6880ce9883409df486de35d3946704 ]

Instead of saving off the text and data pointers and using them to compare with the current boot's text and data pointers, just save off the KASLR offset. Then that can be used to figure out how to read the previous boots buffer.

The last_boot_info will now show this offset, but only if it is for a previous boot:

~# cat instances/boot_mapped/last_boot_info
39000000 [kernel]

~# echo function > instances/boot_mapped/current_tracer ~# cat instances/boot_mapped/last_boot_info
# Current

If the KASLR offset saved is for the current boot, the last_boot_info will show the value of "current".

---
 include/linux/ring_buffer.h |  3 +--
 kernel/trace/ring_buffer.c  | 31 ++++++++++++-------------------
 kernel/trace/trace.c        | 30 +++++++++++++++++++++---------
 kernel/trace/trace.h        |  9 +++++----
 4 files changed, 39 insertions(+), 34 deletions(-)
include/linux/ring_buffer.h +1 -2
index 17fbb78552952..8de035f4f0d9a 100644
@@ -94,8 +94,7 @@ struct trace_buffer *__ring_buffer_alloc_range(unsigned long size, unsigned flag
 					       unsigned long range_size,
 					       struct lock_class_key *key);
 
-bool ring_buffer_last_boot_delta(struct trace_buffer *buffer, long *text,
-				 long *data);
+bool ring_buffer_last_boot_delta(struct trace_buffer *buffer, unsigned long *kaslr_addr);
 
 /*
  * Because the ring buffer is generic, if other users of the ring buffer get
kernel/trace/ring_buffer.c +12 -19
index f76bee67a792c..9b1db04c74e25 100644
@@ -31,6 +31,7 @@
 
 #include <asm/local64.h>
 #include <asm/local.h>
+#include <asm/setup.h>
 
 #include "trace.h"
 
@@ -49,8 +50,7 @@ static void update_pages_handler(struct work_struct *work);
 struct ring_buffer_meta {
 	int		magic;
 	int		struct_size;
-	unsigned long	text_addr;
-	unsigned long	data_addr;
+	unsigned long	kaslr_addr;
 	unsigned long	first_buffer;
 	unsigned long	head_buffer;
 	unsigned long	commit_buffer;
@@ -550,8 +550,7 @@ struct trace_buffer {
 	unsigned long			range_addr_start;
 	unsigned long			range_addr_end;
 
-	long				last_text_delta;
-	long				last_data_delta;
+	unsigned long			kaslr_addr;
 
 	unsigned int			subbuf_size;
 	unsigned int			subbuf_order;
@@ -1893,16 +1892,13 @@ static void rb_meta_validate_events(struct ring_buffer_per_cpu *cpu_buffer)
 	}
 }
 
-/* Used to calculate data delta */
-static char rb_data_ptr[] = "";
-
-#define THIS_TEXT_PTR		((unsigned long)rb_meta_init_text_addr)
-#define THIS_DATA_PTR		((unsigned long)rb_data_ptr)
-
 static void rb_meta_init_text_addr(struct ring_buffer_meta *meta)
 {
-	meta->text_addr = THIS_TEXT_PTR;
-	meta->data_addr = THIS_DATA_PTR;
+#ifdef CONFIG_RANDOMIZE_BASE
+	meta->kaslr_addr = kaslr_offset();
+#else
+	meta->kaslr_addr = 0;
+#endif
 }
 
 static void rb_range_meta_init(struct trace_buffer *buffer, int nr_pages)
@@ -1930,8 +1926,7 @@ static void rb_range_meta_init(struct trace_buffer *buffer, int nr_pages)
 			meta->first_buffer += delta;
 			meta->head_buffer += delta;
 			meta->commit_buffer += delta;
-			buffer->last_text_delta = THIS_TEXT_PTR - meta->text_addr;
-			buffer->last_data_delta = THIS_DATA_PTR - meta->data_addr;
+			buffer->kaslr_addr = meta->kaslr_addr;
 			continue;
 		}
 
@@ -2484,17 +2479,15 @@ struct trace_buffer *__ring_buffer_alloc_range(unsigned long size, unsigned flag
  *
  * Returns: The true if the delta is non zero
  */
-bool ring_buffer_last_boot_delta(struct trace_buffer *buffer, long *text,
-				 long *data)
+bool ring_buffer_last_boot_delta(struct trace_buffer *buffer, unsigned long *kaslr_addr)
 {
 	if (!buffer)
 		return false;
 
-	if (!buffer->last_text_delta)
+	if (!buffer->kaslr_addr)
 		return false;
 
-	*text = buffer->last_text_delta;
-	*data = buffer->last_data_delta;
+	*kaslr_addr = buffer->kaslr_addr;
 
 	return true;
 }
kernel/trace/trace.c +21 -9
index 814626bb410b2..c3f1365ec9609 100644
@@ -50,7 +50,7 @@
 #include <linux/irq_work.h>
 #include <linux/workqueue.h>
 
-#include <asm/setup.h> /* COMMAND_LINE_SIZE */
+#include <asm/setup.h> /* COMMAND_LINE_SIZE and kaslr_offset() */
 
 #include "trace.h"
 #include "trace_output.h"
@@ -4193,7 +4193,7 @@ static enum print_line_t print_trace_fmt(struct trace_iterator *iter)
 		 * safe to use if the array has delta offsets
 		 * Force printing via the fields.
 		 */
-		if ((tr->text_delta || tr->data_delta) &&
+		if ((tr->text_delta) &&
 		    event->type > __TRACE_LAST_TYPE)
 			return print_event_fields(iter, event);
 
@@ -5990,7 +5990,7 @@ ssize_t tracing_resize_ring_buffer(struct trace_array *tr,
 
 static void update_last_data(struct trace_array *tr)
 {
-	if (!tr->text_delta && !tr->data_delta)
+	if (!(tr->flags & TRACE_ARRAY_FL_LAST_BOOT))
 		return;
 
 	/*
@@ -6003,7 +6003,8 @@ static void update_last_data(struct trace_array *tr)
 
 	/* Using current data now */
 	tr->text_delta = 0;
-	tr->data_delta = 0;
+
+	tr->flags &= ~TRACE_ARRAY_FL_LAST_BOOT;
 }
 
 /**
@@ -6822,8 +6823,17 @@ tracing_last_boot_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t
 
 	seq_buf_init(&seq, buf, 64);
 
-	seq_buf_printf(&seq, "text delta:\t%ld\n", tr->text_delta);
-	seq_buf_printf(&seq, "data delta:\t%ld\n", tr->data_delta);
+	/*
+	 * Do not leak KASLR address. This only shows the KASLR address of
+	 * the last boot. When the ring buffer is started, the LAST_BOOT
+	 * flag gets cleared, and this should only report "current".
+	 * Otherwise it shows the KASLR address from the previous boot which
+	 * should not be the same as the current boot.
+	 */
+	if (tr->flags & TRACE_ARRAY_FL_LAST_BOOT)
+		seq_buf_printf(&seq, "%lx\t[kernel]\n", tr->kaslr_addr);
+	else
+		seq_buf_puts(&seq, "# Current\n");
 
 	return simple_read_from_buffer(ubuf, cnt, ppos, buf, seq_buf_used(&seq));
 }
@@ -9211,8 +9221,10 @@ allocate_trace_buffer(struct trace_array *tr, struct array_buffer *buf, int size
 						      tr->range_addr_start,
 						      tr->range_addr_size);
 
-		ring_buffer_last_boot_delta(buf->buffer,
-					    &tr->text_delta, &tr->data_delta);
+#ifdef CONFIG_RANDOMIZE_BASE
+		if (ring_buffer_last_boot_delta(buf->buffer, &tr->kaslr_addr))
+			tr->text_delta = kaslr_offset() - tr->kaslr_addr;
+#endif
 		/*
 		 * This is basically the same as a mapped buffer,
 		 * with the same restrictions.
@@ -10470,7 +10482,7 @@ __init static void enable_instances(void)
 		 * to it.
 		 */
 		if (start) {
-			tr->flags |= TRACE_ARRAY_FL_BOOT;
+			tr->flags |= TRACE_ARRAY_FL_BOOT | TRACE_ARRAY_FL_LAST_BOOT;
 			tr->ref++;
 		}
 
kernel/trace/trace.h +5 -4
index 9c21ba45b7af6..abe8169c3e879 100644
@@ -348,8 +348,8 @@ struct trace_array {
 	unsigned int		mapped;
 	unsigned long		range_addr_start;
 	unsigned long		range_addr_size;
+	unsigned long		kaslr_addr;
 	long			text_delta;
-	long			data_delta;
 
 	struct trace_pid_list	__rcu *filtered_pids;
 	struct trace_pid_list	__rcu *filtered_no_pids;
@@ -433,9 +433,10 @@ struct trace_array {
 };
 
 enum {
-	TRACE_ARRAY_FL_GLOBAL	= BIT(0),
-	TRACE_ARRAY_FL_BOOT	= BIT(1),
-	TRACE_ARRAY_FL_MOD_INIT	= BIT(2),
+	TRACE_ARRAY_FL_GLOBAL		= BIT(0),
+	TRACE_ARRAY_FL_BOOT		= BIT(1),
+	TRACE_ARRAY_FL_LAST_BOOT	= BIT(2),
+	TRACE_ARRAY_FL_MOD_INIT		= BIT(3),
 };
 
 #ifdef CONFIG_MODULES
Signature · 1 line
2.39.5
author maintainer
#62 lore raw

PATCH 61/783 tracing: Mark binary printing functions with __printf() attribute

In reply to Greg Kroah-Hartman

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

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

From: Andy Shevchenko <[email protected]>

[ Upstream commit 196a062641fe68d9bfe0ad36b6cd7628c99ad22c ]

Binary printing functions are using printf() type of format, and compiler is not happy about them as is:

kernel/trace/trace.c:3292:9: error: function ‘trace_vbprintk’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] kernel/trace/trace_seq.c:182:9: error: function ‘trace_seq_bprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]

Fix the compilation errors by adding __printf() attribute.

While at it, move existing __printf() attributes from the implementations to the declarations. IT also fixes incorrect attribute parameters that are used for trace_array_printk().

---
 include/linux/trace.h     |  4 ++--
 include/linux/trace_seq.h |  8 ++++----
 kernel/trace/trace.c      | 11 +++--------
 kernel/trace/trace.h      | 16 +++++++++-------
 4 files changed, 18 insertions(+), 21 deletions(-)
include/linux/trace.h +2 -2
index fdcd76b7be83d..7eaad857dee04 100644
@@ -72,8 +72,8 @@ static inline int unregister_ftrace_export(struct trace_export *export)
 static inline void trace_printk_init_buffers(void)
 {
 }
-static inline int trace_array_printk(struct trace_array *tr, unsigned long ip,
-				     const char *fmt, ...)
+static inline __printf(3, 4)
+int trace_array_printk(struct trace_array *tr, unsigned long ip, const char *fmt, ...)
 {
 	return 0;
 }
include/linux/trace_seq.h +4 -4
index 1ef95c0287f05..a93ed5ac32265 100644
@@ -88,8 +88,8 @@ extern __printf(2, 3)
 void trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
 extern __printf(2, 0)
 void trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
-extern void
-trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
+extern __printf(2, 0)
+void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
 extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);
 extern int trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
 			     int cnt);
@@ -113,8 +113,8 @@ static inline __printf(2, 3)
 void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
 {
 }
-static inline void
-trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
+static inline __printf(2, 0)
+void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
 {
 }
 
kernel/trace/trace.c +3 -8
index c3f1365ec9609..b1738563bdc3b 100644
@@ -3322,10 +3322,9 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
 }
 EXPORT_SYMBOL_GPL(trace_vbprintk);
 
-__printf(3, 0)
-static int
-__trace_array_vprintk(struct trace_buffer *buffer,
-		      unsigned long ip, const char *fmt, va_list args)
+static __printf(3, 0)
+int __trace_array_vprintk(struct trace_buffer *buffer,
+			  unsigned long ip, const char *fmt, va_list args)
 {
 	struct ring_buffer_event *event;
 	int len = 0, size;
@@ -3375,7 +3374,6 @@ __trace_array_vprintk(struct trace_buffer *buffer,
 	return len;
 }
 
-__printf(3, 0)
 int trace_array_vprintk(struct trace_array *tr,
 			unsigned long ip, const char *fmt, va_list args)
 {
@@ -3405,7 +3403,6 @@ int trace_array_vprintk(struct trace_array *tr,
  * Note, trace_array_init_printk() must be called on @tr before this
  * can be used.
  */
-__printf(3, 0)
 int trace_array_printk(struct trace_array *tr,
 		       unsigned long ip, const char *fmt, ...)
 {
@@ -3450,7 +3447,6 @@ int trace_array_init_printk(struct trace_array *tr)
 }
 EXPORT_SYMBOL_GPL(trace_array_init_printk);
 
-__printf(3, 4)
 int trace_array_printk_buf(struct trace_buffer *buffer,
 			   unsigned long ip, const char *fmt, ...)
 {
@@ -3466,7 +3462,6 @@ int trace_array_printk_buf(struct trace_buffer *buffer,
 	return ret;
 }
 
-__printf(2, 0)
 int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
 {
 	return trace_array_vprintk(printk_trace, ip, fmt, args);
kernel/trace/trace.h +9 -7
index abe8169c3e879..ccf3874823f5f 100644
@@ -837,13 +837,15 @@ static inline void __init disable_tracing_selftest(const char *reason)
 
 extern void *head_page(struct trace_array_cpu *data);
 extern unsigned long long ns2usecs(u64 nsec);
-extern int
-trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
-extern int
-trace_vprintk(unsigned long ip, const char *fmt, va_list args);
-extern int
-trace_array_vprintk(struct trace_array *tr,
-		    unsigned long ip, const char *fmt, va_list args);
+
+__printf(2, 0)
+int trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
+__printf(2, 0)
+int trace_vprintk(unsigned long ip, const char *fmt, va_list args);
+__printf(3, 0)
+int trace_array_vprintk(struct trace_array *tr,
+			unsigned long ip, const char *fmt, va_list args);
+__printf(3, 4)
 int trace_array_printk_buf(struct trace_buffer *buffer,
 			   unsigned long ip, const char *fmt, ...);
 void trace_printk_seq(struct trace_seq *s);
Signature · 1 line
2.39.5
author maintainer
#63 lore raw

PATCH 62/783 ACPI: PNP: Add Intel OC Watchdog IDs to non-PNP device list

In reply to Greg Kroah-Hartman

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

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

From: Diogo Ivo <[email protected]>

[ Upstream commit f06777cf2bbc21dd8c71d6e3906934e56b4e18e4 ]

Intel Over-Clocking Watchdogs are described in ACPI tables by both the generic PNP0C02 _CID and their ACPI _HID. The presence of the _CID then causes the PNP scan handler to attach to the watchdog, preventing the actual watchdog driver from binding. Address this by adding the ACPI _HIDs to the list of non-PNP devices, so that the PNP scan handler is bypassed.

Note that these watchdogs can be described by multiple _HIDs for what seems to be identical hardware. This commit is not a complete list of all the possible watchdog ACPI _HIDs.

---
 drivers/acpi/acpi_pnp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/acpi_pnp.c +2 -0
index 01abf26764b00..3f5a1840f5733 100644
@@ -355,8 +355,10 @@ static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matc
  * device represented by it.
  */
 static const struct acpi_device_id acpi_nonpnp_device_ids[] = {
+	{"INT3F0D"},
 	{"INTC1080"},
 	{"INTC1081"},
+	{"INTC1099"},
 	{""},
 };
 
Signature · 1 line
2.39.5
author maintainer
#64 lore raw

PATCH 63/783 tpm: Convert warn to dbg in tpm2_start_auth_session()

In reply to Greg Kroah-Hartman

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

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

From: Jonathan McDowell <[email protected]>

[ Upstream commit 6359691b4fbcaf3ed86f53043a1f7c6cc54c09be ]

TPM2 sessions have been flushed lazily since commit df745e25098dc ("tpm:
Lazily flush the auth session"). If /dev/tpm{rm}0 is not accessed in-between two in-kernel calls, it is possible that a TPM2 session is re-started before the previous one has been completed.

This causes a spurios warning in a legit run-time condition, which is also correctly addressed with a fast return path:

[    2.944047] tpm tpm0: auth session is active

Address the issue by changing dev_warn_once() call to a dev_dbg_once() call.

[jarkko: Rewrote the commit message, and instead of dropping converted
to a debug message.]

---
 drivers/char/tpm/tpm2-sessions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm2-sessions.c +1 -1
index a894dbc40e43b..7b5049b3d476e 100644
@@ -974,7 +974,7 @@ int tpm2_start_auth_session(struct tpm_chip *chip)
 	int rc;
 
 	if (chip->auth) {
-		dev_warn_once(&chip->dev, "auth session is active\n");
+		dev_dbg_once(&chip->dev, "auth session is active\n");
 		return 0;
 	}
 
Signature · 1 line
2.39.5
author maintainer
#65 lore raw

PATCH 64/783 mailbox: pcc: Use acpi_os_ioremap() instead of ioremap()

In reply to Greg Kroah-Hartman

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

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

From: Sudeep Holla <[email protected]>

[ Upstream commit d181acea5b864e91f38f5771b8961215ce5017ae ]

The Platform Communication Channel (PCC) mailbox driver currently uses ioremap() to map channel shared memory regions. However it is preferred to use acpi_os_ioremap(), which is mapping function specific to EFI/ACPI defined memory regions. It ensures that the correct memory attributes are applied when mapping ACPI-provided regions.

While at it, also add checks for handling any errors with the mapping.

---
 drivers/mailbox/pcc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/mailbox/pcc.c +6 -2
index f8215a8f656a4..49254d99a8ad6 100644
@@ -419,8 +419,12 @@ int pcc_mbox_ioremap(struct mbox_chan *chan)
 		return -1;
 	pchan_info = chan->con_priv;
 	pcc_mbox_chan = &pchan_info->chan;
-	pcc_mbox_chan->shmem = ioremap(pcc_mbox_chan->shmem_base_addr,
-				       pcc_mbox_chan->shmem_size);
+
+	pcc_mbox_chan->shmem = acpi_os_ioremap(pcc_mbox_chan->shmem_base_addr,
+					       pcc_mbox_chan->shmem_size);
+	if (!pcc_mbox_chan->shmem)
+		return -ENXIO;
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(pcc_mbox_ioremap);
Signature · 1 line
2.39.5
author maintainer
#66 lore raw

PATCH 65/783 mailbox: use error ret code of of_parse_phandle_with_args()

In reply to Greg Kroah-Hartman

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

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

From: Tudor Ambarus <[email protected]>

[ Upstream commit 24fdd5074b205cfb0ef4cd0751a2d03031455929 ]

In case of error, of_parse_phandle_with_args() returns -EINVAL when the passed index is negative, or -ENOENT when the index is for an empty phandle. The mailbox core overwrote the error return code with a less precise -ENODEV. Use the error returned code from of_parse_phandle_with_args().

---
 drivers/mailbox/mailbox.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/mailbox/mailbox.c +4 -3
index d3d26a2c98956..cb174e788a96c 100644
@@ -415,11 +415,12 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
 
 	mutex_lock(&con_mutex);
 
-	if (of_parse_phandle_with_args(dev->of_node, "mboxes",
-				       "#mbox-cells", index, &spec)) {
+	ret = of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells",
+					 index, &spec);
+	if (ret) {
 		dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
 		mutex_unlock(&con_mutex);
-		return ERR_PTR(-ENODEV);
+		return ERR_PTR(ret);
 	}
 
 	chan = ERR_PTR(-EPROBE_DEFER);
Signature · 1 line
2.39.5
author maintainer
#67 lore raw

PATCH 66/783 riscv: Allow NOMMU kernels to access all of RAM

In reply to Greg Kroah-Hartman

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

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

From: Samuel Holland <[email protected]>

[ Upstream commit 2c0391b29b27f315c1b4c29ffde66f50b29fab99 ]

NOMMU kernels currently cannot access memory below the kernel link address. Remove this restriction by setting PAGE_OFFSET to the actual start of RAM, as determined from the devicetree. The kernel link address must be a constant, so keep using CONFIG_PAGE_OFFSET for that purpose.

---
 arch/riscv/include/asm/page.h    | 12 ++++--------
 arch/riscv/include/asm/pgtable.h |  2 +-
 2 files changed, 5 insertions(+), 9 deletions(-)
arch/riscv/include/asm/page.h +4 -8
index 125f5ecd95652..6409fd78ae6fa 100644
@@ -24,12 +24,9 @@
  * When not using MMU this corresponds to the first free page in
  * physical memory (aligned on a page boundary).
  */
-#ifdef CONFIG_64BIT
 #ifdef CONFIG_MMU
+#ifdef CONFIG_64BIT
 #define PAGE_OFFSET		kernel_map.page_offset
-#else
-#define PAGE_OFFSET		_AC(CONFIG_PAGE_OFFSET, UL)
-#endif
 /*
  * By default, CONFIG_PAGE_OFFSET value corresponds to SV57 address space so
  * define the PAGE_OFFSET value for SV48 and SV39.
@@ -39,6 +36,9 @@
 #else
 #define PAGE_OFFSET		_AC(CONFIG_PAGE_OFFSET, UL)
 #endif /* CONFIG_64BIT */
+#else
+#define PAGE_OFFSET		((unsigned long)phys_ram_base)
+#endif /* CONFIG_MMU */
 
 #ifndef __ASSEMBLY__
 
@@ -95,11 +95,7 @@ typedef struct page *pgtable_t;
 #define MIN_MEMBLOCK_ADDR      0
 #endif
 
-#ifdef CONFIG_MMU
 #define ARCH_PFN_OFFSET		(PFN_DOWN((unsigned long)phys_ram_base))
-#else
-#define ARCH_PFN_OFFSET		(PAGE_OFFSET >> PAGE_SHIFT)
-#endif /* CONFIG_MMU */
 
 struct kernel_mapping {
 	unsigned long page_offset;
arch/riscv/include/asm/pgtable.h +1 -1
index 050fdc49b5ad7..eb7b25ef556ec 100644
@@ -12,7 +12,7 @@
 #include <asm/pgtable-bits.h>
 
 #ifndef CONFIG_MMU
-#define KERNEL_LINK_ADDR	PAGE_OFFSET
+#define KERNEL_LINK_ADDR	_AC(CONFIG_PAGE_OFFSET, UL)
 #define KERN_VIRT_SIZE		(UL(-1))
 #else
 
Signature · 1 line
2.39.5
author maintainer
#68 lore raw

PATCH 67/783 fbdev: fsl-diu-fb: add missing device_remove_file()

In reply to Greg Kroah-Hartman

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

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

From: Shixiong Ou <[email protected]>

[ Upstream commit 86d16cd12efa547ed43d16ba7a782c1251c80ea8 ]

Call device_remove_file() when driver remove.

---
 drivers/video/fbdev/fsl-diu-fb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/fbdev/fsl-diu-fb.c +1 -0
index 5ac8201c35337..b71d15794ce8b 100644
@@ -1827,6 +1827,7 @@ static void fsl_diu_remove(struct platform_device *pdev)
 	int i;
 
 	data = dev_get_drvdata(&pdev->dev);
+	device_remove_file(&pdev->dev, &data->dev_attr);
 	disable_lcdc(&data->fsl_diu_info[0]);
 
 	free_irq(data->irq, data->diu_reg);
Signature · 1 line
2.39.5
author maintainer
#51 lore raw

PATCH 50/783 cifs: Fix negotiate retry functionality

In reply to Greg Kroah-Hartman

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

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

From: Pali Rohár <[email protected]>

[ Upstream commit e94e882a6d69525c07589222cf3a6ff57ad12b5b ]

SMB negotiate retry functionality in cifs_negotiate() is currently broken and does not work when doing socket reconnect. Caller of this function, which is cifs_negotiate_protocol() requires that tcpStatus after successful execution of negotiate callback stay in CifsInNegotiate. But if the CIFSSMBNegotiate() called from cifs_negotiate() fails due to connection issues then tcpStatus is changed as so repeated CIFSSMBNegotiate() call does not help.

Fix this problem by moving retrying code from negotiate callback (which is either cifs_negotiate() or smb2_negotiate()) to cifs_negotiate_protocol() which is caller of those callbacks. This allows to properly handle and implement correct transistions between tcpStatus states as function cifs_negotiate_protocol() already handles it.

With this change, cifs_negotiate_protocol() now handles also -EAGAIN error set by the RFC1002_NEGATIVE_SESSION_RESPONSE processing after reconnecting with NetBIOS session.

---
 fs/smb/client/connect.c | 10 ++++++++++
 fs/smb/client/smb1ops.c |  7 -------
 fs/smb/client/smb2ops.c |  3 ---
 3 files changed, 10 insertions(+), 10 deletions(-)
fs/smb/client/connect.c +10 -0
index cc9c912db8def..92685fc675b59 100644
@@ -3922,11 +3922,13 @@ int
 cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses,
 			struct TCP_Server_Info *server)
 {
+	bool in_retry = false;
 	int rc = 0;
 
 	if (!server->ops->need_neg || !server->ops->negotiate)
 		return -ENOSYS;
 
+retry:
 	/* only send once per connect */
 	spin_lock(&server->srv_lock);
 	if (server->tcpStatus != CifsGood &&
@@ -3946,6 +3948,14 @@ cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses,
 	spin_unlock(&server->srv_lock);
 
 	rc = server->ops->negotiate(xid, ses, server);
+	if (rc == -EAGAIN) {
+		/* Allow one retry attempt */
+		if (!in_retry) {
+			in_retry = true;
+			goto retry;
+		}
+		rc = -EHOSTDOWN;
+	}
 	if (rc == 0) {
 		spin_lock(&server->srv_lock);
 		if (server->tcpStatus == CifsInNegotiate)
fs/smb/client/smb1ops.c +0 -7
index 808970e4a7142..e28cdaca47e12 100644
@@ -426,13 +426,6 @@ cifs_negotiate(const unsigned int xid,
 {
 	int rc;
 	rc = CIFSSMBNegotiate(xid, ses, server);
-	if (rc == -EAGAIN) {
-		/* retry only once on 1st time connection */
-		set_credits(server, 1);
-		rc = CIFSSMBNegotiate(xid, ses, server);
-		if (rc == -EAGAIN)
-			rc = -EHOSTDOWN;
-	}
 	return rc;
 }
 
fs/smb/client/smb2ops.c +0 -3
index 7aeac8dd9a1d1..6f89e087629fe 100644
@@ -464,9 +464,6 @@ smb2_negotiate(const unsigned int xid,
 	server->CurrentMid = 0;
 	spin_unlock(&server->mid_lock);
 	rc = SMB2_negotiate(xid, ses, server);
-	/* BB we probably don't need to retry with modern servers */
-	if (rc == -EAGAIN)
-		rc = -EHOSTDOWN;
 	return rc;
 }
 
Signature · 1 line
2.39.5
author maintainer
#69 lore raw

PATCH 68/783 fbcon: Use correct erase colour for clearing in fbcon

In reply to Greg Kroah-Hartman

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

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

From: Zsolt Kajtar <[email protected]>

[ Upstream commit 892c788d73fe4a94337ed092cb998c49fa8ecaf4 ]

The erase colour calculation for fbcon clearing should use get_color instead of attr_col_ec, like everything else. The latter is similar but is not correct. For example it's missing the depth dependent remapping and doesn't care about blanking.

The problem can be reproduced by setting up the background colour to grey (vt.color=0x70) and having an fbcon console set to 2bpp (4 shades of gray). Now the background attribute should be 1 (dark gray) on the console.

If the screen is scrolled when pressing enter in a shell prompt at the bottom line then the new line is cleared using colour 7 instead of 1. That's not something fillrect likes (at 2bbp it expect 0-3) so the result is interesting.

This patch switches to get_color with vc_video_erase_char to determine the erase colour from attr_col_ec. That makes the latter function redundant as no other users were left.

Use correct erase colour for clearing in fbcon

---
 drivers/video/fbdev/core/bitblit.c   |  5 ++--
 drivers/video/fbdev/core/fbcon.c     | 10 +++++---
 drivers/video/fbdev/core/fbcon.h     | 38 +---------------------------
 drivers/video/fbdev/core/fbcon_ccw.c |  5 ++--
 drivers/video/fbdev/core/fbcon_cw.c  |  5 ++--
 drivers/video/fbdev/core/fbcon_ud.c  |  5 ++--
 drivers/video/fbdev/core/tileblit.c  |  8 +++---
 7 files changed, 18 insertions(+), 58 deletions(-)
drivers/video/fbdev/core/bitblit.c +2 -3
index 3ff1b2a8659e8..f9475c14f7339 100644
@@ -59,12 +59,11 @@ static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy,
 }
 
 static void bit_clear(struct vc_data *vc, struct fb_info *info, int sy,
-		      int sx, int height, int width)
+		      int sx, int height, int width, int fg, int bg)
 {
-	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	struct fb_fillrect region;
 
-	region.color = attr_bgcol_ec(bgshift, vc, info);
+	region.color = bg;
 	region.dx = sx * vc->vc_font.width;
 	region.dy = sy * vc->vc_font.height;
 	region.width = width * vc->vc_font.width;
drivers/video/fbdev/core/fbcon.c +6 -4
index e8b4e8c119b5c..07d127110ca4c 100644
@@ -1258,7 +1258,7 @@ static void __fbcon_clear(struct vc_data *vc, unsigned int sy, unsigned int sx,
 {
 	struct fb_info *info = fbcon_info_from_console(vc->vc_num);
 	struct fbcon_ops *ops = info->fbcon_par;
-
+	int fg, bg;
 	struct fbcon_display *p = &fb_display[vc->vc_num];
 	u_int y_break;
 
@@ -1279,16 +1279,18 @@ static void __fbcon_clear(struct vc_data *vc, unsigned int sy, unsigned int sx,
 		fbcon_clear_margins(vc, 0);
 	}
 
+	fg = get_color(vc, info, vc->vc_video_erase_char, 1);
+	bg = get_color(vc, info, vc->vc_video_erase_char, 0);
 	/* Split blits that cross physical y_wrap boundary */
 
 	y_break = p->vrows - p->yscroll;
 	if (sy < y_break && sy + height - 1 >= y_break) {
 		u_int b = y_break - sy;
-		ops->clear(vc, info, real_y(p, sy), sx, b, width);
+		ops->clear(vc, info, real_y(p, sy), sx, b, width, fg, bg);
 		ops->clear(vc, info, real_y(p, sy + b), sx, height - b,
-				 width);
+				 width, fg, bg);
 	} else
-		ops->clear(vc, info, real_y(p, sy), sx, height, width);
+		ops->clear(vc, info, real_y(p, sy), sx, height, width, fg, bg);
 }
 
 static void fbcon_clear(struct vc_data *vc, unsigned int sy, unsigned int sx,
drivers/video/fbdev/core/fbcon.h +1 -37
index df70ea5ec5b37..4d97e6d8a16a2 100644
@@ -55,7 +55,7 @@ struct fbcon_ops {
 	void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy,
 		      int sx, int dy, int dx, int height, int width);
 	void (*clear)(struct vc_data *vc, struct fb_info *info, int sy,
-		      int sx, int height, int width);
+		      int sx, int height, int width, int fb, int bg);
 	void (*putcs)(struct vc_data *vc, struct fb_info *info,
 		      const unsigned short *s, int count, int yy, int xx,
 		      int fg, int bg);
@@ -116,42 +116,6 @@ static inline int mono_col(const struct fb_info *info)
 	return (~(0xfff << max_len)) & 0xff;
 }
 
-static inline int attr_col_ec(int shift, struct vc_data *vc,
-			      struct fb_info *info, int is_fg)
-{
-	int is_mono01;
-	int col;
-	int fg;
-	int bg;
-
-	if (!vc)
-		return 0;
-
-	if (vc->vc_can_do_color)
-		return is_fg ? attr_fgcol(shift,vc->vc_video_erase_char)
-			: attr_bgcol(shift,vc->vc_video_erase_char);
-
-	if (!info)
-		return 0;
-
-	col = mono_col(info);
-	is_mono01 = info->fix.visual == FB_VISUAL_MONO01;
-
-	if (attr_reverse(vc->vc_video_erase_char)) {
-		fg = is_mono01 ? col : 0;
-		bg = is_mono01 ? 0 : col;
-	}
-	else {
-		fg = is_mono01 ? 0 : col;
-		bg = is_mono01 ? col : 0;
-	}
-
-	return is_fg ? fg : bg;
-}
-
-#define attr_bgcol_ec(bgshift, vc, info) attr_col_ec(bgshift, vc, info, 0)
-#define attr_fgcol_ec(fgshift, vc, info) attr_col_ec(fgshift, vc, info, 1)
-
     /*
      *  Scroll Method
      */
drivers/video/fbdev/core/fbcon_ccw.c +2 -3
index f9b794ff7d396..89ef4ba7e8672 100644
@@ -78,14 +78,13 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
 }
 
 static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy,
-		     int sx, int height, int width)
+		     int sx, int height, int width, int fg, int bg)
 {
 	struct fbcon_ops *ops = info->fbcon_par;
 	struct fb_fillrect region;
-	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	u32 vyres = GETVYRES(ops->p, info);
 
-	region.color = attr_bgcol_ec(bgshift,vc,info);
+	region.color = bg;
 	region.dx = sy * vc->vc_font.height;
 	region.dy = vyres - ((sx + width) * vc->vc_font.width);
 	region.height = width * vc->vc_font.width;
drivers/video/fbdev/core/fbcon_cw.c +2 -3
index 903f6fc174e14..b9dac7940fb77 100644
@@ -63,14 +63,13 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
 }
 
 static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy,
-		     int sx, int height, int width)
+		     int sx, int height, int width, int fg, int bg)
 {
 	struct fbcon_ops *ops = info->fbcon_par;
 	struct fb_fillrect region;
-	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	u32 vxres = GETVXRES(ops->p, info);
 
-	region.color = attr_bgcol_ec(bgshift,vc,info);
+	region.color = bg;
 	region.dx = vxres - ((sy + height) * vc->vc_font.height);
 	region.dy = sx *  vc->vc_font.width;
 	region.height = width * vc->vc_font.width;
drivers/video/fbdev/core/fbcon_ud.c +2 -3
index 594331936fd3c..0af7913a2abdc 100644
@@ -64,15 +64,14 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy,
 }
 
 static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy,
-		     int sx, int height, int width)
+		     int sx, int height, int width, int fg, int bg)
 {
 	struct fbcon_ops *ops = info->fbcon_par;
 	struct fb_fillrect region;
-	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	u32 vyres = GETVYRES(ops->p, info);
 	u32 vxres = GETVXRES(ops->p, info);
 
-	region.color = attr_bgcol_ec(bgshift,vc,info);
+	region.color = bg;
 	region.dy = vyres - ((sy + height) * vc->vc_font.height);
 	region.dx = vxres - ((sx + width) *  vc->vc_font.width);
 	region.width = width * vc->vc_font.width;
drivers/video/fbdev/core/tileblit.c +3 -5
index eff7ec4da1671..45b0828fad1cf 100644
@@ -32,16 +32,14 @@ static void tile_bmove(struct vc_data *vc, struct fb_info *info, int sy,
 }
 
 static void tile_clear(struct vc_data *vc, struct fb_info *info, int sy,
-		       int sx, int height, int width)
+		       int sx, int height, int width, int fg, int bg)
 {
 	struct fb_tilerect rect;
-	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
-	int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
 
 	rect.index = vc->vc_video_erase_char &
 		((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
-	rect.fg = attr_fgcol_ec(fgshift, vc, info);
-	rect.bg = attr_bgcol_ec(bgshift, vc, info);
+	rect.fg = fg;
+	rect.bg = bg;
 	rect.sx = sx;
 	rect.sy = sy;
 	rect.width = width;
Signature · 1 line
2.39.5
author maintainer
#70 lore raw

PATCH 69/783 fbdev: core: tileblit: Implement missing margin clearing for tileblit

In reply to Greg Kroah-Hartman

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

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

From: Zsolt Kajtar <[email protected]>

[ Upstream commit 76d3ca89981354e1f85a3e0ad9ac4217d351cc72 ]

I was wondering why there's garbage at the bottom of the screen when tile blitting is used with an odd mode like 1080, 600 or 200. Sure there's only space for half a tile but the same area is clean when the buffer is bitmap.

Then later I found that it's supposed to be cleaned but that's not implemented. So I took what's in bitblit and adapted it for tileblit.

This implementation was tested for both the horizontal and vertical case, and now does the same as what's done for bitmap buffers.

If anyone is interested to reproduce the problem then I could bet that'd be on a S3 or Ark. Just set up a mode with an odd line count and make sure that the virtual size covers the complete tile at the bottom. E.g. for 600 lines that's 608 virtual lines for a 16 tall tile. Then the bottom area should be cleaned.

For the right side it's more difficult as there the drivers won't let an odd size happen, unless the code is modified. But once it reports back a few pixel columns short then fbcon won't use the last column. With the patch that column is now clean.

Btw. the virtual size should be rounded up by the driver for both axes (not only the horizontal) so that it's dividable by the tile size. That's a driver bug but correcting it is not in scope for this patch.

Implement missing margin clearing for tileblit

---
 drivers/video/fbdev/core/tileblit.c | 37 ++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)
drivers/video/fbdev/core/tileblit.c +36 -1
index 45b0828fad1cf..d342b90c42b7f 100644
@@ -74,7 +74,42 @@ static void tile_putcs(struct vc_data *vc, struct fb_info *info,
 static void tile_clear_margins(struct vc_data *vc, struct fb_info *info,
 			       int color, int bottom_only)
 {
-	return;
+	unsigned int cw = vc->vc_font.width;
+	unsigned int ch = vc->vc_font.height;
+	unsigned int rw = info->var.xres - (vc->vc_cols*cw);
+	unsigned int bh = info->var.yres - (vc->vc_rows*ch);
+	unsigned int rs = info->var.xres - rw;
+	unsigned int bs = info->var.yres - bh;
+	unsigned int vwt = info->var.xres_virtual / cw;
+	unsigned int vht = info->var.yres_virtual / ch;
+	struct fb_tilerect rect;
+
+	rect.index = vc->vc_video_erase_char &
+		((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
+	rect.fg = color;
+	rect.bg = color;
+
+	if ((int) rw > 0 && !bottom_only) {
+		rect.sx = (info->var.xoffset + rs + cw - 1) / cw;
+		rect.sy = 0;
+		rect.width = (rw + cw - 1) / cw;
+		rect.height = vht;
+		if (rect.width + rect.sx > vwt)
+			rect.width = vwt - rect.sx;
+		if (rect.sx < vwt)
+			info->tileops->fb_tilefill(info, &rect);
+	}
+
+	if ((int) bh > 0) {
+		rect.sx = info->var.xoffset / cw;
+		rect.sy = (info->var.yoffset + bs) / ch;
+		rect.width = rs / cw;
+		rect.height = (bh + ch - 1) / ch;
+		if (rect.height + rect.sy > vht)
+			rect.height = vht - rect.sy;
+		if (rect.sy < vht)
+			info->tileops->fb_tilefill(info, &rect);
+	}
 }
 
 static void tile_cursor(struct vc_data *vc, struct fb_info *info, bool enable,
Signature · 1 line
2.39.5
author maintainer
#71 lore raw

PATCH 70/783 cifs: Set default Netbios RFC1001 server name to hostname in UNC

In reply to Greg Kroah-Hartman

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

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

From: Pali Rohár <[email protected]>

[ Upstream commit be786e509c1af9b2dcf25c3d601f05c8c251f482 ]

Windows SMB servers (including SMB2+) which are working over RFC1001 require that Netbios server name specified in RFC1001 Session Request packet is same as the UNC host name. Netbios server name can be already specified manually via -o servern= option.

With this change the RFC1001 server name is set automatically by extracting the hostname from the mount source.

---
 fs/smb/client/fs_context.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
fs/smb/client/fs_context.c +11 -0
index 00af8dd5aa689..b877def5a3664 100644
@@ -1118,6 +1118,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
 	int i, opt;
 	bool is_smb3 = !strcmp(fc->fs_type->name, "smb3");
 	bool skip_parsing = false;
+	char *hostname;
 
 	cifs_dbg(FYI, "CIFS: parsing cifs mount option '%s'\n", param->key);
 
@@ -1450,6 +1451,16 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
 			cifs_errorf(fc, "OOM when copying UNC string\n");
 			goto cifs_parse_mount_err;
 		}
+		hostname = extract_hostname(ctx->UNC);
+		if (IS_ERR(hostname)) {
+			cifs_errorf(fc, "Cannot extract hostname from UNC string\n");
+			goto cifs_parse_mount_err;
+		}
+		/* last byte, type, is 0x20 for servr type */
+		memset(ctx->target_rfc1001_name, 0x20, RFC1001_NAME_LEN_WITH_NULL);
+		for (i = 0; i < RFC1001_NAME_LEN && hostname[i] != 0; i++)
+			ctx->target_rfc1001_name[i] = toupper(hostname[i]);
+		kfree(hostname);
 		break;
 	case Opt_user:
 		kfree(ctx->username);
Signature · 1 line
2.39.5
author maintainer
#72 lore raw

PATCH 71/783 cifs: add validation check for the fields in smb_aces

In reply to Greg Kroah-Hartman

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

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

From: Namjae Jeon <[email protected]>

[ Upstream commit eeb827f2922eb07ffbf7d53569cc95b38272646f ]

cifs.ko is missing validation check when accessing smb_aces. This patch add validation check for the fields in smb_aces.

---
 fs/smb/client/cifsacl.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
fs/smb/client/cifsacl.c +16 -1
index 64bd68f750f84..f9d577f2d59bb 100644
@@ -811,7 +811,23 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
 			return;
 
 		for (i = 0; i < num_aces; ++i) {
+			if (end_of_acl - acl_base < acl_size)
+				break;
+
 			ppace[i] = (struct smb_ace *) (acl_base + acl_size);
+			acl_base = (char *)ppace[i];
+			acl_size = offsetof(struct smb_ace, sid) +
+				offsetof(struct smb_sid, sub_auth);
+
+			if (end_of_acl - acl_base < acl_size ||
+			    ppace[i]->sid.num_subauth == 0 ||
+			    ppace[i]->sid.num_subauth > SID_MAX_SUB_AUTHORITIES ||
+			    (end_of_acl - acl_base <
+			     acl_size + sizeof(__le32) * ppace[i]->sid.num_subauth) ||
+			    (le16_to_cpu(ppace[i]->size) <
+			     acl_size + sizeof(__le32) * ppace[i]->sid.num_subauth))
+				break;
+
 #ifdef CONFIG_CIFS_DEBUG2
 			dump_ace(ppace[i], end_of_acl);
 #endif
@@ -855,7 +871,6 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
 				(void *)ppace[i],
 				sizeof(struct smb_ace)); */
 
-			acl_base = (char *)ppace[i];
 			acl_size = le16_to_cpu(ppace[i]->size);
 		}
 
Signature · 1 line
2.39.5
author maintainer
#73 lore raw

PATCH 72/783 cifs: Fix establishing NetBIOS session for SMB2+ connection

In reply to Greg Kroah-Hartman

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

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

From: Pali Rohár <[email protected]>

[ Upstream commit 781802aa5a5950f99899f13ff9d760f5db81d36d ]

Function ip_rfc1001_connect() which establish NetBIOS session for SMB connections, currently uses smb_send() function for sending NetBIOS Session Request packet. This function expects that the passed buffer is SMB packet and for SMB2+ connections it mangles packet header, which breaks prepared NetBIOS Session Request packet. Result is that this function send garbage packet for SMB2+ connection, which SMB2+ server cannot parse. That function is not mangling packets for SMB1 connections, so it somehow works for SMB1.

Fix this problem and instead of smb_send(), use smb_send_kvec() function which does not mangle prepared packet, this function send them as is. Just API of this function takes struct msghdr (kvec) instead of packet buffer.

[MS-SMB2] specification allows SMB2 protocol to use NetBIOS as a transport protocol. NetBIOS can be used over TCP via port 139. So this is a valid configuration, just not so common. And even recent Windows versions (e.g. Windows Server 2022) still supports this configuration: SMB over TCP port 139, including for modern SMB2 and SMB3 dialects.

This change fixes SMB2 and SMB3 connections over TCP port 139 which requires establishing of NetBIOS session. Tested that this change fixes establishing of SMB2 and SMB3 connections with Windows Server 2022.

---
 fs/smb/client/cifsproto.h |  3 +++
 fs/smb/client/connect.c   | 20 +++++++++++++++-----
 fs/smb/client/transport.c |  2 +-
 3 files changed, 19 insertions(+), 6 deletions(-)
fs/smb/client/cifsproto.h +3 -0
index 278092a15f890..1609ca825d825 100644
@@ -31,6 +31,9 @@ extern void cifs_small_buf_release(void *);
 extern void free_rsp_buf(int, void *);
 extern int smb_send(struct TCP_Server_Info *, struct smb_hdr *,
 			unsigned int /* length */);
+extern int smb_send_kvec(struct TCP_Server_Info *server,
+			 struct msghdr *msg,
+			 size_t *sent);
 extern unsigned int _get_xid(void);
 extern void _free_xid(unsigned int);
 #define get_xid()							\
fs/smb/client/connect.c +15 -5
index 92685fc675b59..22f29d2725928 100644
@@ -3028,8 +3028,10 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
 	 * sessinit is sent but no second negprot
 	 */
 	struct rfc1002_session_packet req = {};
-	struct smb_hdr *smb_buf = (struct smb_hdr *)&req;
+	struct msghdr msg = {};
+	struct kvec iov = {};
 	unsigned int len;
+	size_t sent;
 
 	req.trailer.session_req.called_len = sizeof(req.trailer.session_req.called_name);
 
@@ -3058,10 +3060,18 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
 	 * As per rfc1002, @len must be the number of bytes that follows the
 	 * length field of a rfc1002 session request payload.
 	 */
-	len = sizeof(req) - offsetof(struct rfc1002_session_packet, trailer.session_req);
+	len = sizeof(req.trailer.session_req);
+	req.type = RFC1002_SESSION_REQUEST;
+	req.flags = 0;
+	req.length = cpu_to_be16(len);
+	len += offsetof(typeof(req), trailer.session_req);
+	iov.iov_base = &req;
+	iov.iov_len = len;
+	iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, &iov, 1, len);
+	rc = smb_send_kvec(server, &msg, &sent);
+	if (rc < 0 || len != sent)
+		return (rc == -EINTR || rc == -EAGAIN) ? rc : -ECONNABORTED;
 
-	smb_buf->smb_buf_length = cpu_to_be32((RFC1002_SESSION_REQUEST << 24) | len);
-	rc = smb_send(server, smb_buf, len);
 	/*
 	 * RFC1001 layer in at least one server requires very short break before
 	 * negprot presumably because not expecting negprot to follow so fast.
@@ -3070,7 +3080,7 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
 	 */
 	usleep_range(1000, 2000);
 
-	return rc;
+	return 0;
 }
 
 static int
fs/smb/client/transport.c +1 -1
index 0dc80959ce488..03434dbe9374c 100644
@@ -179,7 +179,7 @@ delete_mid(struct mid_q_entry *mid)
  * Our basic "send data to server" function. Should be called with srv_mutex
  * held. The caller is responsible for handling the results.
  */
-static int
+int
 smb_send_kvec(struct TCP_Server_Info *server, struct msghdr *smb_msg,
 	      size_t *sent)
 {
Signature · 1 line
2.39.5
author maintainer
#74 lore raw

PATCH 73/783 cifs: Fix getting DACL-only xattr system.cifs_acl and system.smb3_acl

In reply to Greg Kroah-Hartman

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

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

From: Pali Rohár <[email protected]>

[ Upstream commit ad9364a6835c45c52f47587ffbe0577bb7cd4c5b ]

Currently ->get_acl() callback always create request for OWNER, GROUP and DACL, even when only DACLs was requested by user. Change API callback to request only information for which the caller asked. Therefore when only DACLs requested, then SMB client will prepare and send DACL-only request.

This change fixes retrieving of "system.cifs_acl" and "system.smb3_acl" xattrs to contain only DACL structure as documented.

Note that setting/changing of "system.cifs_acl" and "system.smb3_acl" xattrs already takes only DACL structure and ignores all other fields.

---
 fs/smb/client/cifsacl.c |  4 ++--
 fs/smb/client/cifssmb.c |  3 +--
 fs/smb/client/smb2pdu.c |  4 +---
 fs/smb/client/xattr.c   | 15 +++++++++++----
 4 files changed, 15 insertions(+), 11 deletions(-)
fs/smb/client/cifsacl.c +2 -2
index f9d577f2d59bb..63b3b1290bed2 100644
@@ -1565,7 +1565,7 @@ cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, struct cifs_fattr *fattr,
 	int rc = 0;
 	struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
 	struct smb_version_operations *ops;
-	const u32 info = 0;
+	const u32 info = OWNER_SECINFO | GROUP_SECINFO | DACL_SECINFO;
 
 	cifs_dbg(NOISY, "converting ACL to mode for %s\n", path);
 
@@ -1619,7 +1619,7 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmode,
 	struct tcon_link *tlink;
 	struct smb_version_operations *ops;
 	bool mode_from_sid, id_from_sid;
-	const u32 info = 0;
+	const u32 info = OWNER_SECINFO | GROUP_SECINFO | DACL_SECINFO;
 	bool posix;
 
 	tlink = cifs_sb_tlink(cifs_sb);
fs/smb/client/cifssmb.c +1 -2
index c2abe79f0dd3b..e90811f321944 100644
@@ -3416,8 +3416,7 @@ CIFSSMBGetCIFSACL(const unsigned int xid, struct cifs_tcon *tcon, __u16 fid,
 	/* BB TEST with big acls that might need to be e.g. larger than 16K */
 	pSMB->MaxSetupCount = 0;
 	pSMB->Fid = fid; /* file handle always le */
-	pSMB->AclFlags = cpu_to_le32(CIFS_ACL_OWNER | CIFS_ACL_GROUP |
-				     CIFS_ACL_DACL | info);
+	pSMB->AclFlags = cpu_to_le32(info);
 	pSMB->ByteCount = cpu_to_le16(11); /* 3 bytes pad + 8 bytes parm */
 	inc_rfc1001_len(pSMB, 11);
 	iov[0].iov_base = (char *)pSMB;
fs/smb/client/smb2pdu.c +1 -3
index ed3ffcb80aef0..d080c777906b4 100644
@@ -3910,12 +3910,10 @@ SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon,
 	       u64 persistent_fid, u64 volatile_fid,
 	       void **data, u32 *plen, u32 extra_info)
 {
-	__u32 additional_info = OWNER_SECINFO | GROUP_SECINFO | DACL_SECINFO |
-				extra_info;
 	*plen = 0;
 
 	return query_info(xid, tcon, persistent_fid, volatile_fid,
-			  0, SMB2_O_INFO_SECURITY, additional_info,
+			  0, SMB2_O_INFO_SECURITY, extra_info,
 			  SMB2_MAX_BUFFER_SIZE, MIN_SEC_DESC_LEN, data, plen);
 }
 
fs/smb/client/xattr.c +11 -4
index 58a584f0b27e9..7d49f38f01f3e 100644
@@ -320,10 +320,17 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
 		if (pTcon->ses->server->ops->get_acl == NULL)
 			goto out; /* rc already EOPNOTSUPP */
 
-		if (handler->flags == XATTR_CIFS_NTSD_FULL) {
-			extra_info = SACL_SECINFO;
-		} else {
-			extra_info = 0;
+		switch (handler->flags) {
+		case XATTR_CIFS_NTSD_FULL:
+			extra_info = OWNER_SECINFO | GROUP_SECINFO | DACL_SECINFO | SACL_SECINFO;
+			break;
+		case XATTR_CIFS_NTSD:
+			extra_info = OWNER_SECINFO | GROUP_SECINFO | DACL_SECINFO;
+			break;
+		case XATTR_CIFS_ACL:
+		default:
+			extra_info = DACL_SECINFO;
+			break;
 		}
 		pacl = pTcon->ses->server->ops->get_acl(cifs_sb,
 				inode, full_path, &acllen, extra_info);
Signature · 1 line
2.39.5
author maintainer
#75 lore raw

PATCH 74/783 cifs: Check if server supports reparse points before using them

In reply to Greg Kroah-Hartman

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

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

From: Pali Rohár <[email protected]>

[ Upstream commit 6c06be908ca190e2d8feae1cf452d78598cd0b94 ]

Do not attempt to query or create reparse point when server fs does not support it. This will prevent creating unusable empty object on the server.

---
 fs/smb/client/cifssmb.c   | 3 +++
 fs/smb/client/link.c      | 3 ++-
 fs/smb/client/smb2inode.c | 8 ++++++++
 fs/smb/client/smb2ops.c   | 4 ++--
 4 files changed, 15 insertions(+), 3 deletions(-)
fs/smb/client/cifssmb.c +3 -0
index e90811f321944..53e3e8282cb2a 100644
@@ -2725,6 +2725,9 @@ int cifs_query_reparse_point(const unsigned int xid,
 	if (cap_unix(tcon->ses))
 		return -EOPNOTSUPP;
 
+	if (!(le32_to_cpu(tcon->fsAttrInfo.Attributes) & FILE_SUPPORTS_REPARSE_POINTS))
+		return -EOPNOTSUPP;
+
 	oparms = (struct cifs_open_parms) {
 		.tcon = tcon,
 		.cifs_sb = cifs_sb,
fs/smb/client/link.c +2 -1
index 34a026243287f..769752ad2c5ce 100644
@@ -643,7 +643,8 @@ cifs_symlink(struct mnt_idmap *idmap, struct inode *inode,
 	case CIFS_SYMLINK_TYPE_NATIVE:
 	case CIFS_SYMLINK_TYPE_NFS:
 	case CIFS_SYMLINK_TYPE_WSL:
-		if (server->ops->create_reparse_symlink) {
+		if (server->ops->create_reparse_symlink &&
+		    (le32_to_cpu(pTcon->fsAttrInfo.Attributes) & FILE_SUPPORTS_REPARSE_POINTS)) {
 			rc = server->ops->create_reparse_symlink(xid, inode,
 								 direntry,
 								 pTcon,
fs/smb/client/smb2inode.c +8 -0
index 826b57a5a2a8d..e9fd3e204a6f4 100644
@@ -1273,6 +1273,14 @@ struct inode *smb2_get_reparse_inode(struct cifs_open_info_data *data,
 	int rc;
 	int i;
 
+	/*
+	 * If server filesystem does not support reparse points then do not
+	 * attempt to create reparse point. This will prevent creating unusable
+	 * empty object on the server.
+	 */
+	if (!(le32_to_cpu(tcon->fsAttrInfo.Attributes) & FILE_SUPPORTS_REPARSE_POINTS))
+		return ERR_PTR(-EOPNOTSUPP);
+
 	oparms = CIFS_OPARMS(cifs_sb, tcon, full_path,
 			     SYNCHRONIZE | DELETE |
 			     FILE_READ_ATTRIBUTES |
fs/smb/client/smb2ops.c +2 -2
index 6795970d4de6e..fbb3686292134 100644
@@ -5237,7 +5237,7 @@ static int smb2_make_node(unsigned int xid, struct inode *inode,
 			  const char *full_path, umode_t mode, dev_t dev)
 {
 	struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
-	int rc;
+	int rc = -EOPNOTSUPP;
 
 	/*
 	 * Check if mounted with mount parm 'sfu' mount parm.
@@ -5248,7 +5248,7 @@ static int smb2_make_node(unsigned int xid, struct inode *inode,
 	if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) {
 		rc = cifs_sfu_make_node(xid, inode, dentry, tcon,
 					full_path, mode, dev);
-	} else {
+	} else if (le32_to_cpu(tcon->fsAttrInfo.Attributes) & FILE_SUPPORTS_REPARSE_POINTS) {
 		rc = smb2_mknod_reparse(xid, inode, dentry, tcon,
 					full_path, mode, dev);
 	}
Signature · 1 line
2.39.5
author maintainer
#76 lore raw

PATCH 75/783 NFSv4: Treat ENETUNREACH errors as fatal for state recovery

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 0af5fb5ed3d2fd9e110c6112271f022b744a849a ]

If a containerised process is killed and causes an ENETUNREACH or ENETDOWN error to be propagated to the state manager, then mark the nfs_client as being dead so that we don't loop in functions that are expecting recovery to succeed.

---
 fs/nfs/nfs4state.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
fs/nfs/nfs4state.c +9 -1
index 542cdf71229fe..04c726cc2900b 100644
@@ -2739,7 +2739,15 @@ static void nfs4_state_manager(struct nfs_client *clp)
 	pr_warn_ratelimited("NFS: state manager%s%s failed on NFSv4 server %s"
 			" with error %d\n", section_sep, section,
 			clp->cl_hostname, -status);
-	ssleep(1);
+	switch (status) {
+	case -ENETDOWN:
+	case -ENETUNREACH:
+		nfs_mark_client_ready(clp, -EIO);
+		break;
+	default:
+		ssleep(1);
+		break;
+	}
 out_drain:
 	memalloc_nofs_restore(memflags);
 	nfs4_end_drain_session(clp);
Signature · 1 line
2.39.5
author maintainer
#77 lore raw

PATCH 76/783 SUNRPC: rpc_clnt_set_transport() must not change the autobind setting

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit bf9be373b830a3e48117da5d89bb6145a575f880 ]

The autobind setting was supposed to be determined in rpc_create(), since commit c2866763b402 ("SUNRPC: use sockaddr + size when creating remote transport endpoints").

---
 net/sunrpc/clnt.c | 3 ---
 1 file changed, 3 deletions(-)
net/sunrpc/clnt.c +0 -3
index 2fe88ea79a70c..c9c5f0caef6bd 100644
@@ -270,9 +270,6 @@ static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt,
 	old = rcu_dereference_protected(clnt->cl_xprt,
 			lockdep_is_held(&clnt->cl_lock));
 
-	if (!xprt_bound(xprt))
-		clnt->cl_autobind = 1;
-
 	clnt->cl_timeout = timeout;
 	rcu_assign_pointer(clnt->cl_xprt, xprt);
 	spin_unlock(&clnt->cl_lock);
Signature · 1 line
2.39.5
author maintainer
#78 lore raw

PATCH 77/783 SUNRPC: rpcbind should never reset the port to the value 0

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 214c13e380ad7636631279f426387f9c4e3c14d9 ]

If we already had a valid port number for the RPC service, then we should not allow the rpcbind client to set it to the invalid value '0'.

---
 net/sunrpc/rpcb_clnt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
net/sunrpc/rpcb_clnt.c +3 -2
index 102c3818bc54d..53bcca365fb1c 100644
@@ -820,9 +820,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
 	}
 
 	trace_rpcb_setport(child, map->r_status, map->r_port);
-	xprt->ops->set_port(xprt, map->r_port);
-	if (map->r_port)
+	if (map->r_port) {
+		xprt->ops->set_port(xprt, map->r_port);
 		xprt_set_bound(xprt);
+	}
 }
 
 /*
Signature · 1 line
2.39.5
author maintainer
#52 lore raw

PATCH 51/783 smb: client: Store original IO parameters and prevent zero IO sizes

In reply to Greg Kroah-Hartman

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

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

From: Wang Zhaolong <[email protected]>

[ Upstream commit 287906b20035a04a234d1a3c64f760a5678387be ]

During mount option processing and negotiation with the server, the original user-specified rsize/wsize values were being modified directly. This makes it impossible to recover these values after a connection reset, leading to potential degraded performance after reconnection.

The other problem is that When negotiating read and write sizes, there are cases where the negotiated values might calculate to zero, especially during reconnection when server->max_read or server->max_write might be reset. In general, these values come from the negotiation response. According to MS-SMB2 specification, these values should be at least 65536 bytes.

This patch improves IO parameter handling:

1. Adds vol_rsize and vol_wsize fields to store the original user-specified values separately from the negotiated values
2. Uses got_rsize/got_wsize flags to determine if values were user-specified rather than checking for non-zero values, which is more reliable
3. Adds a prevent_zero_iosize() helper function to ensure IO sizes are never negotiated down to zero, which could happen in edge cases like when server->max_read/write is zero

The changes make the CIFS client more resilient to unusual server responses and reconnection scenarios, preventing potential failures when IO sizes are calculated to be zero.

---
 fs/smb/client/fs_context.c |  2 ++
 fs/smb/client/fs_context.h |  3 +++
 fs/smb/client/smb1ops.c    |  6 +++---
 fs/smb/client/smb2ops.c    | 27 +++++++++++++++++++--------
 fs/smb/common/smb2pdu.h    |  3 +++
 5 files changed, 30 insertions(+), 11 deletions(-)
fs/smb/client/fs_context.c +2 -0
index e38521a713a6b..00af8dd5aa689 100644
@@ -1327,6 +1327,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
 	case Opt_rsize:
 		ctx->rsize = result.uint_32;
 		ctx->got_rsize = true;
+		ctx->vol_rsize = ctx->rsize;
 		break;
 	case Opt_wsize:
 		ctx->wsize = result.uint_32;
@@ -1342,6 +1343,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
 					 ctx->wsize, PAGE_SIZE);
 			}
 		}
+		ctx->vol_wsize = ctx->wsize;
 		break;
 	case Opt_acregmax:
 		if (result.uint_32 > CIFS_MAX_ACTIMEO / HZ) {
fs/smb/client/fs_context.h +3 -0
index 881bfc08667e7..7516ccdc69c71 100644
@@ -279,6 +279,9 @@ struct smb3_fs_context {
 	bool use_client_guid:1;
 	/* reuse existing guid for multichannel */
 	u8 client_guid[SMB2_CLIENT_GUID_SIZE];
+	/* User-specified original r/wsize value */
+	unsigned int vol_rsize;
+	unsigned int vol_wsize;
 	unsigned int bsize;
 	unsigned int rasize;
 	unsigned int rsize;
fs/smb/client/smb1ops.c +3 -3
index e28cdaca47e12..73a689b4ccdff 100644
@@ -437,8 +437,8 @@ cifs_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 	unsigned int wsize;
 
 	/* start with specified wsize, or default */
-	if (ctx->wsize)
-		wsize = ctx->wsize;
+	if (ctx->got_wsize)
+		wsize = ctx->vol_wsize;
 	else if (tcon->unix_ext && (unix_cap & CIFS_UNIX_LARGE_WRITE_CAP))
 		wsize = CIFS_DEFAULT_IOSIZE;
 	else
@@ -490,7 +490,7 @@ cifs_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 	else
 		defsize = server->maxBuf - sizeof(READ_RSP);
 
-	rsize = ctx->rsize ? ctx->rsize : defsize;
+	rsize = ctx->got_rsize ? ctx->vol_rsize : defsize;
 
 	/*
 	 * no CAP_LARGE_READ_X? Then MS-CIFS states that we must limit this to
fs/smb/client/smb2ops.c +19 -8
index 6f89e087629fe..6795970d4de6e 100644
@@ -467,6 +467,17 @@ smb2_negotiate(const unsigned int xid,
 	return rc;
 }
 
+static inline unsigned int
+prevent_zero_iosize(unsigned int size, const char *type)
+{
+	if (size == 0) {
+		cifs_dbg(VFS, "SMB: Zero %ssize calculated, using minimum value %u\n",
+			 type, CIFS_MIN_DEFAULT_IOSIZE);
+		return CIFS_MIN_DEFAULT_IOSIZE;
+	}
+	return size;
+}
+
 static unsigned int
 smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 {
@@ -474,12 +485,12 @@ smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 	unsigned int wsize;
 
 	/* start with specified wsize, or default */
-	wsize = ctx->wsize ? ctx->wsize : CIFS_DEFAULT_IOSIZE;
+	wsize = ctx->got_wsize ? ctx->vol_wsize : CIFS_DEFAULT_IOSIZE;
 	wsize = min_t(unsigned int, wsize, server->max_write);
 	if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
 		wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE);
 
-	return wsize;
+	return prevent_zero_iosize(wsize, "w");
 }
 
 static unsigned int
@@ -489,7 +500,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 	unsigned int wsize;
 
 	/* start with specified wsize, or default */
-	wsize = ctx->wsize ? ctx->wsize : SMB3_DEFAULT_IOSIZE;
+	wsize = ctx->got_wsize ? ctx->vol_wsize : SMB3_DEFAULT_IOSIZE;
 	wsize = min_t(unsigned int, wsize, server->max_write);
 #ifdef CONFIG_CIFS_SMB_DIRECT
 	if (server->rdma) {
@@ -511,7 +522,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 	if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
 		wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE);
 
-	return wsize;
+	return prevent_zero_iosize(wsize, "w");
 }
 
 static unsigned int
@@ -521,13 +532,13 @@ smb2_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 	unsigned int rsize;
 
 	/* start with specified rsize, or default */
-	rsize = ctx->rsize ? ctx->rsize : CIFS_DEFAULT_IOSIZE;
+	rsize = ctx->got_rsize ? ctx->vol_rsize : CIFS_DEFAULT_IOSIZE;
 	rsize = min_t(unsigned int, rsize, server->max_read);
 
 	if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
 		rsize = min_t(unsigned int, rsize, SMB2_MAX_BUFFER_SIZE);
 
-	return rsize;
+	return prevent_zero_iosize(rsize, "r");
 }
 
 static unsigned int
@@ -537,7 +548,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 	unsigned int rsize;
 
 	/* start with specified rsize, or default */
-	rsize = ctx->rsize ? ctx->rsize : SMB3_DEFAULT_IOSIZE;
+	rsize = ctx->got_rsize ? ctx->vol_rsize : SMB3_DEFAULT_IOSIZE;
 	rsize = min_t(unsigned int, rsize, server->max_read);
 #ifdef CONFIG_CIFS_SMB_DIRECT
 	if (server->rdma) {
@@ -560,7 +571,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 	if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
 		rsize = min_t(unsigned int, rsize, SMB2_MAX_BUFFER_SIZE);
 
-	return rsize;
+	return prevent_zero_iosize(rsize, "r");
 }
 
 /*
fs/smb/common/smb2pdu.h +3 -0
index 12f0013334057..f79a5165a7cc6 100644
@@ -95,6 +95,9 @@
  */
 #define SMB3_DEFAULT_IOSIZE (4 * 1024 * 1024)
 
+/* According to MS-SMB2 specification The minimum recommended value is 65536.*/
+#define CIFS_MIN_DEFAULT_IOSIZE (65536)
+
 /*
  * SMB2 Header Definition
  *
Signature · 1 line
2.39.5
author maintainer
#79 lore raw

PATCH 78/783 spi-rockchip: Fix register out of bounds access

In reply to Greg Kroah-Hartman

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

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

From: Luis de Arquer <[email protected]>

[ Upstream commit 7a874e8b54ea21094f7fd2d428b164394c6cb316 ]

Do not write native chip select stuff for GPIO chip selects. GPIOs can be numbered much higher than native CS. Also, it makes no sense.

---
 drivers/spi/spi-rockchip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-rockchip.c +1 -1
index 1bc012fce7cb8..1a6381de6f33d 100644
@@ -547,7 +547,7 @@ static int rockchip_spi_config(struct rockchip_spi *rs,
 	cr0 |= (spi->mode & 0x3U) << CR0_SCPH_OFFSET;
 	if (spi->mode & SPI_LSB_FIRST)
 		cr0 |= CR0_FBM_LSB << CR0_FBM_OFFSET;
-	if (spi->mode & SPI_CS_HIGH)
+	if ((spi->mode & SPI_CS_HIGH) && !(spi_get_csgpiod(spi, 0)))
 		cr0 |= BIT(spi_get_chipselect(spi, 0)) << CR0_SOI_OFFSET;
 
 	if (xfer->rx_buf && xfer->tx_buf)
Signature · 1 line
2.39.5
author maintainer
#80 lore raw

PATCH 79/783 ASoC: codecs: wsa884x: Correct VI sense channel mask

In reply to Greg Kroah-Hartman

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

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

From: Krzysztof Kozlowski <[email protected]>

[ Upstream commit 060fac202eb8e5c83961f0e0bf6dad8ab6e46643 ]

VI sense port on WSA883x speaker takes only one channel, so use 0x1 as channel mask. This fixes garbage being recorded by the speaker when testing the VI sense feedback path.

---
 sound/soc/codecs/wsa884x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wsa884x.c +1 -1
index 560a2c04b6955..18b0ee8f15a55 100644
@@ -891,7 +891,7 @@ static const struct sdw_port_config wsa884x_pconfig[WSA884X_MAX_SWR_PORTS] = {
 	},
 	[WSA884X_PORT_VISENSE] = {
 		.num = WSA884X_PORT_VISENSE + 1,
-		.ch_mask = 0x3,
+		.ch_mask = 0x1,
 	},
 	[WSA884X_PORT_CPS] = {
 		.num = WSA884X_PORT_CPS + 1,
Signature · 1 line
2.39.5
author maintainer
#81 lore raw

PATCH 80/783 ASoC: codecs: wsa883x: Correct VI sense channel mask

In reply to Greg Kroah-Hartman

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

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

From: Krzysztof Kozlowski <[email protected]>

[ Upstream commit ed3b274abc4008efffebf1997968a3f2720a86d3 ]

VI sense port on WSA883x speaker takes only one channel, so use 0x1 as channel mask. This fixes garbage being recorded by the speaker when testing the VI sense feedback path.

---
 sound/soc/codecs/wsa883x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wsa883x.c +1 -1
index 47da5674d7c92..e31b7fb104e6c 100644
@@ -529,7 +529,7 @@ static const struct sdw_port_config wsa883x_pconfig[WSA883X_MAX_SWR_PORTS] = {
 	},
 	[WSA883X_PORT_VISENSE] = {
 		.num = WSA883X_PORT_VISENSE + 1,
-		.ch_mask = 0x3,
+		.ch_mask = 0x1,
 	},
 };
 
Signature · 1 line
2.39.5
author maintainer
#53 lore raw

PATCH 52/783 fuse: Return EPERM rather than ENOSYS from link()

In reply to Greg Kroah-Hartman

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

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

From: Matt Johnston <[email protected]>

[ Upstream commit 8344213571b2ac8caf013cfd3b37bc3467c3a893 ]

link() is documented to return EPERM when a filesystem doesn't support the operation, return that instead.

---
 fs/fuse/dir.c | 2 ++
 1 file changed, 2 insertions(+)
fs/fuse/dir.c +2 -0
index 3b031d24d3691..8f699c67561fa 100644
@@ -1137,6 +1137,8 @@ static int fuse_link(struct dentry *entry, struct inode *newdir,
 	else if (err == -EINTR)
 		fuse_invalidate_attr(inode);
 
+	if (err == -ENOSYS)
+		err = -EPERM;
 	return err;
 }
 
Signature · 1 line
2.39.5
author maintainer
#54 lore raw

PATCH 53/783 exfat: call bh_read in get_block only when necessary

In reply to Greg Kroah-Hartman

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

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

From: Sungjong Seo <[email protected]>

[ Upstream commit c73e680d1f84059e1b1ea82a537f6ccc1c563eb4 ]

With commit 11a347fb6cef ("exfat: change to get file size from DataLength"), exfat_get_block() can now handle valid_size. However, most partial unwritten blocks that could be mapped with other blocks are being inefficiently processed separately as individual blocks.

Except for partial unwritten blocks that require independent processing, let's handle them simply as before.

---
 fs/exfat/inode.c | 159 +++++++++++++++++++++++------------------------
 1 file changed, 77 insertions(+), 82 deletions(-)
fs/exfat/inode.c +77 -82
index a23677de4544f..b22c02d6000f7 100644
@@ -274,9 +274,11 @@ static int exfat_get_block(struct inode *inode, sector_t iblock,
 	sector_t last_block;
 	sector_t phys = 0;
 	sector_t valid_blks;
+	loff_t i_size;
 
 	mutex_lock(&sbi->s_lock);
-	last_block = EXFAT_B_TO_BLK_ROUND_UP(i_size_read(inode), sb);
+	i_size = i_size_read(inode);
+	last_block = EXFAT_B_TO_BLK_ROUND_UP(i_size, sb);
 	if (iblock >= last_block && !create)
 		goto done;
 
@@ -305,102 +307,95 @@ static int exfat_get_block(struct inode *inode, sector_t iblock,
 	if (buffer_delay(bh_result))
 		clear_buffer_delay(bh_result);
 
-	if (create) {
+	/*
+	 * In most cases, we just need to set bh_result to mapped, unmapped
+	 * or new status as follows:
+	 *  1. i_size == valid_size
+	 *  2. write case (create == 1)
+	 *  3. direct_read (!bh_result->b_folio)
+	 *     -> the unwritten part will be zeroed in exfat_direct_IO()
+	 *
+	 * Otherwise, in the case of buffered read, it is necessary to take
+	 * care the last nested block if valid_size is not equal to i_size.
+	 */
+	if (i_size == ei->valid_size || create || !bh_result->b_folio)
 		valid_blks = EXFAT_B_TO_BLK_ROUND_UP(ei->valid_size, sb);
+	else
+		valid_blks = EXFAT_B_TO_BLK(ei->valid_size, sb);
 
-		if (iblock + max_blocks < valid_blks) {
-			/* The range has been written, map it */
-			goto done;
-		} else if (iblock < valid_blks) {
-			/*
-			 * The range has been partially written,
-			 * map the written part.
-			 */
-			max_blocks = valid_blks - iblock;
-			goto done;
-		}
+	/* The range has been fully written, map it */
+	if (iblock + max_blocks < valid_blks)
+		goto done;
 
-		/* The area has not been written, map and mark as new. */
-		set_buffer_new(bh_result);
+	/* The range has been partially written, map the written part */
+	if (iblock < valid_blks) {
+		max_blocks = valid_blks - iblock;
+		goto done;
+	}
 
+	/* The area has not been written, map and mark as new for create case */
+	if (create) {
+		set_buffer_new(bh_result);
 		ei->valid_size = EXFAT_BLK_TO_B(iblock + max_blocks, sb);
 		mark_inode_dirty(inode);
-	} else {
-		valid_blks = EXFAT_B_TO_BLK(ei->valid_size, sb);
+		goto done;
+	}
 
-		if (iblock + max_blocks < valid_blks) {
-			/* The range has been written, map it */
-			goto done;
-		} else if (iblock < valid_blks) {
-			/*
-			 * The area has been partially written,
-			 * map the written part.
-			 */
-			max_blocks = valid_blks - iblock;
+	/*
+	 * The area has just one block partially written.
+	 * In that case, we should read and fill the unwritten part of
+	 * a block with zero.
+	 */
+	if (bh_result->b_folio && iblock == valid_blks &&
+	    (ei->valid_size & (sb->s_blocksize - 1))) {
+		loff_t size, pos;
+		void *addr;
+
+		max_blocks = 1;
+
+		/*
+		 * No buffer_head is allocated.
+		 * (1) bmap: It's enough to set blocknr without I/O.
+		 * (2) read: The unwritten part should be filled with zero.
+		 *           If a folio does not have any buffers,
+		 *           let's returns -EAGAIN to fallback to
+		 *           block_read_full_folio() for per-bh IO.
+		 */
+		if (!folio_buffers(bh_result->b_folio)) {
+			err = -EAGAIN;
 			goto done;
-		} else if (iblock == valid_blks &&
-			   (ei->valid_size & (sb->s_blocksize - 1))) {
-			/*
-			 * The block has been partially written,
-			 * zero the unwritten part and map the block.
-			 */
-			loff_t size, pos;
-			void *addr;
-
-			max_blocks = 1;
-
-			/*
-			 * For direct read, the unwritten part will be zeroed in
-			 * exfat_direct_IO()
-			 */
-			if (!bh_result->b_folio)
-				goto done;
-
-			/*
-			 * No buffer_head is allocated.
-			 * (1) bmap: It's enough to fill bh_result without I/O.
-			 * (2) read: The unwritten part should be filled with 0
-			 *           If a folio does not have any buffers,
-			 *           let's returns -EAGAIN to fallback to
-			 *           per-bh IO like block_read_full_folio().
-			 */
-			if (!folio_buffers(bh_result->b_folio)) {
-				err = -EAGAIN;
-				goto done;
-			}
+		}
 
-			pos = EXFAT_BLK_TO_B(iblock, sb);
-			size = ei->valid_size - pos;
-			addr = folio_address(bh_result->b_folio) +
-			       offset_in_folio(bh_result->b_folio, pos);
+		pos = EXFAT_BLK_TO_B(iblock, sb);
+		size = ei->valid_size - pos;
+		addr = folio_address(bh_result->b_folio) +
+			offset_in_folio(bh_result->b_folio, pos);
 
-			/* Check if bh->b_data points to proper addr in folio */
-			if (bh_result->b_data != addr) {
-				exfat_fs_error_ratelimit(sb,
+		/* Check if bh->b_data points to proper addr in folio */
+		if (bh_result->b_data != addr) {
+			exfat_fs_error_ratelimit(sb,
 					"b_data(%p) != folio_addr(%p)",
 					bh_result->b_data, addr);
-				err = -EINVAL;
-				goto done;
-			}
-
-			/* Read a block */
-			err = bh_read(bh_result, 0);
-			if (err < 0)
-				goto done;
+			err = -EINVAL;
+			goto done;
+		}
 
-			/* Zero unwritten part of a block */
-			memset(bh_result->b_data + size, 0,
-			       bh_result->b_size - size);
+		/* Read a block */
+		err = bh_read(bh_result, 0);
+		if (err < 0)
+			goto done;
 
-			err = 0;
-		} else {
-			/*
-			 * The range has not been written, clear the mapped flag
-			 * to only zero the cache and do not read from disk.
-			 */
-			clear_buffer_mapped(bh_result);
-		}
+		/* Zero unwritten part of a block */
+		memset(bh_result->b_data + size, 0, bh_result->b_size - size);
+		err = 0;
+		goto done;
 	}
+
+	/*
+	 * The area has not been written, clear mapped for read/bmap cases.
+	 * If so, it will be filled with zero without reading from disk.
+	 */
+	clear_buffer_mapped(bh_result);
 done:
 	bh_result->b_size = EXFAT_BLK_TO_B(max_blocks, sb);
 	if (err < 0)
Signature · 1 line
2.39.5
author maintainer
#55 lore raw

PATCH 54/783 io_uring/msg: initialise msg request opcode

In reply to Greg Kroah-Hartman

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

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

From: Pavel Begunkov <[email protected]>

[ Upstream commit 9cc0bbdaba2a66ad90bc6ce45163b7745baffe98 ]

It's risky to have msg request opcode set to garbage, so at least initialise it to nop. Later we might want to add a user inaccessible opcode for such cases.

---
 io_uring/msg_ring.c | 1 +
 1 file changed, 1 insertion(+)
io_uring/msg_ring.c +1 -0
index 7e6f68e911f10..f844ab24cda42 100644
@@ -93,6 +93,7 @@ static int io_msg_remote_post(struct io_ring_ctx *ctx, struct io_kiocb *req,
 		kmem_cache_free(req_cachep, req);
 		return -EOWNERDEAD;
 	}
+	req->opcode = IORING_OP_NOP;
 	req->cqe.user_data = user_data;
 	io_req_set_res(req, res, cflags);
 	percpu_ref_get(&ctx->refs);
Signature · 1 line
2.39.5
author maintainer
#56 lore raw

PATCH 55/783 NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 9e8f324bd44c1fe026b582b75213de4eccfa1163 ]

Check that the delegation is still attached after taking the spin lock in nfs_start_delegation_return_locked().

---
 fs/nfs/delegation.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/nfs/delegation.c +2 -1
index 325ba0663a6de..8bdbc4dca89ca 100644
@@ -307,7 +307,8 @@ nfs_start_delegation_return_locked(struct nfs_inode *nfsi)
 	if (delegation == NULL)
 		goto out;
 	spin_lock(&delegation->lock);
-	if (!test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
+	if (delegation->inode &&
+	    !test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
 		clear_bit(NFS_DELEGATION_RETURN_DELAYED, &delegation->flags);
 		/* Refcount matched in nfs_end_delegation_return() */
 		ret = nfs_get_delegation(delegation);
Signature · 1 line
2.39.5
author maintainer
#57 lore raw

PATCH 56/783 NFS: Dont allow waiting for exiting tasks

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 8d3ca331026a7f9700d3747eed59a67b8f828cdc ]

Once a task calls exit_signals() it can no longer be signalled. So do not allow it to do killable waits.

---
 fs/nfs/inode.c    | 2 ++
 fs/nfs/internal.h | 5 +++++
 fs/nfs/nfs3proc.c | 2 +-
 fs/nfs/nfs4proc.c | 9 +++++++--
 4 files changed, 15 insertions(+), 3 deletions(-)
fs/nfs/inode.c +2 -0
index 1aa67fca69b2f..119e447758b99 100644
@@ -74,6 +74,8 @@ nfs_fattr_to_ino_t(struct nfs_fattr *fattr)
 
 int nfs_wait_bit_killable(struct wait_bit_key *key, int mode)
 {
+	if (unlikely(nfs_current_task_exiting()))
+		return -EINTR;
 	schedule();
 	if (signal_pending_state(mode, current))
 		return -ERESTARTSYS;
fs/nfs/internal.h +5 -0
index 59bb4d0338f39..3cedb7979fcd0 100644
@@ -905,6 +905,11 @@ static inline u32 nfs_stateid_hash(const nfs4_stateid *stateid)
 				NFS4_STATEID_OTHER_SIZE);
 }
 
+static inline bool nfs_current_task_exiting(void)
+{
+	return (current->flags & PF_EXITING) != 0;
+}
+
 static inline bool nfs_error_is_fatal(int err)
 {
 	switch (err) {
fs/nfs/nfs3proc.c +1 -1
index 0c3bc98cd999c..c1736dbb92b63 100644
@@ -39,7 +39,7 @@ nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
 		__set_current_state(TASK_KILLABLE|TASK_FREEZABLE_UNSAFE);
 		schedule_timeout(NFS_JUKEBOX_RETRY_TIME);
 		res = -ERESTARTSYS;
-	} while (!fatal_signal_pending(current));
+	} while (!fatal_signal_pending(current) && !nfs_current_task_exiting());
 	return res;
 }
 
fs/nfs/nfs4proc.c +7 -2
index 810cfd9b7e533..cfdbd521fc7b6 100644
@@ -443,6 +443,8 @@ static int nfs4_delay_killable(long *timeout)
 {
 	might_sleep();
 
+	if (unlikely(nfs_current_task_exiting()))
+		return -EINTR;
 	__set_current_state(TASK_KILLABLE|TASK_FREEZABLE_UNSAFE);
 	schedule_timeout(nfs4_update_delay(timeout));
 	if (!__fatal_signal_pending(current))
@@ -454,6 +456,8 @@ static int nfs4_delay_interruptible(long *timeout)
 {
 	might_sleep();
 
+	if (unlikely(nfs_current_task_exiting()))
+		return -EINTR;
 	__set_current_state(TASK_INTERRUPTIBLE|TASK_FREEZABLE_UNSAFE);
 	schedule_timeout(nfs4_update_delay(timeout));
 	if (!signal_pending(current))
@@ -1774,7 +1778,8 @@ static void nfs_set_open_stateid_locked(struct nfs4_state *state,
 		rcu_read_unlock();
 		trace_nfs4_open_stateid_update_wait(state->inode, stateid, 0);
 
-		if (!fatal_signal_pending(current)) {
+		if (!fatal_signal_pending(current) &&
+		    !nfs_current_task_exiting()) {
 			if (schedule_timeout(5*HZ) == 0)
 				status = -EAGAIN;
 			else
@@ -3578,7 +3583,7 @@ static bool nfs4_refresh_open_old_stateid(nfs4_stateid *dst,
 		write_sequnlock(&state->seqlock);
 		trace_nfs4_close_stateid_update_wait(state->inode, dst, 0);
 
-		if (fatal_signal_pending(current))
+		if (fatal_signal_pending(current) || nfs_current_task_exiting())
 			status = -EINTR;
 		else
 			if (schedule_timeout(5*HZ) != 0)
Signature · 1 line
2.39.5
author maintainer
#58 lore raw

PATCH 57/783 SUNRPC: Dont allow waiting for exiting tasks

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 14e41b16e8cb677bb440dca2edba8b041646c742 ]

Once a task calls exit_signals() it can no longer be signalled. So do not allow it to do killable waits.

---
 net/sunrpc/sched.c | 2 ++
 1 file changed, 2 insertions(+)
net/sunrpc/sched.c +2 -0
index 9b45fbdc90cab..73bc39281ef5f 100644
@@ -276,6 +276,8 @@ EXPORT_SYMBOL_GPL(rpc_destroy_wait_queue);
 
 static int rpc_wait_bit_killable(struct wait_bit_key *key, int mode)
 {
+	if (unlikely(current->flags & PF_EXITING))
+		return -EINTR;
 	schedule();
 	if (signal_pending_state(mode, current))
 		return -ERESTARTSYS;
Signature · 1 line
2.39.5
author maintainer
#49 lore raw

PATCH 48/783 cifs: Fix querying and creating MF symlinks over SMB1

In reply to Greg Kroah-Hartman

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

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

From: Pali Rohár <[email protected]>

[ Upstream commit 4236ac9fe5b8b42756070d4abfb76fed718e87c2 ]

Old SMB1 servers without CAP_NT_SMBS do not support CIFS_open() function and instead SMBLegacyOpen() needs to be used. This logic is already handled in cifs_open_file() function, which is server->ops->open callback function.

So for querying and creating MF symlinks use open callback function instead of CIFS_open() function directly.

This change fixes querying and creating new MF symlinks on Windows 98. Currently cifs_query_mf_symlink() is not able to detect MF symlink and cifs_create_mf_symlink() is failing with EIO error.

---
 fs/smb/client/link.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
fs/smb/client/link.c +4 -4
index 6e6c09cc5ce7a..34a026243287f 100644
@@ -258,7 +258,7 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
 	struct cifs_open_parms oparms;
 	struct cifs_io_parms io_parms = {0};
 	int buf_type = CIFS_NO_BUFFER;
-	FILE_ALL_INFO file_info;
+	struct cifs_open_info_data query_data;
 
 	oparms = (struct cifs_open_parms) {
 		.tcon = tcon,
@@ -270,11 +270,11 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
 		.fid = &fid,
 	};
 
-	rc = CIFS_open(xid, &oparms, &oplock, &file_info);
+	rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, &query_data);
 	if (rc)
 		return rc;
 
-	if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
+	if (query_data.fi.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
 		rc = -ENOENT;
 		/* it's not a symlink */
 		goto out;
@@ -313,7 +313,7 @@ cifs_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
 		.fid = &fid,
 	};
 
-	rc = CIFS_open(xid, &oparms, &oplock, NULL);
+	rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, NULL);
 	if (rc)
 		return rc;
 
Signature · 1 line
2.39.5
author maintainer
#83 lore raw

PATCH 82/783 net: tn40xx: add pci-id of the aqr105-based Tehuti TN4010 cards

In reply to Greg Kroah-Hartman

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

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

From: Hans-Frieder Vogt <[email protected]>

[ Upstream commit 53377b5c2952097527b01ce2f1d9a9332f042f70 ]

Add the PCI-ID of the AQR105-based Tehuti TN4010 cards to allow loading of the tn40xx driver on these cards. Here, I chose the detailed definition with the subvendor ID similar to the QT2025 cards with the PCI-ID TEHUTI:0x4022, because there is a card with an AQ2104 hiding amongst the AQR105 cards, and they all come with the same PCI-ID (TEHUTI:0x4025). But the AQ2104 is currently not supported.

---
 drivers/net/ethernet/tehuti/tn40.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/tehuti/tn40.c +4 -0
index 259bdac24cf21..a6965258441c4 100644
@@ -1832,6 +1832,10 @@ static const struct pci_device_id tn40_id_table[] = {
 			 PCI_VENDOR_ID_ASUSTEK, 0x8709) },
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_TEHUTI, 0x4022,
 			 PCI_VENDOR_ID_EDIMAX, 0x8103) },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_TEHUTI, PCI_DEVICE_ID_TEHUTI_TN9510,
+			 PCI_VENDOR_ID_TEHUTI, 0x3015) },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_TEHUTI, PCI_DEVICE_ID_TEHUTI_TN9510,
+			 PCI_VENDOR_ID_EDIMAX, 0x8102) },
 	{ }
 };
 
Signature · 1 line
2.39.5
author maintainer
#92 lore raw

PATCH 91/783 objtool: Properly disable uaccess validation

In reply to Greg Kroah-Hartman

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

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

From: Josh Poimboeuf <[email protected]>

[ Upstream commit e1a9dda74dbffbc3fa2069ff418a1876dc99fb14 ]

If opts.uaccess isn't set, the uaccess validation is disabled, but only
partially: it doesn't read the uaccess_safe_builtin list but still tries to do the validation. Disable it completely to prevent false warnings.

---
 tools/objtool/check.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
tools/objtool/check.c +9 -2
index a7dcf2d00ab65..522ae26f581be 100644
@@ -3209,7 +3209,7 @@ static int handle_insn_ops(struct instruction *insn,
 		if (update_cfi_state(insn, next_insn, &state->cfi, op))
 			return 1;
 
-		if (!insn->alt_group)
+		if (!opts.uaccess || !insn->alt_group)
 			continue;
 
 		if (op->dest.type == OP_DEST_PUSHF) {
@@ -3676,6 +3676,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
 			return 0;
 
 		case INSN_STAC:
+			if (!opts.uaccess)
+				break;
+
 			if (state.uaccess) {
 				WARN_INSN(insn, "recursive UACCESS enable");
 				return 1;
@@ -3685,6 +3688,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
 			break;
 
 		case INSN_CLAC:
+			if (!opts.uaccess)
+				break;
+
 			if (!state.uaccess && func) {
 				WARN_INSN(insn, "redundant UACCESS disable");
 				return 1;
@@ -4160,7 +4166,8 @@ static int validate_symbol(struct objtool_file *file, struct section *sec,
 	if (!insn || insn->ignore || insn->visited)
 		return 0;
 
-	state->uaccess = sym->uaccess_safe;
+	if (opts.uaccess)
+		state->uaccess = sym->uaccess_safe;
 
 	ret = validate_branch(file, insn_func(insn), insn, *state);
 	if (ret)
Signature · 1 line
2.39.5
author maintainer
#93 lore raw

PATCH 92/783 net/mlx5e: Use right API to free bitmap memory

In reply to Greg Kroah-Hartman

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

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

From: Mark Zhang <[email protected]>

[ Upstream commit cac48eb6d383ee4f037e320608efa5dec029e26a ]

Use bitmap_free() to free memory allocated with bitmap_zalloc_node().
This fixes memtrack error:
mtl rsc inconsistency: memtrack_free: .../drivers/net/ethernet/mellanox/mlx5/core/en_main.c::466: kfree for unknown address=0xFFFF0000CA3619E8, device=0x0

---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +2 -2
index 01f6a60308cb7..5c5168bdacb90 100644
@@ -359,7 +359,7 @@ static int mlx5e_rq_shampo_hd_info_alloc(struct mlx5e_rq *rq, int node)
 	return 0;
 
 err_nomem:
-	kvfree(shampo->bitmap);
+	bitmap_free(shampo->bitmap);
 	kvfree(shampo->pages);
 
 	return -ENOMEM;
@@ -367,7 +367,7 @@ static int mlx5e_rq_shampo_hd_info_alloc(struct mlx5e_rq *rq, int node)
 
 static void mlx5e_rq_shampo_hd_info_free(struct mlx5e_rq *rq)
 {
-	kvfree(rq->mpwqe.shampo->bitmap);
+	bitmap_free(rq->mpwqe.shampo->bitmap);
 	kvfree(rq->mpwqe.shampo->pages);
 }
 
Signature · 1 line
2.39.5
author maintainer
#94 lore raw

PATCH 93/783 PCI: dwc: ep: Ensure proper iteration over outbound map windows

In reply to Greg Kroah-Hartman

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

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

From: Frank Li <[email protected]>

[ Upstream commit f3e1dccba0a0833fc9a05fb838ebeb6ea4ca0e1a ]

Most systems' PCIe outbound map windows have non-zero physical addresses, but the possibility of encountering zero increased after following commit ("PCI: dwc: Use parent_bus_offset").

'ep->outbound_addr[n]', representing 'parent_bus_address', might be 0 on some hardware, which trims high address bits through bus fabric before sending to the PCIe controller.

Replace the iteration logic with 'for_each_set_bit()' to ensure only allocated map windows are iterated when determining the ATU index from a given address.

---
 drivers/pci/controller/dwc/pcie-designware-ep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-designware-ep.c +1 -1
index e41479a9ca027..c91d095024689 100644
@@ -282,7 +282,7 @@ static int dw_pcie_find_index(struct dw_pcie_ep *ep, phys_addr_t addr,
 	u32 index;
 	struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
 
-	for (index = 0; index < pci->num_ob_windows; index++) {
+	for_each_set_bit(index, ep->ob_window_map, pci->num_ob_windows) {
 		if (ep->outbound_addr[index] != addr)
 			continue;
 		*atu_index = index;
Signature · 1 line
2.39.5
author maintainer
#95 lore raw

PATCH 94/783 r8169: disable RTL8126 ZRX-DC timeout

In reply to Greg Kroah-Hartman

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

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

From: ChunHao Lin <[email protected]>

[ Upstream commit b48688ea3c9ac8d5d910c6e91fb7f80d846581f0 ]

Disable it due to it dose not meet ZRX-DC specification. If it is enabled, device will exit L1 substate every 100ms. Disable it for saving more power in L1 substate.

---
 drivers/net/ethernet/realtek/r8169_main.c | 27 +++++++++++++++++++++++
 1 file changed, 27 insertions(+)
drivers/net/ethernet/realtek/r8169_main.c +27 -0
index 5a5eba49c6515..4ead966727734 100644
@@ -2850,6 +2850,32 @@ static u32 rtl_csi_read(struct rtl8169_private *tp, int addr)
 		RTL_R32(tp, CSIDR) : ~0;
 }
 
+static void rtl_disable_zrxdc_timeout(struct rtl8169_private *tp)
+{
+	struct pci_dev *pdev = tp->pci_dev;
+	u32 csi;
+	int rc;
+	u8 val;
+
+#define RTL_GEN3_RELATED_OFF	0x0890
+#define RTL_GEN3_ZRXDC_NONCOMPL	0x1
+	if (pdev->cfg_size > RTL_GEN3_RELATED_OFF) {
+		rc = pci_read_config_byte(pdev, RTL_GEN3_RELATED_OFF, &val);
+		if (rc == PCIBIOS_SUCCESSFUL) {
+			val &= ~RTL_GEN3_ZRXDC_NONCOMPL;
+			rc = pci_write_config_byte(pdev, RTL_GEN3_RELATED_OFF,
+						   val);
+			if (rc == PCIBIOS_SUCCESSFUL)
+				return;
+		}
+	}
+
+	netdev_notice_once(tp->dev,
+		"No native access to PCI extended config space, falling back to CSI\n");
+	csi = rtl_csi_read(tp, RTL_GEN3_RELATED_OFF);
+	rtl_csi_write(tp, RTL_GEN3_RELATED_OFF, csi & ~RTL_GEN3_ZRXDC_NONCOMPL);
+}
+
 static void rtl_set_aspm_entry_latency(struct rtl8169_private *tp, u8 val)
 {
 	struct pci_dev *pdev = tp->pci_dev;
@@ -3822,6 +3848,7 @@ static void rtl_hw_start_8125d(struct rtl8169_private *tp)
 
 static void rtl_hw_start_8126a(struct rtl8169_private *tp)
 {
+	rtl_disable_zrxdc_timeout(tp);
 	rtl_set_def_aspm_entry_latency(tp);
 	rtl_hw_start_8125_common(tp);
 }
Signature · 1 line
2.39.5
author maintainer
#96 lore raw

PATCH 95/783 tools/build: Dont pass test log files to linker

In reply to Greg Kroah-Hartman

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

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

From: Ian Rogers <[email protected]>

[ Upstream commit 935e7cb5bb80106ff4f2fe39640f430134ef8cd8 ]

Separate test log files from object files. Depend on test log output but don't pass to the linker.

---
 tools/build/Makefile.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tools/build/Makefile.build +5 -1
index e710ed67a1b49..3584ff3086078 100644
@@ -129,6 +129,10 @@ objprefix    := $(subst ./,,$(OUTPUT)$(dir)/)
 obj-y        := $(addprefix $(objprefix),$(obj-y))
 subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
 
+# Separate out test log files from real build objects.
+test-y       := $(filter %_log, $(obj-y))
+obj-y        := $(filter-out %_log, $(obj-y))
+
 # Final '$(obj)-in.o' object
 in-target := $(objprefix)$(obj)-in.o
 
@@ -139,7 +143,7 @@ $(subdir-y):
 
 $(sort $(subdir-obj-y)): $(subdir-y) ;
 
-$(in-target): $(obj-y) FORCE
+$(in-target): $(obj-y) $(test-y) FORCE
 	$(call rule_mkdir)
 	$(call if_changed,$(host)ld_multi)
 
Signature · 1 line
2.39.5
author maintainer
#97 lore raw

PATCH 96/783 PCI: xilinx-cpm: Add cpm_csr register mapping for CPM5_HOST1 variant

In reply to Greg Kroah-Hartman

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

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

From: Thippeswamy Havalige <[email protected]>

[ Upstream commit 9e141923cf86b2e1c83d21b87fb4de3d14a20c99 ]

Update the CPM5 check to include CPM5_HOST1 variant. Previously, only CPM5 was considered when mapping the "cpm_csr" register.

With this change, CPM5_HOST1 is also supported, ensuring proper resource mapping for this variant.

---
 drivers/pci/controller/pcie-xilinx-cpm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/controller/pcie-xilinx-cpm.c +2 -1
index dc8ecdbee56c8..163d805673d6d 100644
@@ -538,7 +538,8 @@ static int xilinx_cpm_pcie_parse_dt(struct xilinx_cpm_pcie *port,
 	if (IS_ERR(port->cfg))
 		return PTR_ERR(port->cfg);
 
-	if (port->variant->version == CPM5) {
+	if (port->variant->version == CPM5 ||
+	    port->variant->version == CPM5_HOST1) {
 		port->reg_base = devm_platform_ioremap_resource_byname(pdev,
 								    "cpm_csr");
 		if (IS_ERR(port->reg_base))
Signature · 1 line
2.39.5
author maintainer
#98 lore raw

PATCH 97/783 i2c: qcom-geni: Update i2c frequency table to match hardware guidance

In reply to Greg Kroah-Hartman

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

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

From: Mukesh Kumar Savaliya <[email protected]>

[ Upstream commit a815975cbaeb4ab29f45312ef23be2871b2e8b82 ]

With the current settings, the I2C buses are achieving around 370KHz instead of the expected 400KHz. For 100KHz and 1MHz, the settings are now more compliant and adhere to the Qualcomm’s internal programming guide.

Update the I2C frequency table to align with the recommended values outlined in the I2C hardware programming guide, ensuring proper communication and performance.

---
 drivers/i2c/busses/i2c-qcom-geni.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/i2c/busses/i2c-qcom-geni.c +3 -3
index 7bbd478171e02..515a784c951ca 100644
@@ -148,9 +148,9 @@ struct geni_i2c_clk_fld {
  * source_clock = 19.2 MHz
  */
 static const struct geni_i2c_clk_fld geni_i2c_clk_map_19p2mhz[] = {
-	{KHZ(100), 7, 10, 11, 26},
-	{KHZ(400), 2,  5, 12, 24},
-	{KHZ(1000), 1, 3,  9, 18},
+	{KHZ(100), 7, 10, 12, 26},
+	{KHZ(400), 2,  5, 11, 22},
+	{KHZ(1000), 1, 2,  8, 18},
 	{},
 };
 
Signature · 1 line
2.39.5
author maintainer
#99 lore raw

PATCH 98/783 pNFS/flexfiles: Report ENETDOWN as a connection error

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit aa42add73ce9b9e3714723d385c254b75814e335 ]

If the client should see an ENETDOWN when trying to connect to the data server, it might still be able to talk to the metadata server through another NIC. If so, report the error.

---
 fs/nfs/flexfilelayout/flexfilelayout.c | 1 +
 1 file changed, 1 insertion(+)
fs/nfs/flexfilelayout/flexfilelayout.c +1 -0
index 98b45b636be33..646cda8e2e75b 100644
@@ -1264,6 +1264,7 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
 		case -ECONNRESET:
 		case -EHOSTDOWN:
 		case -EHOSTUNREACH:
+		case -ENETDOWN:
 		case -ENETUNREACH:
 		case -EADDRINUSE:
 		case -ENOBUFS:
Signature · 1 line
2.39.5
author maintainer
#100 lore raw

PATCH 99/783 drm/amdgpu/discovery: check ip_discovery fw file available

In reply to Greg Kroah-Hartman

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

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

From: Flora Cui <[email protected]>

[ Upstream commit 017fbb6690c2245b1b4ef39b66c79d2990fe63dd ]

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 31 ++++++++++---------
 1 file changed, 16 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +16 -15
index 949d74eff2946..6a6dc15273dc7 100644
@@ -113,8 +113,7 @@
 #include "amdgpu_isp.h"
 #endif
 
-#define FIRMWARE_IP_DISCOVERY "amdgpu/ip_discovery.bin"
-MODULE_FIRMWARE(FIRMWARE_IP_DISCOVERY);
+MODULE_FIRMWARE("amdgpu/ip_discovery.bin");
 
 #define mmIP_DISCOVERY_VERSION  0x16A00
 #define mmRCC_CONFIG_MEMSIZE	0xde3
@@ -297,21 +296,13 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
 	return ret;
 }
 
-static int amdgpu_discovery_read_binary_from_file(struct amdgpu_device *adev, uint8_t *binary)
+static int amdgpu_discovery_read_binary_from_file(struct amdgpu_device *adev,
+							uint8_t *binary,
+							const char *fw_name)
 {
 	const struct firmware *fw;
-	const char *fw_name;
 	int r;
 
-	switch (amdgpu_discovery) {
-	case 2:
-		fw_name = FIRMWARE_IP_DISCOVERY;
-		break;
-	default:
-		dev_warn(adev->dev, "amdgpu_discovery is not set properly\n");
-		return -EINVAL;
-	}
-
 	r = request_firmware(&fw, fw_name, adev->dev);
 	if (r) {
 		dev_err(adev->dev, "can't load firmware \"%s\"\n",
@@ -404,10 +395,19 @@ static int amdgpu_discovery_verify_npsinfo(struct amdgpu_device *adev,
 	return 0;
 }
 
+static const char *amdgpu_discovery_get_fw_name(struct amdgpu_device *adev)
+{
+	if (amdgpu_discovery == 2)
+		return "amdgpu/ip_discovery.bin";
+
+	return NULL;
+}
+
 static int amdgpu_discovery_init(struct amdgpu_device *adev)
 {
 	struct table_info *info;
 	struct binary_header *bhdr;
+	const char *fw_name;
 	uint16_t offset;
 	uint16_t size;
 	uint16_t checksum;
@@ -419,9 +419,10 @@ static int amdgpu_discovery_init(struct amdgpu_device *adev)
 		return -ENOMEM;
 
 	/* Read from file if it is the preferred option */
-	if (amdgpu_discovery == 2) {
+	fw_name = amdgpu_discovery_get_fw_name(adev);
+	if (fw_name != NULL) {
 		dev_info(adev->dev, "use ip discovery information from file");
-		r = amdgpu_discovery_read_binary_from_file(adev, adev->mman.discovery_bin);
+		r = amdgpu_discovery_read_binary_from_file(adev, adev->mman.discovery_bin, fw_name);
 
 		if (r) {
 			dev_err(adev->dev, "failed to read ip discovery binary from file\n");
Signature · 1 line
2.39.5
author maintainer
#101 lore raw

PATCH 100/783 drm/amdgpu: rework how the cleaner shader is emitted v3

In reply to Greg Kroah-Hartman

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

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

From: Christian König <[email protected]>

[ Upstream commit b7fbcd77bb467d09ba14cb4ec3b121dc85bb3100 ]

Instead of emitting the cleaner shader for every job which has the enforce_isolation flag set only emit it for the first submission from every client.

v2: add missing NULL check
v3: fix another NULL pointer deref

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 27 ++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +21 -6
index 22aa4a8f11891..f0d675c0fc69c 100644
@@ -754,6 +754,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
 		    bool need_pipe_sync)
 {
 	struct amdgpu_device *adev = ring->adev;
+	struct amdgpu_isolation *isolation = &adev->isolation[ring->xcp_id];
 	unsigned vmhub = ring->vm_hub;
 	struct amdgpu_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
 	struct amdgpu_vmid *id = &id_mgr->ids[job->vmid];
@@ -761,8 +762,9 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
 	bool gds_switch_needed = ring->funcs->emit_gds_switch &&
 		job->gds_switch_needed;
 	bool vm_flush_needed = job->vm_needs_flush;
-	struct dma_fence *fence = NULL;
+	bool cleaner_shader_needed = false;
 	bool pasid_mapping_needed = false;
+	struct dma_fence *fence = NULL;
 	unsigned int patch;
 	int r;
 
@@ -785,8 +787,12 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
 	pasid_mapping_needed &= adev->gmc.gmc_funcs->emit_pasid_mapping &&
 		ring->funcs->emit_wreg;
 
+	cleaner_shader_needed = adev->gfx.enable_cleaner_shader &&
+		ring->funcs->emit_cleaner_shader && job->base.s_fence &&
+		&job->base.s_fence->scheduled == isolation->spearhead;
+
 	if (!vm_flush_needed && !gds_switch_needed && !need_pipe_sync &&
-	    !(job->enforce_isolation && !job->vmid))
+	    !cleaner_shader_needed)
 		return 0;
 
 	amdgpu_ring_ib_begin(ring);
@@ -797,9 +803,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
 	if (need_pipe_sync)
 		amdgpu_ring_emit_pipeline_sync(ring);
 
-	if (adev->gfx.enable_cleaner_shader &&
-	    ring->funcs->emit_cleaner_shader &&
-	    job->enforce_isolation)
+	if (cleaner_shader_needed)
 		ring->funcs->emit_cleaner_shader(ring);
 
 	if (vm_flush_needed) {
@@ -821,7 +825,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
 					    job->oa_size);
 	}
 
-	if (vm_flush_needed || pasid_mapping_needed) {
+	if (vm_flush_needed || pasid_mapping_needed || cleaner_shader_needed) {
 		r = amdgpu_fence_emit(ring, &fence, NULL, 0);
 		if (r)
 			return r;
@@ -843,6 +847,17 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
 		id->pasid_mapping = dma_fence_get(fence);
 		mutex_unlock(&id_mgr->lock);
 	}
+
+	/*
+	 * Make sure that all other submissions wait for the cleaner shader to
+	 * finish before we push them to the HW.
+	 */
+	if (cleaner_shader_needed) {
+		mutex_lock(&adev->enforce_isolation_mutex);
+		dma_fence_put(isolation->spearhead);
+		isolation->spearhead = dma_fence_get(fence);
+		mutex_unlock(&adev->enforce_isolation_mutex);
+	}
 	dma_fence_put(fence);
 
 	amdgpu_ring_patch_cond_exec(ring, patch);
Signature · 1 line
2.39.5
author maintainer
#84 lore raw

PATCH 83/783 net: tn40xx: create swnode for mdio and aqr105 phy and add to mdiobus

In reply to Greg Kroah-Hartman

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

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

From: Hans-Frieder Vogt <[email protected]>

[ Upstream commit 25b6a6d29d4082f6ac231c056ac321a996eb55c9 ]

In case of an AQR105-based device, create a software node for the mdio function, with a child node for the Aquantia AQR105 PHY, providing a firmware-name (and a bit more, which may be used for future checks) to allow the PHY to load a MAC specific firmware from the file system.

The name of the PHY software node follows the naming convention suggested in the patch for the mdiobus_scan function (in the same patch series).

---
 drivers/net/ethernet/tehuti/tn40.c      |  5 +-
 drivers/net/ethernet/tehuti/tn40.h      | 33 ++++++++++
 drivers/net/ethernet/tehuti/tn40_mdio.c | 82 ++++++++++++++++++++++++-
 3 files changed, 117 insertions(+), 3 deletions(-)
drivers/net/ethernet/tehuti/tn40.c +4 -1
index a6965258441c4..558b791a97edd 100644
@@ -1778,7 +1778,7 @@ static int tn40_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	ret = tn40_phy_register(priv);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to set up PHY.\n");
-		goto err_free_irq;
+		goto err_cleanup_swnodes;
 	}
 
 	ret = tn40_priv_init(priv);
@@ -1795,6 +1795,8 @@ static int tn40_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return 0;
 err_unregister_phydev:
 	tn40_phy_unregister(priv);
+err_cleanup_swnodes:
+	tn40_swnodes_cleanup(priv);
 err_free_irq:
 	pci_free_irq_vectors(pdev);
 err_unset_drvdata:
@@ -1816,6 +1818,7 @@ static void tn40_remove(struct pci_dev *pdev)
 	unregister_netdev(ndev);
 
 	tn40_phy_unregister(priv);
+	tn40_swnodes_cleanup(priv);
 	pci_free_irq_vectors(priv->pdev);
 	pci_set_drvdata(pdev, NULL);
 	iounmap(priv->regs);
drivers/net/ethernet/tehuti/tn40.h +33 -0
index 490781fe51205..25da8686d4691 100644
@@ -4,10 +4,13 @@
 #ifndef _TN40_H_
 #define _TN40_H_
 
+#include <linux/property.h>
 #include "tn40_regs.h"
 
 #define TN40_DRV_NAME "tn40xx"
 
+#define PCI_DEVICE_ID_TEHUTI_TN9510	0x4025
+
 #define TN40_MDIO_SPEED_1MHZ (1)
 #define TN40_MDIO_SPEED_6MHZ (6)
 
@@ -102,10 +105,39 @@ struct tn40_txdb {
 	int size; /* Number of elements in the db */
 };
 
+#define NODE_PROP(_NAME, _PROP)	(		\
+	(const struct software_node) {		\
+		.name = _NAME,			\
+		.properties = _PROP,		\
+	})
+
+#define NODE_PAR_PROP(_NAME, _PAR, _PROP)	(	\
+	(const struct software_node) {		\
+		.name = _NAME,			\
+		.parent = _PAR,			\
+		.properties = _PROP,		\
+	})
+
+enum tn40_swnodes {
+	SWNODE_MDIO,
+	SWNODE_PHY,
+	SWNODE_MAX
+};
+
+struct tn40_nodes {
+	char phy_name[32];
+	char mdio_name[32];
+	struct property_entry phy_props[3];
+	struct software_node swnodes[SWNODE_MAX];
+	const struct software_node *group[SWNODE_MAX + 1];
+};
+
 struct tn40_priv {
 	struct net_device *ndev;
 	struct pci_dev *pdev;
 
+	struct tn40_nodes nodes;
+
 	struct napi_struct napi;
 	/* RX FIFOs: 1 for data (full) descs, and 2 for free descs */
 	struct tn40_rxd_fifo rxd_fifo0;
@@ -225,6 +257,7 @@ static inline void tn40_write_reg(struct tn40_priv *priv, u32 reg, u32 val)
 
 int tn40_set_link_speed(struct tn40_priv *priv, u32 speed);
 
+void tn40_swnodes_cleanup(struct tn40_priv *priv);
 int tn40_mdiobus_init(struct tn40_priv *priv);
 
 int tn40_phy_register(struct tn40_priv *priv);
drivers/net/ethernet/tehuti/tn40_mdio.c +80 -2

106 lines not on this page · raw message

Signature · 1 line
2.39.5
author maintainer
#102 lore raw

PATCH 101/783 drm/amdgpu: rework how isolation is enforced v2

In reply to Greg Kroah-Hartman

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

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

From: Christian König <[email protected]>

[ Upstream commit bd22e44ad415ac22e3a4f9a983d2a085f6cb4427 ]

Limiting the number of available VMIDs to enforce isolation causes some issues with gang submit and applying certain HW workarounds which require multiple VMIDs to work correctly.

So instead start to track all submissions to the relevant engines in a per partition data structure and use the dma_fences of the submissions to enforce isolation similar to what a VMID limit does.

v2: use ~0l for jobs without isolation to distinct it from kernel
submissions which uses NULL for the owner. Add some warning when we are OOM.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 13 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 98 +++++++++++++++++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c    | 43 ++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c    | 16 +++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c   | 19 +++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h   |  1 +
 6 files changed, 155 insertions(+), 35 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +11 -2
index 416d2611fbf1c..90f688b3d9d36 100644
@@ -1187,9 +1187,15 @@ struct amdgpu_device {
 	bool                            debug_enable_ras_aca;
 	bool                            debug_exp_resets;
 
-	bool				enforce_isolation[MAX_XCP];
-	/* Added this mutex for cleaner shader isolation between GFX and compute processes */
+	/* Protection for the following isolation structure */
 	struct mutex                    enforce_isolation_mutex;
+	bool				enforce_isolation[MAX_XCP];
+	struct amdgpu_isolation {
+		void			*owner;
+		struct dma_fence	*spearhead;
+		struct amdgpu_sync	active;
+		struct amdgpu_sync	prev;
+	} isolation[MAX_XCP];
 
 	struct amdgpu_init_level *init_lvl;
 };
@@ -1470,6 +1476,9 @@ void amdgpu_device_pcie_port_wreg(struct amdgpu_device *adev,
 struct dma_fence *amdgpu_device_get_gang(struct amdgpu_device *adev);
 struct dma_fence *amdgpu_device_switch_gang(struct amdgpu_device *adev,
 					    struct dma_fence *gang);
+struct dma_fence *amdgpu_device_enforce_isolation(struct amdgpu_device *adev,
+						  struct amdgpu_ring *ring,
+						  struct amdgpu_job *job);
 bool amdgpu_device_has_display_hardware(struct amdgpu_device *adev);
 ssize_t amdgpu_get_soft_full_reset_mask(struct amdgpu_ring *ring);
 ssize_t amdgpu_show_reset_mask(char *buf, uint32_t supported_reset);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +97 -1

122 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +15 -28

55 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +12 -4
index 100f044759435..685c61a05af85 100644
@@ -342,17 +342,24 @@ amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
 {
 	struct amdgpu_ring *ring = to_amdgpu_ring(s_entity->rq->sched);
 	struct amdgpu_job *job = to_amdgpu_job(sched_job);
-	struct dma_fence *fence = NULL;
+	struct dma_fence *fence;
 	int r;
 
 	r = drm_sched_entity_error(s_entity);
 	if (r)
 		goto error;
 
-	if (job->gang_submit)
+	if (job->gang_submit) {
 		fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
+		if (fence)
+			return fence;
+	}
+
+	fence = amdgpu_device_enforce_isolation(ring->adev, ring, job);
+	if (fence)
+		return fence;
 
-	if (!fence && job->vm && !job->vmid) {
+	if (job->vm && !job->vmid) {
 		r = amdgpu_vmid_grab(job->vm, ring, job, &fence);
 		if (r) {
 			dev_err(ring->adev->dev, "Error getting VM ID (%d)\n", r);
@@ -365,9 +372,10 @@ amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
 		 */
 		if (!fence)
 			job->vm = NULL;
+		return fence;
 	}
 
-	return fence;
+	return NULL;
 
 error:
 	dma_fence_set_error(&job->base.s_fence->finished, r);
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +19 -0
index c586ab4c911bf..d75715b3f1870 100644
@@ -399,6 +399,25 @@ int amdgpu_sync_clone(struct amdgpu_sync *source, struct amdgpu_sync *clone)
 	return 0;
 }
 
+/**
+ * amdgpu_sync_move - move all fences from src to dst
+ *
+ * @src: source of the fences, empty after function
+ * @dst: destination for the fences
+ *
+ * Moves all fences from source to destination. All fences in destination are
+ * freed and source is empty after the function call.
+ */
+void amdgpu_sync_move(struct amdgpu_sync *src, struct amdgpu_sync *dst)
+{
+	unsigned int i;
+
+	amdgpu_sync_free(dst);
+
+	for (i = 0; i < HASH_SIZE(src->fences); ++i)
+		hlist_move_list(&src->fences[i], &dst->fences[i]);
+}
+
 /**
  * amdgpu_sync_push_to_job - push fences into job
  * @sync: sync object to get the fences from
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h +1 -0
index e3272dce798d7..a91a8eaf808b1 100644
@@ -56,6 +56,7 @@ struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
 				     struct amdgpu_ring *ring);
 struct dma_fence *amdgpu_sync_get_fence(struct amdgpu_sync *sync);
 int amdgpu_sync_clone(struct amdgpu_sync *source, struct amdgpu_sync *clone);
+void amdgpu_sync_move(struct amdgpu_sync *src, struct amdgpu_sync *dst);
 int amdgpu_sync_push_to_job(struct amdgpu_sync *sync, struct amdgpu_job *job);
 int amdgpu_sync_wait(struct amdgpu_sync *sync, bool intr);
 void amdgpu_sync_free(struct amdgpu_sync *sync);
Signature · 1 line
2.39.5
author maintainer
#103 lore raw

PATCH 102/783 drm/amdgpu: use GFP_NOWAIT for memory allocations

In reply to Greg Kroah-Hartman

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

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

From: Christian König <[email protected]>

[ Upstream commit 16590745b571c07869ef8958e0bbe44ab6f08d1f ]

In the critical submission path memory allocations can't wait for reclaim since that can potentially wait for submissions to finish.

Finally clean that up and mark most memory allocations in the critical path with GFP_NOWAIT. The only exception left is the dma_fence_array() used when no VMID is available, but that will be cleaned up later on.

---
 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c   |  8 ++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c         | 18 +++++++++++-------
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c        | 11 +++++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c        |  4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c       | 11 ++++++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h       |  3 ++-
 6 files changed, 32 insertions(+), 23 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +4 -4
index 1e998f972c308..70224b9f54f2f 100644
@@ -499,7 +499,7 @@ static int vm_update_pds(struct amdgpu_vm *vm, struct amdgpu_sync *sync)
 	if (ret)
 		return ret;
 
-	return amdgpu_sync_fence(sync, vm->last_update);
+	return amdgpu_sync_fence(sync, vm->last_update, GFP_KERNEL);
 }
 
 static uint64_t get_pte_flags(struct amdgpu_device *adev, struct kgd_mem *mem)
@@ -1263,7 +1263,7 @@ static int unmap_bo_from_gpuvm(struct kgd_mem *mem,
 
 	(void)amdgpu_vm_clear_freed(adev, vm, &bo_va->last_pt_update);
 
-	(void)amdgpu_sync_fence(sync, bo_va->last_pt_update);
+	(void)amdgpu_sync_fence(sync, bo_va->last_pt_update, GFP_KERNEL);
 
 	return 0;
 }
@@ -1287,7 +1287,7 @@ static int update_gpuvm_pte(struct kgd_mem *mem,
 		return ret;
 	}
 
-	return amdgpu_sync_fence(sync, bo_va->last_pt_update);
+	return amdgpu_sync_fence(sync, bo_va->last_pt_update, GFP_KERNEL);
 }
 
 static int map_bo_to_gpuvm(struct kgd_mem *mem,
@@ -2969,7 +2969,7 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence __rcu *
 		}
 		dma_resv_for_each_fence(&cursor, bo->tbo.base.resv,
 					DMA_RESV_USAGE_KERNEL, fence) {
-			ret = amdgpu_sync_fence(&sync_obj, fence);
+			ret = amdgpu_sync_fence(&sync_obj, fence, GFP_KERNEL);
 			if (ret) {
 				pr_debug("Memory eviction: Sync BO fence failed. Try again\n");
 				goto validate_map_fail;
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +11 -7
index 5cc5f59e30184..4a5b406601fa2 100644
@@ -428,7 +428,7 @@ static int amdgpu_cs_p2_dependencies(struct amdgpu_cs_parser *p,
 			dma_fence_put(old);
 		}
 
-		r = amdgpu_sync_fence(&p->sync, fence);
+		r = amdgpu_sync_fence(&p->sync, fence, GFP_KERNEL);
 		dma_fence_put(fence);
 		if (r)
 			return r;
@@ -450,7 +450,7 @@ static int amdgpu_syncobj_lookup_and_add(struct amdgpu_cs_parser *p,
 		return r;
 	}
 
-	r = amdgpu_sync_fence(&p->sync, fence);
+	r = amdgpu_sync_fence(&p->sync, fence, GFP_KERNEL);
 	dma_fence_put(fence);
 	return r;
 }
@@ -1124,7 +1124,8 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
 	if (r)
 		return r;
 
-	r = amdgpu_sync_fence(&p->sync, fpriv->prt_va->last_pt_update);
+	r = amdgpu_sync_fence(&p->sync, fpriv->prt_va->last_pt_update,
+			      GFP_KERNEL);
 	if (r)
 		return r;
 
@@ -1135,7 +1136,8 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
 		if (r)
 			return r;
 
-		r = amdgpu_sync_fence(&p->sync, bo_va->last_pt_update);
+		r = amdgpu_sync_fence(&p->sync, bo_va->last_pt_update,
+				      GFP_KERNEL);
 		if (r)
 			return r;
 	}
@@ -1154,7 +1156,8 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
 		if (r)
 			return r;
 
-		r = amdgpu_sync_fence(&p->sync, bo_va->last_pt_update);
+		r = amdgpu_sync_fence(&p->sync, bo_va->last_pt_update,
+				      GFP_KERNEL);
 		if (r)
 			return r;
 	}
@@ -1167,7 +1170,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
 	if (r)
 		return r;
 
-	r = amdgpu_sync_fence(&p->sync, vm->last_update);
+	r = amdgpu_sync_fence(&p->sync, vm->last_update, GFP_KERNEL);
 	if (r)
 		return r;
 
@@ -1248,7 +1251,8 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
 			continue;
 		}
 
-		r = amdgpu_sync_fence(&p->gang_leader->explicit_sync, fence);
+		r = amdgpu_sync_fence(&p->gang_leader->explicit_sync, fence,
+				      GFP_KERNEL);
 		dma_fence_put(fence);
 		if (r)
 			return r;
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +7 -4
index 9008b7388e897..92ab821afc06a 100644
@@ -209,7 +209,7 @@ static int amdgpu_vmid_grab_idle(struct amdgpu_ring *ring,
 		return 0;
 	}
 
-	fences = kmalloc_array(id_mgr->num_ids, sizeof(void *), GFP_KERNEL);
+	fences = kmalloc_array(id_mgr->num_ids, sizeof(void *), GFP_NOWAIT);
 	if (!fences)
 		return -ENOMEM;
 
@@ -313,7 +313,8 @@ static int amdgpu_vmid_grab_reserved(struct amdgpu_vm *vm,
 	/* Good we can use this VMID. Remember this submission as
 	* user of the VMID.
 	*/
-	r = amdgpu_sync_fence(&(*id)->active, &job->base.s_fence->finished);
+	r = amdgpu_sync_fence(&(*id)->active, &job->base.s_fence->finished,
+			      GFP_NOWAIT);
 	if (r)
 		return r;
 
@@ -372,7 +373,8 @@ static int amdgpu_vmid_grab_used(struct amdgpu_vm *vm,
 		 * user of the VMID.
 		 */
 		r = amdgpu_sync_fence(&(*id)->active,
-				      &job->base.s_fence->finished);
+				      &job->base.s_fence->finished,
+				      GFP_NOWAIT);
 		if (r)
 			return r;
 
@@ -424,7 +426,8 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
 
 			/* Remember this submission as user of the VMID */
 			r = amdgpu_sync_fence(&id->active,
-					      &job->base.s_fence->finished);
+					      &job->base.s_fence->finished,
+					      GFP_NOWAIT);
 			if (r)
 				goto error;
 
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +2 -2
index 6fa20980a0b15..e4251d0691c9c 100644
@@ -1335,14 +1335,14 @@ int amdgpu_mes_ctx_map_meta_data(struct amdgpu_device *adev,
 		DRM_ERROR("failed to do vm_bo_update on meta data\n");
 		goto error_del_bo_va;
 	}
-	amdgpu_sync_fence(&sync, bo_va->last_pt_update);
+	amdgpu_sync_fence(&sync, bo_va->last_pt_update, GFP_KERNEL);
 
 	r = amdgpu_vm_update_pdes(adev, vm, false);
 	if (r) {
 		DRM_ERROR("failed to update pdes on meta data\n");
 		goto error_del_bo_va;
 	}
-	amdgpu_sync_fence(&sync, vm->last_update);
+	amdgpu_sync_fence(&sync, vm->last_update, GFP_KERNEL);
 
 	amdgpu_sync_wait(&sync, false);
 	drm_exec_fini(&exec);
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +6 -5
index d75715b3f1870..34fc742fda91d 100644
@@ -152,7 +152,8 @@ static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f)
  *
  * Add the fence to the sync object.
  */
-int amdgpu_sync_fence(struct amdgpu_sync *sync, struct dma_fence *f)
+int amdgpu_sync_fence(struct amdgpu_sync *sync, struct dma_fence *f,
+		      gfp_t flags)
 {
 	struct amdgpu_sync_entry *e;
 
@@ -162,7 +163,7 @@ int amdgpu_sync_fence(struct amdgpu_sync *sync, struct dma_fence *f)
 	if (amdgpu_sync_add_later(sync, f))
 		return 0;
 
-	e = kmem_cache_alloc(amdgpu_sync_slab, GFP_KERNEL);
+	e = kmem_cache_alloc(amdgpu_sync_slab, flags);
 	if (!e)
 		return -ENOMEM;
 
@@ -249,7 +250,7 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
 			struct dma_fence *tmp = dma_fence_chain_contained(f);
 
 			if (amdgpu_sync_test_fence(adev, mode, owner, tmp)) {
-				r = amdgpu_sync_fence(sync, f);
+				r = amdgpu_sync_fence(sync, f, GFP_KERNEL);
 				dma_fence_put(f);
 				if (r)
 					return r;
@@ -281,7 +282,7 @@ int amdgpu_sync_kfd(struct amdgpu_sync *sync, struct dma_resv *resv)
 		if (fence_owner != AMDGPU_FENCE_OWNER_KFD)
 			continue;
 
-		r = amdgpu_sync_fence(sync, f);
+		r = amdgpu_sync_fence(sync, f, GFP_KERNEL);
 		if (r)
 			break;
 	}
@@ -388,7 +389,7 @@ int amdgpu_sync_clone(struct amdgpu_sync *source, struct amdgpu_sync *clone)
 	hash_for_each_safe(source->fences, i, tmp, e, node) {
 		f = e->fence;
 		if (!dma_fence_is_signaled(f)) {
-			r = amdgpu_sync_fence(clone, f);
+			r = amdgpu_sync_fence(clone, f, GFP_KERNEL);
 			if (r)
 				return r;
 		} else {
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h +2 -1
index a91a8eaf808b1..51eb4382c91eb 100644
@@ -47,7 +47,8 @@ struct amdgpu_sync {
 };
 
 void amdgpu_sync_create(struct amdgpu_sync *sync);
-int amdgpu_sync_fence(struct amdgpu_sync *sync, struct dma_fence *f);
+int amdgpu_sync_fence(struct amdgpu_sync *sync, struct dma_fence *f,
+		      gfp_t flags);
 int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
 		     struct dma_resv *resv, enum amdgpu_sync_mode mode,
 		     void *owner);
Signature · 1 line
2.39.5
author maintainer
#104 lore raw

PATCH 103/783 drm/amdkfd: set precise mem ops caps to disabled for gfx 11 and 12

In reply to Greg Kroah-Hartman

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

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

From: Jonathan Kim <[email protected]>

[ Upstream commit f82d27dcff939d3cbecbc60e1b71e2518c37e81d ]

Clause instructions with precise memory enabled currently hang the shader so set capabilities flag to disabled since it's unsafe to use for debugging.

---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +0 -4
index 62a9a9ccf9bb6..334c576a75b14 100644
@@ -2006,10 +2006,6 @@ static void kfd_topology_set_capabilities(struct kfd_topology_device *dev)
 		dev->node_props.debug_prop |= HSA_DBG_WATCH_ADDR_MASK_LO_BIT_GFX10 |
 					HSA_DBG_WATCH_ADDR_MASK_HI_BIT;
 
-		if (KFD_GC_VERSION(dev->gpu) >= IP_VERSION(11, 0, 0))
-			dev->node_props.capability |=
-				HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED;
-
 		if (KFD_GC_VERSION(dev->gpu) >= IP_VERSION(12, 0, 0))
 			dev->node_props.capability |=
 				HSA_CAP_TRAP_DEBUG_PRECISE_ALU_OPERATIONS_SUPPORTED;
Signature · 1 line
2.39.5
author maintainer
#105 lore raw

PATCH 104/783 PCI: vmd: Disable MSI remapping bypass under Xen

In reply to Greg Kroah-Hartman

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

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

From: Roger Pau Monne <[email protected]>

[ Upstream commit 6c4d5aadf5df31ea0ac025980670eee9beaf466b ]

MSI remapping bypass (directly configuring MSI entries for devices on the VMD bus) won't work under Xen, as Xen is not aware of devices in such bus, and hence cannot configure the entries using the pIRQ interface in the PV case, and in the PVH case traps won't be setup for MSI entries for such devices.

Until Xen is aware of devices in the VMD bus prevent the VMD_FEAT_CAN_BYPASS_MSI_REMAP capability from being used when running as any kind of Xen guest.

The MSI remapping bypass is an optional feature of VMD bridges, and hence when running under Xen it will be masked and devices will be forced to redirect its interrupts from the VMD bridge. That mode of operation must always be supported by VMD bridges and works when Xen is not aware of devices behind the VMD bridge.

Message-ID: <[email protected]>

---
 drivers/pci/controller/vmd.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
drivers/pci/controller/vmd.c +20 -0
index 94ceec50a2b94..8df064b62a2ff 100644
@@ -17,6 +17,8 @@
 #include <linux/rculist.h>
 #include <linux/rcupdate.h>
 
+#include <xen/xen.h>
+
 #include <asm/irqdomain.h>
 
 #define VMD_CFGBAR	0
@@ -970,6 +972,24 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	struct vmd_dev *vmd;
 	int err;
 
+	if (xen_domain()) {
+		/*
+		 * Xen doesn't have knowledge about devices in the VMD bus
+		 * because the config space of devices behind the VMD bridge is
+		 * not known to Xen, and hence Xen cannot discover or configure
+		 * them in any way.
+		 *
+		 * Bypass of MSI remapping won't work in that case as direct
+		 * write by Linux to the MSI entries won't result in functional
+		 * interrupts, as Xen is the entity that manages the host
+		 * interrupt controller and must configure interrupts.  However
+		 * multiplexing of interrupts by the VMD bridge will work under
+		 * Xen, so force the usage of that mode which must always be
+		 * supported by VMD bridges.
+		 */
+		features &= ~VMD_FEAT_CAN_BYPASS_MSI_REMAP;
+	}
+
 	if (resource_size(&dev->resource[VMD_CFGBAR]) < (1 << 20))
 		return -ENOMEM;
 
Signature · 1 line
2.39.5
author maintainer
#106 lore raw

PATCH 105/783 xen/pci: Do not register devices with segments >= 0x10000

In reply to Greg Kroah-Hartman

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

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

From: Roger Pau Monne <[email protected]>

[ Upstream commit 5ccf1b8ae76ddf348e02a0d1564ff9baf8b6c415 ]

The current hypercall interface for doing PCI device operations always uses a segment field that has a 16 bit width. However on Linux there are buses like VMD that hook up devices into the PCI hierarchy at segment >= 0x10000, after the maximum possible segment enumerated in ACPI.

Attempting to register or manage those devices with Xen would result in errors at best, or overlaps with existing devices living on the truncated equivalent segment values. Note also that the VMD segment numbers are arbitrarily assigned by the OS, and hence there would need to be some negotiation between Xen and the OS to agree on how to enumerate VMD segments and devices behind them.

Skip notifying Xen about those devices. Given how VMD bridges can multiplex interrupts on behalf of devices behind them there's no need for Xen to be aware of such devices for them to be usable by Linux.

Message-ID: <[email protected]>

---
 drivers/xen/pci.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
drivers/xen/pci.c +32 -0
index 416f231809cb6..bfe07adb3e3a6 100644
@@ -43,6 +43,18 @@ static int xen_add_device(struct device *dev)
 		pci_mcfg_reserved = true;
 	}
 #endif
+
+	if (pci_domain_nr(pci_dev->bus) >> 16) {
+		/*
+		 * The hypercall interface is limited to 16bit PCI segment
+		 * values, do not attempt to register devices with Xen in
+		 * segments greater or equal than 0x10000.
+		 */
+		dev_info(dev,
+			 "not registering with Xen: invalid PCI segment\n");
+		return 0;
+	}
+
 	if (pci_seg_supported) {
 		DEFINE_RAW_FLEX(struct physdev_pci_device_add, add, optarr, 1);
 
@@ -149,6 +161,16 @@ static int xen_remove_device(struct device *dev)
 	int r;
 	struct pci_dev *pci_dev = to_pci_dev(dev);
 
+	if (pci_domain_nr(pci_dev->bus) >> 16) {
+		/*
+		 * The hypercall interface is limited to 16bit PCI segment
+		 * values.
+		 */
+		dev_info(dev,
+			 "not unregistering with Xen: invalid PCI segment\n");
+		return 0;
+	}
+
 	if (pci_seg_supported) {
 		struct physdev_pci_device device = {
 			.seg = pci_domain_nr(pci_dev->bus),
@@ -182,6 +204,16 @@ int xen_reset_device(const struct pci_dev *dev)
 		.flags = PCI_DEVICE_RESET_FLR,
 	};
 
+	if (pci_domain_nr(dev->bus) >> 16) {
+		/*
+		 * The hypercall interface is limited to 16bit PCI segment
+		 * values.
+		 */
+		dev_info(&dev->dev,
+			 "unable to notify Xen of device reset: invalid PCI segment\n");
+		return 0;
+	}
+
 	return HYPERVISOR_physdev_op(PHYSDEVOP_pci_device_reset, &device);
 }
 EXPORT_SYMBOL_GPL(xen_reset_device);
Signature · 1 line
2.39.5
author maintainer
#107 lore raw

PATCH 106/783 ext4: on a remount, only log the ro or r/w state when it has changed

In reply to Greg Kroah-Hartman

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

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

From: Nicolas Bretz <[email protected]>

[ Upstream commit d7b0befd09320e3356a75cb96541c030515e7f5f ]

A user complained that a message such as:

EXT4-fs (nvme0n1p3): re-mounted UUID ro. Quota mode: none.

implied that the file system was previously mounted read/write and was now remounted read-only, when it could have been some other mount state that had changed by the "mount -o remount" operation. Fix this by only logging "ro"or "r/w" when it has changed.

https://bugzilla.kernel.org/show_bug.cgi?id=219132

---
 fs/ext4/super.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
fs/ext4/super.c +4 -3
index 528979de0f7c1..b4a02be2eacf6 100644
@@ -6776,6 +6776,7 @@ static int ext4_reconfigure(struct fs_context *fc)
 {
 	struct super_block *sb = fc->root->d_sb;
 	int ret;
+	bool old_ro = sb_rdonly(sb);
 
 	fc->s_fs_info = EXT4_SB(sb);
 
@@ -6787,9 +6788,9 @@ static int ext4_reconfigure(struct fs_context *fc)
 	if (ret < 0)
 		return ret;
 
-	ext4_msg(sb, KERN_INFO, "re-mounted %pU %s. Quota mode: %s.",
-		 &sb->s_uuid, sb_rdonly(sb) ? "ro" : "r/w",
-		 ext4_quota_mode(sb));
+	ext4_msg(sb, KERN_INFO, "re-mounted %pU%s.",
+		 &sb->s_uuid,
+		 (old_ro != sb_rdonly(sb)) ? (sb_rdonly(sb) ? " ro" : " r/w") : "");
 
 	return 0;
 }
Signature · 1 line
2.39.5
author maintainer
#108 lore raw

PATCH 107/783 libnvdimm/labels: Fix divide error in nd_label_data_init()

In reply to Greg Kroah-Hartman

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

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

From: Robert Richter <[email protected]>

[ Upstream commit ef1d3455bbc1922f94a91ed58d3d7db440652959 ]

If a faulty CXL memory device returns a broken zero LSA size in its memory device information (Identify Memory Device (Opcode 4000h), CXL spec. 3.1, 8.2.9.9.1.1), a divide error occurs in the libnvdimm driver:

 Oops: divide error: 0000 [#1] PREEMPT SMP NOPTI
 RIP: 0010:nd_label_data_init+0x10e/0x800 [libnvdimm]

Code and flow:

1) CXL Command 4000h returns LSA size = 0
2) config_size is assigned to zero LSA size (CXL pmem driver):

drivers/cxl/pmem.c: .config_size = mds->lsa_size,

3) max_xfer is set to zero (nvdimm driver):

drivers/nvdimm/label.c: max_xfer = min_t(size_t, ndd->nsarea.max_xfer, config_size);

4) A subsequent DIV_ROUND_UP() causes a division by zero:

drivers/nvdimm/label.c: /* Make our initial read size a multiple of max_xfer size */ drivers/nvdimm/label.c: read_size = min(DIV_ROUND_UP(read_size, max_xfer) * max_xfer,
drivers/nvdimm/label.c- config_size);

Fix this by checking the config size parameter by extending an existing check.

---
 drivers/nvdimm/label.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvdimm/label.c +2 -1
index 082253a3a9560..04f4a049599a1 100644
@@ -442,7 +442,8 @@ int nd_label_data_init(struct nvdimm_drvdata *ndd)
 	if (ndd->data)
 		return 0;
 
-	if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0) {
+	if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0 ||
+	    ndd->nsarea.config_size == 0) {
 		dev_dbg(ndd->dev, "failed to init config data area: (%u:%u)\n",
 			ndd->nsarea.max_xfer, ndd->nsarea.config_size);
 		return -ENXIO;
Signature · 1 line
2.39.5
author maintainer
#109 lore raw

PATCH 108/783 pidfs: improve multi-threaded exec and premature thread-group leader exit polling

In reply to Greg Kroah-Hartman

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

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

From: Christian Brauner <[email protected]>

[ Upstream commit 0fb482728ba1ee2130eaa461bf551f014447997c ]

This is another attempt trying to make pidfd polling for multi-threaded exec and premature thread-group leader exit consistent.

A quick recap of these two cases:

(1) During a multi-threaded exec by a subthread, i.e., non-thread-group leader thread, all other threads in the thread-group including the thread-group leader are killed and the struct pid of the thread-group leader will be taken over by the subthread that called exec. IOW, two tasks change their TIDs.

(2) A premature thread-group leader exit means that the thread-group leader exited before all of the other subthreads in the thread-group have exited.

Both cases lead to inconsistencies for pidfd polling with PIDFD_THREAD. Any caller that holds a PIDFD_THREAD pidfd to the current thread-group leader may or may not see an exit notification on the file descriptor depending on when poll is performed. If the poll is performed before the exec of the subthread has concluded an exit notification is generated for the old thread-group leader. If the poll is performed after the exec of the subthread has concluded no exit notification is generated for the old thread-group leader.

The correct behavior would be to simply not generate an exit notification on the struct pid of a subhthread exec because the struct pid is taken over by the subthread and thus remains alive.

But this is difficult to handle because a thread-group may exit prematurely as mentioned in (2). In that case an exit notification is reliably generated but the subthreads may continue to run for an indeterminate amount of time and thus also may exec at some point.

So far there was no way to distinguish between (1) and (2) internally. This tiny series tries to address this problem by discarding PIDFD_THREAD notification on premature thread-group leader exit.

If that works correctly then no exit notifications are generated for a PIDFD_THREAD pidfd for a thread-group leader until all subthreads have been reaped. If a subthread should exec aftewards no exit notification will be generated until that task exits or it creates subthreads and repeates the cycle.

---
 fs/pidfs.c      |    9 +++++----
 kernel/exit.c   |    6 +++---
 kernel/signal.c |    3 +--
 3 files changed, 9 insertions(+), 9 deletions(-)
fs/pidfs.c +5 -4
@@ -188,20 +188,21 @@ static void pidfd_show_fdinfo(struct seq
 static __poll_t pidfd_poll(struct file *file, struct poll_table_struct *pts)
 {
 	struct pid *pid = pidfd_pid(file);
-	bool thread = file->f_flags & PIDFD_THREAD;
 	struct task_struct *task;
 	__poll_t poll_flags = 0;
 
 	poll_wait(file, &pid->wait_pidfd, pts);
 	/*
-	 * Depending on PIDFD_THREAD, inform pollers when the thread
-	 * or the whole thread-group exits.
+	 * Don't wake waiters if the thread-group leader exited
+	 * prematurely. They either get notified when the last subthread
+	 * exits or not at all if one of the remaining subthreads execs
+	 * and assumes the struct pid of the old thread-group leader.
 	 */
 	guard(rcu)();
 	task = pid_task(pid, PIDTYPE_PID);
 	if (!task)
 		poll_flags = EPOLLIN | EPOLLRDNORM | EPOLLHUP;
-	else if (task->exit_state && (thread || thread_group_empty(task)))
+	else if (task->exit_state && !delay_group_leader(task))
 		poll_flags = EPOLLIN | EPOLLRDNORM;
 
 	return poll_flags;
kernel/exit.c +3 -3
@@ -741,10 +741,10 @@ static void exit_notify(struct task_stru
 
 	tsk->exit_state = EXIT_ZOMBIE;
 	/*
-	 * sub-thread or delay_group_leader(), wake up the
-	 * PIDFD_THREAD waiters.
+	 * Ignore thread-group leaders that exited before all
+	 * subthreads did.
 	 */
-	if (!thread_group_empty(tsk))
+	if (!delay_group_leader(tsk))
 		do_notify_pidfd(tsk);
 
 	if (unlikely(tsk->ptrace)) {
kernel/signal.c +1 -2
@@ -2180,8 +2180,7 @@ bool do_notify_parent(struct task_struct
 	WARN_ON_ONCE(!tsk->ptrace &&
 	       (tsk->group_leader != tsk || !thread_group_empty(tsk)));
 	/*
-	 * tsk is a group leader and has no threads, wake up the
-	 * non-PIDFD_THREAD waiters.
+	 * Notify for thread-group leaders without subthreads.
 	 */
 	if (thread_group_empty(tsk))
 		do_notify_pidfd(tsk);
author maintainer
#110 lore raw

PATCH 109/783 staging: vchiq_arm: Create keep-alive thread during probe

In reply to Greg Kroah-Hartman

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

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

From: Stefan Wahren <[email protected]>

[ Upstream commit 86bc8821700665ad3962f3ef0d93667f59cf7031 ]

Creating the keep-alive thread in vchiq_platform_init_state have the following advantages:
- abort driver probe if kthread_create fails (more consistent behavior)
- make resource release process easier

Since vchiq_keepalive_thread_func is defined below vchiq_platform_init_state, the latter must be moved.

---
 .../interface/vchiq_arm/vchiq_arm.c           | 69 +++++++++----------
 1 file changed, 34 insertions(+), 35 deletions(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +34 -35
index 0c7ea2d0ee85e..64f9536f12329 100644
@@ -280,29 +280,6 @@ static int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state
 	return 0;
 }
 
-int
-vchiq_platform_init_state(struct vchiq_state *state)
-{
-	struct vchiq_arm_state *platform_state;
-
-	platform_state = devm_kzalloc(state->dev, sizeof(*platform_state), GFP_KERNEL);
-	if (!platform_state)
-		return -ENOMEM;
-
-	rwlock_init(&platform_state->susp_res_lock);
-
-	init_completion(&platform_state->ka_evt);
-	atomic_set(&platform_state->ka_use_count, 0);
-	atomic_set(&platform_state->ka_use_ack_count, 0);
-	atomic_set(&platform_state->ka_release_count, 0);
-
-	platform_state->state = state;
-
-	state->platform_state = (struct opaque_platform_state *)platform_state;
-
-	return 0;
-}
-
 static struct vchiq_arm_state *vchiq_platform_get_arm_state(struct vchiq_state *state)
 {
 	return (struct vchiq_arm_state *)state->platform_state;
@@ -1011,6 +988,39 @@ vchiq_keepalive_thread_func(void *v)
 	return 0;
 }
 
+int
+vchiq_platform_init_state(struct vchiq_state *state)
+{
+	struct vchiq_arm_state *platform_state;
+	char threadname[16];
+
+	platform_state = devm_kzalloc(state->dev, sizeof(*platform_state), GFP_KERNEL);
+	if (!platform_state)
+		return -ENOMEM;
+
+	snprintf(threadname, sizeof(threadname), "vchiq-keep/%d",
+		 state->id);
+	platform_state->ka_thread = kthread_create(&vchiq_keepalive_thread_func,
+						   (void *)state, threadname);
+	if (IS_ERR(platform_state->ka_thread)) {
+		dev_err(state->dev, "couldn't create thread %s\n", threadname);
+		return PTR_ERR(platform_state->ka_thread);
+	}
+
+	rwlock_init(&platform_state->susp_res_lock);
+
+	init_completion(&platform_state->ka_evt);
+	atomic_set(&platform_state->ka_use_count, 0);
+	atomic_set(&platform_state->ka_use_ack_count, 0);
+	atomic_set(&platform_state->ka_release_count, 0);
+
+	platform_state->state = state;
+
+	state->platform_state = (struct opaque_platform_state *)platform_state;
+
+	return 0;
+}
+
 int
 vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service,
 		   enum USE_TYPE_E use_type)
@@ -1331,7 +1341,6 @@ void vchiq_platform_conn_state_changed(struct vchiq_state *state,
 				       enum vchiq_connstate newstate)
 {
 	struct vchiq_arm_state *arm_state = vchiq_platform_get_arm_state(state);
-	char threadname[16];
 
 	dev_dbg(state->dev, "suspend: %d: %s->%s\n",
 		state->id, get_conn_state_name(oldstate), get_conn_state_name(newstate));
@@ -1346,17 +1355,7 @@ void vchiq_platform_conn_state_changed(struct vchiq_state *state,
 
 	arm_state->first_connect = 1;
 	write_unlock_bh(&arm_state->susp_res_lock);
-	snprintf(threadname, sizeof(threadname), "vchiq-keep/%d",
-		 state->id);
-	arm_state->ka_thread = kthread_create(&vchiq_keepalive_thread_func,
-					      (void *)state,
-					      threadname);
-	if (IS_ERR(arm_state->ka_thread)) {
-		dev_err(state->dev, "suspend: Couldn't create thread %s\n",
-			threadname);
-	} else {
-		wake_up_process(arm_state->ka_thread);
-	}
+	wake_up_process(arm_state->ka_thread);
 }
 
 static const struct of_device_id vchiq_of_match[] = {
Signature · 1 line
2.39.5
author maintainer
#111 lore raw

PATCH 110/783 mmc: host: Wait for Vdd to settle on card power off

In reply to Greg Kroah-Hartman

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

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

From: Erick Shepherd <[email protected]>

[ Upstream commit 31e75ed964582257f59156ce6a42860e1ae4cc39 ]

The SD spec version 6.0 section 6.4.1.5 requires that Vdd must be lowered to less than 0.5V for a minimum of 1 ms when powering off a card. Increase wait to 15 ms so that voltage has time to drain down to 0.5V and cards can power off correctly. Issues with voltage drain time were only observed on Apollo Lake and Bay Trail host controllers so this fix is limited to those devices.

---
 drivers/mmc/host/sdhci-pci-core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-pci-core.c +5 -1
index 1f0bd723f0112..13a84b9309e06 100644
@@ -610,8 +610,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,
 
 	sdhci_set_power(host, mode, vdd);
 
-	if (mode == MMC_POWER_OFF)
+	if (mode == MMC_POWER_OFF) {
+		if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
+		    slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BYT_SD)
+			usleep_range(15000, 17500);
 		return;
+	}
 
 	/*
 	 * Bus power might not enable after D3 -> D0 transition due to the
Signature · 1 line
2.39.5
author maintainer
#85 lore raw

PATCH 84/783 thermal/drivers/mediatek/lvts: Start sensor interrupts disabled

In reply to Greg Kroah-Hartman

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

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

From: Nícolas F. R. A. Prado <[email protected]>

[ Upstream commit 2738fb3ec6838a10d2c4ce65cefdb3b90b11bd61 ]

Interrupts are enabled per sensor in lvts_update_irq_mask() as needed, there's no point in enabling all of them during initialization. Change the MONINT register initial value so all sensor interrupts start disabled.

---
 drivers/thermal/mediatek/lvts_thermal.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/thermal/mediatek/lvts_thermal.c +1 -2
index 0aaa44b734ca4..d0901d8ac85da 100644
@@ -65,7 +65,6 @@
 #define LVTS_HW_FILTER				0x0
 #define LVTS_TSSEL_CONF				0x13121110
 #define LVTS_CALSCALE_CONF			0x300
-#define LVTS_MONINT_CONF			0x0300318C
 
 #define LVTS_MONINT_OFFSET_SENSOR0		0xC
 #define LVTS_MONINT_OFFSET_SENSOR1		0x180
@@ -929,7 +928,7 @@ static int lvts_irq_init(struct lvts_ctrl *lvts_ctrl)
 	 * The LVTS_MONINT register layout is the same as the LVTS_MONINTSTS
 	 * register, except we set the bits to enable the interrupt.
 	 */
-	writel(LVTS_MONINT_CONF, LVTS_MONINT(lvts_ctrl->base));
+	writel(0, LVTS_MONINT(lvts_ctrl->base));
 
 	return 0;
 }
Signature · 1 line
2.39.5
author maintainer
#112 lore raw

PATCH 111/783 drm/amdgpu: Skip pcie_replay_count sysfs creation for VF

In reply to Greg Kroah-Hartman

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

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

From: Victor Skvortsov <[email protected]>

[ Upstream commit 9c05636ca72a2dbf41bf0900380f438a0de47319 ]

VFs cannot read the NAK_COUNTER register. This information is only available through PMFW metrics.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 ++++++++++++++++------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +20 -7
index 726c4854e6296..c00a01c62724a 100644
@@ -224,6 +224,24 @@ static ssize_t amdgpu_device_get_pcie_replay_count(struct device *dev,
 static DEVICE_ATTR(pcie_replay_count, 0444,
 		amdgpu_device_get_pcie_replay_count, NULL);
 
+static int amdgpu_device_attr_sysfs_init(struct amdgpu_device *adev)
+{
+	int ret = 0;
+
+	if (!amdgpu_sriov_vf(adev))
+		ret = sysfs_create_file(&adev->dev->kobj,
+					&dev_attr_pcie_replay_count.attr);
+
+	return ret;
+}
+
+static void amdgpu_device_attr_sysfs_fini(struct amdgpu_device *adev)
+{
+	if (!amdgpu_sriov_vf(adev))
+		sysfs_remove_file(&adev->dev->kobj,
+				  &dev_attr_pcie_replay_count.attr);
+}
+
 static ssize_t amdgpu_sysfs_reg_state_get(struct file *f, struct kobject *kobj,
 					  struct bin_attribute *attr, char *buf,
 					  loff_t ppos, size_t count)
@@ -4123,11 +4141,6 @@ static bool amdgpu_device_check_iommu_remap(struct amdgpu_device *adev)
 }
 #endif
 
-static const struct attribute *amdgpu_dev_attributes[] = {
-	&dev_attr_pcie_replay_count.attr,
-	NULL
-};
-
 static void amdgpu_device_set_mcbp(struct amdgpu_device *adev)
 {
 	if (amdgpu_mcbp == 1)
@@ -4572,7 +4585,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	} else
 		adev->ucode_sysfs_en = true;
 
-	r = sysfs_create_files(&adev->dev->kobj, amdgpu_dev_attributes);
+	r = amdgpu_device_attr_sysfs_init(adev);
 	if (r)
 		dev_err(adev->dev, "Could not create amdgpu device attr\n");
 
@@ -4709,7 +4722,7 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
 		amdgpu_pm_sysfs_fini(adev);
 	if (adev->ucode_sysfs_en)
 		amdgpu_ucode_sysfs_fini(adev);
-	sysfs_remove_files(&adev->dev->kobj, amdgpu_dev_attributes);
+	amdgpu_device_attr_sysfs_fini(adev);
 	amdgpu_fru_sysfs_fini(adev);
 
 	amdgpu_reg_state_sysfs_fini(adev);
Signature · 1 line
2.39.5