Skip to contentSkip to conversation

6.6.33-rc1 review

PATCH In review Greg Kroah-Hartman 16 participants 772 messages Jun 6, 2024 – Jun 9, 2024 Page 1 of 7

Subsystems (7)
Stable branch Documentation VFS ACPI +3 more subsystems
lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH 1/744 x86/tsc: Trust initial offset in architectural TSC-adjust MSRs

In reply to Greg Kroah-Hartman

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

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

From: Daniel J Blueman <[email protected]>

commit 455f9075f14484f358b3c1d6845b4a438de198a7 upstream.

When the BIOS configures the architectural TSC-adjust MSRs on secondary sockets to correct a constant inter-chassis offset, after Linux brings the cores online, the TSC sync check later resets the core-local MSR to 0, triggering HPET fallback and leading to performance loss.

Fix this by unconditionally using the initial adjust values read from the MSRs. Trusting the initial offsets in this architectural mechanism is a better approach than special-casing workarounds for specific platforms.

---
 arch/x86/kernel/tsc_sync.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
arch/x86/kernel/tsc_sync.c +2 -4
@@ -193,11 +193,9 @@ bool tsc_store_and_check_tsc_adjust(bool
 	cur->warned = false;
 
 	/*
-	 * If a non-zero TSC value for socket 0 may be valid then the default
-	 * adjusted value cannot assumed to be zero either.
+	 * The default adjust value cannot be assumed to be zero on any socket.
 	 */
-	if (tsc_async_resets)
-		cur->adjusted = bootval;
+	cur->adjusted = bootval;
 
 	/*
 	 * Check whether this CPU is the first in a package to come up. In
author maintainer
#10 lore raw

PATCH 10/744 io_uring: fail NOP if non-zero op flags is passed in

In reply to Greg Kroah-Hartman

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

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

From: Ming Lei <[email protected]>

commit 3d8f874bd620ce03f75a5512847586828ab86544 upstream.

The NOP op flags should have been checked from beginning like any other opcode, otherwise NOP may not be extended with the op flags.

Given both liburing and Rust io-uring crate always zeros SQE op flags, just ignore users which play raw NOP uring interface without zeroing SQE, because NOP is just for test purpose. Then we can save one NOP2 opcode.

---
 io_uring/nop.c |    2 ++
 1 file changed, 2 insertions(+)
io_uring/nop.c +2 -0
@@ -12,6 +12,8 @@
 
 int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
 {
+	if (READ_ONCE(sqe->rw_flags))
+		return -EINVAL;
 	return 0;
 }
 
author maintainer
#11 lore raw

PATCH 11/744 Revert "r8169: dont try to disable interrupts if NAPI is, scheduled already"

In reply to Greg Kroah-Hartman

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

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

From: Heiner Kallweit <[email protected]>

commit eabb8a9be1e4a12f3bf37ceb7411083e3775672d upstream.

This reverts commit 7274c4147afbf46f45b8501edbdad6da8cd013b9.

Ken reported that RTL8125b can lock up if gro_flush_timeout has the default value of 20000 and napi_defer_hard_irqs is set to 0. In this scenario device interrupts aren't disabled, what seems to trigger some silicon bug under heavy load. I was able to reproduce this behavior on RTL8168h. Fix this by reverting 7274c4147afb.

Fixes 7274c4147afb ("r8169: don't try to disable interrupts if NAPI is scheduled already")
---
 drivers/net/ethernet/realtek/r8169_main.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +2 -4
@@ -4566,10 +4566,8 @@ static irqreturn_t rtl8169_interrupt(int
 		rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
 	}
 
-	if (napi_schedule_prep(&tp->napi)) {
-		rtl_irq_disable(tp);
-		__napi_schedule(&tp->napi);
-	}
+	rtl_irq_disable(tp);
+	napi_schedule(&tp->napi);
 out:
 	rtl_ack_events(tp, status);
 
author maintainer
#12 lore raw

PATCH 12/744 r8169: Fix possible ring buffer corruption on fragmented Tx packets.

In reply to Greg Kroah-Hartman

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

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

From: Ken Milmore <[email protected]>

commit c71e3a5cffd5309d7f84444df03d5b72600cc417 upstream.

An issue was found on the RTL8125b when transmitting small fragmented packets, whereby invalid entries were inserted into the transmit ring buffer, subsequently leading to calls to dma_unmap_single() with a null address.

This was caused by rtl8169_start_xmit() not noticing changes to nr_frags which may occur when small packets are padded (to work around hardware quirks) in rtl8169_tso_csum_v2().

To fix this, postpone inspecting nr_frags until after any padding has been applied.

---
 drivers/net/ethernet/realtek/r8169_main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169_main.c +2 -1
@@ -4246,11 +4246,11 @@ static void rtl8169_doorbell(struct rtl8
 static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
 				      struct net_device *dev)
 {
-	unsigned int frags = skb_shinfo(skb)->nr_frags;
 	struct rtl8169_private *tp = netdev_priv(dev);
 	unsigned int entry = tp->cur_tx % NUM_TX_DESC;
 	struct TxDesc *txd_first, *txd_last;
 	bool stop_queue, door_bell;
+	unsigned int frags;
 	u32 opts[2];
 
 	if (unlikely(!rtl_tx_slots_avail(tp))) {
@@ -4273,6 +4273,7 @@ static netdev_tx_t rtl8169_start_xmit(st
 
 	txd_first = tp->TxDescArray + entry;
 
+	frags = skb_shinfo(skb)->nr_frags;
 	if (frags) {
 		if (rtl8169_xmit_frags(tp, skb, opts, entry))
 			goto err_dma_1;
author maintainer
#13 lore raw

PATCH 13/744 ring-buffer: Fix a race between readers and resize checks

In reply to Greg Kroah-Hartman

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

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

From: Petr Pavlu <[email protected]>

commit c2274b908db05529980ec056359fae916939fdaa upstream.

The reader code in rb_get_reader_page() swaps a new reader page into the ring buffer by doing cmpxchg on old->list.prev->next to point it to the new page. Following that, if the operation is successful, old->list.next->prev gets updated too. This means the underlying doubly-linked list is temporarily inconsistent, page->prev->next or page->next->prev might not be equal back to page for some page in the ring buffer.

The resize operation in ring_buffer_resize() can be invoked in parallel. It calls rb_check_pages() which can detect the described inconsistency and stop further tracing:

[  190.271762] ------------[ cut here ]------------
[  190.271771] WARNING: CPU: 1 PID: 6186 at kernel/trace/ring_buffer.c:1467 rb_check_pages.isra.0+0x6a/0xa0
[  190.271789] Modules linked in: [...]
[  190.271991] Unloaded tainted modules: intel_uncore_frequency(E):1 skx_edac(E):1
[  190.272002] CPU: 1 PID: 6186 Comm: cmd.sh Kdump: loaded Tainted: G            E      6.9.0-rc6-default #5 158d3e1e6d0b091c34c3b96bfd99a1c58306d79f
[  190.272011] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552c-rebuilt.opensuse.org 04/01/2014
[  190.272015] RIP: 0010:rb_check_pages.isra.0+0x6a/0xa0
[  190.272023] Code: [...]
[  190.272028] RSP: 0018:ffff9c37463abb70 EFLAGS: 00010206
[  190.272034] RAX: ffff8eba04b6cb80 RBX: 0000000000000007 RCX: ffff8eba01f13d80
[  190.272038] RDX: ffff8eba01f130c0 RSI: ffff8eba04b6cd00 RDI: ffff8eba0004c700
[  190.272042] RBP: ffff8eba0004c700 R08: 0000000000010002 R09: 0000000000000000
[  190.272045] R10: 00000000ffff7f52 R11: ffff8eba7f600000 R12: ffff8eba0004c720
[  190.272049] R13: ffff8eba00223a00 R14: 0000000000000008 R15: ffff8eba067a8000
[  190.272053] FS:  00007f1bd64752c0(0000) GS:ffff8eba7f680000(0000) knlGS:0000000000000000
[  190.272057] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  190.272061] CR2: 00007f1bd6662590 CR3: 000000010291e001 CR4: 0000000000370ef0
[  190.272070] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  190.272073] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  190.272077] Call Trace:
[  190.272098]  <TASK>
[  190.272189]  ring_buffer_resize+0x2ab/0x460
[  190.272199]  __tracing_resize_ring_buffer.part.0+0x23/0xa0
[  190.272206]  tracing_resize_ring_buffer+0x65/0x90
[  190.272216]  tracing_entries_write+0x74/0xc0
[  190.272225]  vfs_write+0xf5/0x420
[  190.272248]  ksys_write+0x67/0xe0
[  190.272256]  do_syscall_64+0x82/0x170
[  190.272363]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[  190.272373] RIP: 0033:0x7f1bd657d263
[  190.272381] Code: [...]
[  190.272385] RSP: 002b:00007ffe72b643f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  190.272391] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1bd657d263
[  190.272395] RDX: 0000000000000002 RSI: 0000555a6eb538e0 RDI: 0000000000000001
[  190.272398] RBP: 0000555a6eb538e0 R08: 000000000000000a R09: 0000000000000000
[  190.272401] R10: 0000555a6eb55190 R11: 0000000000000246 R12: 00007f1bd6662500
[  190.272404] R13: 0000000000000002 R14: 00007f1bd6667c00 R15: 0000000000000002
[  190.272412]  </TASK>
[  190.272414] ---[ end trace 0000000000000000 ]---

Note that ring_buffer_resize() calls rb_check_pages() only if the parent trace_buffer has recording disabled. Recent commit d78ab792705c ("tracing: Stop current tracer when resizing buffer") causes that it is now always the case which makes it more likely to experience this issue.

The window to hit this race is nonetheless very small. To help reproducing it, one can add a delay loop in rb_get_reader_page():

ret = rb_head_page_replace(reader, cpu_buffer->reader_page); if (!ret)
goto spin;
for (unsigned i = 0; i < 1U << 26; i++) /* inserted delay loop */
__asm__ __volatile__ ("" : : : "memory");
rb_list_head(reader->list.next)->prev = &cpu_buffer->reader_page->list;

.. and then run the following commands on the target system:

echo 1 > /sys/kernel/tracing/events/sched/sched_switch/enable while true; do
echo 16 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1 echo 8 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
done &
while true; do
for i in /sys/kernel/tracing/per_cpu/*; do
timeout 0.1 cat $i/trace_pipe; sleep 0.2
done
done

To fix the problem, make sure ring_buffer_resize() doesn't invoke rb_check_pages() concurrently with a reader operating on the same ring_buffer_per_cpu by taking its cpu_buffer->reader_lock.

Cc Masami Hiramatsu <[email protected]>
Cc Mathieu Desnoyers <[email protected]>
Fixes 659f451ff213 ("ring-buffer: Add integrity check at end of iter read")
[ Fixed whitespace ]
---
 kernel/trace/ring_buffer.c |    9 +++++++++
 1 file changed, 9 insertions(+)
kernel/trace/ring_buffer.c +9 -0
@@ -1592,6 +1592,11 @@ static void rb_check_bpage(struct ring_b
  *
  * As a safety measure we check to make sure the data pages have not
  * been corrupted.
+ *
+ * Callers of this function need to guarantee that the list of pages doesn't get
+ * modified during the check. In particular, if it's possible that the function
+ * is invoked with concurrent readers which can swap in a new reader page then
+ * the caller should take cpu_buffer->reader_lock.
  */
 static void rb_check_pages(struct ring_buffer_per_cpu *cpu_buffer)
 {
@@ -2331,8 +2336,12 @@ int ring_buffer_resize(struct trace_buff
 		 */
 		synchronize_rcu();
 		for_each_buffer_cpu(buffer, cpu) {
+			unsigned long flags;
+
 			cpu_buffer = buffer->buffers[cpu];
+			raw_spin_lock_irqsave(&cpu_buffer->reader_lock, flags);
 			rb_check_pages(cpu_buffer);
+			raw_spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags);
 		}
 		atomic_dec(&buffer->record_disabled);
 	}
author maintainer
#14 lore raw

PATCH 14/744 net: mana: Fix the extra HZ in mana_hwc_send_request

In reply to Greg Kroah-Hartman

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

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

From: Souradeep Chakrabarti <[email protected]>

commit 9c91c7fadb1771dcc2815c5271d14566366d05c5 upstream.

Commit 62c1bff593b7 added an extra HZ along with msecs_to_jiffies. This patch fixes that.

---
 drivers/net/ethernet/microsoft/mana/hw_channel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/microsoft/mana/hw_channel.c +1 -1
@@ -847,7 +847,7 @@ int mana_hwc_send_request(struct hw_chan
 	}
 
 	if (!wait_for_completion_timeout(&ctx->comp_event,
-					 (msecs_to_jiffies(hwc->hwc_timeout) * HZ))) {
+					 (msecs_to_jiffies(hwc->hwc_timeout)))) {
 		dev_err(hwc->dev, "HWC: Request timed out!\n");
 		err = -ETIMEDOUT;
 		goto out;
author maintainer
#15 lore raw

PATCH 15/744 tools/latency-collector: Fix -Wformat-security compile warns

In reply to Greg Kroah-Hartman

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

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

From: Shuah Khan <[email protected]>

commit df73757cf8f66fa54c4721c53b0916af3c4d9818 upstream.

Fix the following -Wformat-security compile warnings adding missing format arguments:

latency-collector.c: In function ‘show_available’:
latency-collector.c:938:17: warning: format not a string literal and no format arguments [-Wformat-security]

  938 |                 warnx(no_tracer_msg);
      |                 ^~~~~

latency-collector.c:943:17: warning: format not a string literal and no format arguments [-Wformat-security]

  943 |                 warnx(no_latency_tr_msg);
      |                 ^~~~~

latency-collector.c: In function ‘find_default_tracer’:
latency-collector.c:986:25: warning: format not a string literal and no format arguments [-Wformat-security]

  986 |                         errx(EXIT_FAILURE, no_tracer_msg);
      |
                         ^~~~
latency-collector.c: In function ‘scan_arguments’:
latency-collector.c:1881:33: warning: format not a string literal and
no format arguments [-Wformat-security]
 1881 |                                 errx(EXIT_FAILURE, no_tracer_msg);
      |                                 ^~~~
Fixes e23db805da2df ("tracing/tools: Add the latency-collector to tools directory")
---
 tools/tracing/latency/latency-collector.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/tracing/latency/latency-collector.c +4 -4
@@ -935,12 +935,12 @@ static void show_available(void)
 	}
 
 	if (!tracers) {
-		warnx(no_tracer_msg);
+		warnx("%s", no_tracer_msg);
 		return;
 	}
 
 	if (!found) {
-		warnx(no_latency_tr_msg);
+		warnx("%s", no_latency_tr_msg);
 		tracefs_list_free(tracers);
 		return;
 	}
@@ -983,7 +983,7 @@ static const char *find_default_tracer(v
 	for (i = 0; relevant_tracers[i]; i++) {
 		valid = tracer_valid(relevant_tracers[i], &notracer);
 		if (notracer)
-			errx(EXIT_FAILURE, no_tracer_msg);
+			errx(EXIT_FAILURE, "%s", no_tracer_msg);
 		if (valid)
 			return relevant_tracers[i];
 	}
@@ -1878,7 +1878,7 @@ static void scan_arguments(int argc, cha
 			}
 			valid = tracer_valid(current_tracer, &notracer);
 			if (notracer)
-				errx(EXIT_FAILURE, no_tracer_msg);
+				errx(EXIT_FAILURE, "%s", no_tracer_msg);
 			if (!valid)
 				errx(EXIT_FAILURE,
 "The tracer %s is not supported by your kernel!\n", current_tracer);
author maintainer
#16 lore raw

PATCH 16/744 tools/nolibc/stdlib: fix memory error in realloc()

In reply to Greg Kroah-Hartman

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

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

From: Brennan Xavier McManus <[email protected]>

commit 791f4641142e2aced85de082e5783b4fb0b977c2 upstream.

Pass user_p_len to memcpy() instead of heap->len to prevent realloc() from copying an extra sizeof(heap) bytes from beyond the allocated region.

Fixes 0e0ff638400be8f497a35b51a4751fd823f6bd6a ("tools/nolibc/stdlib: Implement `malloc()`, `calloc()`, `realloc()` and `free()`")
---
 tools/include/nolibc/stdlib.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/include/nolibc/stdlib.h +1 -1
@@ -185,7 +185,7 @@ void *realloc(void *old_ptr, size_t new_
 	if (__builtin_expect(!ret, 0))
 		return NULL;
 
-	memcpy(ret, heap->user_p, heap->len);
+	memcpy(ret, heap->user_p, user_p_len);
 	munmap(heap, heap->len);
 	return ret;
 }
author maintainer
#17 lore raw

PATCH 17/744 net: ti: icssg_prueth: Fix NULL pointer dereference in prueth_probe()

In reply to Greg Kroah-Hartman

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

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

From: Romain Gantois <[email protected]>

commit b31c7e78086127a7fcaa761e8d336ee855a920c6 upstream.

In the prueth_probe() function, if one of the calls to emac_phy_connect() fails due to of_phy_connect() returning NULL, then the subsequent call to phy_attached_info() will dereference a NULL pointer.

Check the return code of emac_phy_connect and fail cleanly if there is an error.

---
 drivers/net/ethernet/ti/icssg/icssg_prueth.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/net/ethernet/ti/icssg/icssg_prueth.c +12 -2
@@ -2136,7 +2136,12 @@ static int prueth_probe(struct platform_
 
 		prueth->registered_netdevs[PRUETH_MAC0] = prueth->emac[PRUETH_MAC0]->ndev;
 
-		emac_phy_connect(prueth->emac[PRUETH_MAC0]);
+		ret = emac_phy_connect(prueth->emac[PRUETH_MAC0]);
+		if (ret) {
+			dev_err(dev,
+				"can't connect to MII0 PHY, error -%d", ret);
+			goto netdev_unregister;
+		}
 		phy_attached_info(prueth->emac[PRUETH_MAC0]->ndev->phydev);
 	}
 
@@ -2148,7 +2153,12 @@ static int prueth_probe(struct platform_
 		}
 
 		prueth->registered_netdevs[PRUETH_MAC1] = prueth->emac[PRUETH_MAC1]->ndev;
-		emac_phy_connect(prueth->emac[PRUETH_MAC1]);
+		ret = emac_phy_connect(prueth->emac[PRUETH_MAC1]);
+		if (ret) {
+			dev_err(dev,
+				"can't connect to MII1 PHY, error %d", ret);
+			goto netdev_unregister;
+		}
 		phy_attached_info(prueth->emac[PRUETH_MAC1]->ndev->phydev);
 	}
 
author maintainer
#18 lore raw

PATCH 18/744 net: lan966x: remove debugfs directory in probe() error path

In reply to Greg Kroah-Hartman

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

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

From: Herve Codina <[email protected]>

commit 99975ad644c7836414183fa7be4f883a4fb2bf64 upstream.

A debugfs directory entry is create early during probe(). This entry is not removed on error path leading to some "already present" issues in case of EPROBE_DEFER.

Create this entry later in the probe() code to avoid the need to change many 'return' in 'goto' and add the removal in the already present error path.

Fixes 942814840127 ("net: lan966x: Add VCAP debugFS support")
---
 drivers/net/ethernet/microchip/lan966x/lan966x_main.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/microchip/lan966x/lan966x_main.c +4 -2
@@ -1088,8 +1088,6 @@ static int lan966x_probe(struct platform
 	platform_set_drvdata(pdev, lan966x);
 	lan966x->dev = &pdev->dev;
 
-	lan966x->debugfs_root = debugfs_create_dir("lan966x", NULL);
-
 	if (!device_get_mac_address(&pdev->dev, mac_addr)) {
 		ether_addr_copy(lan966x->base_mac, mac_addr);
 	} else {
@@ -1180,6 +1178,8 @@ static int lan966x_probe(struct platform
 		return dev_err_probe(&pdev->dev, -ENODEV,
 				     "no ethernet-ports child found\n");
 
+	lan966x->debugfs_root = debugfs_create_dir("lan966x", NULL);
+
 	/* init switch */
 	lan966x_init(lan966x);
 	lan966x_stats_init(lan966x);
@@ -1258,6 +1258,8 @@ cleanup_ports:
 	destroy_workqueue(lan966x->stats_queue);
 	mutex_destroy(&lan966x->stats_lock);
 
+	debugfs_remove_recursive(lan966x->debugfs_root);
+
 	return err;
 }
 
author maintainer
#19 lore raw

PATCH 19/744 net: smc91x: Fix m68k kernel compilation for ColdFire CPU

In reply to Greg Kroah-Hartman

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

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

From: Thorsten Blum <[email protected]>

commit 5eefb477d21a26183bc3499aeefa991198315a2d upstream.

Compiling the m68k kernel with support for the ColdFire CPU family fails with the following error:

In file included from drivers/net/ethernet/smsc/smc91x.c:80:
drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_reset’:
drivers/net/ethernet/smsc/smc91x.h:160:40: error: implicit declaration of function ‘_swapw’; did you mean ‘swap’? [-Werror=implicit-function-declaration]
160 | #define SMC_outw(lp, v, a, r) writew(_swapw(v), (a) + (r))
| ^~~~~~
drivers/net/ethernet/smsc/smc91x.h:904:25: note: in expansion of macro ‘SMC_outw’

  904 |                         SMC_outw(lp, x, ioaddr, BANK_SELECT);           \
      |                         ^~~~~~~~
drivers/net/ethernet/smsc/smc91x.c:250:9: note: in expansion of macro ‘SMC_SELECT_BANK’
  250 |         SMC_SELECT_BANK(lp, 2);
      |         ^~~~~~~~~~~~~~~

cc1: some warnings being treated as errors

The function _swapw() was removed in commit d97cf70af097 ("m68k: use asm-generic/io.h for non-MMU io access functions"), but is still used in drivers/net/ethernet/smsc/smc91x.h.

Use ioread16be() and iowrite16be() to resolve the error.

Fixes d97cf70af097 ("m68k: use asm-generic/io.h for non-MMU io access functions")
---
 drivers/net/ethernet/smsc/smc91x.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/smsc/smc91x.h +2 -2
@@ -175,8 +175,8 @@ static inline void mcf_outsw(void *a, un
 		writew(*wp++, a);
 }
 
-#define SMC_inw(a, r)		_swapw(readw((a) + (r)))
-#define SMC_outw(lp, v, a, r)	writew(_swapw(v), (a) + (r))
+#define SMC_inw(a, r)		ioread16be((a) + (r))
+#define SMC_outw(lp, v, a, r)	iowrite16be(v, (a) + (r))
 #define SMC_insw(a, r, p, l)	mcf_insw(a + r, p, l)
 #define SMC_outsw(a, r, p, l)	mcf_outsw(a + r, p, l)
 
author maintainer
#2 lore raw

PATCH 2/744 selftests/ftrace: Fix BTFARG testcase to check fprobe is enabled correctly

In reply to Greg Kroah-Hartman

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

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

From: Masami Hiramatsu (Google) <[email protected]>

commit 2fd3ef1b9265eda7f53b9506f1ebfb67eb6435a2 upstream.

Since the dynevent/add_remove_btfarg.tc test case forgets to ensure that fprobe is enabled for some structure field access tests which uses the fprobe, it fails if CONFIG_FPROBE=n or CONFIG_FPROBE_EVENTS=n. Fixes it to ensure the fprobe events are supported.

Fixes d892d3d3d885 ("selftests/ftrace: Add BTF fields access testcases")
---
 .../selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc +1 -1
index b9c21a81d248..c0cdad4c400e 100644
@@ -53,7 +53,7 @@ fi
 
 echo > dynamic_events
 
-if [ "$FIELDS" ] ; then
+if [ "$FIELDS" -a "$FPROBES" ] ; then
 echo "t:tpevent ${TP2} obj_size=s->object_size" >> dynamic_events
 echo "f:fpevent ${TP3}%return path=\$retval->name:string" >> dynamic_events
 echo "t:tpevent2 ${TP4} p->se.group_node.next->prev" >> dynamic_events
Signature · 1 line
2.45.1
author maintainer
#20 lore raw

PATCH 20/744 nilfs2: fix use-after-free of timer for log writer thread

In reply to Greg Kroah-Hartman

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

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

From: Ryusuke Konishi <[email protected]>

commit f5d4e04634c9cf68bdf23de08ada0bb92e8befe7 upstream.

Patch series "nilfs2: fix log writer related issues".

This bug fix series covers three nilfs2 log writer-related issues, including a timer use-after-free issue and potential deadlock issue on unmount, and a potential freeze issue in event synchronization found during their analysis. Details are described in each commit log.

This patch (of 3):

A use-after-free issue has been reported regarding the timer sc_timer on the nilfs_sc_info structure.

The problem is that even though it is used to wake up a sleeping log writer thread, sc_timer is not shut down until the nilfs_sc_info structure is about to be freed, and is used regardless of the thread's lifetime.

Fix this issue by limiting the use of sc_timer only while the log writer thread is alive.

---
 fs/nilfs2/segment.c |   25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)
fs/nilfs2/segment.c +19 -6
@@ -2161,8 +2161,10 @@ static void nilfs_segctor_start_timer(st
 {
 	spin_lock(&sci->sc_state_lock);
 	if (!(sci->sc_state & NILFS_SEGCTOR_COMMIT)) {
-		sci->sc_timer.expires = jiffies + sci->sc_interval;
-		add_timer(&sci->sc_timer);
+		if (sci->sc_task) {
+			sci->sc_timer.expires = jiffies + sci->sc_interval;
+			add_timer(&sci->sc_timer);
+		}
 		sci->sc_state |= NILFS_SEGCTOR_COMMIT;
 	}
 	spin_unlock(&sci->sc_state_lock);
@@ -2363,10 +2365,21 @@ int nilfs_construct_dsync_segment(struct
  */
 static void nilfs_segctor_accept(struct nilfs_sc_info *sci)
 {
+	bool thread_is_alive;
+
 	spin_lock(&sci->sc_state_lock);
 	sci->sc_seq_accepted = sci->sc_seq_request;
+	thread_is_alive = (bool)sci->sc_task;
 	spin_unlock(&sci->sc_state_lock);
-	del_timer_sync(&sci->sc_timer);
+
+	/*
+	 * This function does not race with the log writer thread's
+	 * termination.  Therefore, deleting sc_timer, which should not be
+	 * done after the log writer thread exits, can be done safely outside
+	 * the area protected by sc_state_lock.
+	 */
+	if (thread_is_alive)
+		del_timer_sync(&sci->sc_timer);
 }
 
 /**
@@ -2392,7 +2405,7 @@ static void nilfs_segctor_notify(struct
 			sci->sc_flush_request &= ~FLUSH_DAT_BIT;
 
 		/* re-enable timer if checkpoint creation was not done */
-		if ((sci->sc_state & NILFS_SEGCTOR_COMMIT) &&
+		if ((sci->sc_state & NILFS_SEGCTOR_COMMIT) && sci->sc_task &&
 		    time_before(jiffies, sci->sc_timer.expires))
 			add_timer(&sci->sc_timer);
 	}
@@ -2582,6 +2595,7 @@ static int nilfs_segctor_thread(void *ar
 	int timeout = 0;
 
 	sci->sc_timer_task = current;
+	timer_setup(&sci->sc_timer, nilfs_construction_timeout, 0);
 
 	/* start sync. */
 	sci->sc_task = current;
@@ -2648,6 +2662,7 @@ static int nilfs_segctor_thread(void *ar
  end_thread:
 	/* end sync. */
 	sci->sc_task = NULL;
+	timer_shutdown_sync(&sci->sc_timer);
 	wake_up(&sci->sc_wait_task); /* for nilfs_segctor_kill_thread() */
 	spin_unlock(&sci->sc_state_lock);
 	return 0;
@@ -2711,7 +2726,6 @@ static struct nilfs_sc_info *nilfs_segct
 	INIT_LIST_HEAD(&sci->sc_gc_inodes);
 	INIT_LIST_HEAD(&sci->sc_iput_queue);
 	INIT_WORK(&sci->sc_iput_work, nilfs_iput_work_func);
-	timer_setup(&sci->sc_timer, nilfs_construction_timeout, 0);
 
 	sci->sc_interval = HZ * NILFS_SC_DEFAULT_TIMEOUT;
 	sci->sc_mjcp_freq = HZ * NILFS_SC_DEFAULT_SR_FREQ;
@@ -2790,7 +2804,6 @@ static void nilfs_segctor_destroy(struct
 
 	down_write(&nilfs->ns_segctor_sem);
 
-	timer_shutdown_sync(&sci->sc_timer);
 	kfree(sci);
 }
 
author maintainer
#21 lore raw

PATCH 21/744 nilfs2: fix unexpected freezing of nilfs_segctor_sync()

In reply to Greg Kroah-Hartman

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

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

From: Ryusuke Konishi <[email protected]>

commit 936184eadd82906992ff1f5ab3aada70cce44cee upstream.

A potential and reproducible race issue has been identified where nilfs_segctor_sync() would block even after the log writer thread writes a checkpoint, unless there is an interrupt or other trigger to resume log writing.

This turned out to be because, depending on the execution timing of the log writer thread running in parallel, the log writer thread may skip responding to nilfs_segctor_sync(), which causes a call to schedule() waiting for completion within nilfs_segctor_sync() to lose the opportunity to wake up.

The reason why waking up the task waiting in nilfs_segctor_sync() may be skipped is that updating the request generation issued using a shared sequence counter and adding an wait queue entry to the request wait queue to the log writer, are not done atomically. There is a possibility that log writing and request completion notification by nilfs_segctor_wakeup() may occur between the two operations, and in that case, the wait queue entry is not yet visible to nilfs_segctor_wakeup() and the wake-up of nilfs_segctor_sync() will be carried over until the next request occurs.

Fix this issue by performing these two operations simultaneously within the lock section of sc_state_lock. Also, following the memory barrier guidelines for event waiting loops, move the call to set_current_state() in the same location into the event waiting loop to ensure that a memory barrier is inserted just before the event condition determination.

---
 fs/nilfs2/segment.c |   17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
fs/nilfs2/segment.c +13 -4
@@ -2211,19 +2211,28 @@ static int nilfs_segctor_sync(struct nil
 	struct nilfs_segctor_wait_request wait_req;
 	int err = 0;
 
-	spin_lock(&sci->sc_state_lock);
 	init_wait(&wait_req.wq);
 	wait_req.err = 0;
 	atomic_set(&wait_req.done, 0);
+	init_waitqueue_entry(&wait_req.wq, current);
+
+	/*
+	 * To prevent a race issue where completion notifications from the
+	 * log writer thread are missed, increment the request sequence count
+	 * "sc_seq_request" and insert a wait queue entry using the current
+	 * sequence number into the "sc_wait_request" queue at the same time
+	 * within the lock section of "sc_state_lock".
+	 */
+	spin_lock(&sci->sc_state_lock);
 	wait_req.seq = ++sci->sc_seq_request;
+	add_wait_queue(&sci->sc_wait_request, &wait_req.wq);
 	spin_unlock(&sci->sc_state_lock);
 
-	init_waitqueue_entry(&wait_req.wq, current);
-	add_wait_queue(&sci->sc_wait_request, &wait_req.wq);
-	set_current_state(TASK_INTERRUPTIBLE);
 	wake_up(&sci->sc_wait_daemon);
 
 	for (;;) {
+		set_current_state(TASK_INTERRUPTIBLE);
+
 		if (atomic_read(&wait_req.done)) {
 			err = wait_req.err;
 			break;
author maintainer
#22 lore raw

PATCH 22/744 nilfs2: fix potential hang in nilfs_detach_log_writer()

In reply to Greg Kroah-Hartman

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

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

From: Ryusuke Konishi <[email protected]>

commit eb85dace897c5986bc2f36b3c783c6abb8a4292e upstream.

Syzbot has reported a potential hang in nilfs_detach_log_writer() called during nilfs2 unmount.

Analysis revealed that this is because nilfs_segctor_sync(), which synchronizes with the log writer thread, can be called after nilfs_segctor_destroy() terminates that thread, as shown in the call trace below:

nilfs_detach_log_writer
nilfs_segctor_destroy

    nilfs_segctor_kill_thread  --> Shut down log writer thread
    flush_work
      nilfs_iput_work_func
        nilfs_dispose_list
          iput
            nilfs_evict_inode
              nilfs_transaction_commit
                nilfs_construct_segment (if inode needs sync)
                  nilfs_segctor_sync  --> Attempt to synchronize with
                                          log writer thread
                           *** DEADLOCK ***

Fix this issue by changing nilfs_segctor_sync() so that the log writer thread returns normally without synchronizing after it terminates, and by forcing tasks that are already waiting to complete once after the thread terminates.

The skipped inode metadata flushout will then be processed together in the subsequent cleanup work in nilfs_segctor_destroy().

---
 fs/nilfs2/segment.c |   21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
fs/nilfs2/segment.c +18 -3
@@ -2233,6 +2233,14 @@ static int nilfs_segctor_sync(struct nil
 	for (;;) {
 		set_current_state(TASK_INTERRUPTIBLE);
 
+		/*
+		 * Synchronize only while the log writer thread is alive.
+		 * Leave flushing out after the log writer thread exits to
+		 * the cleanup work in nilfs_segctor_destroy().
+		 */
+		if (!sci->sc_task)
+			break;
+
 		if (atomic_read(&wait_req.done)) {
 			err = wait_req.err;
 			break;
@@ -2248,7 +2256,7 @@ static int nilfs_segctor_sync(struct nil
 	return err;
 }
 
-static void nilfs_segctor_wakeup(struct nilfs_sc_info *sci, int err)
+static void nilfs_segctor_wakeup(struct nilfs_sc_info *sci, int err, bool force)
 {
 	struct nilfs_segctor_wait_request *wrq, *n;
 	unsigned long flags;
@@ -2256,7 +2264,7 @@ static void nilfs_segctor_wakeup(struct
 	spin_lock_irqsave(&sci->sc_wait_request.lock, flags);
 	list_for_each_entry_safe(wrq, n, &sci->sc_wait_request.head, wq.entry) {
 		if (!atomic_read(&wrq->done) &&
-		    nilfs_cnt32_ge(sci->sc_seq_done, wrq->seq)) {
+		    (force || nilfs_cnt32_ge(sci->sc_seq_done, wrq->seq))) {
 			wrq->err = err;
 			atomic_set(&wrq->done, 1);
 		}
@@ -2405,7 +2413,7 @@ static void nilfs_segctor_notify(struct
 	if (mode == SC_LSEG_SR) {
 		sci->sc_state &= ~NILFS_SEGCTOR_COMMIT;
 		sci->sc_seq_done = sci->sc_seq_accepted;
-		nilfs_segctor_wakeup(sci, err);
+		nilfs_segctor_wakeup(sci, err, false);
 		sci->sc_flush_request = 0;
 	} else {
 		if (mode == SC_FLUSH_FILE)
@@ -2788,6 +2796,13 @@ static void nilfs_segctor_destroy(struct
 		|| sci->sc_seq_request != sci->sc_seq_done);
 	spin_unlock(&sci->sc_state_lock);
 
+	/*
+	 * Forcibly wake up tasks waiting in nilfs_segctor_sync(), which can
+	 * be called from delayed iput() via nilfs_evict_inode() and can race
+	 * with the above log writer thread termination.
+	 */
+	nilfs_segctor_wakeup(sci, 0, true);
+
 	if (flush_work(&sci->sc_iput_work))
 		flag = true;
 
author maintainer
#23 lore raw

PATCH 23/744 fs/ntfs3: Remove max link count info display during driver init

In reply to Greg Kroah-Hartman

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

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

From: Konstantin Komarov <[email protected]>

commit a8948b5450e7c65a3a34ebf4ccfcebc19335d4fb upstream.

Removes the output of this purely informational message from the kernel buffer:

	"ntfs3: Max link count 4000"
---
 fs/ntfs3/super.c |    2 --
 1 file changed, 2 deletions(-)
fs/ntfs3/super.c +0 -2
@@ -1804,8 +1804,6 @@ static int __init init_ntfs_fs(void)
 {
 	int err;
 
-	pr_info("ntfs3: Max link count %u\n", NTFS_LINK_MAX);
-
 	if (IS_ENABLED(CONFIG_NTFS3_FS_POSIX_ACL))
 		pr_info("ntfs3: Enabled Linux POSIX ACLs support\n");
 	if (IS_ENABLED(CONFIG_NTFS3_64BIT_CLUSTER))
author maintainer
#24 lore raw

PATCH 24/744 fs/ntfs3: Taking DOS names into account during link counting

In reply to Greg Kroah-Hartman

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

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

From: Konstantin Komarov <[email protected]>

commit 110b24eb1a749bea3440f3ca2ff890a26179050a upstream.

When counting and checking hard links in an ntfs file record,

struct MFT_REC {
struct NTFS_RECORD_HEADER rhdr; // 'FILE'
__le16 seq; // 0x10: Sequence number for this record.

Quoted 1 line
Quoted 1 line

__le16 hard_links; // 0x12: The number of hard links to record.

    __le16 attr_off;	// 0x14: Offset to attributes.

...

the ntfs3 driver ignored short names (DOS names), causing the link count to be reduced by 1 and messages to be output to dmesg.

For Windows, such a situation is a minor error, meaning chkdsk does not report errors on such a volume, and in the case of using the /f switch, it silently corrects them, reporting that no errors were found. This does not affect the consistency of the file system.

Nevertheless, the behavior in the ntfs3 driver is incorrect and changes the content of the file system. This patch should fix that.

PS: most likely, there has been a confusion of concepts MFT_REC::hard_links and inode::__i_nlink.

Fixes 82cae269cfa95 ("fs/ntfs3: Add initialization of super block")
---
 fs/ntfs3/inode.c  |    7 ++++---
 fs/ntfs3/record.c |   11 ++---------
 2 files changed, 6 insertions(+), 12 deletions(-)
fs/ntfs3/inode.c +4 -3
@@ -37,7 +37,7 @@ static struct inode *ntfs_read_mft(struc
 	bool is_dir;
 	unsigned long ino = inode->i_ino;
 	u32 rp_fa = 0, asize, t32;
-	u16 roff, rsize, names = 0;
+	u16 roff, rsize, names = 0, links = 0;
 	const struct ATTR_FILE_NAME *fname = NULL;
 	const struct INDEX_ROOT *root;
 	struct REPARSE_DATA_BUFFER rp; // 0x18 bytes
@@ -198,11 +198,12 @@ next_attr:
 		    rsize < SIZEOF_ATTRIBUTE_FILENAME)
 			goto out;
 
+		names += 1;
 		fname = Add2Ptr(attr, roff);
 		if (fname->type == FILE_NAME_DOS)
 			goto next_attr;
 
-		names += 1;
+		links += 1;
 		if (name && name->len == fname->name_len &&
 		    !ntfs_cmp_names_cpu(name, (struct le_str *)&fname->name_len,
 					NULL, false))
@@ -429,7 +430,7 @@ end_enum:
 		ni->mi.dirty = true;
 	}
 
-	set_nlink(inode, names);
+	set_nlink(inode, links);
 
 	if (S_ISDIR(mode)) {
 		ni->std_fa |= FILE_ATTRIBUTE_DIRECTORY;
fs/ntfs3/record.c +2 -9
@@ -534,16 +534,9 @@ bool mi_remove_attr(struct ntfs_inode *n
 	if (aoff + asize > used)
 		return false;
 
-	if (ni && is_attr_indexed(attr)) {
+	if (ni && is_attr_indexed(attr) && attr->type == ATTR_NAME) {
 		u16 links = le16_to_cpu(ni->mi.mrec->hard_links);
-		struct ATTR_FILE_NAME *fname =
-			attr->type != ATTR_NAME ?
-				NULL :
-				resident_data_ex(attr,
-						 SIZEOF_ATTRIBUTE_FILENAME);
-		if (fname && fname->type == FILE_NAME_DOS) {
-			/* Do not decrease links count deleting DOS name. */
-		} else if (!links) {
+		if (!links) {
 			/* minor error. Not critical. */
 		} else {
 			ni->mi.mrec->hard_links = cpu_to_le16(links - 1);
author maintainer
#25 lore raw

PATCH 25/744 fs/ntfs3: Fix case when index is reused during tree transformation

In reply to Greg Kroah-Hartman

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

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

From: Konstantin Komarov <[email protected]>

commit 05afeeebcac850a016ec4fb1f681ceda11963562 upstream.

In most cases when adding a cluster to the directory index, they are placed at the end, and in the bitmap, this cluster corresponds to the last bit. The new directory size is calculated as follows:

	data_size = (u64)(bit + 1) << indx->index_bits;

In the case of reusing a non-final cluster from the index, data_size is calculated incorrectly, resulting in the directory size differing from the actual size.

A check for cluster reuse has been added, and the size update is skipped.

Fixes 82cae269cfa95 ("fs/ntfs3: Add initialization of super block")
---
 fs/ntfs3/index.c |    6 ++++++
 1 file changed, 6 insertions(+)
fs/ntfs3/index.c +6 -0
@@ -1533,6 +1533,11 @@ static int indx_add_allocate(struct ntfs
 		goto out1;
 	}
 
+	if (data_size <= le64_to_cpu(alloc->nres.data_size)) {
+		/* Reuse index. */
+		goto out;
+	}
+
 	/* Increase allocation. */
 	err = attr_set_size(ni, ATTR_ALLOC, in->name, in->name_len,
 			    &indx->alloc_run, data_size, &data_size, true,
@@ -1546,6 +1551,7 @@ static int indx_add_allocate(struct ntfs
 	if (in->name == I30_NAME)
 		i_size_write(&ni->vfs_inode, data_size);
 
+out:
 	*vbn = bit << indx->idx2vbn_bits;
 
 	return 0;
author maintainer
#26 lore raw

PATCH 26/744 fs/ntfs3: Break dir enumeration if directory contents error

In reply to Greg Kroah-Hartman

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

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

From: Konstantin Komarov <[email protected]>

commit 302e9dca8428979c9c99f2dbb44dc1783f5011c3 upstream.

If we somehow attempt to read beyond the directory size, an error is supposed to be returned.

However, in some cases, read requests do not stop and instead enter into a loop.

To avoid this, we set the position in the directory to the end.

---
 fs/ntfs3/dir.c |    1 +
 1 file changed, 1 insertion(+)
fs/ntfs3/dir.c +1 -0
@@ -475,6 +475,7 @@ static int ntfs_readdir(struct file *fil
 		vbo = (u64)bit << index_bits;
 		if (vbo >= i_size) {
 			ntfs_inode_err(dir, "Looks like your dir is corrupt");
+			ctx->pos = eod;
 			err = -EINVAL;
 			goto out;
 		}
author maintainer
#27 lore raw

PATCH 27/744 ksmbd: avoid to send duplicate oplock break notifications

In reply to Greg Kroah-Hartman

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

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

From: Namjae Jeon <[email protected]>

commit c91ecba9e421e4f2c9219cf5042fa63a12025310 upstream.

This patch fixes generic/011 when oplocks is enable.

Avoid to send duplicate oplock break notifications like smb2 leases case.

Fixes 97c2ec64667b ("ksmbd: avoid to send duplicate lease break notifications")
---
 fs/smb/server/oplock.c |   21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)
fs/smb/server/oplock.c +13 -8
@@ -614,19 +614,24 @@ static int oplock_break_pending(struct o
 		if (opinfo->op_state == OPLOCK_CLOSING)
 			return -ENOENT;
 		else if (opinfo->level <= req_op_level) {
-			if (opinfo->is_lease &&
-			    opinfo->o_lease->state !=
-			     (SMB2_LEASE_HANDLE_CACHING_LE |
-			      SMB2_LEASE_READ_CACHING_LE))
+			if (opinfo->is_lease == false)
+				return 1;
+
+			if (opinfo->o_lease->state !=
+			    (SMB2_LEASE_HANDLE_CACHING_LE |
+			     SMB2_LEASE_READ_CACHING_LE))
 				return 1;
 		}
 	}
 
 	if (opinfo->level <= req_op_level) {
-		if (opinfo->is_lease &&
-		    opinfo->o_lease->state !=
-		     (SMB2_LEASE_HANDLE_CACHING_LE |
-		      SMB2_LEASE_READ_CACHING_LE)) {
+		if (opinfo->is_lease == false) {
+			wake_up_oplock_break(opinfo);
+			return 1;
+		}
+		if (opinfo->o_lease->state !=
+		    (SMB2_LEASE_HANDLE_CACHING_LE |
+		     SMB2_LEASE_READ_CACHING_LE)) {
 			wake_up_oplock_break(opinfo);
 			return 1;
 		}
author maintainer
#28 lore raw

PATCH 28/744 ksmbd: ignore trailing slashes in share paths

In reply to Greg Kroah-Hartman

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

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

From: Nandor Kracser <[email protected]>

commit 405ee4097c4bc3e70556520aed5ba52a511c2266 upstream.

Trailing slashes in share paths (like: /home/me/Share/) caused permission issues with shares for clients on iOS and on Android TV for me, but otherwise they work fine with plain old Samba.

---
 fs/smb/server/mgmt/share_config.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fs/smb/server/mgmt/share_config.c +5 -1
@@ -165,8 +165,12 @@ static struct ksmbd_share_config *share_
 
 		share->path = kstrndup(ksmbd_share_config_path(resp), path_len,
 				      GFP_KERNEL);
-		if (share->path)
+		if (share->path) {
 			share->path_sz = strlen(share->path);
+			while (share->path_sz > 1 &&
+			       share->path[share->path_sz - 1] == '/')
+				share->path[--share->path_sz] = '\0';
+		}
 		share->create_mask = resp->create_mask;
 		share->directory_mask = resp->directory_mask;
 		share->force_create_mode = resp->force_create_mode;
author maintainer
#3 lore raw

PATCH 3/744 ftrace: Fix possible use-after-free issue in ftrace_location()

In reply to Greg Kroah-Hartman

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

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

From: Zheng Yejian <[email protected]>

commit e60b613df8b6253def41215402f72986fee3fc8d upstream.

KASAN reports a bug:

  BUG: KASAN: use-after-free in ftrace_location+0x90/0x120
  Read of size 8 at addr ffff888141d40010 by task insmod/424
  CPU: 8 PID: 424 Comm: insmod Tainted: G        W          6.9.0-rc2+
  [...]
  Call Trace:
   <TASK>
   dump_stack_lvl+0x68/0xa0
   print_report+0xcf/0x610
   kasan_report+0xb5/0xe0
   ftrace_location+0x90/0x120
   register_kprobe+0x14b/0xa40
   kprobe_init+0x2d/0xff0 [kprobe_example]
   do_one_initcall+0x8f/0x2d0
   do_init_module+0x13a/0x3c0
   load_module+0x3082/0x33d0
   init_module_from_file+0xd2/0x130
   __x64_sys_finit_module+0x306/0x440
   do_syscall_64+0x68/0x140
   entry_SYSCALL_64_after_hwframe+0x71/0x79

The root cause is that, in lookup_rec(), ftrace record of some address is being searched in ftrace pages of some module, but those ftrace pages at the same time is being freed in ftrace_release_mod() as the corresponding module is being deleted:

           CPU1                       |      CPU2
  register_kprobes() {                | delete_module() {
    check_kprobe_address_safe() {     |
      arch_check_ftrace_location() {  |
        ftrace_location() {           |
          lookup_rec() // USE!        |   ftrace_release_mod() // Free!

To fix this issue:
1. Hold rcu lock as accessing ftrace pages in ftrace_location_range();
2. Use ftrace_location_range() instead of lookup_rec() in

     ftrace_location();

3. Call synchronize_rcu() before freeing any ftrace pages both in ftrace_process_locs()/ftrace_release_mod()/ftrace_free_mem().

---
 kernel/trace/ftrace.c |   39 +++++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 16 deletions(-)
kernel/trace/ftrace.c +23 -16
@@ -1595,12 +1595,15 @@ static struct dyn_ftrace *lookup_rec(uns
 unsigned long ftrace_location_range(unsigned long start, unsigned long end)
 {
 	struct dyn_ftrace *rec;
+	unsigned long ip = 0;
 
+	rcu_read_lock();
 	rec = lookup_rec(start, end);
 	if (rec)
-		return rec->ip;
+		ip = rec->ip;
+	rcu_read_unlock();
 
-	return 0;
+	return ip;
 }
 
 /**
@@ -1613,25 +1616,22 @@ unsigned long ftrace_location_range(unsi
  */
 unsigned long ftrace_location(unsigned long ip)
 {
-	struct dyn_ftrace *rec;
+	unsigned long loc;
 	unsigned long offset;
 	unsigned long size;
 
-	rec = lookup_rec(ip, ip);
-	if (!rec) {
+	loc = ftrace_location_range(ip, ip);
+	if (!loc) {
 		if (!kallsyms_lookup_size_offset(ip, &size, &offset))
 			goto out;
 
 		/* map sym+0 to __fentry__ */
 		if (!offset)
-			rec = lookup_rec(ip, ip + size - 1);
+			loc = ftrace_location_range(ip, ip + size - 1);
 	}
 
-	if (rec)
-		return rec->ip;
-
 out:
-	return 0;
+	return loc;
 }
 
 /**
@@ -6593,6 +6593,8 @@ static int ftrace_process_locs(struct mo
 	/* We should have used all pages unless we skipped some */
 	if (pg_unuse) {
 		WARN_ON(!skipped);
+		/* Need to synchronize with ftrace_location_range() */
+		synchronize_rcu();
 		ftrace_free_pages(pg_unuse);
 	}
 	return ret;
@@ -6806,6 +6808,9 @@ void ftrace_release_mod(struct module *m
  out_unlock:
 	mutex_unlock(&ftrace_lock);
 
+	/* Need to synchronize with ftrace_location_range() */
+	if (tmp_page)
+		synchronize_rcu();
 	for (pg = tmp_page; pg; pg = tmp_page) {
 
 		/* Needs to be called outside of ftrace_lock */
@@ -7139,6 +7144,7 @@ void ftrace_free_mem(struct module *mod,
 	unsigned long start = (unsigned long)(start_ptr);
 	unsigned long end = (unsigned long)(end_ptr);
 	struct ftrace_page **last_pg = &ftrace_pages_start;
+	struct ftrace_page *tmp_page = NULL;
 	struct ftrace_page *pg;
 	struct dyn_ftrace *rec;
 	struct dyn_ftrace key;
@@ -7180,12 +7186,8 @@ void ftrace_free_mem(struct module *mod,
 		ftrace_update_tot_cnt--;
 		if (!pg->index) {
 			*last_pg = pg->next;
-			if (pg->records) {
-				free_pages((unsigned long)pg->records, pg->order);
-				ftrace_number_of_pages -= 1 << pg->order;
-			}
-			ftrace_number_of_groups--;
-			kfree(pg);
+			pg->next = tmp_page;
+			tmp_page = pg;
 			pg = container_of(last_pg, struct ftrace_page, next);
 			if (!(*last_pg))
 				ftrace_pages = pg;
@@ -7202,6 +7204,11 @@ void ftrace_free_mem(struct module *mod,
 		clear_func_from_hashes(func);
 		kfree(func);
 	}
+	/* Need to synchronize with ftrace_location_range() */
+	if (tmp_page) {
+		synchronize_rcu();
+		ftrace_free_pages(tmp_page);
+	}
 }
 
 void __init ftrace_free_init_mem(void)
author maintainer
#29 lore raw

PATCH 29/744 ALSA: hda/realtek: fix mute/micmute LEDs dont work for ProBook 440/460 G11.

In reply to Greg Kroah-Hartman

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

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

From: Andy Chi <[email protected]>

commit b3b6f125da2773cbc681316842afba63ca9869aa upstream.

HP ProBook 440/460 G11 needs ALC236_FIXUP_HP_GPIO_LED quirk to make mic-mute/audio-mute working.

---
 sound/pci/hda/patch_realtek.c |    3 +++
 1 file changed, 3 insertions(+)
sound/pci/hda/patch_realtek.c +3 -0
@@ -9959,8 +9959,11 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
+	SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
+	SND_PCI_QUIRK(0x103c, 0x8c8d, "HP ProBook 440 G11", ALC236_FIXUP_HP_GPIO_LED),
+	SND_PCI_QUIRK(0x103c, 0x8c8e, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8c90, "HP EliteBook 640", ALC236_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
author maintainer
#30 lore raw

PATCH 30/744 ALSA: core: Fix NULL module pointer assignment at card init

In reply to Greg Kroah-Hartman

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

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

From: Takashi Iwai <[email protected]>

commit 39381fe7394e5eafac76e7e9367e7351138a29c1 upstream.

The commit 81033c6b584b ("ALSA: core: Warn on empty module") introduced a WARN_ON() for a NULL module pointer passed at snd_card object creation, and it also wraps the code around it with '#ifdef MODULE'. This works in most cases, but the devils are always in details. "MODULE" is defined when the target code (i.e. the sound core) is built as a module; but this doesn't mean that the caller is also built-in or not. Namely, when only the sound core is built-in (CONFIG_SND=y) while the driver is a module (CONFIG_SND_USB_AUDIO=m), the passed module pointer is ignored even if it's non-NULL, and card->module remains as NULL. This would result in the missing module reference up/down at the device open/close, leading to a race with the code execution after the module removal.

For addressing the bug, move the assignment of card->module again out of ifdef. The WARN_ON() is still wrapped with ifdef because the module can be really NULL when all sound drivers are built-in.

Note that we keep 'ifdef MODULE' for WARN_ON(), otherwise it would lead to a false-positive NULL module check. Admittedly it won't catch perfectly, i.e. no check is performed when CONFIG_SND=y. But, it's no real problem as it's only for debugging, and the condition is pretty rare.

---
 sound/core/init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/init.c +1 -1
@@ -312,8 +312,8 @@ static int snd_card_init(struct snd_card
 	card->number = idx;
 #ifdef MODULE
 	WARN_ON(!module);
-	card->module = module;
 #endif
+	card->module = module;
 	INIT_LIST_HEAD(&card->devices);
 	init_rwsem(&card->controls_rwsem);
 	rwlock_init(&card->ctl_files_rwlock);
author maintainer
#31 lore raw

PATCH 31/744 ALSA: Fix deadlocks with kctl removals at disconnection

In reply to Greg Kroah-Hartman

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

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

From: Takashi Iwai <[email protected]>

commit 87988a534d8e12f2e6fc01fe63e6c1925dc5307c upstream.

In snd_card_disconnect(), we set card->shutdown flag at the beginning, call callbacks and do sync for card->power_ref_sleep waiters at the end. The callback may delete a kctl element, and this can lead to a deadlock when the device was in the suspended state. Namely:

* A process waits for the power up at snd_power_ref_and_wait() in snd_ctl_info() or read/write() inside card->controls_rwsem.

* The system gets disconnected meanwhile, and the driver tries to delete a kctl via snd_ctl_remove*(); it tries to take card->controls_rwsem again, but this is already locked by the above. Since the sleeper isn't woken up, this deadlocks.

An easy fix is to wake up sleepers before processing the driver disconnect callbacks but right after setting the card->shutdown flag. Then all sleepers will abort immediately, and the code flows again.

So, basically this patch moves the wait_event() call at the right timing. While we're at it, just to be sure, call wait_event_all() instead of wait_event(), although we don't use exclusive events on this queue for now.

---
 sound/core/init.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
sound/core/init.c +8 -1
@@ -523,6 +523,14 @@ void snd_card_disconnect(struct snd_card
 	}
 	spin_unlock(&card->files_lock);	
 
+#ifdef CONFIG_PM
+	/* wake up sleepers here before other callbacks for avoiding potential
+	 * deadlocks with other locks (e.g. in kctls);
+	 * then this notifies the shutdown and sleepers would abort immediately
+	 */
+	wake_up_all(&card->power_sleep);
+#endif
+
 	/* notify all connected devices about disconnection */
 	/* at this point, they cannot respond to any calls except release() */
 
@@ -550,7 +558,6 @@ void snd_card_disconnect(struct snd_card
 	mutex_unlock(&snd_card_mutex);
 
 #ifdef CONFIG_PM
-	wake_up(&card->power_sleep);
 	snd_power_sync_ref(card);
 #endif
 }
author maintainer
#32 lore raw

PATCH 32/744 KEYS: asymmetric: Add missing dependency on CRYPTO_SIG

In reply to Greg Kroah-Hartman

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

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

From: Eric Biggers <[email protected]>

commit dcaa86b904ea3761e62c849957dd0904e126bf4a upstream.

Make ASYMMETRIC_PUBLIC_KEY_SUBTYPE select CRYPTO_SIG to avoid build errors like the following, which were possible with CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y && CONFIG_CRYPTO_SIG=n:

    ld: vmlinux.o: in function `public_key_verify_signature':
    (.text+0x306280): undefined reference to `crypto_alloc_sig'
    ld: (.text+0x306300): undefined reference to `crypto_sig_set_pubkey'
    ld: (.text+0x306324): undefined reference to `crypto_sig_verify'
    ld: (.text+0x30636c): undefined reference to `crypto_sig_set_privkey'
Fixes 63ba4d67594a ("KEYS: asymmetric: Use new crypto interface without scatterlists")
---
 crypto/asymmetric_keys/Kconfig | 1 +
 1 file changed, 1 insertion(+)
crypto/asymmetric_keys/Kconfig +1 -0
index 59ec726b7c77..3f089abd6fc9 100644
@@ -15,6 +15,7 @@ config ASYMMETRIC_PUBLIC_KEY_SUBTYPE
 	select MPILIB
 	select CRYPTO_HASH_INFO
 	select CRYPTO_AKCIPHER
+	select CRYPTO_SIG
 	select CRYPTO_HASH
 	help
 	  This option provides support for asymmetric public key type handling.
Signature · 1 line
2.45.1
author maintainer
#4 lore raw

PATCH 4/744 tty: n_gsm: fix possible out-of-bounds in gsm0_receive()

In reply to Greg Kroah-Hartman

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

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

From: Daniel Starke <[email protected]>

commit 47388e807f85948eefc403a8a5fdc5b406a65d5a upstream.

Assuming the following:
- side A configures the n_gsm in basic option mode
- side B sends the header of a basic option mode frame with data length 1
- side A switches to advanced option mode
- side B sends 2 data bytes which exceeds gsm->len
Reason: gsm->len is not used in advanced option mode.
- side A switches to basic option mode
- side B keeps sending until gsm0_receive() writes past gsm->buf
Reason: Neither gsm->state nor gsm->len have been reset after reconfiguration.

Fix this by changing gsm->count to gsm->len comparison from equal to less than. Also add upper limit checks against the constant MAX_MRU in gsm0_receive() and gsm1_receive() to harden against memory corruption of gsm->len and gsm->mru.

All other checks remain as we still need to limit the data according to the user configuration and actual payload size.

---
 drivers/tty/n_gsm.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/tty/n_gsm.c +5 -2
@@ -2912,7 +2912,10 @@ static void gsm0_receive(struct gsm_mux
 		break;
 	case GSM_DATA:		/* Data */
 		gsm->buf[gsm->count++] = c;
-		if (gsm->count == gsm->len) {
+		if (gsm->count >= MAX_MRU) {
+			gsm->bad_size++;
+			gsm->state = GSM_SEARCH;
+		} else if (gsm->count >= gsm->len) {
 			/* Calculate final FCS for UI frames over all data */
 			if ((gsm->control & ~PF) != UIH) {
 				gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf,
@@ -3025,7 +3028,7 @@ static void gsm1_receive(struct gsm_mux
 		gsm->state = GSM_DATA;
 		break;
 	case GSM_DATA:		/* Data */
-		if (gsm->count > gsm->mru) {	/* Allow one for the FCS */
+		if (gsm->count > gsm->mru || gsm->count > MAX_MRU) {	/* Allow one for the FCS */
 			gsm->state = GSM_OVERRUN;
 			gsm->bad_size++;
 		} else
author maintainer
#5 lore raw

PATCH 5/744 tty: n_gsm: fix missing receive state reset after mode switch

In reply to Greg Kroah-Hartman

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

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

From: Daniel Starke <[email protected]>

commit 70d7f1427afcf7fa2d21cb5a04c6f3555d5b9357 upstream.

The current implementation uses either gsm0_receive() or gsm1_receive() depending on whether the user configured the mux in basic or advanced option mode. Both functions share some state values over the same logical elements of the frame. However, both frame types differ in their nature. gsm0_receive() uses non-transparency framing, whereas gsm1_receive() uses transparency mechanism. Switching between both modes leaves the receive function in an undefined state when done during frame reception.

Fix this by splitting both states. Add gsm0_receive_state_check_and_fix() and gsm1_receive_state_check_and_fix() to ensure that gsm->state is reset after a change of gsm->receive.

Note that gsm->state is only accessed in:
- gsm0_receive()
- gsm1_receive()
- gsm_error()

---
 drivers/tty/n_gsm.c |  133 +++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 92 insertions(+), 41 deletions(-)
drivers/tty/n_gsm.c +92 -41
@@ -244,16 +244,18 @@ enum gsm_encoding {
 
 enum gsm_mux_state {
 	GSM_SEARCH,
-	GSM_START,
-	GSM_ADDRESS,
-	GSM_CONTROL,
-	GSM_LEN,
-	GSM_DATA,
-	GSM_FCS,
-	GSM_OVERRUN,
-	GSM_LEN0,
-	GSM_LEN1,
-	GSM_SSOF,
+	GSM0_ADDRESS,
+	GSM0_CONTROL,
+	GSM0_LEN0,
+	GSM0_LEN1,
+	GSM0_DATA,
+	GSM0_FCS,
+	GSM0_SSOF,
+	GSM1_START,
+	GSM1_ADDRESS,
+	GSM1_CONTROL,
+	GSM1_DATA,
+	GSM1_OVERRUN,
 };
 
 /*
@@ -2846,6 +2848,30 @@ invalid:
 	return;
 }
 
+/**
+ * gsm0_receive_state_check_and_fix	-	check and correct receive state
+ * @gsm: gsm data for this ldisc instance
+ *
+ * Ensures that the current receive state is valid for basic option mode.
+ */
+
+static void gsm0_receive_state_check_and_fix(struct gsm_mux *gsm)
+{
+	switch (gsm->state) {
+	case GSM_SEARCH:
+	case GSM0_ADDRESS:
+	case GSM0_CONTROL:
+	case GSM0_LEN0:
+	case GSM0_LEN1:
+	case GSM0_DATA:
+	case GSM0_FCS:
+	case GSM0_SSOF:
+		break;
+	default:
+		gsm->state = GSM_SEARCH;
+		break;
+	}
+}
 
 /**
  *	gsm0_receive	-	perform processing for non-transparency
@@ -2859,26 +2885,27 @@ static void gsm0_receive(struct gsm_mux
 {
 	unsigned int len;
 
+	gsm0_receive_state_check_and_fix(gsm);
 	switch (gsm->state) {
 	case GSM_SEARCH:	/* SOF marker */
 		if (c == GSM0_SOF) {
-			gsm->state = GSM_ADDRESS;
+			gsm->state = GSM0_ADDRESS;
 			gsm->address = 0;
 			gsm->len = 0;
 			gsm->fcs = INIT_FCS;
 		}
 		break;
-	case GSM_ADDRESS:	/* Address EA */
+	case GSM0_ADDRESS:	/* Address EA */
 		gsm->fcs = gsm_fcs_add(gsm->fcs, c);
 		if (gsm_read_ea(&gsm->address, c))
-			gsm->state = GSM_CONTROL;
+			gsm->state = GSM0_CONTROL;
 		break;
-	case GSM_CONTROL:	/* Control Byte */
+	case GSM0_CONTROL:	/* Control Byte */
 		gsm->fcs = gsm_fcs_add(gsm->fcs, c);
 		gsm->control = c;
-		gsm->state = GSM_LEN0;
+		gsm->state = GSM0_LEN0;
 		break;
-	case GSM_LEN0:		/* Length EA */
+	case GSM0_LEN0:		/* Length EA */
 		gsm->fcs = gsm_fcs_add(gsm->fcs, c);
 		if (gsm_read_ea(&gsm->len, c)) {
 			if (gsm->len > gsm->mru) {
@@ -2888,14 +2915,14 @@ static void gsm0_receive(struct gsm_mux
 			}
 			gsm->count = 0;
 			if (!gsm->len)
-				gsm->state = GSM_FCS;
+				gsm->state = GSM0_FCS;
 			else
-				gsm->state = GSM_DATA;
+				gsm->state = GSM0_DATA;
 			break;
 		}
-		gsm->state = GSM_LEN1;
+		gsm->state = GSM0_LEN1;
 		break;
-	case GSM_LEN1:
+	case GSM0_LEN1:
 		gsm->fcs = gsm_fcs_add(gsm->fcs, c);
 		len = c;
 		gsm->len |= len << 7;
@@ -2906,11 +2933,11 @@ static void gsm0_receive(struct gsm_mux
 		}
 		gsm->count = 0;
 		if (!gsm->len)
-			gsm->state = GSM_FCS;
+			gsm->state = GSM0_FCS;
 		else
-			gsm->state = GSM_DATA;
+			gsm->state = GSM0_DATA;
 		break;
-	case GSM_DATA:		/* Data */
+	case GSM0_DATA:		/* Data */
 		gsm->buf[gsm->count++] = c;
 		if (gsm->count >= MAX_MRU) {
 			gsm->bad_size++;
@@ -2921,14 +2948,14 @@ static void gsm0_receive(struct gsm_mux
 				gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf,
 							     gsm->count);
 			}
-			gsm->state = GSM_FCS;
+			gsm->state = GSM0_FCS;
 		}
 		break;
-	case GSM_FCS:		/* FCS follows the packet */
+	case GSM0_FCS:		/* FCS follows the packet */
 		gsm->fcs = gsm_fcs_add(gsm->fcs, c);
-		gsm->state = GSM_SSOF;
+		gsm->state = GSM0_SSOF;
 		break;
-	case GSM_SSOF:
+	case GSM0_SSOF:
 		gsm->state = GSM_SEARCH;
 		if (c == GSM0_SOF)
 			gsm_queue(gsm);
@@ -2942,6 +2969,29 @@ static void gsm0_receive(struct gsm_mux
 }
 
 /**
+ * gsm1_receive_state_check_and_fix	-	check and correct receive state
+ * @gsm: gsm data for this ldisc instance
+ *
+ * Ensures that the current receive state is valid for advanced option mode.
+ */
+
+static void gsm1_receive_state_check_and_fix(struct gsm_mux *gsm)
+{
+	switch (gsm->state) {
+	case GSM_SEARCH:
+	case GSM1_START:
+	case GSM1_ADDRESS:
+	case GSM1_CONTROL:
+	case GSM1_DATA:
+	case GSM1_OVERRUN:
+		break;
+	default:
+		gsm->state = GSM_SEARCH;
+		break;
+	}
+}
+
+/**
  *	gsm1_receive	-	perform processing for non-transparency
  *	@gsm: gsm data for this ldisc instance
  *	@c: character
@@ -2951,6 +3001,7 @@ static void gsm0_receive(struct gsm_mux
 
 static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
 {
+	gsm1_receive_state_check_and_fix(gsm);
 	/* handle XON/XOFF */
 	if ((c & ISO_IEC_646_MASK) == XON) {
 		gsm->constipated = true;
@@ -2963,11 +3014,11 @@ static void gsm1_receive(struct gsm_mux
 	}
 	if (c == GSM1_SOF) {
 		/* EOF is only valid in frame if we have got to the data state */
-		if (gsm->state == GSM_DATA) {
+		if (gsm->state == GSM1_DATA) {
 			if (gsm->count < 1) {
 				/* Missing FSC */
 				gsm->malformed++;
-				gsm->state = GSM_START;
+				gsm->state = GSM1_START;
 				return;
 			}
 			/* Remove the FCS from data */
@@ -2983,14 +3034,14 @@ static void gsm1_receive(struct gsm_mux
 			gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->buf[gsm->count]);
 			gsm->len = gsm->count;
 			gsm_queue(gsm);
-			gsm->state  = GSM_START;
+			gsm->state  = GSM1_START;
 			return;
 		}
 		/* Any partial frame was a runt so go back to start */
-		if (gsm->state != GSM_START) {
+		if (gsm->state != GSM1_START) {
 			if (gsm->state != GSM_SEARCH)
 				gsm->malformed++;
-			gsm->state = GSM_START;
+			gsm->state = GSM1_START;
 		}
 		/* A SOF in GSM_START means we are still reading idling or
 		   framing bytes */
@@ -3011,30 +3062,30 @@ static void gsm1_receive(struct gsm_mux
 		gsm->escape = false;
 	}
 	switch (gsm->state) {
-	case GSM_START:		/* First byte after SOF */
+	case GSM1_START:		/* First byte after SOF */
 		gsm->address = 0;
-		gsm->state = GSM_ADDRESS;
+		gsm->state = GSM1_ADDRESS;
 		gsm->fcs = INIT_FCS;
 		fallthrough;
-	case GSM_ADDRESS:	/* Address continuation */
+	case GSM1_ADDRESS:	/* Address continuation */
 		gsm->fcs = gsm_fcs_add(gsm->fcs, c);
 		if (gsm_read_ea(&gsm->address, c))
-			gsm->state = GSM_CONTROL;
+			gsm->state = GSM1_CONTROL;
 		break;
-	case GSM_CONTROL:	/* Control Byte */
+	case GSM1_CONTROL:	/* Control Byte */
 		gsm->fcs = gsm_fcs_add(gsm->fcs, c);
 		gsm->control = c;
 		gsm->count = 0;
-		gsm->state = GSM_DATA;
+		gsm->state = GSM1_DATA;
 		break;
-	case GSM_DATA:		/* Data */
+	case GSM1_DATA:		/* Data */
 		if (gsm->count > gsm->mru || gsm->count > MAX_MRU) {	/* Allow one for the FCS */
-			gsm->state = GSM_OVERRUN;
+			gsm->state = GSM1_OVERRUN;
 			gsm->bad_size++;
 		} else
 			gsm->buf[gsm->count++] = c;
 		break;
-	case GSM_OVERRUN:	/* Over-long - eg a dropped SOF */
+	case GSM1_OVERRUN:	/* Over-long - eg a dropped SOF */
 		break;
 	default:
 		pr_debug("%s: unhandled state: %d\n", __func__, gsm->state);
author maintainer
#6 lore raw

PATCH 6/744 speakup: Fix sizeof() vs ARRAY_SIZE() bug

In reply to Greg Kroah-Hartman

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

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

From: Dan Carpenter <[email protected]>

commit 008ab3c53bc4f0b2f20013c8f6c204a3203d0b8b upstream.

The "buf" pointer is an array of u16 values. This code should be using ARRAY_SIZE() (which is 256) instead of sizeof() (which is 512), otherwise it can the still got out of bounds.

---
 drivers/accessibility/speakup/main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/accessibility/speakup/main.c +1 -1
@@ -574,7 +574,7 @@ static u_long get_word(struct vc_data *v
 	}
 	attr_ch = get_char(vc, (u_short *)tmp_pos, &spk_attr);
 	buf[cnt++] = attr_ch;
-	while (tmpx < vc->vc_cols - 1 && cnt < sizeof(buf) - 1) {
+	while (tmpx < vc->vc_cols - 1 && cnt < ARRAY_SIZE(buf) - 1) {
 		tmp_pos += 2;
 		tmpx++;
 		ch = get_char(vc, (u_short *)tmp_pos, &temp);
author maintainer
#7 lore raw

PATCH 7/744 serial: 8250_bcm7271: use default_mux_rate if possible

In reply to Greg Kroah-Hartman

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

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

From: Doug Berger <[email protected]>

commit 614a19b89ca43449196a8af1afac7d55c6781687 upstream.

There is a scenario when resuming from some power saving states with no_console_suspend where console output can be generated before the 8250_bcm7271 driver gets the opportunity to restore the baud_mux_clk frequency. Since the baud_mux_clk is at its default frequency at this time the output can be garbled until the driver gets the opportunity to resume.

Since this is only an issue with console use of the serial port during that window and the console isn't likely to use baud rates that require alternate baud_mux_clk frequencies, allow the driver to select the default_mux_rate if it is accurate enough.

---
 drivers/tty/serial/8250/8250_bcm7271.c |  101 +++++++++++++++++++--------------
 1 file changed, 60 insertions(+), 41 deletions(-)
drivers/tty/serial/8250/8250_bcm7271.c +60 -41
@@ -676,18 +676,46 @@ static void init_real_clk_rates(struct d
 	clk_set_rate(priv->baud_mux_clk, priv->default_mux_rate);
 }
 
+static u32 find_quot(struct device *dev, u32 freq, u32 baud, u32 *percent)
+{
+	u32 quot;
+	u32 rate;
+	u64 hires_rate;
+	u64 hires_baud;
+	u64 hires_err;
+
+	rate = freq / 16;
+	quot = DIV_ROUND_CLOSEST(rate, baud);
+	if (!quot)
+		return 0;
+
+	/* increase resolution to get xx.xx percent */
+	hires_rate = div_u64((u64)rate * 10000, (u64)quot);
+	hires_baud = (u64)baud * 10000;
+
+	/* get the delta */
+	if (hires_rate > hires_baud)
+		hires_err = (hires_rate - hires_baud);
+	else
+		hires_err = (hires_baud - hires_rate);
+
+	*percent = (unsigned long)DIV_ROUND_CLOSEST_ULL(hires_err, baud);
+
+	dev_dbg(dev, "Baud rate: %u, MUX Clk: %u, Error: %u.%u%%\n",
+		baud, freq, *percent / 100, *percent % 100);
+
+	return quot;
+}
+
 static void set_clock_mux(struct uart_port *up, struct brcmuart_priv *priv,
 			u32 baud)
 {
 	u32 percent;
 	u32 best_percent = UINT_MAX;
 	u32 quot;
+	u32 freq;
 	u32 best_quot = 1;
-	u32 rate;
-	int best_index = -1;
-	u64 hires_rate;
-	u64 hires_baud;
-	u64 hires_err;
+	u32 best_freq = 0;
 	int rc;
 	int i;
 	int real_baud;
@@ -696,44 +724,35 @@ static void set_clock_mux(struct uart_po
 	if (priv->baud_mux_clk == NULL)
 		return;
 
-	/* Find the closest match for specified baud */
-	for (i = 0; i < ARRAY_SIZE(priv->real_rates); i++) {
-		if (priv->real_rates[i] == 0)
-			continue;
-		rate = priv->real_rates[i] / 16;
-		quot = DIV_ROUND_CLOSEST(rate, baud);
-		if (!quot)
-			continue;
-
-		/* increase resolution to get xx.xx percent */
-		hires_rate = (u64)rate * 10000;
-		hires_baud = (u64)baud * 10000;
-
-		hires_err = div_u64(hires_rate, (u64)quot);
-
-		/* get the delta */
-		if (hires_err > hires_baud)
-			hires_err = (hires_err - hires_baud);
-		else
-			hires_err = (hires_baud - hires_err);
-
-		percent = (unsigned long)DIV_ROUND_CLOSEST_ULL(hires_err, baud);
-		dev_dbg(up->dev,
-			"Baud rate: %u, MUX Clk: %u, Error: %u.%u%%\n",
-			baud, priv->real_rates[i], percent / 100,
-			percent % 100);
-		if (percent < best_percent) {
-			best_percent = percent;
-			best_index = i;
-			best_quot = quot;
+	/* Try default_mux_rate first */
+	quot = find_quot(up->dev, priv->default_mux_rate, baud, &percent);
+	if (quot) {
+		best_percent = percent;
+		best_freq = priv->default_mux_rate;
+		best_quot = quot;
+	}
+	/* If more than 1% error, find the closest match for specified baud */
+	if (best_percent > 100) {
+		for (i = 0; i < ARRAY_SIZE(priv->real_rates); i++) {
+			freq = priv->real_rates[i];
+			if (freq == 0 || freq == priv->default_mux_rate)
+				continue;
+			quot = find_quot(up->dev, freq, baud, &percent);
+			if (!quot)
+				continue;
+
+			if (percent < best_percent) {
+				best_percent = percent;
+				best_freq = freq;
+				best_quot = quot;
+			}
 		}
 	}
-	if (best_index == -1) {
+	if (!best_freq) {
 		dev_err(up->dev, "Error, %d BAUD rate is too fast.\n", baud);
 		return;
 	}
-	rate = priv->real_rates[best_index];
-	rc = clk_set_rate(priv->baud_mux_clk, rate);
+	rc = clk_set_rate(priv->baud_mux_clk, best_freq);
 	if (rc)
 		dev_err(up->dev, "Error selecting BAUD MUX clock\n");
 
@@ -742,8 +761,8 @@ static void set_clock_mux(struct uart_po
 		dev_err(up->dev, "Error, baud: %d has %u.%u%% error\n",
 			baud, percent / 100, percent % 100);
 
-	real_baud = rate / 16 / best_quot;
-	dev_dbg(up->dev, "Selecting BAUD MUX rate: %u\n", rate);
+	real_baud = best_freq / 16 / best_quot;
+	dev_dbg(up->dev, "Selecting BAUD MUX rate: %u\n", best_freq);
 	dev_dbg(up->dev, "Requested baud: %u, Actual baud: %u\n",
 		baud, real_baud);
 
@@ -752,7 +771,7 @@ static void set_clock_mux(struct uart_po
 	i += (i / 2);
 	priv->char_wait = ns_to_ktime(i);
 
-	up->uartclk = rate;
+	up->uartclk = best_freq;
 }
 
 static void brcmstb_set_termios(struct uart_port *up,
author maintainer
#8 lore raw

PATCH 8/744 serial: 8520_mtk: Set RTS on shutdown for Rx in-band wakeup

In reply to Greg Kroah-Hartman

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

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

From: Pin-yen Lin <[email protected]>

commit 4244f830a56058ee0670d80e7ac9fd7c982eb480 upstream.

When Rx in-band wakeup is enabled, set RTS to true in mtk8250_shutdown() so the connected device can still send message and trigger IRQ when the system is suspended.

Fixes 18c9d4a3c249 ("serial: When UART is suspended, set RTS to false")
Cc stable <[email protected]>
---
 drivers/tty/serial/8250/8250_mtk.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/tty/serial/8250/8250_mtk.c +6 -2
@@ -209,15 +209,19 @@ static int mtk8250_startup(struct uart_p
 
 static void mtk8250_shutdown(struct uart_port *port)
 {
-#ifdef CONFIG_SERIAL_8250_DMA
 	struct uart_8250_port *up = up_to_u8250p(port);
 	struct mtk8250_data *data = port->private_data;
+	int irq = data->rx_wakeup_irq;
 
+#ifdef CONFIG_SERIAL_8250_DMA
 	if (up->dma)
 		data->rx_status = DMA_RX_SHUTDOWN;
 #endif
 
-	return serial8250_do_shutdown(port);
+	serial8250_do_shutdown(port);
+
+	if (irq >= 0)
+		serial8250_do_set_mctrl(&up->port, TIOCM_RTS);
 }
 
 static void mtk8250_disable_intrs(struct uart_8250_port *up, int mask)
author maintainer
#9 lore raw

PATCH 9/744 Input: try trimming too long modalias strings

In reply to Greg Kroah-Hartman

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

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

From: Dmitry Torokhov <[email protected]>

commit 0774d19038c496f0c3602fb505c43e1b2d8eed85 upstream.

If an input device declares too many capability bits then modalias string for such device may become too long and not fit into uevent buffer, resulting in failure of sending said uevent. This, in turn, may prevent userspace from recognizing existence of such devices.

This is typically not a concern for real hardware devices as they have limited number of keys, but happen with synthetic devices such as ones created by xen-kbdfront driver, which creates devices as being capable of delivering all possible keys, since it doesn't know what keys the backend may produce.

To deal with such devices input core will attempt to trim key data, in the hope that the rest of modalias string will fit in the given buffer. When trimming key data it will indicate that it is not complete by placing "+," sign, resulting in conversions like this:

old: k71,72,73,74,78,7A,7B,7C,7D,8E,9E,A4,AD,E0,E1,E4,F8,174,
new: k71,72,73,74,78,7A,7B,7C,+,

This should allow existing udev rules continue to work with existing devices, and will also allow writing more complex rules that would recognize trimmed modalias and check input device characteristics by other means (for example by parsing KEY= data in uevent or parsing input device sysfs attributes).

Note that the driver core may try adding more uevent environment variables once input core is done adding its own, so when forming modalias we can not use the entire available buffer, so we reduce it by somewhat an arbitrary amount (96 bytes).

---
 drivers/input/input.c |  104 ++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 89 insertions(+), 15 deletions(-)
drivers/input/input.c +89 -15
@@ -1378,19 +1378,19 @@ static int input_print_modalias_bits(cha
 				     char name, const unsigned long *bm,
 				     unsigned int min_bit, unsigned int max_bit)
 {
-	int len = 0, i;
+	int bit = min_bit;
+	int len = 0;
 
 	len += snprintf(buf, max(size, 0), "%c", name);
-	for (i = min_bit; i < max_bit; i++)
-		if (bm[BIT_WORD(i)] & BIT_MASK(i))
-			len += snprintf(buf + len, max(size - len, 0), "%X,", i);
+	for_each_set_bit_from(bit, bm, max_bit)
+		len += snprintf(buf + len, max(size - len, 0), "%X,", bit);
 	return len;
 }
 
-static int input_print_modalias(char *buf, int size, const struct input_dev *id,
-				int add_cr)
+static int input_print_modalias_parts(char *buf, int size, int full_len,
+				      const struct input_dev *id)
 {
-	int len;
+	int len, klen, remainder, space;
 
 	len = snprintf(buf, max(size, 0),
 		       "input:b%04Xv%04Xp%04Xe%04X-",
@@ -1399,8 +1399,48 @@ static int input_print_modalias(char *bu
 
 	len += input_print_modalias_bits(buf + len, size - len,
 				'e', id->evbit, 0, EV_MAX);
-	len += input_print_modalias_bits(buf + len, size - len,
+
+	/*
+	 * Calculate the remaining space in the buffer making sure we
+	 * have place for the terminating 0.
+	 */
+	space = max(size - (len + 1), 0);
+
+	klen = input_print_modalias_bits(buf + len, size - len,
 				'k', id->keybit, KEY_MIN_INTERESTING, KEY_MAX);
+	len += klen;
+
+	/*
+	 * If we have more data than we can fit in the buffer, check
+	 * if we can trim key data to fit in the rest. We will indicate
+	 * that key data is incomplete by adding "+" sign at the end, like
+	 * this: * "k1,2,3,45,+,".
+	 *
+	 * Note that we shortest key info (if present) is "k+," so we
+	 * can only try to trim if key data is longer than that.
+	 */
+	if (full_len && size < full_len + 1 && klen > 3) {
+		remainder = full_len - len;
+		/*
+		 * We can only trim if we have space for the remainder
+		 * and also for at least "k+," which is 3 more characters.
+		 */
+		if (remainder <= space - 3) {
+			/*
+			 * We are guaranteed to have 'k' in the buffer, so
+			 * we need at least 3 additional bytes for storing
+			 * "+," in addition to the remainder.
+			 */
+			for (int i = size - 1 - remainder - 3; i >= 0; i--) {
+				if (buf[i] == 'k' || buf[i] == ',') {
+					strcpy(buf + i + 1, "+,");
+					len = i + 3; /* Not counting '\0' */
+					break;
+				}
+			}
+		}
+	}
+
 	len += input_print_modalias_bits(buf + len, size - len,
 				'r', id->relbit, 0, REL_MAX);
 	len += input_print_modalias_bits(buf + len, size - len,
@@ -1416,12 +1456,25 @@ static int input_print_modalias(char *bu
 	len += input_print_modalias_bits(buf + len, size - len,
 				'w', id->swbit, 0, SW_MAX);
 
-	if (add_cr)
-		len += snprintf(buf + len, max(size - len, 0), "\n");
-
 	return len;
 }
 
+static int input_print_modalias(char *buf, int size, const struct input_dev *id)
+{
+	int full_len;
+
+	/*
+	 * Printing is done in 2 passes: first one figures out total length
+	 * needed for the modalias string, second one will try to trim key
+	 * data in case when buffer is too small for the entire modalias.
+	 * If the buffer is too small regardless, it will fill as much as it
+	 * can (without trimming key data) into the buffer and leave it to
+	 * the caller to figure out what to do with the result.
+	 */
+	full_len = input_print_modalias_parts(NULL, 0, 0, id);
+	return input_print_modalias_parts(buf, size, full_len, id);
+}
+
 static ssize_t input_dev_show_modalias(struct device *dev,
 				       struct device_attribute *attr,
 				       char *buf)
@@ -1429,7 +1482,9 @@ static ssize_t input_dev_show_modalias(s
 	struct input_dev *id = to_input_dev(dev);
 	ssize_t len;
 
-	len = input_print_modalias(buf, PAGE_SIZE, id, 1);
+	len = input_print_modalias(buf, PAGE_SIZE, id);
+	if (len < PAGE_SIZE - 2)
+		len += snprintf(buf + len, PAGE_SIZE - len, "\n");
 
 	return min_t(int, len, PAGE_SIZE);
 }
@@ -1641,6 +1696,23 @@ static int input_add_uevent_bm_var(struc
 	return 0;
 }
 
+/*
+ * This is a pretty gross hack. When building uevent data the driver core
+ * may try adding more environment variables to kobj_uevent_env without
+ * telling us, so we have no idea how much of the buffer we can use to
+ * avoid overflows/-ENOMEM elsewhere. To work around this let's artificially
+ * reduce amount of memory we will use for the modalias environment variable.
+ *
+ * The potential additions are:
+ *
+ * SEQNUM=18446744073709551615 - (%llu - 28 bytes)
+ * HOME=/ (6 bytes)
+ * PATH=/sbin:/bin:/usr/sbin:/usr/bin (34 bytes)
+ *
+ * 68 bytes total. Allow extra buffer - 96 bytes
+ */
+#define UEVENT_ENV_EXTRA_LEN	96
+
 static int input_add_uevent_modalias_var(struct kobj_uevent_env *env,
 					 const struct input_dev *dev)
 {
@@ -1650,9 +1722,11 @@ static int input_add_uevent_modalias_var
 		return -ENOMEM;
 
 	len = input_print_modalias(&env->buf[env->buflen - 1],
-				   sizeof(env->buf) - env->buflen,
-				   dev, 0);
-	if (len >= (sizeof(env->buf) - env->buflen))
+				   (int)sizeof(env->buf) - env->buflen -
+					UEVENT_ENV_EXTRA_LEN,
+				   dev);
+	if (len >= ((int)sizeof(env->buf) - env->buflen -
+					UEVENT_ENV_EXTRA_LEN))
 		return -ENOMEM;
 
 	env->buflen += len;

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover 6.6.33-rc1 review

This is the start of the stable review cycle for the 6.6.33 release. There are 744 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 Sat, 08 Jun 2024 13:15:55 +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.6.33-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.6.y
and the diffstat can be found below.

thanks,

greg k-h

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

Greg Kroah-Hartman <[email protected]>

    Linux 6.6.33-rc1

Srinivas Pandruvada <[email protected]>
platform/x86/intel-uncore-freq: Don't present root domain on error

Srinivas Pandruvada <[email protected]>
platform/x86/intel/tpmi: Handle error from tpmi_process_info()

Dongli Zhang <[email protected]>
genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline

Gerd Hoffmann <[email protected]>
KVM: x86: Don't advertise guest.MAXPHYADDR as host.MAXPHYADDR in CPUID

Bjorn Helgaas <[email protected]>
x86/pci: Skip early E820 check for ECAM region

Hagar Hemdan <[email protected]>
efi: libstub: only free priv.runtime_map when allocated

Ard Biesheuvel <[email protected]>
x86/efistub: Omit physical KASLR when memory reservations exist

Takashi Iwai <[email protected]>
ALSA: timer: Set lower bound of start tick time

Takashi Iwai <[email protected]>
ALSA: seq: ump: Fix swapped song position pointer data

Sergey Matyukevich <[email protected]>
riscv: prevent pt_regs corruption for secondary idle threads

Guenter Roeck <[email protected]>
hwmon: (shtc1) Fix property misspelling

Peter Colberg <[email protected]>
hwmon: (intel-m10-bmc-hwmon) Fix multiplier for N6000 board power sensor

Gerald Loacker <[email protected]>
drm/panel: sitronix-st7789v: fix display size for jt240mhqs_hwt_ek_e3 panel

Gerald Loacker <[email protected]>
drm/panel: sitronix-st7789v: tweak timing for jt240mhqs_hwt_ek_e3 panel

Gerald Loacker <[email protected]>
drm/panel: sitronix-st7789v: fix timing for jt240mhqs_hwt_ek_e3 panel

Michael Ellerman <[email protected]>
powerpc/uaccess: Use YZ asm constraint for ld

Nathan Lynch <[email protected]>
powerpc/pseries/lparcfg: drop error message from guest name lookup

Takashi Iwai <[email protected]>
ALSA: seq: Fix yet another spot for system message conversion

Yue Haibing <[email protected]>

    ipvlan: Dont Use skb->sk in ipvlan_process_v{4,6}_outbound

Shay Agroskin <[email protected]>
net: ena: Fix redundant device NUMA node override

David Arinzon <[email protected]>
net: ena: Reduce lines with longer column width boundary

Hui Wang <[email protected]>
e1000e: move force SMBUS near the end of enable_ulp function

Tristram Ha <[email protected]>
net: dsa: microchip: fix RGMII error in KSZ DSA driver

Uwe Kleine-König <[email protected]>
spi: stm32: Don't warn about spurious interrupts

Miguel Ojeda <[email protected]>
kheaders: use command -v to test for existence of cpio

Andi Shyti <[email protected]>
drm/i915/gt: Fix CCS id's calculation for CCS mode setting

Arnd Bergmann <[email protected]>
drm/i915/guc: avoid FIELD_PREP warning

Masahiro Yamada <[email protected]>
kconfig: fix comparison to constant symbols, 'm', 'n'

Vladimir Oltean <[email protected]>
net/sched: taprio: extend minimum interval restriction to entire cycle too

Vladimir Oltean <[email protected]>

    net/sched: taprio: make q->picos_per_byte available to fill_sched_entry()

Eric Garver <[email protected]>
netfilter: nft_fib: allow from forward/input without iif selector

Florian Westphal <[email protected]>
netfilter: tproxy: bail out if IP has been disabled on the device

Pablo Neira Ayuso <[email protected]>
netfilter: nft_payload: skbuff vlan metadata mangle support

MD Danish Anwar <[email protected]>
net: ti: icssg-prueth: Fix start counter for ft1 filter

Takashi Iwai <[email protected]>

    ALSA: seq: Don't clear bank selection at event -> UMP MIDI2 conversion

Takashi Iwai <[email protected]>
ALSA: seq: Fix missing bank setup between MIDI1/MIDI2 UMP conversion

Matthieu Baerts (NGI0) <[email protected]>
selftests: mptcp: join: mark 'fail' tests as flaky

Geliang Tang <[email protected]>
selftests: mptcp: add ms units for tc-netem delay

Matthieu Baerts (NGI0) <[email protected]>
selftests: mptcp: simult flows: mark 'unbalanced' tests as flaky

Jacob Keller <[email protected]>
ice: fix accounting if a VLAN already exists

Horatiu Vultur <[email protected]>
net: micrel: Fix lan8841_config_intr after getting out of sleep mode

Xiaolei Wang <[email protected]>
net:fec: Add fec_enet_deinit()

Jakub Sitnicki <[email protected]>
bpf: Allow delete from sockmap/sockhash only if update is allowed

Charles Keepax <[email protected]>
ASoC: cs42l43: Only restrict 44.1kHz for the ASP

Parthiban Veerasooran <[email protected]>
net: usb: smsc95xx: fix changing LED_SEL bit value updated from EEPROM

Hariprasad Kelam <[email protected]>
Octeontx2-pf: Free send queue buffers incase of leaf to inner

Kuniyuki Iwashima <[email protected]>

    af_unix: Read sk->sk_hash under bindlock during bind().

Kuniyuki Iwashima <[email protected]>

    af_unix: Annotate data-race around unix_sk(sk)->addr.

Roded Zats <[email protected]>
enic: Validate length of nl attributes in enic_set_vf_port

Luke D. Jones <[email protected]>
ALSA: hda/realtek: Adjust G814JZR to use SPI init for amp

Takashi Iwai <[email protected]>
ALSA: core: Remove debugfs at disconnection

Takashi Iwai <[email protected]>
ALSA: jack: Use guard() for locking

Friedrich Vock <[email protected]>
bpf: Fix potential integer overflow in resolve_btfids

Tetsuo Handa <[email protected]>
dma-buf/sw-sync: don't enable IRQ from sync_print_obj()

Gal Pressman <[email protected]>
net/mlx5e: Fix UDP GSO for encapsulated packets

Carolina Jubran <[email protected]>
net/mlx5e: Use rx_missed_errors instead of rx_dropped for reporting buffer exhaustion

Rahul Rameshbabu <[email protected]>
net/mlx5e: Fix IPsec tunnel mode offload feature check

Rahul Rameshbabu <[email protected]>
net/mlx5: Use mlx5_ipsec_rx_status_destroy to correctly delete status rules

Gal Pressman <[email protected]>
net/mlx5: Fix MTMP register capability offset in MCAM register

Maher Sanalla <[email protected]>
net/mlx5: Lag, do bond only if slaves agree on roce state

Mathieu Othacehe <[email protected]>
net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8061

Mario Limonciello <[email protected]>
drm/amd/display: Enable colorspace property for MST connectors

Sagi Grimberg <[email protected]>
nvmet: fix ns enable/disable possible hang

Keith Busch <[email protected]>
nvme-multipath: fix io accounting on failover

Hannes Reinecke <[email protected]>
nvme-tcp: add definitions for TLS cipher suites

Fedor Pchelkin <[email protected]>
dma-mapping: benchmark: handle NUMA_NO_NODE correctly

Fedor Pchelkin <[email protected]>
dma-mapping: benchmark: fix node id validation

Fedor Pchelkin <[email protected]>
dma-mapping: benchmark: fix up kthread-related error handling

Andreas Gruenbacher <[email protected]>
kthread: add kthread_stop_put

Andy Shevchenko <[email protected]>
spi: Don't mark message DMA mapped when no transfer in it is

Pablo Neira Ayuso <[email protected]>
netfilter: nft_payload: restore vlan q-in-q match support

Alexander Maltsev <[email protected]>
netfilter: ipset: Add list flush to cancel_gc

Eric Dumazet <[email protected]>
netfilter: nfnetlink_queue: acquire rcu_read_lock() in instance_destroy_rcu()

Matthew R. Ochs <[email protected]>
tpm_tis_spi: Account for SPI header when allocating TPM SPI xfer buffer

Carlos López <[email protected]>
tracing/probes: fix error check in parse_btf_field()

Andrey Konovalov <[email protected]>
kasan, fortify: properly rename memintrinsics

Larysa Zaremba <[email protected]>
ice: Interpret .set_channels() input differently

Henry Wang <[email protected]>
drivers/xen: Improve the late XenStore init protocol

Ryosuke Yasuoka <[email protected]>
nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()

Paolo Abeni <[email protected]>
net: relax socket state check at accept time.

Jason Xing <[email protected]>

    tcp: remove 64 KByte limit for initial tp->rcv_wnd value

Dae R. Jeong <[email protected]>
tls: fix missing memory barrier in tls_init

Wei Fang <[email protected]>
net: fec: avoid lock evasion when reading pps_enable

Jacob Keller <[email protected]>
Revert "ixgbe: Manual AN-37 for troublesome link partners for X550 SFI"

Matthew Bystrin <[email protected]>
riscv: stacktrace: fixed walk_stackframe()

Frank Li <[email protected]>
i3c: master: svc: change ENXIO to EAGAIN when IBI occurs during start frame

Frank Li <[email protected]>
i3c: master: svc: return actual transfer data len

Frank Li <[email protected]>
i3c: master: svc: rename read_len as actual_len

Frank Li <[email protected]>
i3c: add actual_len in i3c_priv_xfer

Charlie Jenkins <[email protected]>
riscv: cpufeature: Fix thead vector hwcap removal

Jiri Pirko <[email protected]>
virtio: delete vq in vp_find_vqs_msix() when request_irq() fails

Horatiu Vultur <[email protected]>
net: lan966x: Remove ptp traps in case the ptp is not enabled.

Yang Li <[email protected]>
rv: Update rv_en(dis)able_monitor doc to match kernel-doc

Jiangfeng Xiao <[email protected]>
arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY

Aaron Conole <[email protected]>
openvswitch: Set the skbuff pkt_type for proper pmtud support.

Olga Kornievskaia <[email protected]>
pNFS/filelayout: fixup pNfs allocation modes

Kuniyuki Iwashima <[email protected]>
tcp: Fix shift-out-of-bounds in dctcp_update_alpha().

Neha Malcom Francis <[email protected]>
regulator: tps6594-regulator: Correct multi-phase configuration

Hangbin Liu <[email protected]>
ipv6: sr: fix memleak in seg6_hmac_init_algo

Kuniyuki Iwashima <[email protected]>

    af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock.

Matti Vaittinen <[email protected]>
regulator: tps6287x: Force writing VSEL bit

Matti Vaittinen <[email protected]>
regulator: pickable ranges: don't always cache vsel

Dan Aloni <[email protected]>
rpcrdma: fix handling for RDMA_CM_EVENT_DEVICE_REMOVAL

Dan Aloni <[email protected]>
sunrpc: fix NFSACL RPC retry on soft mount

Martin Kaiser <[email protected]>
nfs: keep server info for remounts

Benjamin Coddington <[email protected]>
NFSv4: Fixup smatch warning for ambiguous return

Shenghao Ding <[email protected]>
ASoC: tas2781: Fix wrong loading calibrated data sequence

Shenghao Ding <[email protected]>
ASoC: tas2552: Add TX path for capturing AUDIO-OUT data

Ryosuke Yasuoka <[email protected]>
nfc: nci: Fix uninit-value in nci_rx_work

Taehee Yoo <[email protected]>
selftests: net: kill smcrouted in the cleanup logic in amt.sh

Andrea Mayer <[email protected]>
ipv6: sr: fix missing sk_buff release in seg6_input_core

Florian Fainelli <[email protected]>
net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled

Masahiro Yamada <[email protected]>
x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y

Namhyung Kim <[email protected]>

    perf/arm-dmc620: Fix lockdep assert in ->event_init()

Roger Pau Monne <[email protected]>
xen/x86: add extra pages to unpopulated-alloc if available

Matti Vaittinen <[email protected]>
regulator: bd71828: Don't overwrite runtime voltages

Waiman Long <[email protected]>
blk-cgroup: Properly propagate the iostat update up the hierarchy

Ming Lei <[email protected]>

    blk-cgroup: fix list corruption from reorder of WRITE ->lqueued

Ming Lei <[email protected]>
blk-cgroup: fix list corruption from resetting io stat

Mohamed Ahmed <[email protected]>
drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations

Dave Airlie <[email protected]>
nouveau: add an ioctl to report vram usage

Dave Airlie <[email protected]>
nouveau: add an ioctl to return vram bar size.

Hsin-Te Yuan <[email protected]>
ASoC: mediatek: mt8192: fix register configuration for tdm

Richard Fitzgerald <[email protected]>
ALSA: hda: cs35l56: Fix lifetime of cs_dsp instance

Richard Fitzgerald <[email protected]>
ALSA: hda: cs35l56: Initialize all ASP1 registers

Richard Fitzgerald <[email protected]>
ASoC: cs35l56: Fix to ensure ASP1 registers match cache

Richard Fitzgerald <[email protected]>
ALSA: hda/cs_dsp_ctl: Use private_free for control cleanup

Ryusuke Konishi <[email protected]>
nilfs2: make superblock data array index computation sparse friendly

Zhu Yanjun <[email protected]>
null_blk: Fix the WARNING: modpost: missing MODULE_DESCRIPTION()

Shenghao Ding <[email protected]>
ASoC: tas2781: Fix a warning reported by robot kernel test

Konrad Dybcio <[email protected]>
drm/msm/a6xx: Avoid a nullptr dereference when speedbin setting fails

Benjamin Gray <[email protected]>
selftests/powerpc/dexcr: Add -no-pie to hashchk tests

Sean Anderson <[email protected]>
drm: zynqmp_dpsub: Always register bridge

Luca Ceresoli <[email protected]>
Revert "drm/bridge: ti-sn65dsi83: Fix enable error path"

Hans Verkuil <[email protected]>
media: cec: core: avoid confusing "transmit timed out" message

Hans Verkuil <[email protected]>
media: cec: core: avoid recursive cec_claim_log_addrs

Hans Verkuil <[email protected]>
media: cec: cec-api: add locking in cec_release()

Hans Verkuil <[email protected]>
media: cec: cec-adap: always cancel work in cec_transmit_msg_fh

Randy Dunlap <[email protected]>
media: sunxi: a83-mips-csi2: also select GENERIC_PHY

Li Zhijian <[email protected]>
cxl/region: Fix cxlr_pmem leaks

Alison Schofield <[email protected]>
cxl/trace: Correct DPA field masks for general_media & dram events

Tiwei Bie <[email protected]>
um: Fix the declaration of kasan_map_memory

Tiwei Bie <[email protected]>
um: Fix the -Wmissing-prototypes warning for get_thread_reg

Tiwei Bie <[email protected]>
um: Fix the -Wmissing-prototypes warning for __switch_mm

Shrikanth Hegde <[email protected]>
powerpc/pseries: Add failure related checks for h_get_mpp and h_get_ppp

Dongliang Mu <[email protected]>
media: flexcop-usb: fix sanity check of bNumEndpoints

Hans de Goede <[email protected]>
platform/x86: thinkpad_acpi: Take hotkey_mutex during hotkey_exit()

David E. Box <[email protected]>
tools/arch/x86/intel_sdsi: Fix meter_certificate decoding

David E. Box <[email protected]>
tools/arch/x86/intel_sdsi: Fix meter_show display

David E. Box <[email protected]>
tools/arch/x86/intel_sdsi: Fix maximum meter bundle length

Eugen Hristev <[email protected]>
media: mediatek: vcodec: fix possible unbalanced PM counter

Irui Wang <[email protected]>
media: mediatek: vcodec: add encoder power management helper functions

Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Fix buffer size in gfx_v9_4_3_init_ cp_compute_microcode() and rlc_microcode()

Le Ma <[email protected]>
drm/amdgpu: init microcode chip name from ip versions

Marek Szyprowski <[email protected]>
Input: cyapa - add missing input core locking to suspend/resume functions

Dan Carpenter <[email protected]>
media: stk1160: fix bounds checking in stk1160_copy_video()

Michael Walle <[email protected]>

    drm/bridge: tc358775: fix support for jeida-18 and jeida-24

Aleksandr Mishin <[email protected]>
drm/msm/dpu: Add callback function pointer check before its call

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: stop using raw IRQ indices in the kernel output

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: make the irq table size static

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: add helper to get IRQ-related data

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: extract dpu_core_irq_is_valid() helper

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: remove irq_idx argument from IRQ callbacks

Konstantin Komarov <[email protected]>
fs/ntfs3: Use variable length array instead of fixed size

Konstantin Komarov <[email protected]>
fs/ntfs3: Use 64 bit variable to avoid 32 bit overflow

Konstantin Komarov <[email protected]>
fs/ntfs3: Check 'folio' pointer for NULL

Johannes Berg <[email protected]>
um: vector: fix bpfflash parameter evaluation

Roberto Sassu <[email protected]>
um: Add winch to winch_handlers before registering winch IRQ

Duoming Zhou <[email protected]>
um: Fix return value in ubd_init()

Neil Armstrong <[email protected]>
drm/meson: gate px_clk when setting rate

Wojciech Macek <[email protected]>
drm/mediatek: dp: Fix mtk_dp_aux_transfer return value

Marijn Suijten <[email protected]>
drm/msm/dpu: Always flush the slave INTF on the CTL

Marijn Suijten <[email protected]>
drm/msm/dsi: Print dual-DSI-adjusted pclk instead of original mode pclk

Fabio Estevam <[email protected]>
media: ov2680: Do not fail if data-lanes property is absent

Fabio Estevam <[email protected]>
media: ov2680: Allow probing if link-frequencies is absent

Fabio Estevam <[email protected]>
media: ov2680: Clear the 'ret' variable on success

Sakari Ailus <[email protected]>
media: v4l: Don't turn on privacy LED if streamon fails

Laurent Pinchart <[email protected]>
media: v4l2-subdev: Document and enforce .s_stream() requirements

Fenglin Wu <[email protected]>
Input: pm8xxx-vibrator - correct VIB_MAX_LEVELS calculation

Judith Mendez <[email protected]>
mmc: sdhci_am654: Fix ITAPDLY for HS400 timing

Judith Mendez <[email protected]>
mmc: sdhci_am654: Add ITAPDLYSEL in sdhci_j721e_4bit_set_clock

Judith Mendez <[email protected]>
mmc: sdhci_am654: Add OTAP/ITAP delay enable

Vignesh Raghavendra <[email protected]>
mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel

Judith Mendez <[email protected]>
mmc: sdhci_am654: Write ITAPDLY for DDR52 timing

Judith Mendez <[email protected]>
mmc: sdhci_am654: Add tuning algorithm for delay chain

Arnd Bergmann <[email protected]>
Input: ims-pcu - fix printf string overflow

Nuno Sa <[email protected]>
dt-bindings: adc: axi-adc: add clocks property

Nuno Sa <[email protected]>
dt-bindings: adc: axi-adc: update bindings for backend framework

Steven Rostedt (Google) <[email protected]>
eventfs: Have "events" directory get permissions from its parent

Steven Rostedt (Google) <[email protected]>
eventfs: Free all of the eventfs_inode after RCU

Steven Rostedt (Google) <[email protected]>
eventfs/tracing: Add callback for release of an eventfs_inode

Steven Rostedt (Google) <[email protected]>
eventfs: Create eventfs_root_inode to store dentry

Hugo Villeneuve <[email protected]>
serial: sc16is7xx: fix bug in sc16is7xx_set_baud() when using prescaler

Hugo Villeneuve <[email protected]>
serial: sc16is7xx: replace hardcoded divisor value with BIT() macro

Thomas Weißschuh <[email protected]>
misc/pvpanic-pci: register attributes via pci_driver

Thomas Weißschuh <[email protected]>
misc/pvpanic: deduplicate common code

Hans de Goede <[email protected]>
iio: accel: mxc4005: Reset chip on probe() and resume()

Luca Ceresoli <[email protected]>
iio: accel: mxc4005: allow module autoloading via OF compatible

Steven Rostedt (Google) <[email protected]>
eventfs: Do not differentiate the toplevel events directory

Wenjing Liu <[email protected]>
drm/amd/display: Revert Remove pixle rate limit for subvp

Alvin Lee <[email protected]>
drm/amd/display: Remove pixle rate limit for subvp

Devyn Liu <[email protected]>
gpiolib: acpi: Fix failed in acpi_gpiochip_find() by adding parent node match

Krzysztof Kozlowski <[email protected]>
dt-bindings: PCI: rockchip,rk3399-pcie: Add missing maxItems to ep-gpios

Sven Schnelle <[email protected]>
s390/boot: Remove alt_stfle_fac_list from decompressor

Alexander Egorenkov <[email protected]>
s390/ipl: Fix incorrect initialization of nvme dump block

Alexander Egorenkov <[email protected]>
s390/ipl: Fix incorrect initialization of len fields in nvme reipl block

Heiko Carstens <[email protected]>
s390/vdso: Use standard stack frame layout

Jens Remus <[email protected]>
s390/vdso: Create .build-id links for unstripped vdso files

Masahiro Yamada <[email protected]>
kbuild: fix build ID symlinks to installed debug VDSO files

Masahiro Yamada <[email protected]>
kbuild: unify vdso_install rules

Jens Remus <[email protected]>
s390/vdso: Generate unwind information for C modules

Sumanth Korikkar <[email protected]>
s390/vdso64: filter out munaligned-symbols flag for vdso

Huacai Chen <[email protected]>
LoongArch: Fix callchain parse error with kernel tracepoint events again

Ian Rogers <[email protected]>
perf pmu: Count sys and cpuid JSON events separately

Ian Rogers <[email protected]>
perf pmu: Assume sysfs events are always the same case

Ian Rogers <[email protected]>
perf tools: Add/use PMU reverse lookup from config to name

Ian Rogers <[email protected]>
perf tools: Use pmus to describe type from attribute

Jing Zhang <[email protected]>
perf pmu: "Compat" supports regular expression matching identifiers

James Clark <[email protected]>
perf pmu: Move pmu__find_core_pmu() to pmus.c

James Clark <[email protected]>
perf test: Add a test for strcmp_cpuid_str() expression

Ian Rogers <[email protected]>
perf stat: Don't display metric header for non-leader uncore events

Andy Shevchenko <[email protected]>
usb: fotg210: Add missing kernel doc description

Chao Yu <[email protected]>
f2fs: fix to add missing iput() in gc_data_segment()

Samasth Norway Ananda <[email protected]>
perf daemon: Fix file leak in daemon_session__control

Ian Rogers <[email protected]>
libsubcmd: Fix parse-options memory leak

Wolfram Sang <[email protected]>
serial: sh-sci: protect invalidating RXDMA on shutdown

Chao Yu <[email protected]>
f2fs: compress: don't allow unaligned truncation on released compress inode

Chao Yu <[email protected]>
f2fs: fix to release node block count in error path of f2fs_new_node_page()

Chao Yu <[email protected]>
f2fs: compress: fix to cover {reserve,release}_compress_blocks() w/ cp_rwsem lock

Chao Yu <[email protected]>
f2fs: compress: fix error path of inc_valid_block_count()

Chao Yu <[email protected]>
f2fs: introduce get_available_block_count() for cleanup

Jaegeuk Kim <[email protected]>
f2fs: deprecate io_bits

Chao Yu <[email protected]>
f2fs: compress: fix to update i_compr_blocks correctly

James Clark <[email protected]>
perf symbols: Fix ownership of string in dso__load_vmlinux()

Ian Rogers <[email protected]>
perf maps: Move symbol maps functions to maps.c

Ian Rogers <[email protected]>
perf thread: Fixes to thread__new() related to initializing comm

Ian Rogers <[email protected]>
perf report: Avoid SEGV in report__setup_sample_type()

Ian Rogers <[email protected]>
perf ui browser: Avoid SEGV on title

Wu Bo <[email protected]>
f2fs: fix block migration when section is not aligned to pow2

Daeho Jeong <[email protected]>
f2fs: support file pinning for zoned devices

Jaegeuk Kim <[email protected]>
f2fs: kill heap-based allocation

Daeho Jeong <[email protected]>
f2fs: separate f2fs_gc_range() to use GC for a range

Jaegeuk Kim <[email protected]>
f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC

Chao Yu <[email protected]>
f2fs: support printk_ratelimited() in f2fs_printk()

KaiLong Wang <[email protected]>
f2fs: Clean up errors in segment.h

Kuppuswamy Sathyanarayanan <[email protected]>
PCI/EDR: Align EDR_PORT_LOCATE_DSM with PCI Firmware r3.3

Kuppuswamy Sathyanarayanan <[email protected]>
PCI/EDR: Align EDR_PORT_DPC_ENABLE_DSM with PCI Firmware r3.3

Johan Hovold <[email protected]>
dt-bindings: spmi: hisilicon,hisi-spmi-controller: fix binding references

Randy Dunlap <[email protected]>
extcon: max8997: select IRQ_DOMAIN instead of depending on it

Ian Rogers <[email protected]>
perf ui browser: Don't save pointer to stack memory

He Zhe <[email protected]>
perf bench internals inject-build-id: Fix trap divide when collecting just one DSO

Christophe JAILLET <[email protected]>
i2c: synquacer: Fix an error handling path in synquacer_i2c_probe()

Sai Pavan Boddu <[email protected]>
i2c: cadence: Avoid fifo clear after start

Huai-Yuan Liu <[email protected]>
ppdev: Add an error check in register_device

Christophe JAILLET <[email protected]>
ppdev: Remove usage of the deprecated ida_simple_xx() API

Dan Carpenter <[email protected]>
stm class: Fix a double free in stm_register_device()

Chris Wulff <[email protected]>
usb: gadget: u_audio: Clear uac pointer when freed.

Chris Wulff <[email protected]>
usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.

Fenghua Yu <[email protected]>
dmaengine: idxd: Avoid unnecessary destruction of file_ida

Dmitry Baryshkov <[email protected]>

    dt-bindings: phy: qcom,usb-snps-femto-v2: use correct fallback for sc8180x

Dmitry Baryshkov <[email protected]>

    dt-bindings: phy: qcom,sc8280xp-qmp-ufs-phy: fix msm899[68] power-domains

Chen Ni <[email protected]>
watchdog: sa1100: Fix PTR_ERR_OR_ZERO() vs NULL check in sa1100dog_probe()

Matti Vaittinen <[email protected]>
watchdog: bd9576: Drop "always-running" property

Duoming Zhou <[email protected]>
watchdog: cpu5wdt.c: Fix use-after-free bug caused by cpu5wdt_trigger

Danila Tikhonov <[email protected]>
pinctrl: qcom: pinctrl-sm7150: Fix sdc1 and ufs special pins regs

Rafał Miłecki <[email protected]>
dt-bindings: pinctrl: mediatek: mt7622: fix array properties

Christoph Hellwig <[email protected]>
xfs: upgrade the extent counters in xfs_reflink_end_cow_extent later

Christoph Hellwig <[email protected]>
xfs: fix log recovery buffer allocation for the legacy h_size fixup

Dave Chinner <[email protected]>
xfs: convert kmem_free() for kvmalloc users to kvfree()

Christophe JAILLET <[email protected]>
VMCI: Fix an error handling path in vmci_guest_probe_device()

Duoming Zhou <[email protected]>
PCI: of_property: Return error for int_map allocation failure

Miklos Szeredi <[email protected]>
ovl: remove upper umask handling from ovl_create_upper()

Uwe Kleine-König <[email protected]>
leds: pwm: Disable PWM when going to suspend

Sean Young <[email protected]>
pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()

Samuel Holland <[email protected]>
riscv: Flush the instruction cache during SMP bringup

Andrew Jones <[email protected]>
RISC-V: Enable cbo.zero in usermode

Zhang Yi <[email protected]>
xfs: match lock mode in xfs_buffered_write_iomap_begin()

Adrian Hunter <[email protected]>
perf intel-pt: Fix unassigned instruction op (discovered by MemorySanitizer)

Ilpo Järvinen <[email protected]>

    PCI: Wait for Link Training==0 before starting Link retrain

Michal Simek <[email protected]>
microblaze: Remove early printk call from cpuinfo-static.c

Michal Simek <[email protected]>
microblaze: Remove gcc flag for non existing early_printk.c file

Darrick J. Wong <[email protected]>
xfs: require XFS_SB_FEAT_INCOMPAT_LOG_XATTRS for attr log intent item recovery

Matthew Wilcox (Oracle) <[email protected]>
udf: Convert udf_expand_file_adinicb() to use a folio

Jan Kara <[email protected]>
udf: Remove GFP_NOFS allocation in udf_expand_file_adinicb()

Marco Pagani <[email protected]>
fpga: region: add owner module and take its refcount

Ye Bin <[email protected]>
vfio/pci: fix potential memory leak in vfio_intx_enable()

Christian Brauner <[email protected]>
i915: make inject_virtual_interrupt() void

Suzuki K Poulose <[email protected]>
coresight: etm4x: Fix access to resource selector registers

Suzuki K Poulose <[email protected]>
coresight: etm4x: Safe access for TRCQCLTR

Suzuki K Poulose <[email protected]>
coresight: etm4x: Do not save/restore Data trace control registers

Suzuki K Poulose <[email protected]>
coresight: etm4x: Do not hardcode IOMEM access for register restore

Nuno Sa <[email protected]>
iio: adc: adi-axi-adc: only error out in major version mismatch

Nuno Sa <[email protected]>
iio: adc: adi-axi-adc: move to backend framework

Nuno Sa <[email protected]>
iio: adc: ad9467: convert to backend framework

Nuno Sa <[email protected]>
iio: add the IIO backend framework

Nuno Sa <[email protected]>
iio: buffer-dmaengine: export buffer alloc and free functions

Nuno Sa <[email protected]>
iio: adc: adi-axi-adc: convert to regmap

Nuno Sa <[email protected]>
iio: adc: ad9467: use chip_info variables instead of array

Nuno Sa <[email protected]>

    iio: adc: ad9467: use spi_get_device_match_data()

Thomas Haemmerle <[email protected]>
iio: pressure: dps310: support negative temperature values

James Clark <[email protected]>
perf test shell arm_coresight: Increase buffer size for Coresight basic tests

Ian Rogers <[email protected]>
perf docs: Document bpf event modifier

Anshuman Khandual <[email protected]>
coresight: etm4x: Fix unbalanced pm_runtime_enable()

Miklos Szeredi <[email protected]>
remove call_{read,write}_iter() functions

Amir Goldstein <[email protected]>
fs: move kiocb_start_write() into vfs_iocb_iter_write()

Amir Goldstein <[email protected]>
splice: remove permission hook from iter_file_splice_write()

Amir Goldstein <[email protected]>
ovl: add helper ovl_file_modified()

Hannah Peuckmann <[email protected]>
riscv: dts: starfive: visionfive 2: Remove non-existing TDM hardware

Jonathan Cameron <[email protected]>
iio: adc: stm32: Fixing err code to not indicate success

Chao Yu <[email protected]>
f2fs: fix to check pinfile flag in f2fs_move_file_range()

Chao Yu <[email protected]>
f2fs: fix to relocate check condition in f2fs_fallocate()

Chao Yu <[email protected]>
f2fs: compress: fix to relocate check condition in f2fs_ioc_{,de}compress_file()

Chao Yu <[email protected]>
f2fs: compress: fix to relocate check condition in f2fs_{release,reserve}_compress_blocks()

Ian Rogers <[email protected]>
perf bench uprobe: Remove lib64 from libc.so.6 binary path

Geert Uytterhoeven <[email protected]>
dt-bindings: PCI: rcar-pci-host: Add missing IOMMU properties

Wolfram Sang <[email protected]>
dt-bindings: PCI: rcar-pci-host: Add optional regulators

Adrian Hunter <[email protected]>
perf record: Fix debug message placement for test consumption

Yang Jihong <[email protected]>
perf record: Move setting tracking events before record__init_thread_masks()

Yang Jihong <[email protected]>
perf evlist: Add evlist__findnew_tracking_event() helper

James Clark <[email protected]>
perf tests: Apply attributes to all events in object code reading test

James Clark <[email protected]>
perf tests: Make "test data symbol" more robust on Neoverse N1

Xianwei Zhao <[email protected]>
arm64: dts: meson: fix S4 power-controller node

Konrad Dybcio <[email protected]>
interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment

Arnd Bergmann <[email protected]>
module: don't ignore sysfs_create_link() failures

Hugo Villeneuve <[email protected]>
serial: sc16is7xx: add proper sched.h include for sched_set_fifo()

Vidya Sagar <[email protected]>
PCI: tegra194: Fix probe path for Endpoint mode

Arnd Bergmann <[email protected]>
greybus: arche-ctrl: move device table to its right location

Andy Shevchenko <[email protected]>
serial: max3100: Fix bitwise types

Andy Shevchenko <[email protected]>
serial: max3100: Update uart_driver_registered on driver removal

Andy Shevchenko <[email protected]>

    serial: max3100: Lock port->lock when calling uart_handle_cts_change()

Namhyung Kim <[email protected]>
perf annotate: Fix annotation_calc_lines() to pass correct address to get_srcline()

Namhyung Kim <[email protected]>
perf annotate: Use global annotation_options

Namhyung Kim <[email protected]>
perf top: Convert to the global annotation_options

Namhyung Kim <[email protected]>
perf report: Convert to the global annotation_options

Namhyung Kim <[email protected]>
perf annotate: Introduce global annotation_options

Namhyung Kim <[email protected]>
perf annotate: Split branch stack cycles information out of 'struct annotation_line'

Ian Rogers <[email protected]>
perf machine thread: Remove exited threads by default

Ian Rogers <[email protected]>
perf record: Lazy load kernel symbols

Arnd Bergmann <[email protected]>
firmware: dmi-id: add a release callback function

Chen Ni <[email protected]>
dmaengine: idma64: Add check for dma_set_max_seg_size

Pierre-Louis Bossart <[email protected]>
soundwire: cadence: fix invalid PDI offset

Thomas Richter <[email protected]>
perf stat: Do not fail on metrics on s390 z/VM systems

Dmitry Baryshkov <[email protected]>
usb: typec: ucsi: simplify partner's PD caps registration

Dmitry Baryshkov <[email protected]>
usb: typec: ucsi: always register a link to USB PD device

Namhyung Kim <[email protected]>
perf annotate: Get rid of duplicate --group option item

Randy Dunlap <[email protected]>
counter: linux/counter.h: fix Excess kernel-doc description warning

Marco Pagani <[email protected]>
fpga: bridge: add owner module and take its refcount

Marco Pagani <[email protected]>
fpga: manager: add owner module and take its refcount

Chao Yu <[email protected]>
f2fs: fix to wait on page writeback in __clone_blkaddrs()

Chao Yu <[email protected]>
f2fs: multidev: fix to recognize valid zero block address

Neil Armstrong <[email protected]>
phy: qcom: qmp-combo: fix duplicate return in qmp_v4_configure_dp_phy

Rui Miguel Silva <[email protected]>
greybus: lights: check return of get_channel_from_mode

Andy Shevchenko <[email protected]>
iio: core: Leave private pointer NULL when no private data supplied

Arnaldo Carvalho de Melo <[email protected]>
perf probe: Add missing libgen.h header needed for using basename()

Ian Rogers <[email protected]>
perf record: Delete session after stopping sideband thread

Jiawen Wu <[email protected]>
net: wangxun: fix to change Rx features

Cheng Yu <[email protected]>
sched/core: Fix incorrect initialization of the 'burst' parameter in cpu_max_write()

Vitalii Bursov <[email protected]>
sched/fair: Allow disabling sched_balance_newidle with sched_relax_domain_level

Eric Dumazet <[email protected]>
af_packet: do not call packet_read_pending() from tpacket_destruct_skb()

Eric Dumazet <[email protected]>
netrom: fix possible dead-lock in nr_rt_ioctl()

Chris Lew <[email protected]>
net: qrtr: ns: Fix module refcnt

Nikolay Aleksandrov <[email protected]>
net: bridge: mst: fix vlan use-after-free

Nikolay Aleksandrov <[email protected]>
selftests: net: bridge: increase IGMP/MLD exclude timeout membership interval

Nikolay Aleksandrov <[email protected]>
net: bridge: xmit: make sure we have at least eth header len bytes

Wang Yao <[email protected]>
modules: Drop the .export_symbol section from the final modules

Beau Belgrave <[email protected]>
tracing/user_events: Fix non-spaced field matching

Beau Belgrave <[email protected]>
tracing/user_events: Prepare find/delete for same name events

Beau Belgrave <[email protected]>
tracing/user_events: Allow events to persist for perfmon_capable users

Zhu Yanjun <[email protected]>
RDMA/cma: Fix kmemleak in rdma_core observed during blktests nvme/rdma use siw

Leon Romanovsky <[email protected]>
RDMA/IPoIB: Fix format truncation compilation errors

Edward Liaw <[email protected]>
selftests/kcmp: remove unused open mode

Chuck Lever <[email protected]>
SUNRPC: Fix gss_free_in_token_pages()

Michal Schmidt <[email protected]>
bnxt_re: avoid shift undefined behavior in bnxt_qplib_alloc_init_hwq

Selvin Xavier <[email protected]>
RDMA/bnxt_re: Adds MSN table capability for Gen P7 adapters

Selvin Xavier <[email protected]>
RDMA/bnxt_re: Update the HW interface definitions

Chandramohan Akula <[email protected]>
RDMA/bnxt_re: Remove roundup_pow_of_two depth for all hardware queue resources

Chandramohan Akula <[email protected]>
RDMA/bnxt_re: Refactor the queue index update

Sergey Shtylyov <[email protected]>
of: module: add buffer overflow check in of_modalias()

Zhang Yi <[email protected]>
ext4: remove the redundant folio_wait_stable()

Dan Carpenter <[email protected]>
ext4: fix potential unnitialized variable

Aleksandr Aprelkov <[email protected]>
sunrpc: removed redundant procp check

David Hildenbrand <[email protected]>
drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map()

Christoph Hellwig <[email protected]>
virt: acrn: stop using follow_pfn

Jan Kara <[email protected]>
ext4: avoid excessive credit estimate in ext4_tmpfile()

Adrian Hunter <[email protected]>
x86/insn: Add VEX versions of VPDPBUSD, VPDPBUSDS, VPDPWSSD and VPDPWSSDS

Adrian Hunter <[email protected]>
x86/insn: Fix PUSH instruction in x86 instruction decoder opcode map

Marc Gonzalez <[email protected]>
clk: qcom: mmcc-msm8998: fix venus clock issue

Dmitry Baryshkov <[email protected]>
clk: qcom: dispcc-sm8550: fix DisplayPort clocks

Dmitry Baryshkov <[email protected]>
clk: qcom: dispcc-sm6350: fix DisplayPort clocks

Dmitry Baryshkov <[email protected]>
clk: qcom: dispcc-sm8450: fix DisplayPort clocks

Duoming Zhou <[email protected]>
lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure

Lad Prabhakar <[email protected]>
clk: renesas: r9a07g043: Add clock and reset entry for PLIC

Geert Uytterhoeven <[email protected]>
clk: renesas: r8a779a0: Fix CANFD parent clock

Jason Gunthorpe <[email protected]>
IB/mlx5: Use __iowrite64_copy() for write combining stores

Bob Pearson <[email protected]>
RDMA/rxe: Fix incorrect rxe_put in error path

Bob Pearson <[email protected]>
RDMA/rxe: Allow good work requests to be executed

Bob Pearson <[email protected]>
RDMA/rxe: Fix seg fault in rxe_comp_queue_pkt

Gabor Juhos <[email protected]>
clk: qcom: clk-alpha-pll: remove invalid Stromer register offset

Catalin Popescu <[email protected]>
clk: rs9: fix wrong default value for clock amplitude

Alexandre Mergnat <[email protected]>
clk: mediatek: mt8365-mm: fix DPI0 parent

Chengchang Tang <[email protected]>
RDMA/hns: Modify the print level of CQE error

Chengchang Tang <[email protected]>
RDMA/hns: Use complete parentheses in macros

Chengchang Tang <[email protected]>
RDMA/hns: Fix GMV table pagesize

Chengchang Tang <[email protected]>
RDMA/hns: Fix UAF for cq async event

Chengchang Tang <[email protected]>
RDMA/hns: Fix deadlock on SRQ async events.

Zhengchao Shao <[email protected]>
RDMA/hns: Fix return value in hns_roce_map_mr_sg

Yi Liu <[email protected]>
iommu: Undo pasid attachment only for the devices that have succeeded

Nícolas F. R. A. Prado <[email protected]>
clk: mediatek: pllfh: Don't log error for missing fhctl node

Or Har-Toov <[email protected]>
RDMA/mlx5: Adding remote atomic access flag to updatable flags

Or Har-Toov <[email protected]>
RDMA/mlx5: Uncacheable mkey has neither rb_key or cache_ent

Jaewon Kim <[email protected]>
clk: samsung: exynosautov9: fix wrong pll clock id value

Pratyush Yadav <[email protected]>
media: cadence: csi2rx: configure DPHY before starting source stream

Ville Syrjälä <[email protected]>
drm/edid: Parse topology block for all DispID structure v1.x

Detlev Casanova <[email protected]>
drm/rockchip: vop2: Do not divide height twice for YUV

Ricardo Ribalda <[email protected]>
media: uvcvideo: Add quirk for Logitech Rally Bar

Dmitry Baryshkov <[email protected]>
drm/mipi-dsi: use correct return type for the DSC functions

Marek Vasut <[email protected]>
drm/panel: simple: Add missing Innolux G121X1-L03 format, flags, connector

Hsin-Te Yuan <[email protected]>
drm/bridge: anx7625: Update audio status while detecting

Nícolas F. R. A. Prado <[email protected]>
drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found

Nícolas F. R. A. Prado <[email protected]>
drm/bridge: dpc3433: Don't log an error when DSI host can't be found

Nícolas F. R. A. Prado <[email protected]>
drm/bridge: tc358775: Don't log an error when DSI host can't be found

Nícolas F. R. A. Prado <[email protected]>
drm/bridge: lt9611uxc: Don't log an error when DSI host can't be found

Nícolas F. R. A. Prado <[email protected]>
drm/bridge: lt9611: Don't log an error when DSI host can't be found

Nícolas F. R. A. Prado <[email protected]>
drm/bridge: lt8912b: Don't log an error when DSI host can't be found

Nícolas F. R. A. Prado <[email protected]>
drm/bridge: icn6211: Don't log an error when DSI host can't be found

Nícolas F. R. A. Prado <[email protected]>
drm/bridge: anx7625: Don't log an error when DSI host can't be found

Steven Rostedt <[email protected]>
ASoC: tracing: Export SND_SOC_DAPM_DIR_OUT to its value

Aleksandr Mishin <[email protected]>
drm: vc4: Fix possible null pointer dereference

Huai-Yuan Liu <[email protected]>
drm/arm/malidp: fix a possible null pointer dereference

Zhipeng Lu <[email protected]>
media: atomisp: ssh_css: Fix a null-pointer dereference in load_video_binaries

Randy Dunlap <[email protected]>
fbdev: sh7760fb: allow modular build

Laurent Pinchart <[email protected]>
media: v4l2-subdev: Fix stream handling for crop API

Uwe Kleine-König <[email protected]>
media: i2c: et8ek8: Don't strip remove function when driver is builtin

Fabio Estevam <[email protected]>
media: dt-bindings: ovti,ov2680: Fix the power supply names

Sakari Ailus <[email protected]>
media: ipu3-cio2: Request IRQ earlier

Douglas Anderson <[email protected]>
drm/msm/dp: Avoid a long timeout for AUX transfer if nothing connected

Dmitry Baryshkov <[email protected]>
drm/msm/dp: allow voltage swing / pre emphasis of 3

Armin Wolf <[email protected]>
platform/x86: xiaomi-wmi: Fix race condition when reporting key events

Aleksandr Mishin <[email protected]>
drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference

Ricardo Ribalda <[email protected]>
media: radio-shark2: Avoid led_names truncations

Arnd Bergmann <[email protected]>
media: rcar-vin: work around -Wenum-compare-conditional warning

Aleksandr Burakov <[email protected]>
media: ngene: Add dvb_ca_en50221_init return value check

Cezary Rojewski <[email protected]>
ASoC: Intel: avs: Test result of avs_get_module_entry()

Cezary Rojewski <[email protected]>
ASoC: Intel: avs: Fix potential integer overflow

Cezary Rojewski <[email protected]>
ASoC: Intel: avs: Fix ASRC module initialization

Tianchen Ding <[email protected]>
selftests: cgroup: skip test_cgcore_lesser_ns_open when cgroup2 mounted without nsdelegate

Arnd Bergmann <[email protected]>
fbdev: sisfb: hide unused variables

Peter Ujfalusi <[email protected]>
ASoC: SOF: Intel: mtl: Implement firmware boot state check

Peter Ujfalusi <[email protected]>
ASoC: SOF: Intel: mtl: Disable interrupts when firmware boot failed

Yong Zhi <[email protected]>
ASoC: SOF: Intel: mtl: call dsp dump when boot retry fails

Peter Ujfalusi <[email protected]>
ASoC: SOF: Intel: lnl: Correct rom_status_reg

Peter Ujfalusi <[email protected]>
ASoC: SOF: Intel: mtl: Correct rom_status_reg

Pierre-Louis Bossart <[email protected]>
ASoC: SOF: Intel: pci-mtl: fix ARL-S definitions

Arun T <[email protected]>
ASoC: SOF: Intel: pci-mtl: use ARL specific firmware definitions

Arun T <[email protected]>
ASoC: Intel: common: add ACPI matching tables for Arrow Lake

Arnd Bergmann <[email protected]>
powerpc/fsl-soc: hide unused const variable

Justin Green <[email protected]>
drm/mediatek: Add 0 size check to mtk_drm_gem_obj

Christian Hewitt <[email protected]>
drm/meson: vclk: fix calculation of 59.94 fractional rates

Aleksandr Mishin <[email protected]>
ASoC: kirkwood: Fix potential NULL dereference

Arnd Bergmann <[email protected]>
fbdev: shmobile: fix snprintf truncation

AngeloGioacchino Del Regno <[email protected]>
ASoC: mediatek: Assign dummy when codec not specified for a DAI link

Maxim Korotkov <[email protected]>
mtd: rawnand: hynix: fixed typo

Aapo Vienamo <[email protected]>
mtd: core: Report error if first mtd_otp_size() call fails in mtd_otp_nvmem_add()

Cezary Rojewski <[email protected]>
ASoC: Intel: avs: ssm4567: Do not ignore route checks

Cezary Rojewski <[email protected]>
ASoC: Intel: Disable route checks for Skylake boards

Srinivasan Shanmugam <[email protected]>
drm/amd/display: Fix potential index out of bounds in color transformation function

Douglas Anderson <[email protected]>
drm/panel: atna33xc20: Fix unbalanced regulator in the case HPD doesn't assert

Douglas Anderson <[email protected]>
drm/dp: Don't attempt AUX transfers when eDP panels are not powered

Marek Vasut <[email protected]>
drm/lcdif: Do not disable clocks on already suspended hardware

Geert Uytterhoeven <[email protected]>
dev_printk: Add and use dev_no_printk()

Geert Uytterhoeven <[email protected]>
printk: Let no_printk() use _printk()

Tony Lindgren <[email protected]>
drm/omapdrm: Fix console with deferred ops

Thomas Zimmermann <[email protected]>
fbdev: Provide I/O-memory helpers as module

Tony Lindgren <[email protected]>
drm/omapdrm: Fix console by implementing fb_dirty

Vignesh Raman <[email protected]>
drm/ci: update device type for volteer devices

Helen Koike <[email protected]>
drm/ci: add subset-1-gfx to LAVA_TAGS and adjust shards

Helen Koike <[email protected]>
drm/ci: uprev mesa version: fix container build & crosvm

Jagan Teki <[email protected]>
drm/bridge: Fix improper bridge init order with pre_enable_prev_first

Luiz Augusto von Dentz <[email protected]>
Bluetooth: HCI: Remove HCI_AMP support

Lukas Bulwahn <[email protected]>
Bluetooth: hci_event: Remove code to removed CONFIG_BT_HS

Christophe JAILLET <[email protected]>
Bluetooth: Remove usage of the deprecated ida_simple_xx() API

Iulia Tanasescu <[email protected]>
Bluetooth: ISO: Fix BIS cleanup

Dan Carpenter <[email protected]>
Bluetooth: qca: Fix error code in qca_read_fw_build_info()

Sebastian Urban <[email protected]>
Bluetooth: compute LE flow credits based on recvbuf space

Horatiu Vultur <[email protected]>
net: micrel: Fix receiving the timestamp in the frame for lan8841

Matthieu Baerts (NGI0) <[email protected]>
mptcp: SO_KEEPALIVE: fix getsockopt support

Wei Fang <[email protected]>
net: fec: remove .ndo_poll_controller to avoid deadlocks

Duoming Zhou <[email protected]>
ax25: Fix reference count leak issue of net_device

Duoming Zhou <[email protected]>
ax25: Fix reference count leak issues of ax25_dev

Duoming Zhou <[email protected]>
ax25: Use kernel universal linked list to implement ax25_dev_list

Puranjay Mohan <[email protected]>
riscv, bpf: make some atomic operations fully ordered

Ilya Leoshkevich <[email protected]>
s390/bpf: Emit a barrier for BPF_FETCH instructions

Akiva Goldberger <[email protected]>
net/mlx5: Discard command completions in internal error

Akiva Goldberger <[email protected]>
net/mlx5: Add a timeout to acquire the command queue semaphore

Maher Sanalla <[email protected]>
net/mlx5: Reload only IB representors upon lag disable/enable

Shay Drory <[email protected]>
net/mlx5: Enable 4 ports multiport E-switch

Hangbin Liu <[email protected]>
ipv6: sr: fix invalid unregister error path

Hangbin Liu <[email protected]>
ipv6: sr: fix incorrect unregister order

Hangbin Liu <[email protected]>
ipv6: sr: add missing seg6_local_exit

Ilya Maximets <[email protected]>
net: openvswitch: fix overwriting ct original tuple for ICMPv6

Eric Dumazet <[email protected]>

    net: usb: smsc95xx: stop lying about skb->truesize

Breno Leitao <[email protected]>
af_unix: Fix data races in unix_release_sock/unix_stream_sendmsg

Linus Walleij <[email protected]>
net: ethernet: cortina: Locking fixes

Jakub Kicinski <[email protected]>
selftests: net: move amt to socat for better compatibility

Jakub Kicinski <[email protected]>
selftests: net: add missing config for amt.sh

Paolo Abeni <[email protected]>
selftests: net: add more missing kernel config

Jakub Kicinski <[email protected]>
eth: sungem: remove .ndo_poll_controller to avoid deadlocks

gaoxingwang <[email protected]>
net: ipv6: fix wrong start position when receive hop-by-hop fragment

Finn Thain <[email protected]>
m68k: mac: Fix reboot hang on Mac IIci

Michael Schmitz <[email protected]>
m68k: Fix spinlock race in kernel thread creation

Eric Dumazet <[email protected]>

    net: usb: sr9700: stop lying about skb->truesize

Eric Dumazet <[email protected]>

    usb: aqc111: stop lying about skb->truesize

Basavaraj Natikar <[email protected]>
HID: amd_sfh: Handle "no sensors" in PM operations

Dan Carpenter <[email protected]>

    wifi: mwl8k: initialize cmd->addr[] properly

Robert Richter <[email protected]>
x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks()

Kent Overstreet <[email protected]>
kernel/numa.c: Move logging out of numa.h

Himanshu Madhani <[email protected]>
scsi: qla2xxx: Fix debugfs output for fw_resource_count

Bui Quang Minh <[email protected]>
scsi: qedf: Ensure the copied buf is NUL terminated

Bui Quang Minh <[email protected]>
scsi: bfa: Ensure the copied buf is NUL terminated

Chen Ni <[email protected]>
HID: intel-ish-hid: ipc: Add check for pci_alloc_irq_vectors

Michal Schmidt <[email protected]>
selftests/bpf: Fix pointer arithmetic in test_xdp_do_redirect

Mickaël Salaün <[email protected]>
kunit: Fix kthread reference

Valentin Obst <[email protected]>
selftests: default to host arch for LLVM builds

John Hubbard <[email protected]>
selftests/resctrl: fix clang build failure: use LOCAL_HDRS

John Hubbard <[email protected]>
selftests/binderfs: use the Makefile's rules, not Make's implicit rules

Kees Cook <[email protected]>
wifi: nl80211: Avoid address calculations via out of bounds array indexing

Jiri Olsa <[email protected]>
libbpf: Fix error message in attach_kprobe_multi

Felix Fietkau <[email protected]>
wifi: mt76: mt7603: add wpdma tx eof flag for PSE client reset

Felix Fietkau <[email protected]>
wifi: mt76: mt7603: fix tx queue of loopback packets

Guenter Roeck <[email protected]>
Revert "sh: Handle calling csum_partial with misaligned data"

Geert Uytterhoeven <[email protected]>
sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe()

Stanislav Fomichev <[email protected]>
bpf: Add BPF_PROG_TYPE_CGROUP_SKB attach type enforcement in BPF_LINK_CREATE

Nikita Zhandarovich <[email protected]>
wifi: ar5523: enable proper endpoint verification

Alexei Starovoitov <[email protected]>

    bpf: Fix verifier assumptions about socket->sk

Nikita Zhandarovich <[email protected]>
wifi: carl9170: add a proper sanity check for endpoints

Finn Thain <[email protected]>
macintosh/via-macii: Fix "BUG: sleeping function called from invalid context"

Eric Dumazet <[email protected]>
net: give more chances to rcu in netdev_wait_allrefs_any()

Hao Chen <[email protected]>
drivers/perf: hisi: hns3: Actually use devm_add_action_or_reset()

Junhao He <[email protected]>
drivers/perf: hisi: hns3: Fix out-of-bound access when valid event group

Junhao He <[email protected]>
drivers/perf: hisi_pcie: Fix out-of-bound access when valid event group

Uwe Kleine-König <[email protected]>
pwm: sti: Simplify probe function using devm functions

Uwe Kleine-König <[email protected]>
pwm: sti: Prepare removing pwm_chip from driver data

Eric Dumazet <[email protected]>
tcp: avoid premature drops in tcp_add_backlog()

Matthias Schiffer <[email protected]>
net: dsa: mv88e6xxx: Avoid EEPROM timeout without EEPROM on 88E6250-family switches

Matthias Schiffer <[email protected]>
net: dsa: mv88e6xxx: Add support for model-specific pre- and post-reset handlers

Dmitry Baryshkov <[email protected]>
wifi: ath10k: populate board data for WCN3990

Portia Stephens <[email protected]>
cpufreq: brcmstb-avs-cpufreq: ISO C90 forbids mixed declarations

Bart Van Assche <[email protected]>
scsi: ufs: core: mcq: Fix ufshcd_mcq_sqe_search()

Geliang Tang <[email protected]>
selftests/bpf: Fix a fd leak in error paths in open_netns

Andreas Gruenbacher <[email protected]>
gfs2: do_xmote fixes

Andreas Gruenbacher <[email protected]>
gfs2: finish_xmote cleanup

Andreas Gruenbacher <[email protected]>
gfs2: Rename gfs2_withdrawn to gfs2_withdrawing_or_withdrawn

Andreas Gruenbacher <[email protected]>
gfs2: Mark withdraws as unlikely

Andreas Gruenbacher <[email protected]>
gfs2: Fix potential glock use-after-free on unmount

Andreas Gruenbacher <[email protected]>
gfs2: Remove ill-placed consistency check

Andreas Gruenbacher <[email protected]>
gfs2: No longer use 'extern' in function declarations

Andreas Gruenbacher <[email protected]>

    gfs2: Rename gfs2_lookup_{ simple => meta }

Andreas Gruenbacher <[email protected]>
gfs2: Convert gfs2_internal_read to folios

Andreas Gruenbacher <[email protected]>
gfs2: Get rid of gfs2_alloc_blocks generation parameter

Su Hui <[email protected]>
wifi: ath10k: Fix an error code problem in ath10k_dbg_sta_write_peer_debug_trigger()

Binbin Zhou <[email protected]>
dt-bindings: thermal: loongson,ls2k-thermal: Fix incorrect compatible definition

Binbin Zhou <[email protected]>
dt-bindings: thermal: loongson,ls2k-thermal: Add Loongson-2K0500 compatible

Binbin Zhou <[email protected]>
dt-bindings: thermal: loongson,ls2k-thermal: Fix binding check issues

Aleksandr Mishin <[email protected]>
thermal/drivers/tsens: Fix null pointer dereference

Karthikeyan Kathirvel <[email protected]>
wifi: ath12k: fix out-of-bound access of qmi_invoke_handler()

Ard Biesheuvel <[email protected]>
x86/purgatory: Switch to the position-independent small code model

Yuri Karpov <[email protected]>
scsi: hpsa: Fix allocation size for Scsi_Host private data

Xingui Yang <[email protected]>
scsi: libsas: Fix the failure of adding phy with zero-address to port

Johannes Berg <[email protected]>
wifi: iwlwifi: mvm: init vif works only once

Aleksandr Mishin <[email protected]>
cppc_cpufreq: Fix possible null pointer dereference

Stafford Horne <[email protected]>
openrisc: traps: Don't send signals to kernel mode threads

Gabriel Krisman Bertazi <[email protected]>
udp: Avoid call to compute_score on multiple sites

Juergen Gross <[email protected]>
x86/pat: Fix W^X violation false-positives when running as Xen PV guest

Juergen Gross <[email protected]>
x86/pat: Restructure _lookup_address_cpa()

Juergen Gross <[email protected]>
x86/pat: Introduce lookup_address_in_pgd_attr()

Viresh Kumar <[email protected]>
cpufreq: exit() callback is optional

Hechao Li <[email protected]>
tcp: increase the default TCP scaling ratio

Paolo Abeni <[email protected]>
tcp: define initial scaling factor value as a macro

Geliang Tang <[email protected]>
selftests/bpf: Fix umount cgroup2 error in test_sockmap

Ard Biesheuvel <[email protected]>
x86/boot/64: Clear most of CR4 in startup_64(), except PAE, MCE and LA57

Andreas Gruenbacher <[email protected]>
gfs2: Fix "ignore unlock failures after withdraw"

Andreas Gruenbacher <[email protected]>
gfs2: Don't forget to complete delayed withdraw

Arnd Bergmann <[email protected]>
ACPI: disable -Wstringop-truncation

Zenghui Yu <[email protected]>
irqchip/loongson-pch-msi: Fix off-by-one on allocation error path

Zenghui Yu <[email protected]>
irqchip/alpine-msi: Fix off-by-one in allocation error path

Uros Bizjak <[email protected]>
locking/atomic/x86: Correct the definition of __arch_try_cmpxchg128()

Andy Shevchenko <[email protected]>
ACPI: LPSS: Advertise number of chip selects via property

Andrew Halaney <[email protected]>
scsi: ufs: core: Perform read back after disabling UIC_COMMAND_COMPL

Andrew Halaney <[email protected]>
scsi: ufs: core: Perform read back after disabling interrupts

Andrew Halaney <[email protected]>
scsi: ufs: core: Perform read back after writing UTP_TASK_REQ_LIST_BASE_H

Andrew Halaney <[email protected]>
scsi: ufs: cdns-pltfrm: Perform read back after writing HCLKDIV

Andrew Halaney <[email protected]>
scsi: ufs: qcom: Perform read back after writing CGC enable

Andrew Halaney <[email protected]>
scsi: ufs: qcom: Perform read back after writing unipro mode

Andrew Halaney <[email protected]>
scsi: ufs: qcom: Perform read back after writing REG_UFS_SYS1CLK_1US

Andrew Halaney <[email protected]>
scsi: ufs: qcom: Perform read back after writing reset bit

Andrii Nakryiko <[email protected]>
bpf: prevent r10 register from being marked as precise

Anton Protopopov <[email protected]>
bpf: Pack struct bpf_fib_lookup

Sahil Siddiq <[email protected]>
bpftool: Mount bpffs on provided dir instead of parent dir

Arnd Bergmann <[email protected]>
wifi: carl9170: re-fix fortified-memset warning

Alexander Aring <[email protected]>
dlm: fix user space lock decision to copy lvb

Alexander Lobakin <[email protected]>
bitops: add missing prototype check

Arnd Bergmann <[email protected]>
mlx5: stop warning for 64KB pages

Arnd Bergmann <[email protected]>
mlx5: avoid truncating error message

Arnd Bergmann <[email protected]>
qed: avoid truncating work queue length

Arnd Bergmann <[email protected]>
enetc: avoid truncating error message

Armin Wolf <[email protected]>
ACPI: Fix Generic Initiator Affinity _OSC bit

Shrikanth Hegde <[email protected]>
sched/fair: Add EAS checks before updating root_domain::overutilized

Johannes Berg <[email protected]>
wifi: iwlwifi: mvm: fix check in iwl_mvm_sta_fw_id_mask

Johannes Berg <[email protected]>
wifi: iwlwifi: reconfigure TLC during HW restart

Johannes Berg <[email protected]>
wifi: iwlwifi: mvm: select STA mask only for active links

Johannes Berg <[email protected]>
wifi: iwlwifi: mvm: allocate STA links only for active links

Johannes Berg <[email protected]>

    wifi: ieee80211: fix ieee80211_mle_basic_sta_prof_size_ok()

Guixiong Wei <[email protected]>
x86/boot: Ignore relocations in .notes sections in walk_relocs() too

Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7915: workaround too long expansion sparse warnings

Aloka Dixit <[email protected]>
wifi: ath12k: use correct flag field for 320 MHz channels

Yonghong Song <[email protected]>
bpftool: Fix missing pids during link show

Baochen Qiang <[email protected]>
wifi: ath11k: don't force enable power save on non-running vdevs

Duoming Zhou <[email protected]>
wifi: brcmfmac: pcie: handle randbuf allocation failure

Baochen Qiang <[email protected]>
wifi: ath10k: poll service ready message before failing

Yu Kuai <[email protected]>
block: support to account io_ticks precisely

INAGAKI Hiroshi <[email protected]>
block: fix and simplify blkdevparts= cmdline parsing

Christoph Hellwig <[email protected]>
block: refine the EOF check in blkdev_iomap_begin

Giovanni Cabiddu <[email protected]>
crypto: qat - specify firmware files for 402xx

Yu Kuai <[email protected]>
md: fix resync softlockup when bitmap size is less than array size

Kees Cook <[email protected]>
lkdtm: Disable CFI checking for perms functions

Bjorn Andersson <[email protected]>
soc: qcom: pmic_glink: Make client-lock non-sleeping

Kees Cook <[email protected]>
kunit/fortify: Fix mismatched kvalloc()/vfree() usage

Zhu Yanjun <[email protected]>
null_blk: Fix missing mutex_destroy() at module removal

Chun-Kuang Hu <[email protected]>
soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE

Mukesh Ojha <[email protected]>
firmware: qcom: scm: Fix __scm and waitq completion variable initialization

Dmitry Baryshkov <[email protected]>
soc: qcom: pmic_glink: notify clients about the current state

Dmitry Baryshkov <[email protected]>
soc: qcom: pmic_glink: don't traverse clients list without a lock

David Hildenbrand <[email protected]>
s390/mm: Re-enable the shared zeropage for !PV and !skeys KVM guests

David Hildenbrand <[email protected]>
mm/userfaultfd: Do not place zeropages when zeropages are disallowed

Gabriel Krisman Bertazi <[email protected]>
io-wq: write next_work before dropping acct_lock

Ilya Denisyev <[email protected]>
jffs2: prevent xattr node from overflowing the eraseblock

Maxime Ripard <[email protected]>
ARM: configs: sunxi: Enable DRM_DW_HDMI

Nikita Kiryushin <[email protected]>
rcu: Fix buffer overflow in print_cpu_stall_info()

Nikita Kiryushin <[email protected]>
rcu-tasks: Fix show_rcu_tasks_trace_gp_kthread buffer overflow

Jens Axboe <[email protected]>
io_uring: use the right type for work_llist empty check

Peter Oberparleiter <[email protected]>
s390/cio: fix tracepoint subchannel type field

Eric Biggers <[email protected]>
crypto: x86/sha512-avx2 - add missing vzeroupper

Eric Biggers <[email protected]>
crypto: x86/sha256-avx2 - add missing vzeroupper

Eric Biggers <[email protected]>
crypto: x86/nh-avx2 - add missing vzeroupper

Arnd Bergmann <[email protected]>
crypto: ccp - drop platform ifdef checks

Al Viro <[email protected]>
parisc: add missing export of __cmpxchg_u8()

Arnd Bergmann <[email protected]>
nilfs2: fix out-of-range warning

Brian Kubisiak <[email protected]>
ecryptfs: Fix buffer size for tag 66 packet

Laurent Pinchart <[email protected]>
firmware: raspberrypi: Use correct device for DMA mappings

Guenter Roeck <[email protected]>
mm/slub, kunit: Use inverted data to corrupt kmem cache

Aleksandr Mishin <[email protected]>
crypto: bcm - Fix pointer arithmetic

Eric Sandeen <[email protected]>
openpromfs: finish conversion to the new mount API

Dan Carpenter <[email protected]>
nvmet: prevent sprintf() overflow in nvmet_subsys_nsid_exists()

Namjae Jeon <[email protected]>
ksmbd: fix uninitialized symbol 'share' in smb2_tree_connect()

Linus Torvalds <[email protected]>
epoll: be better about file lifetimes

Sagi Grimberg <[email protected]>
nvmet: fix nvme status code when namespace is disabled

Sagi Grimberg <[email protected]>
nvmet-tcp: fix possible memory leak when tearing down a controller

Nilay Shroff <[email protected]>
nvme: cancel pending I/O if nvme controller is in terminal state

Maurizio Lombardi <[email protected]>
nvmet-auth: replace pr_debug() with pr_err() to report an error.

Maurizio Lombardi <[email protected]>
nvmet-auth: return the error code to the nvmet_auth_host_hash() callers

Nilay Shroff <[email protected]>
nvme: find numa distance only if controller has valid numa id

Linus Torvalds <[email protected]>
x86/mm: Remove broken vsyscall emulation code from the page fault code

Lancelot SIX <[email protected]>
drm/amdkfd: Flush the process wq before creating a kfd_process

Sung Joon Kim <[email protected]>
drm/amd/display: Disable seamless boot on 128b/132b encoding

Leo Ma <[email protected]>
drm/amd/display: Fix DC mode screen flickering on DCN321

Rodrigo Siqueira <[email protected]>
drm/amd/display: Add VCO speed parameter for DCN31 FPU

Meenakshikumar Somasundaram <[email protected]>
drm/amd/display: Allocate zero bw after bw alloc enable

Swapnil Patel <[email protected]>
drm/amd/display: Add dtbclk access to dcn315

Mukul Joshi <[email protected]>
drm/amdgpu: Fix VRAM memory accounting

Pierre-Louis Bossart <[email protected]>
ALSA: hda: intel-dsp-config: harden I2C/I2S codec detection

Pierre-Louis Bossart <[email protected]>
ASoC: da7219-aad: fix usage of device_get_named_child_node()

Srinivas Pandruvada <[email protected]>
platform/x86: ISST: Add Grand Ridge to HPM CPU list

Zqiang <[email protected]>
softirq: Fix suspicious RCU usage in __do_softirq()

Oswald Buddenhagen <[email protected]>
ALSA: emu10k1: make E-MU FPGA writes potentially more reliable

Puranjay Mohan <[email protected]>
bpf, x86: Fix PROBE_MEM runtime load check

Peter Colberg <[email protected]>
fpga: dfl-pci: add PCI subdevice ID for Intel D5005 card

Vicki Pfau <[email protected]>
Input: xpad - add support for ASUS ROG RAIKIRI

Oliver Upton <[email protected]>
KVM: selftests: Add test for uaccesses to non-existent vgic-v2 CPUIF

Jack Yu <[email protected]>
ASoC: rt715-sdca: volume step modification

Jack Yu <[email protected]>
ASoC: rt715: add vendor clear control register

Stefan Binding <[email protected]>
ASoC: cs35l41: Update DSP1RX5/6 Sources for DSP config

Krzysztof Kozlowski <[email protected]>
regulator: vqmmc-ipq4019: fix module autoloading

Krzysztof Kozlowski <[email protected]>
regulator: qcom-refgen: fix module autoloading

Jack Yu <[email protected]>
ASoC: rt722-sdca: add headset microphone vrefo setting

Jack Yu <[email protected]>
ASoC: rt722-sdca: modify channel number to support 4 channels

Derek Fang <[email protected]>
ASoC: dt-bindings: rt5645: add cbj sleeve gpio property

Derek Fang <[email protected]>
ASoC: rt5645: Fix the electric noise due to the CBJ contacts floating

end.to.start <[email protected]>
ASoC: acp: Support microphone from device Acer 315-24p

Ranjani Sridharan <[email protected]>
ASoC: SOF: pcm: Restrict DSP D0i3 during S0ix to IPC3

Richard Fitzgerald <[email protected]>
ALSA: hda: cs35l56: Exit cache-only after cs35l56_wait_for_firmware_boot()

Matti Vaittinen <[email protected]>
regulator: irq_helpers: duplicate IRQ name

Hans de Goede <[email protected]>
ASoC: Intel: bytcr_rt5640: Apply Asus T100TA quirk to Asus T100TAM too

Oleg Nesterov <[email protected]>
sched/isolation: Fix boot crash when maxcpus < first housekeeping CPU

Clément Léger <[email protected]>
selftests: sud_test: return correct emulated syscall value on RISC-V

Derek Foreman <[email protected]>
drm/etnaviv: fix tx clock gating on some GC7000 variants

Bibo Mao <[email protected]>
LoongArch: Lately init pmu after smp is online

Sean Christopherson <[email protected]>
cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n

Duanqiang Wen <[email protected]>
Revert "net: txgbe: fix clk_name exceed MAX_DEV_ID limits"

Duanqiang Wen <[email protected]>
Revert "net: txgbe: fix i2c dev name cannot match clkdev"

Jack Xiao <[email protected]>
drm/amdgpu/mes: fix use-after-free issue

Prike Liang <[email protected]>
drm/amdgpu: Fix the ring buffer size for queue VM flush

Mukul Joshi <[email protected]>
drm/amdkfd: Add VRAM accounting for SVM migration

Lijo Lazar <[email protected]>
drm/amd/pm: Restore config space after reset

Felix Kuehling <[email protected]>
drm/amdgpu: Update BO eviction priorities

Joshua Ashton <[email protected]>
drm/amd/display: Set color_mgmt_changed to true on unsuspend

Daniele Palmas <[email protected]>
net: usb: qmi_wwan: add Telit FN920C04 compositions

Abdelrahman Morsy <[email protected]>
HID: mcp-2221: cancel delayed_work only when CONFIG_IIO is enabled

Rob Herring <[email protected]>
dt-bindings: rockchip: grf: Add missing type to 'pcie-phy' node

Igor Artemiev <[email protected]>
wifi: cfg80211: fix the order of arguments for trace events of the tx_rx_evt class

Richard Kinder <[email protected]>
wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field

Johannes Berg <[email protected]>
wifi: mac80211: don't use rate mask for scanning

Eric Biggers <[email protected]>
KEYS: asymmetric: Add missing dependencies of FIPS_SIGNATURE_SELFTEST

Eric Biggers <[email protected]>
KEYS: asymmetric: Add missing dependency on CRYPTO_SIG

Takashi Iwai <[email protected]>
ALSA: Fix deadlocks with kctl removals at disconnection

Takashi Iwai <[email protected]>
ALSA: core: Fix NULL module pointer assignment at card init

Andy Chi <[email protected]>
ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 440/460 G11.

Nandor Kracser <[email protected]>
ksmbd: ignore trailing slashes in share paths

Namjae Jeon <[email protected]>
ksmbd: avoid to send duplicate oplock break notifications

Konstantin Komarov <[email protected]>
fs/ntfs3: Break dir enumeration if directory contents error

Konstantin Komarov <[email protected]>
fs/ntfs3: Fix case when index is reused during tree transformation

Konstantin Komarov <[email protected]>
fs/ntfs3: Taking DOS names into account during link counting

Konstantin Komarov <[email protected]>
fs/ntfs3: Remove max link count info display during driver init

Ryusuke Konishi <[email protected]>
nilfs2: fix potential hang in nilfs_detach_log_writer()

Ryusuke Konishi <[email protected]>
nilfs2: fix unexpected freezing of nilfs_segctor_sync()

Ryusuke Konishi <[email protected]>
nilfs2: fix use-after-free of timer for log writer thread

Thorsten Blum <[email protected]>
net: smc91x: Fix m68k kernel compilation for ColdFire CPU

Herve Codina <[email protected]>
net: lan966x: remove debugfs directory in probe() error path

Romain Gantois <[email protected]>
net: ti: icssg_prueth: Fix NULL pointer dereference in prueth_probe()

Brennan Xavier McManus <[email protected]>
tools/nolibc/stdlib: fix memory error in realloc()

Shuah Khan <[email protected]>
tools/latency-collector: Fix -Wformat-security compile warns

Souradeep Chakrabarti <[email protected]>
net: mana: Fix the extra HZ in mana_hwc_send_request

Petr Pavlu <[email protected]>
ring-buffer: Fix a race between readers and resize checks

Ken Milmore <[email protected]>
r8169: Fix possible ring buffer corruption on fragmented Tx packets.

Heiner Kallweit <[email protected]>
Revert "r8169: don't try to disable interrupts if NAPI is, scheduled already"

Ming Lei <[email protected]>
io_uring: fail NOP if non-zero op flags is passed in

Dmitry Torokhov <[email protected]>
Input: try trimming too long modalias strings

Pin-yen Lin <[email protected]>
serial: 8520_mtk: Set RTS on shutdown for Rx in-band wakeup

Doug Berger <[email protected]>
serial: 8250_bcm7271: use default_mux_rate if possible

Dan Carpenter <[email protected]>
speakup: Fix sizeof() vs ARRAY_SIZE() bug

Daniel Starke <[email protected]>
tty: n_gsm: fix missing receive state reset after mode switch

Daniel Starke <[email protected]>
tty: n_gsm: fix possible out-of-bounds in gsm0_receive()

Zheng Yejian <[email protected]>
ftrace: Fix possible use-after-free issue in ftrace_location()

Masami Hiramatsu (Google) <[email protected]>
selftests/ftrace: Fix BTFARG testcase to check fprobe is enabled correctly

Daniel J Blueman <[email protected]>
x86/tsc: Trust initial offset in architectural TSC-adjust MSRs

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

Diffstat:

 Documentation/admin-guide/kernel-parameters.txt    |   3 +
 .../devicetree/bindings/iio/adc/adi,axi-adc.yaml   |  13 +-
 .../devicetree/bindings/media/i2c/ovti,ov2680.yaml |  18 +-
 .../devicetree/bindings/pci/rcar-pci-host.yaml     |  14 +
 .../bindings/pci/rockchip,rk3399-pcie.yaml         |   1 +
 .../bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml    |  16 +-
 .../bindings/phy/qcom,usb-snps-femto-v2.yaml       |   4 +-
 .../bindings/pinctrl/mediatek,mt7622-pinctrl.yaml  |  92 ++--
 .../devicetree/bindings/soc/rockchip/grf.yaml      |   1 +
 Documentation/devicetree/bindings/sound/rt5645.txt |   6 +
 .../spmi/hisilicon,hisi-spmi-controller.yaml       |   4 +-
 .../bindings/thermal/loongson,ls2k-thermal.yaml    |  34 +-
 Documentation/driver-api/fpga/fpga-bridge.rst      |   7 +-
 Documentation/driver-api/fpga/fpga-mgr.rst         |  34 +-
 Documentation/driver-api/fpga/fpga-region.rst      |  13 +-
 Documentation/driver-api/pwm.rst                   |   8 +-
 Documentation/filesystems/f2fs.rst                 |   6 +-
 MAINTAINERS                                        |  10 +-
 Makefile                                           |  13 +-
 arch/arm/Makefile                                  |   7 +-
 arch/arm/configs/sunxi_defconfig                   |   1 +
 arch/arm/vdso/Makefile                             |  25 --
 arch/arm64/Makefile                                |   9 +-
 arch/arm64/boot/dts/amlogic/meson-s4.dtsi          |  13 +-
 arch/arm64/include/asm/asm-bug.h                   |   1 +
 arch/arm64/kernel/vdso/Makefile                    |  10 -
 arch/arm64/kernel/vdso32/Makefile                  |  10 -
 arch/loongarch/Makefile                            |   4 +-
 arch/loongarch/include/asm/perf_event.h            |   3 +-
 arch/loongarch/kernel/perf_event.c                 |   2 +-
 arch/loongarch/vdso/Makefile                       |  10 -
 arch/m68k/kernel/entry.S                           |   4 +-
 arch/m68k/mac/misc.c                               |  36 +-
 arch/microblaze/kernel/Makefile                    |   1 -
 arch/microblaze/kernel/cpu/cpuinfo-static.c        |   2 +-
 arch/openrisc/kernel/traps.c                       |  42 +-
 arch/parisc/Makefile                               |   8 +-
 arch/parisc/kernel/parisc_ksyms.c                  |   1 +
 arch/powerpc/include/asm/hvcall.h                  |   2 +-
 arch/powerpc/include/asm/uaccess.h                 |  11 +
 arch/powerpc/platforms/pseries/lpar.c              |   6 +-
 arch/powerpc/platforms/pseries/lparcfg.c           |  10 +-
 arch/powerpc/sysdev/fsl_msi.c                      |   2 +
 arch/riscv/Makefile                                |   9 +-
 .../dts/starfive/jh7110-starfive-visionfive-2.dtsi |  40 --
 arch/riscv/include/asm/cpufeature.h                |   1 +
 arch/riscv/include/asm/csr.h                       |   1 +
 arch/riscv/include/asm/hwcap.h                     |  16 +
 arch/riscv/include/asm/sbi.h                       |   2 +
 arch/riscv/kernel/compat_vdso/Makefile             |  10 -
 arch/riscv/kernel/cpu.c                            |  40 +-
 arch/riscv/kernel/cpu_ops_sbi.c                    |   2 +-
 arch/riscv/kernel/cpu_ops_spinwait.c               |   3 +-
 arch/riscv/kernel/cpufeature.c                     |  14 +-
 arch/riscv/kernel/setup.c                          |   4 +
 arch/riscv/kernel/smpboot.c                        |   9 +-
 arch/riscv/kernel/stacktrace.c                     |  20 +-
 arch/riscv/kernel/vdso/Makefile                    |  10 -
 arch/riscv/net/bpf_jit_comp64.c                    |  20 +-
 arch/s390/Makefile                                 |   6 +-
 arch/s390/boot/startup.c                           |   1 -
 arch/s390/include/asm/gmap.h                       |   2 +-
 arch/s390/include/asm/mmu.h                        |   5 +
 arch/s390/include/asm/mmu_context.h                |   1 +
 arch/s390/include/asm/pgtable.h                    |  16 +-
 arch/s390/kernel/ipl.c                             |  10 +-
 arch/s390/kernel/setup.c                           |   2 +-
 arch/s390/kernel/vdso32/Makefile                   |  14 +-
 arch/s390/kernel/vdso64/Makefile                   |  15 +-
 arch/s390/kvm/kvm-s390.c                           |   4 +-
 arch/s390/mm/gmap.c                                | 165 +++++--
 arch/s390/net/bpf_jit_comp.c                       |   8 +-
 arch/sh/kernel/kprobes.c                           |   7 +-
 arch/sh/lib/checksum.S                             |  67 +--
 arch/sparc/Makefile                                |   5 +-
 arch/sparc/vdso/Makefile                           |  27 --
 arch/um/drivers/line.c                             |  14 +-
 arch/um/drivers/ubd_kern.c                         |   4 +-
 arch/um/drivers/vector_kern.c                      |   2 +-
 arch/um/include/asm/kasan.h                        |   1 -
 arch/um/include/asm/mmu.h                          |   2 -
 arch/um/include/asm/processor-generic.h            |   1 -
 arch/um/include/shared/kern_util.h                 |   2 +
 arch/um/include/shared/skas/mm_id.h                |   2 +
 arch/um/os-Linux/mem.c                             |   1 +
 arch/x86/Kconfig                                   |   8 +-
 arch/x86/Kconfig.debug                             |   5 +-
 arch/x86/Makefile                                  |   7 +-
 arch/x86/boot/compressed/head_64.S                 |   5 +
 arch/x86/crypto/nh-avx2-x86_64.S                   |   1 +
 arch/x86/crypto/sha256-avx2-asm.S                  |   1 +
 arch/x86/crypto/sha512-avx2-asm.S                  |   1 +
 arch/x86/entry/vdso/Makefile                       |  27 --
 arch/x86/entry/vsyscall/vsyscall_64.c              |  28 +-
 arch/x86/include/asm/cmpxchg_64.h                  |   2 +-
 arch/x86/include/asm/pgtable_types.h               |   2 +
 arch/x86/include/asm/processor.h                   |   1 -
 arch/x86/include/asm/sparsemem.h                   |   2 -
 arch/x86/kernel/apic/vector.c                      |   9 +-
 arch/x86/kernel/tsc_sync.c                         |   6 +-
 arch/x86/kvm/cpuid.c                               |  21 +-
 arch/x86/lib/x86-opcode-map.txt                    |  10 +-
 arch/x86/mm/fault.c                                |  33 +-
 arch/x86/mm/numa.c                                 |   4 +-
 arch/x86/mm/pat/set_memory.c                       |  68 ++-
 arch/x86/net/bpf_jit_comp.c                        |  57 ++-
 arch/x86/pci/mmconfig-shared.c                     |  40 +-
 arch/x86/purgatory/Makefile                        |   3 +-
 arch/x86/tools/relocs.c                            |   9 +
 arch/x86/um/shared/sysdep/archsetjmp.h             |   7 +
 arch/x86/xen/enlighten.c                           |  33 ++
 block/blk-cgroup.c                                 |  87 ++--
 block/blk-core.c                                   |   9 +-
 block/blk-merge.c                                  |   2 +
 block/blk-mq.c                                     |   4 +
 block/blk.h                                        |   1 +
 block/fops.c                                       |   2 +-
 block/genhd.c                                      |   2 +-
 block/partitions/cmdline.c                         |  49 +--
 crypto/asymmetric_keys/Kconfig                     |   3 +
 drivers/accel/ivpu/ivpu_job.c                      |   3 +-
 drivers/accessibility/speakup/main.c               |   2 +-
 drivers/acpi/acpi_lpss.c                           |   1 +
 drivers/acpi/acpica/Makefile                       |   1 +
 drivers/acpi/numa/srat.c                           |   5 +
 drivers/base/base.h                                |   9 +-
 drivers/base/bus.c                                 |   9 +-
 drivers/base/module.c                              |  42 +-
 drivers/block/loop.c                               |   4 +-
 drivers/block/null_blk/main.c                      |   3 +
 drivers/bluetooth/btmrvl_main.c                    |   9 -
 drivers/bluetooth/btqca.c                          |   4 +-
 drivers/bluetooth/btrsi.c                          |   1 -
 drivers/bluetooth/btsdio.c                         |   8 -
 drivers/bluetooth/btusb.c                          |   5 -
 drivers/bluetooth/hci_bcm4377.c                    |   1 -
 drivers/bluetooth/hci_ldisc.c                      |   6 -
 drivers/bluetooth/hci_serdev.c                     |   5 -
 drivers/bluetooth/hci_uart.h                       |   1 -
 drivers/bluetooth/hci_vhci.c                       |  10 +-
 drivers/bluetooth/virtio_bt.c                      |   2 -
 drivers/char/ppdev.c                               |  21 +-
 drivers/char/tpm/tpm_tis_spi_main.c                |   3 +-
 drivers/clk/clk-renesas-pcie.c                     |  10 +-
 drivers/clk/mediatek/clk-mt8365-mm.c               |   2 +-
 drivers/clk/mediatek/clk-pllfh.c                   |   2 +-
 drivers/clk/qcom/clk-alpha-pll.c                   |   1 -
 drivers/clk/qcom/dispcc-sm6350.c                   |  11 +-
 drivers/clk/qcom/dispcc-sm8450.c                   |  20 +-
 drivers/clk/qcom/dispcc-sm8550.c                   |  20 +-
 drivers/clk/qcom/mmcc-msm8998.c                    |   8 +
 drivers/clk/renesas/r8a779a0-cpg-mssr.c            |   2 +-
 drivers/clk/renesas/r9a07g043-cpg.c                |   9 +
 drivers/clk/samsung/clk-exynosautov9.c             |   8 +-
 drivers/cpufreq/brcmstb-avs-cpufreq.c              |   5 +-
 drivers/cpufreq/cppc_cpufreq.c                     |  14 +-
 drivers/cpufreq/cpufreq.c                          |  11 +-
 drivers/crypto/bcm/spu2.c                          |   2 +-
 drivers/crypto/ccp/sp-platform.c                   |  14 +-
 drivers/crypto/intel/qat/qat_4xxx/adf_drv.c        |   2 +
 drivers/cxl/core/region.c                          |   1 +
 drivers/cxl/core/trace.h                           |   4 +-
 drivers/dma-buf/st-dma-fence-chain.c               |  12 +-
 drivers/dma-buf/st-dma-fence.c                     |   4 +-
 drivers/dma-buf/sync_debug.c                       |   4 +-
 drivers/dma/idma64.c                               |   4 +-
 drivers/dma/idxd/cdev.c                            |   1 -
 drivers/extcon/Kconfig                             |   3 +-
 drivers/firmware/dmi-id.c                          |   7 +-
 drivers/firmware/efi/libstub/fdt.c                 |   4 +-
 drivers/firmware/efi/libstub/x86-stub.c            |  28 +-
 drivers/firmware/qcom_scm.c                        |  10 +-
 drivers/firmware/raspberrypi.c                     |   7 +-
 drivers/fpga/dfl-pci.c                             |   3 +
 drivers/fpga/fpga-bridge.c                         |  57 +--
 drivers/fpga/fpga-mgr.c                            |  82 ++--
 drivers/fpga/fpga-region.c                         |  24 +-
 drivers/gpio/gpiolib-acpi.c                        |  19 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c            |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c         |   2 +
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c             |   3 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c             |   3 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c              |   2 -
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c            |   8 +-
 drivers/gpu/drm/amd/amdkfd/kfd_migrate.c           |  16 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c           |   8 +
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c               |   2 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |   1 +
 .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c    |   3 +
 .../amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c |   8 +
 .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c   |  15 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c           |   3 +
 .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c |   5 +
 .../gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c   |   2 +
 .../display/dc/link/protocols/link_dp_dpia_bw.c    |  10 +-
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c   |  25 ++
 drivers/gpu/drm/arm/malidp_mw.c                    |   5 +-
 drivers/gpu/drm/bridge/analogix/anx7625.c          |  15 +-
 .../gpu/drm/bridge/cadence/cdns-mhdp8546-core.c    |   3 +
 drivers/gpu/drm/bridge/chipone-icn6211.c           |   6 +-
 drivers/gpu/drm/bridge/lontium-lt8912b.c           |   6 +-
 drivers/gpu/drm/bridge/lontium-lt9611.c            |   6 +-
 drivers/gpu/drm/bridge/lontium-lt9611uxc.c         |   6 +-
 drivers/gpu/drm/bridge/tc358775.c                  |  27 +-
 drivers/gpu/drm/bridge/ti-dlpc3433.c               |  17 +-
 drivers/gpu/drm/bridge/ti-sn65dsi83.c              |   1 -
 drivers/gpu/drm/ci/build.yml                       |   1 +
 drivers/gpu/drm/ci/gitlab-ci.yml                   |  22 +-
 drivers/gpu/drm/ci/image-tags.yml                  |   2 +-
 drivers/gpu/drm/ci/lava-submit.sh                  |   2 +-
 drivers/gpu/drm/ci/test.yml                        |  27 +-
 drivers/gpu/drm/display/drm_dp_helper.c            |  35 ++
 drivers/gpu/drm/drm_bridge.c                       |  10 +-
 drivers/gpu/drm/drm_edid.c                         |   2 +-
 drivers/gpu/drm/drm_mipi_dsi.c                     |   6 +-
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c              |   4 +-
 drivers/gpu/drm/i915/display/intel_backlight.c     |   6 +-
 drivers/gpu/drm/i915/gt/intel_engine_cs.c          |   6 +
 drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c        |   2 +-
 drivers/gpu/drm/i915/gt/intel_gt_types.h           |   8 +
 drivers/gpu/drm/i915/gt/selftest_migrate.c         |   4 +-
 drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h      |   6 +-
 drivers/gpu/drm/i915/gvt/interrupt.c               |  13 +-
 drivers/gpu/drm/mediatek/mtk_dp.c                  |   2 +-
 drivers/gpu/drm/mediatek/mtk_drm_gem.c             |   3 +
 drivers/gpu/drm/meson/meson_dw_mipi_dsi.c          |   7 +
 drivers/gpu/drm/meson/meson_vclk.c                 |   6 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c              |   3 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h       |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        |  30 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h   |   2 +-
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c   |  11 +-
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c   |   4 +-
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c    |  16 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c  | 131 +++---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h  |  18 +-
 drivers/gpu/drm/msm/dp/dp_aux.c                    |  20 +
 drivers/gpu/drm/msm/dp/dp_aux.h                    |   1 +
 drivers/gpu/drm/msm/dp/dp_ctrl.c                   |   6 +-
 drivers/gpu/drm/msm/dp/dp_display.c                |   4 +
 drivers/gpu/drm/msm/dp/dp_link.c                   |  22 +-
 drivers/gpu/drm/msm/dp/dp_link.h                   |  14 +-
 drivers/gpu/drm/msm/dsi/dsi_host.c                 |  10 +-
 drivers/gpu/drm/mxsfb/lcdif_drv.c                  |   6 +-
 drivers/gpu/drm/nouveau/nouveau_abi16.c            |  12 +
 drivers/gpu/drm/nouveau/nouveau_bo.c               |  44 +-
 drivers/gpu/drm/omapdrm/Kconfig                    |   2 +-
 drivers/gpu/drm/omapdrm/omap_fbdev.c               |  40 +-
 drivers/gpu/drm/panel/panel-edp.c                  |   3 +
 drivers/gpu/drm/panel/panel-novatek-nt35950.c      |   6 +-
 drivers/gpu/drm/panel/panel-samsung-atna33xc20.c   |  24 +-
 drivers/gpu/drm/panel/panel-simple.c               |   3 +
 drivers/gpu/drm/panel/panel-sitronix-st7789v.c     |  16 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c       |  22 +-
 drivers/gpu/drm/solomon/ssd130x.c                  |   2 +-
 drivers/gpu/drm/vc4/vc4_hdmi.c                     |   2 +
 drivers/gpu/drm/xlnx/zynqmp_dpsub.c                |   7 +-
 drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c      |  10 +
 drivers/hid/hid-mcp2221.c                          |   2 +
 drivers/hid/intel-ish-hid/ipc/pci-ish.c            |   5 +
 drivers/hwmon/intel-m10-bmc-hwmon.c                |   2 +-
 drivers/hwmon/pwm-fan.c                            |   8 +-
 drivers/hwmon/shtc1.c                              |   2 +-
 drivers/hwtracing/coresight/coresight-etm4x-core.c |  29 +-
 drivers/hwtracing/coresight/coresight-etm4x.h      |  31 +-
 drivers/hwtracing/stm/core.c                       |  11 +-
 drivers/i2c/busses/i2c-cadence.c                   |   1 +
 drivers/i2c/busses/i2c-synquacer.c                 |  18 +-
 drivers/i3c/master/svc-i3c-master.c                |  36 +-
 drivers/iio/Kconfig                                |   9 +
 drivers/iio/Makefile                               |   1 +
 drivers/iio/accel/mxc4005.c                        |  76 ++++
 drivers/iio/adc/Kconfig                            |   6 +-
 drivers/iio/adc/ad9467.c                           | 310 ++++++++-----
 drivers/iio/adc/adi-axi-adc.c                      | 478 +++++++--------------
 drivers/iio/adc/stm32-adc.c                        |   1 +
 drivers/iio/buffer/industrialio-buffer-dmaengine.c |   8 +-
 drivers/iio/industrialio-backend.c                 | 418 ++++++++++++++++++
 drivers/iio/industrialio-core.c                    |   6 +-
 drivers/iio/pressure/dps310.c                      |  11 +-
 drivers/infiniband/core/cma.c                      |   4 +-
 drivers/infiniband/hw/bnxt_re/ib_verbs.c           |  59 ++-
 drivers/infiniband/hw/bnxt_re/ib_verbs.h           |   7 +
 drivers/infiniband/hw/bnxt_re/qplib_fp.c           | 208 +++++----
 drivers/infiniband/hw/bnxt_re/qplib_fp.h           |  34 +-
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c         |  19 +-
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h         |   4 +-
 drivers/infiniband/hw/bnxt_re/qplib_res.c          |   2 +-
 drivers/infiniband/hw/bnxt_re/qplib_res.h          |  46 +-
 drivers/infiniband/hw/bnxt_re/roce_hsi.h           |  67 ++-
 drivers/infiniband/hw/hns/hns_roce_cq.c            |  24 +-
 drivers/infiniband/hw/hns/hns_roce_hem.h           |  12 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c         |   7 +-
 drivers/infiniband/hw/hns/hns_roce_main.c          |   1 +
 drivers/infiniband/hw/hns/hns_roce_mr.c            |  15 +-
 drivers/infiniband/hw/hns/hns_roce_srq.c           |   6 +-
 drivers/infiniband/hw/mlx5/mem.c                   |   8 +-
 drivers/infiniband/hw/mlx5/mlx5_ib.h               |   2 +-
 drivers/infiniband/hw/mlx5/mr.c                    |   3 +-
 drivers/infiniband/sw/rxe/rxe_comp.c               |   6 +-
 drivers/infiniband/sw/rxe/rxe_net.c                |  12 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c              |   6 +-
 drivers/infiniband/ulp/ipoib/ipoib_vlan.c          |   8 +-
 drivers/input/input.c                              | 104 ++++-
 drivers/input/joystick/xpad.c                      |   2 +
 drivers/input/misc/da7280.c                        |   4 +-
 drivers/input/misc/ims-pcu.c                       |   4 +-
 drivers/input/misc/pm8xxx-vibrator.c               |   7 +-
 drivers/input/misc/pwm-beeper.c                    |   4 +-
 drivers/input/misc/pwm-vibra.c                     |   8 +-
 drivers/input/mouse/cyapa.c                        |  12 +-
 drivers/interconnect/qcom/qcm2290.c                |   2 +-
 drivers/iommu/iommu.c                              |  21 +-
 drivers/irqchip/irq-alpine-msi.c                   |   2 +-
 drivers/irqchip/irq-loongson-pch-msi.c             |   2 +-
 drivers/leds/leds-pwm.c                            |  10 +-
 drivers/leds/rgb/leds-pwm-multicolor.c             |   4 +-
 drivers/macintosh/via-macii.c                      |  11 +-
 drivers/md/md-bitmap.c                             |   6 +-
 drivers/media/cec/core/cec-adap.c                  |  24 +-
 drivers/media/cec/core/cec-api.c                   |   5 +-
 drivers/media/i2c/et8ek8/et8ek8_driver.c           |   4 +-
 drivers/media/i2c/ov2680.c                         |  13 +-
 drivers/media/pci/intel/ipu3/ipu3-cio2.c           |  10 +-
 drivers/media/pci/ngene/ngene-core.c               |   4 +-
 drivers/media/platform/cadence/cdns-csi2rx.c       |  26 +-
 .../mediatek/vcodec/encoder/mtk_vcodec_enc.c       |  21 +-
 .../mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c    |  20 +
 .../mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h    |   3 +-
 .../platform/mediatek/vcodec/encoder/venc_drv_if.c |  11 +-
 drivers/media/platform/renesas/rcar-vin/rcar-vin.h |   2 +-
 .../platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig    |   1 +
 drivers/media/radio/radio-shark2.c                 |   2 +-
 drivers/media/rc/ir-rx51.c                         |   4 +-
 drivers/media/rc/pwm-ir-tx.c                       |   4 +-
 drivers/media/usb/b2c2/flexcop-usb.c               |   2 +-
 drivers/media/usb/stk1160/stk1160-video.c          |  20 +-
 drivers/media/usb/uvc/uvc_driver.c                 |  31 ++
 drivers/media/usb/uvc/uvcvideo.h                   |   1 +
 drivers/media/v4l2-core/v4l2-subdev.c              |  39 +-
 drivers/misc/lkdtm/Makefile                        |   2 +-
 drivers/misc/lkdtm/perms.c                         |   2 +-
 drivers/misc/pvpanic/pvpanic-mmio.c                |  58 +--
 drivers/misc/pvpanic/pvpanic-pci.c                 |  60 +--
 drivers/misc/pvpanic/pvpanic.c                     |  76 +++-
 drivers/misc/pvpanic/pvpanic.h                     |  10 +-
 drivers/misc/vmw_vmci/vmci_guest.c                 |  10 +-
 drivers/mmc/host/sdhci_am654.c                     | 205 ++++++---
 drivers/mtd/mtdcore.c                              |   6 +-
 drivers/mtd/nand/raw/nand_hynix.c                  |   2 +-
 drivers/net/Makefile                               |   4 +-
 drivers/net/dsa/microchip/ksz_common.c             |   2 +-
 drivers/net/dsa/mv88e6xxx/chip.c                   |  50 ++-
 drivers/net/dsa/mv88e6xxx/chip.h                   |   6 +
 drivers/net/dsa/mv88e6xxx/global1.c                |  89 ++++
 drivers/net/dsa/mv88e6xxx/global1.h                |   2 +
 drivers/net/ethernet/amazon/ena/ena_com.c          | 326 +++++---------
 drivers/net/ethernet/amazon/ena/ena_eth_com.c      |  49 +--
 drivers/net/ethernet/amazon/ena/ena_eth_com.h      |  15 +-
 drivers/net/ethernet/amazon/ena/ena_netdev.c       |  32 +-
 drivers/net/ethernet/cisco/enic/enic_main.c        |  12 +
 drivers/net/ethernet/cortina/gemini.c              |  12 +-
 drivers/net/ethernet/freescale/enetc/enetc.c       |   2 +-
 drivers/net/ethernet/freescale/fec_main.c          |  36 +-
 drivers/net/ethernet/freescale/fec_ptp.c           |  14 +-
 drivers/net/ethernet/intel/e1000e/ich8lan.c        |  22 +
 drivers/net/ethernet/intel/e1000e/netdev.c         |  18 -
 drivers/net/ethernet/intel/ice/ice_ethtool.c       |  19 +-
 drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c  |  11 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h      |   3 -
 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c      |  56 +--
 drivers/net/ethernet/marvell/octeontx2/nic/qos.c   |   4 +
 drivers/net/ethernet/mellanox/mlx5/core/cmd.c      |  46 +-
 .../net/ethernet/mellanox/mlx5/core/en/xsk/setup.c |   6 +-
 .../mellanox/mlx5/core/en_accel/en_accel.h         |   8 +-
 .../mellanox/mlx5/core/en_accel/ipsec_fs.c         |   3 +-
 .../mellanox/mlx5/core/en_accel/ipsec_rxtx.h       |  17 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c    |   6 +-
 .../net/ethernet/mellanox/mlx5/core/esw/bridge.c   |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/eswitch.h  |   4 +-
 .../ethernet/mellanox/mlx5/core/eswitch_offloads.c |  28 +-
 drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c  |  18 +-
 .../net/ethernet/mellanox/mlx5/core/lag/mpesw.c    |  18 +-
 .../net/ethernet/microchip/lan966x/lan966x_main.c  |  12 +-
 drivers/net/ethernet/microsoft/mana/hw_channel.c   |   2 +-
 drivers/net/ethernet/qlogic/qed/qed_main.c         |   9 +-
 drivers/net/ethernet/realtek/r8169_main.c          |   9 +-
 drivers/net/ethernet/smsc/smc91x.h                 |   4 +-
 drivers/net/ethernet/sun/sungem.c                  |  14 -
 drivers/net/ethernet/ti/icssg/icssg_classifier.c   |   2 +-
 drivers/net/ethernet/ti/icssg/icssg_prueth.c       |  14 +-
 drivers/net/ethernet/wangxun/libwx/wx_lib.c        |   4 +-
 drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c     |   8 +-
 drivers/net/ipvlan/ipvlan_core.c                   |   4 +-
 drivers/net/phy/micrel.c                           |  14 +-
 drivers/net/usb/aqc111.c                           |   8 +-
 drivers/net/usb/qmi_wwan.c                         |   3 +
 drivers/net/usb/smsc95xx.c                         |  26 +-
 drivers/net/usb/sr9700.c                           |  10 +-
 drivers/net/wireless/ath/ar5523/ar5523.c           |  14 +
 drivers/net/wireless/ath/ath10k/core.c             |   3 +
 drivers/net/wireless/ath/ath10k/debugfs_sta.c      |   2 +-
 drivers/net/wireless/ath/ath10k/hw.h               |   1 +
 drivers/net/wireless/ath/ath10k/targaddrs.h        |   3 +
 drivers/net/wireless/ath/ath10k/wmi.c              |  26 +-
 drivers/net/wireless/ath/ath11k/mac.c              |   9 +-
 drivers/net/wireless/ath/ath12k/qmi.c              |   3 +
 drivers/net/wireless/ath/ath12k/wmi.c              |   2 +-
 drivers/net/wireless/ath/carl9170/tx.c             |   3 +-
 drivers/net/wireless/ath/carl9170/usb.c            |  32 ++
 .../wireless/broadcom/brcm80211/brcmfmac/pcie.c    |  15 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |  19 +-
 .../net/wireless/intel/iwlwifi/mvm/mld-mac80211.c  |   9 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c   |  19 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h       |   2 +
 drivers/net/wireless/marvell/mwl8k.c               |   2 +-
 drivers/net/wireless/mediatek/mt76/mt7603/dma.c    |  46 +-
 drivers/net/wireless/mediatek/mt76/mt7603/mac.c    |   1 +
 .../net/wireless/mediatek/mt76/mt7915/debugfs.c    |   6 +-
 drivers/net/xen-netback/interface.c                |   3 +-
 drivers/nvme/host/core.c                           |  23 +-
 drivers/nvme/host/multipath.c                      |   6 +-
 drivers/nvme/host/nvme.h                           |  22 +
 drivers/nvme/host/pci.c                            |   8 +-
 drivers/nvme/target/auth.c                         |   8 +-
 drivers/nvme/target/configfs.c                     |  20 +
 drivers/nvme/target/core.c                         |   5 +-
 drivers/nvme/target/nvmet.h                        |   1 +
 drivers/nvme/target/tcp.c                          |  11 +-
 drivers/of/module.c                                |   7 +-
 drivers/pci/controller/dwc/pcie-tegra194.c         |   3 +
 drivers/pci/of_property.c                          |   2 +
 drivers/pci/pci.c                                  |   2 +-
 drivers/pci/pcie/edr.c                             |  28 +-
 drivers/perf/arm_dmc620_pmu.c                      |   9 +-
 drivers/perf/hisilicon/hisi_pcie_pmu.c             |  14 +-
 drivers/perf/hisilicon/hns3_pmu.c                  |  16 +-
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c          |   2 -
 drivers/pinctrl/qcom/pinctrl-sm7150.c              |  20 +-
 .../x86/intel/speed_select_if/isst_if_common.c     |   1 +
 drivers/platform/x86/intel/tpmi.c                  |   7 +-
 .../intel/uncore-frequency/uncore-frequency-tpmi.c |   7 +
 drivers/platform/x86/lenovo-yogabook.c             |   2 +-
 drivers/platform/x86/thinkpad_acpi.c               |   5 +-
 drivers/platform/x86/xiaomi-wmi.c                  |  18 +
 drivers/pwm/core.c                                 |  18 +-
 drivers/pwm/pwm-sti.c                              |  46 +-
 drivers/pwm/pwm-twl-led.c                          |   2 +-
 drivers/pwm/pwm-vt8500.c                           |   2 +-
 drivers/pwm/sysfs.c                                |  10 +-
 drivers/regulator/bd71828-regulator.c              |  58 +--
 drivers/regulator/helpers.c                        |  43 +-
 drivers/regulator/irq_helpers.c                    |   3 +
 drivers/regulator/pwm-regulator.c                  |   4 +-
 drivers/regulator/qcom-refgen-regulator.c          |   1 +
 drivers/regulator/tps6287x-regulator.c             |   1 +
 drivers/regulator/tps6594-regulator.c              |  16 +-
 drivers/regulator/vqmmc-ipq4019-regulator.c        |   1 +
 drivers/s390/cio/trace.h                           |   2 +-
 drivers/scsi/bfa/bfad_debugfs.c                    |   4 +-
 drivers/scsi/hpsa.c                                |   2 +-
 drivers/scsi/libsas/sas_expander.c                 |   3 +-
 drivers/scsi/qedf/qedf_debugfs.c                   |   2 +-
 drivers/scsi/qla2xxx/qla_dfs.c                     |   2 +-
 drivers/soc/mediatek/mtk-cmdq-helper.c             |   5 +-
 drivers/soc/qcom/pmic_glink.c                      |  26 +-
 drivers/soundwire/cadence_master.c                 |   2 +-
 drivers/spi/spi-stm32.c                            |   2 +-
 drivers/spi/spi.c                                  |   4 +
 drivers/staging/greybus/arche-apb-ctrl.c           |   1 +
 drivers/staging/greybus/arche-platform.c           |   9 +-
 drivers/staging/greybus/light.c                    |   8 +-
 drivers/staging/media/atomisp/pci/sh_css.c         |   1 +
 drivers/target/target_core_file.c                  |   4 +-
 drivers/thermal/qcom/tsens.c                       |   2 +-
 drivers/tty/n_gsm.c                                | 140 ++++--
 drivers/tty/serial/8250/8250_bcm7271.c             |  99 +++--
 drivers/tty/serial/8250/8250_mtk.c                 |   8 +-
 drivers/tty/serial/max3100.c                       |  22 +-
 drivers/tty/serial/sc16is7xx.c                     |  27 +-
 drivers/tty/serial/sh-sci.c                        |   5 +
 drivers/ufs/core/ufs-mcq.c                         |   3 +-
 drivers/ufs/core/ufshcd.c                          |   6 +-
 drivers/ufs/host/cdns-pltfrm.c                     |   2 +-
 drivers/ufs/host/ufs-qcom.c                        |   7 +-
 drivers/ufs/host/ufs-qcom.h                        |  12 +-
 drivers/usb/fotg210/fotg210-core.c                 |   1 +
 drivers/usb/gadget/function/u_audio.c              |  21 +-
 drivers/usb/typec/ucsi/ucsi.c                      |  18 +-
 drivers/usb/usbip/usbip_common.h                   |   6 -
 drivers/vfio/pci/vfio_pci_intrs.c                  |   4 +-
 drivers/video/backlight/lm3630a_bl.c               |   2 +-
 drivers/video/backlight/lp855x_bl.c                |   2 +-
 drivers/video/backlight/pwm_bl.c                   |  12 +-
 drivers/video/fbdev/Kconfig                        |   4 +-
 drivers/video/fbdev/core/Kconfig                   |  12 +
 drivers/video/fbdev/core/Makefile                  |   3 +-
 drivers/video/fbdev/core/fb_io_fops.c              |   3 +
 drivers/video/fbdev/sh_mobile_lcdcfb.c             |   2 +-
 drivers/video/fbdev/sis/init301.c                  |   3 +-
 drivers/video/fbdev/ssd1307fb.c                    |   2 +-
 drivers/virt/acrn/mm.c                             |  61 ++-
 drivers/virtio/virtio_pci_common.c                 |   4 +-
 drivers/watchdog/bd9576_wdt.c                      |  12 +-
 drivers/watchdog/cpu5wdt.c                         |   2 +-
 drivers/watchdog/sa1100_wdt.c                      |   5 +-
 drivers/xen/xenbus/xenbus_probe.c                  |  36 +-
 fs/aio.c                                           |   4 +-
 fs/cachefiles/io.c                                 |   5 +-
 fs/dlm/ast.c                                       |  14 +
 fs/dlm/dlm_internal.h                              |   1 +
 fs/dlm/user.c                                      |  15 +-
 fs/ecryptfs/keystore.c                             |   4 +-
 fs/eventpoll.c                                     |  38 +-
 fs/ext4/inode.c                                    |   3 -
 fs/ext4/mballoc.c                                  |   1 +
 fs/ext4/namei.c                                    |   2 +-
 fs/f2fs/checkpoint.c                               |  10 +-
 fs/f2fs/compress.c                                 |  10 +-
 fs/f2fs/data.c                                     | 148 +++----
 fs/f2fs/debug.c                                    |   6 +-
 fs/f2fs/dir.c                                      |   5 +-
 fs/f2fs/f2fs.h                                     | 165 +++----
 fs/f2fs/file.c                                     | 134 +++---
 fs/f2fs/gc.c                                       | 119 ++---
 fs/f2fs/node.c                                     |   6 +-
 fs/f2fs/node.h                                     |   4 +-
 fs/f2fs/recovery.c                                 |   2 +-
 fs/f2fs/segment.c                                  | 240 ++++++-----
 fs/f2fs/segment.h                                  |  66 ++-
 fs/f2fs/super.c                                    | 116 +----
 fs/f2fs/sysfs.c                                    |   6 +-
 fs/gfs2/acl.h                                      |   8 +-
 fs/gfs2/aops.c                                     |  36 +-
 fs/gfs2/aops.h                                     |   6 +-
 fs/gfs2/bmap.c                                     |   4 +-
 fs/gfs2/bmap.h                                     |  38 +-
 fs/gfs2/dir.c                                      |   2 +-
 fs/gfs2/dir.h                                      |  38 +-
 fs/gfs2/file.c                                     |   2 +-
 fs/gfs2/glock.c                                    |  97 +++--
 fs/gfs2/glock.h                                    |  99 ++---
 fs/gfs2/glops.c                                    |   5 +-
 fs/gfs2/glops.h                                    |   4 +-
 fs/gfs2/incore.h                                   |   3 +-
 fs/gfs2/inode.c                                    |  15 +-
 fs/gfs2/inode.h                                    |  48 +--
 fs/gfs2/lock_dlm.c                                 |  40 +-
 fs/gfs2/log.c                                      |  21 +-
 fs/gfs2/log.h                                      |  46 +-
 fs/gfs2/lops.h                                     |  22 +-
 fs/gfs2/meta_io.c                                  |   9 +-
 fs/gfs2/meta_io.h                                  |  20 +-
 fs/gfs2/ops_fstype.c                               |  28 +-
 fs/gfs2/quota.c                                    |   8 +-
 fs/gfs2/quota.h                                    |  35 +-
 fs/gfs2/recovery.c                                 |   2 +-
 fs/gfs2/recovery.h                                 |  18 +-
 fs/gfs2/rgrp.c                                     |  12 +-
 fs/gfs2/rgrp.h                                     |  81 ++--
 fs/gfs2/super.c                                    |  19 +-
 fs/gfs2/super.h                                    |  50 +--
 fs/gfs2/sys.c                                      |   2 +-
 fs/gfs2/trans.c                                    |   2 +-
 fs/gfs2/trans.h                                    |  22 +-
 fs/gfs2/util.c                                     |   5 +-
 fs/gfs2/util.h                                     |  23 +-
 fs/gfs2/xattr.c                                    |   6 +-
 fs/gfs2/xattr.h                                    |  12 +-
 fs/jffs2/xattr.c                                   |   3 +
 fs/nfs/filelayout/filelayout.c                     |   4 +-
 fs/nfs/fs_context.c                                |   9 +-
 fs/nfs/nfs4state.c                                 |  12 +-
 fs/nilfs2/ioctl.c                                  |   2 +-
 fs/nilfs2/segment.c                                |  63 ++-
 fs/nilfs2/the_nilfs.c                              |  20 +-
 fs/ntfs3/dir.c                                     |   1 +
 fs/ntfs3/fslog.c                                   |   3 +-
 fs/ntfs3/index.c                                   |   6 +
 fs/ntfs3/inode.c                                   |  24 +-
 fs/ntfs3/ntfs.h                                    |   2 +-
 fs/ntfs3/record.c                                  |  11 +-
 fs/ntfs3/super.c                                   |   2 -
 fs/openpromfs/inode.c                              |   8 +-
 fs/overlayfs/dir.c                                 |   3 -
 fs/overlayfs/file.c                                |  26 +-
 fs/read_write.c                                    |  19 +-
 fs/smb/server/mgmt/share_config.c                  |   6 +-
 fs/smb/server/oplock.c                             |  21 +-
 fs/smb/server/smb2pdu.c                            |   4 +-
 fs/splice.c                                        |  15 +-
 fs/tracefs/event_inode.c                           | 156 +++++--
 fs/tracefs/internal.h                              |   9 +-
 fs/udf/inode.c                                     |  27 +-
 fs/xfs/xfs_acl.c                                   |   4 +-
 fs/xfs/xfs_attr_item.c                             |   9 +-
 fs/xfs/xfs_bmap_item.c                             |   4 +-
 fs/xfs/xfs_buf_item.c                              |   2 +-
 fs/xfs/xfs_dquot.c                                 |   2 +-
 fs/xfs/xfs_extfree_item.c                          |   4 +-
 fs/xfs/xfs_icreate_item.c                          |   2 +-
 fs/xfs/xfs_inode_item.c                            |   2 +-
 fs/xfs/xfs_ioctl.c                                 |   2 +-
 fs/xfs/xfs_iomap.c                                 |  10 +-
 fs/xfs/xfs_log.c                                   |   4 +-
 fs/xfs/xfs_log_cil.c                               |   2 +-
 fs/xfs/xfs_log_recover.c                           |  60 +--
 fs/xfs/xfs_refcount_item.c                         |   4 +-
 fs/xfs/xfs_reflink.c                               |  16 +-
 fs/xfs/xfs_rmap_item.c                             |   4 +-
 fs/xfs/xfs_rtalloc.c                               |   6 +-
 include/drm/display/drm_dp_helper.h                |   6 +
 include/drm/drm_displayid.h                        |   1 -
 include/drm/drm_mipi_dsi.h                         |   6 +-
 include/linux/acpi.h                               |   2 +-
 include/linux/bitops.h                             |   1 +
 include/linux/counter.h                            |   1 -
 include/linux/cpu.h                                |  11 +
 include/linux/dev_printk.h                         |  25 +-
 include/linux/f2fs_fs.h                            |   6 -
 include/linux/fb.h                                 |   4 +
 include/linux/fortify-string.h                     |  22 +-
 include/linux/fpga/fpga-bridge.h                   |  10 +-
 include/linux/fpga/fpga-mgr.h                      |  26 +-
 include/linux/fpga/fpga-region.h                   |  13 +-
 include/linux/fs.h                                 |  12 -
 include/linux/i3c/device.h                         |   2 +
 include/linux/ieee80211.h                          |   2 +-
 include/linux/iio/adc/adi-axi-adc.h                |  68 ---
 include/linux/iio/backend.h                        |  72 ++++
 include/linux/iio/buffer-dmaengine.h               |   3 +
 include/linux/kthread.h                            |   1 +
 include/linux/mlx5/driver.h                        |   1 +
 include/linux/mlx5/mlx5_ifc.h                      |   4 +-
 include/linux/numa.h                               |  26 +-
 include/linux/nvme-tcp.h                           |   6 +
 include/linux/printk.h                             |   2 +-
 include/linux/pwm.h                                |  28 +-
 include/linux/regulator/driver.h                   |   3 +
 include/linux/tracefs.h                            |   3 +
 include/media/cec.h                                |   1 +
 include/media/v4l2-subdev.h                        |   4 +-
 include/net/ax25.h                                 |   3 +-
 include/net/bluetooth/hci.h                        | 114 -----
 include/net/bluetooth/hci_core.h                   |  46 +-
 include/net/bluetooth/hci_sync.h                   |   2 +
 include/net/bluetooth/l2cap.h                      |  11 +-
 include/net/mac80211.h                             |   3 +
 include/net/tcp.h                                  |  11 +-
 include/sound/cs35l56.h                            |   1 +
 include/sound/soc-acpi-intel-match.h               |   2 +
 include/sound/tas2781-dsp.h                        |   7 +-
 include/trace/events/asoc.h                        |   2 +
 include/uapi/drm/nouveau_drm.h                     |  21 +
 include/uapi/linux/bpf.h                           |   2 +-
 include/uapi/linux/user_events.h                   |  11 +-
 include/uapi/linux/virtio_bt.h                     |   1 -
 include/uapi/rdma/bnxt_re-abi.h                    |  10 +
 io_uring/io-wq.c                                   |  13 +-
 io_uring/io_uring.h                                |   2 +-
 io_uring/nop.c                                     |   2 +
 io_uring/rw.c                                      |   4 +-
 kernel/Makefile                                    |   1 +
 kernel/bpf/syscall.c                               |   5 +
 kernel/bpf/verifier.c                              |  39 +-
 kernel/cgroup/cpuset.c                             |   2 +-
 kernel/cpu.c                                       |  14 +-
 kernel/dma/map_benchmark.c                         |  22 +-
 kernel/gen_kheaders.sh                             |   7 +-
 kernel/irq/cpuhotplug.c                            |  16 +-
 kernel/irq/manage.c                                |  15 +-
 kernel/kthread.c                                   |  18 +
 kernel/numa.c                                      |  26 ++
 kernel/rcu/tasks.h                                 |   2 +-
 kernel/rcu/tree_stall.h                            |   3 +-
 kernel/sched/core.c                                |   2 +-
 kernel/sched/fair.c                                |  53 ++-
 kernel/sched/isolation.c                           |   7 +-
 kernel/sched/topology.c                            |   2 +-
 kernel/smpboot.c                                   |   3 +-
 kernel/softirq.c                                   |  12 +-
 kernel/trace/ftrace.c                              |  39 +-
 kernel/trace/ring_buffer.c                         |   9 +
 kernel/trace/rv/rv.c                               |   2 +
 kernel/trace/trace_events.c                        |  12 +
 kernel/trace/trace_events_user.c                   | 213 ++++++---
 kernel/trace/trace_probe.c                         |   4 +
 lib/fortify_kunit.c                                |  16 +-
 lib/kunit/try-catch.c                              |   9 +-
 lib/slub_kunit.c                                   |   2 +-
 lib/test_hmm.c                                     |   8 +-
 mm/damon/core.c                                    |   3 +-
 mm/userfaultfd.c                                   |  35 ++
 net/ax25/ax25_dev.c                                |  48 +--
 net/bluetooth/hci_conn.c                           |  10 +-
 net/bluetooth/hci_core.c                           | 135 +-----
 net/bluetooth/hci_event.c                          | 310 -------------
 net/bluetooth/hci_sock.c                           |   9 +-
 net/bluetooth/hci_sync.c                           | 138 +-----
 net/bluetooth/l2cap_core.c                         |  77 ++--
 net/bluetooth/l2cap_sock.c                         |  91 +++-
 net/bluetooth/mgmt.c                               |  84 ++--
 net/bridge/br_device.c                             |   6 +
 net/bridge/br_mst.c                                |  16 +-
 net/core/dev.c                                     |   3 +-
 net/core/pktgen.c                                  |   3 +-
 net/ipv4/af_inet.c                                 |   4 +-
 net/ipv4/netfilter/nf_tproxy_ipv4.c                |   2 +
 net/ipv4/tcp_dctcp.c                               |  13 +-
 net/ipv4/tcp_ipv4.c                                |  13 +-
 net/ipv4/tcp_output.c                              |   2 +-
 net/ipv4/udp.c                                     |  21 +-
 net/ipv6/reassembly.c                              |   2 +-
 net/ipv6/seg6.c                                    |   5 +-
 net/ipv6/seg6_hmac.c                               |  42 +-
 net/ipv6/seg6_iptunnel.c                           |  11 +-
 net/ipv6/udp.c                                     |  20 +-
 net/mac80211/mlme.c                                |   3 +-
 net/mac80211/rate.c                                |   6 +-
 net/mac80211/scan.c                                |   1 +
 net/mac80211/tx.c                                  |  13 +-
 net/mptcp/sockopt.c                                |   2 -
 net/netfilter/ipset/ip_set_list_set.c              |   3 +
 net/netfilter/nfnetlink_queue.c                    |   2 +
 net/netfilter/nft_fib.c                            |   8 +-
 net/netfilter/nft_payload.c                        |  95 +++-
 net/netrom/nr_route.c                              |  19 +-
 net/nfc/nci/core.c                                 |  18 +-
 net/openvswitch/actions.c                          |   6 +
 net/openvswitch/flow.c                             |   3 +-
 net/packet/af_packet.c                             |   3 +-
 net/qrtr/ns.c                                      |  27 ++
 net/sched/sch_taprio.c                             |  14 +-
 net/sunrpc/auth_gss/svcauth_gss.c                  |  10 +-
 net/sunrpc/clnt.c                                  |   1 +
 net/sunrpc/svc.c                                   |   2 -
 net/sunrpc/xprtrdma/verbs.c                        |   6 +-
 net/tls/tls_main.c                                 |  10 +-
 net/unix/af_unix.c                                 |  49 ++-
 net/wireless/nl80211.c                             |  14 +-
 net/wireless/trace.h                               |   4 +-
 scripts/Makefile.vdsoinst                          |  45 ++
 scripts/kconfig/symbol.c                           |   6 +-
 scripts/module.lds.S                               |   1 +
 sound/core/init.c                                  |  20 +-
 sound/core/jack.c                                  |  46 +-
 sound/core/seq/seq_ump_convert.c                   |  46 +-
 sound/core/timer.c                                 |  10 +
 sound/hda/intel-dsp-config.c                       |  27 +-
 sound/pci/emu10k1/io.c                             |   1 +
 sound/pci/hda/cs35l56_hda.c                        |  26 +-
 sound/pci/hda/hda_cs_dsp_ctl.c                     |  47 +-
 sound/pci/hda/patch_realtek.c                      |   5 +-
 sound/soc/amd/yc/acp6x-mach.c                      |   7 +
 sound/soc/codecs/cs35l41.c                         |  28 +-
 sound/soc/codecs/cs35l56-shared.c                  |  41 ++
 sound/soc/codecs/cs35l56.c                         |  21 +
 sound/soc/codecs/cs42l43.c                         |   5 +-
 sound/soc/codecs/da7219-aad.c                      |   6 +-
 sound/soc/codecs/rt5645.c                          |  25 ++
 sound/soc/codecs/rt715-sdca.c                      |   8 +-
 sound/soc/codecs/rt715-sdw.c                       |   1 +
 sound/soc/codecs/rt722-sdca.c                      |  27 +-
 sound/soc/codecs/rt722-sdca.h                      |   3 +
 sound/soc/codecs/tas2552.c                         |  15 +-
 sound/soc/codecs/tas2781-fmwlib.c                  | 109 ++---
 sound/soc/codecs/tas2781-i2c.c                     |   4 +-
 sound/soc/intel/avs/boards/ssm4567.c               |   1 -
 sound/soc/intel/avs/cldma.c                        |   2 +-
 sound/soc/intel/avs/path.c                         |   1 +
 sound/soc/intel/avs/probes.c                       |  14 +-
 sound/soc/intel/boards/bxt_da7219_max98357a.c      |   1 +
 sound/soc/intel/boards/bxt_rt298.c                 |   1 +
 sound/soc/intel/boards/bytcr_rt5640.c              |  24 +-
 sound/soc/intel/boards/glk_rt5682_max98357a.c      |   2 +
 sound/soc/intel/boards/kbl_da7219_max98357a.c      |   1 +
 sound/soc/intel/boards/kbl_da7219_max98927.c       |   4 +
 sound/soc/intel/boards/kbl_rt5660.c                |   1 +
 sound/soc/intel/boards/kbl_rt5663_max98927.c       |   2 +
 .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c  |   1 +
 sound/soc/intel/boards/skl_hda_dsp_generic.c       |   2 +
 sound/soc/intel/boards/skl_nau88l25_max98357a.c    |   1 +
 sound/soc/intel/boards/skl_rt286.c                 |   1 +
 sound/soc/intel/common/Makefile                    |   1 +
 sound/soc/intel/common/soc-acpi-intel-arl-match.c  |  51 +++
 sound/soc/kirkwood/kirkwood-dma.c                  |   3 +
 sound/soc/mediatek/common/mtk-soundcard-driver.c   |   6 +-
 sound/soc/mediatek/mt8192/mt8192-dai-tdm.c         |   4 +-
 sound/soc/sof/intel/hda.h                          |   1 +
 sound/soc/sof/intel/lnl.c                          |   3 +-
 sound/soc/sof/intel/lnl.h                          |  15 +
 sound/soc/sof/intel/mtl.c                          |  87 +++-
 sound/soc/sof/intel/mtl.h                          |   4 +-
 sound/soc/sof/intel/pci-mtl.c                      |  31 ++
 sound/soc/sof/ipc3-pcm.c                           |   1 +
 sound/soc/sof/pcm.c                                |  13 +-
 sound/soc/sof/sof-audio.h                          |   2 +
 tools/arch/x86/intel_sdsi/intel_sdsi.c             |  48 ++-
 tools/arch/x86/lib/x86-opcode-map.txt              |  10 +-
 tools/bpf/bpftool/common.c                         |  96 ++++-
 tools/bpf/bpftool/iter.c                           |   2 +-
 tools/bpf/bpftool/main.h                           |   3 +-
 tools/bpf/bpftool/prog.c                           |   5 +-
 tools/bpf/bpftool/skeleton/pid_iter.bpf.c          |   4 +-
 tools/bpf/bpftool/struct_ops.c                     |   2 +-
 tools/bpf/resolve_btfids/main.c                    |   2 +-
 tools/include/nolibc/stdlib.h                      |   2 +-
 tools/include/uapi/linux/bpf.h                     |   2 +-
 tools/lib/bpf/libbpf.c                             |   2 +-
 tools/lib/subcmd/parse-options.c                   |   8 +-
 tools/perf/Documentation/perf-list.txt             |   1 +
 tools/perf/arch/arm64/util/pmu.c                   |   6 +-
 tools/perf/bench/inject-buildid.c                  |   2 +-
 tools/perf/bench/uprobe.c                          |   2 +-
 tools/perf/builtin-annotate.c                      |  46 +-
 tools/perf/builtin-daemon.c                        |   4 +-
 tools/perf/builtin-inject.c                        |   6 +
 tools/perf/builtin-record.c                        |  74 ++--
 tools/perf/builtin-report.c                        |  42 +-
 tools/perf/builtin-top.c                           |  44 +-
 .../pmu-events/arch/s390/cf_z16/transaction.json   |  28 +-
 tools/perf/tests/attr/system-wide-dummy            |  14 +-
 tools/perf/tests/attr/test-record-C0               |   4 +-
 tools/perf/tests/code-reading.c                    |  10 +-
 tools/perf/tests/expr.c                            |  31 +-
 tools/perf/tests/shell/test_arm_coresight.sh       |   2 +-
 tools/perf/tests/workloads/datasym.c               |  16 +
 tools/perf/ui/browser.c                            |   6 +-
 tools/perf/ui/browser.h                            |   2 +-
 tools/perf/ui/browsers/annotate.c                  |   8 +-
 tools/perf/ui/gtk/annotate.c                       |   6 +-
 tools/perf/ui/gtk/gtk.h                            |   2 -
 tools/perf/util/annotate.c                         | 190 ++++----
 tools/perf/util/annotate.h                         |  32 +-
 tools/perf/util/event.c                            |   4 +-
 tools/perf/util/evlist.c                           |  18 +
 tools/perf/util/evlist.h                           |   1 +
 tools/perf/util/expr.c                             |   2 +-
 .../perf/util/intel-pt-decoder/intel-pt-decoder.c  |   2 +
 tools/perf/util/intel-pt.c                         |   2 +
 tools/perf/util/machine.c                          |  10 +-
 tools/perf/util/maps.c                             | 238 ++++++++++
 tools/perf/util/maps.h                             |  12 +
 tools/perf/util/perf_event_attr_fprintf.c          |  26 +-
 tools/perf/util/pmu.c                              | 147 +++++--
 tools/perf/util/pmu.h                              |  10 +-
 tools/perf/util/pmus.c                             |  20 +-
 tools/perf/util/probe-event.c                      |   1 +
 tools/perf/util/python.c                           |  10 +
 tools/perf/util/session.c                          |   5 +
 tools/perf/util/stat-display.c                     |   3 +
 tools/perf/util/symbol.c                           | 259 +----------
 tools/perf/util/symbol.h                           |   1 -
 tools/perf/util/symbol_conf.h                      |   4 +-
 tools/perf/util/thread.c                           |  14 +-
 tools/perf/util/thread.h                           |  14 +
 tools/perf/util/top.h                              |   1 -
 tools/testing/selftests/bpf/network_helpers.c      |   2 +
 .../selftests/bpf/prog_tests/xdp_do_redirect.c     |   4 +-
 .../bpf/progs/bench_local_storage_create.c         |   5 +-
 tools/testing/selftests/bpf/progs/local_storage.c  |  20 +-
 tools/testing/selftests/bpf/progs/lsm_cgroup.c     |   8 +-
 tools/testing/selftests/bpf/test_sockmap.c         |   2 +-
 tools/testing/selftests/cgroup/cgroup_util.c       |   8 +-
 tools/testing/selftests/cgroup/cgroup_util.h       |   2 +-
 tools/testing/selftests/cgroup/test_core.c         |   7 +-
 tools/testing/selftests/cgroup/test_cpu.c          |   2 +-
 tools/testing/selftests/cgroup/test_cpuset.c       |   2 +-
 tools/testing/selftests/cgroup/test_freezer.c      |   2 +-
 tools/testing/selftests/cgroup/test_kill.c         |   2 +-
 tools/testing/selftests/cgroup/test_kmem.c         |   2 +-
 tools/testing/selftests/cgroup/test_memcontrol.c   |   2 +-
 tools/testing/selftests/cgroup/test_zswap.c        |   2 +-
 .../selftests/filesystems/binderfs/Makefile        |   2 -
 .../ftrace/test.d/dynevent/add_remove_btfarg.tc    |   2 +-
 tools/testing/selftests/kcmp/kcmp_test.c           |   2 +-
 tools/testing/selftests/kvm/aarch64/vgic_init.c    |  50 +++
 tools/testing/selftests/lib.mk                     |  12 +-
 tools/testing/selftests/net/amt.sh                 |  20 +-
 tools/testing/selftests/net/config                 |   7 +-
 .../selftests/net/forwarding/bridge_igmp.sh        |   6 +-
 .../testing/selftests/net/forwarding/bridge_mld.sh |   6 +-
 tools/testing/selftests/net/mptcp/mptcp_join.sh    |   8 +-
 tools/testing/selftests/net/mptcp/simult_flows.sh  |  10 +-
 tools/testing/selftests/powerpc/dexcr/Makefile     |   2 +-
 tools/testing/selftests/resctrl/Makefile           |   4 +-
 .../selftests/syscall_user_dispatch/sud_test.c     |  14 +
 .../tc-testing/tc-tests/qdiscs/taprio.json         |  44 ++
 tools/tracing/latency/latency-collector.c          |   8 +-
 891 files changed, 9520 insertions(+), 6799 deletions(-)
author maintainer
#34 lore raw

PATCH 34/744 wifi: mac80211: dont use rate mask for scanning

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

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

From: Johannes Berg <[email protected]>

[ Upstream commit ab9177d83c040eba58387914077ebca56f14fae6 ]

The rate mask is intended for use during operation, and can be set to only have masks for the currently active band. As such, it cannot be used for scanning which can be on other bands as well.

Simply ignore the rate masks during scanning to avoid warnings from incorrect settings.

---
 include/net/mac80211.h |  3 +++
 net/mac80211/rate.c    |  6 +++++-
 net/mac80211/scan.c    |  1 +
 net/mac80211/tx.c      | 13 +++++++++----
 4 files changed, 18 insertions(+), 5 deletions(-)
include/net/mac80211.h +3 -0
index 7c707358d15c8..a39bd4169f292 100644
@@ -936,6 +936,8 @@ enum mac80211_tx_info_flags {
  *	of their QoS TID or other priority field values.
  * @IEEE80211_TX_CTRL_MCAST_MLO_FIRST_TX: first MLO TX, used mostly internally
  *	for sequence number assignment
+ * @IEEE80211_TX_CTRL_SCAN_TX: Indicates that this frame is transmitted
+ *	due to scanning, not in normal operation on the interface.
  * @IEEE80211_TX_CTRL_MLO_LINK: If not @IEEE80211_LINK_UNSPECIFIED, this
  *	frame should be transmitted on the specific link. This really is
  *	only relevant for frames that do not have data present, and is
@@ -956,6 +958,7 @@ enum mac80211_tx_control_flags {
 	IEEE80211_TX_CTRL_NO_SEQNO		= BIT(7),
 	IEEE80211_TX_CTRL_DONT_REORDER		= BIT(8),
 	IEEE80211_TX_CTRL_MCAST_MLO_FIRST_TX	= BIT(9),
+	IEEE80211_TX_CTRL_SCAN_TX		= BIT(10),
 	IEEE80211_TX_CTRL_MLO_LINK		= 0xf0000000,
 };
 
net/mac80211/rate.c +5 -1
index 9d33fd2377c88..a2bc9c5d92b8b 100644
@@ -877,6 +877,7 @@ void ieee80211_get_tx_rates(struct ieee80211_vif *vif,
 	struct ieee80211_sub_if_data *sdata;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_supported_band *sband;
+	u32 mask = ~0;
 
 	rate_control_fill_sta_table(sta, info, dest, max_rates);
 
@@ -889,9 +890,12 @@ void ieee80211_get_tx_rates(struct ieee80211_vif *vif,
 	if (ieee80211_is_tx_data(skb))
 		rate_control_apply_mask(sdata, sta, sband, dest, max_rates);
 
+	if (!(info->control.flags & IEEE80211_TX_CTRL_SCAN_TX))
+		mask = sdata->rc_rateidx_mask[info->band];
+
 	if (dest[0].idx < 0)
 		__rate_control_send_low(&sdata->local->hw, sband, sta, info,
-					sdata->rc_rateidx_mask[info->band]);
+					mask);
 
 	if (sta)
 		rate_fixup_ratelist(vif, sband, info, dest, max_rates);
net/mac80211/scan.c +1 -0
index a52813f2b08cb..b68214f159838 100644
@@ -636,6 +636,7 @@ static void ieee80211_send_scan_probe_req(struct ieee80211_sub_if_data *sdata,
 				cpu_to_le16(IEEE80211_SN_TO_SEQ(sn));
 		}
 		IEEE80211_SKB_CB(skb)->flags |= tx_flags;
+		IEEE80211_SKB_CB(skb)->control.flags |= IEEE80211_TX_CTRL_SCAN_TX;
 		ieee80211_tx_skb_tid_band(sdata, skb, 7, channel->band);
 	}
 }
net/mac80211/tx.c +9 -4
index 5c6c5254d987f..46b02a6ae0a36 100644
@@ -705,11 +705,16 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
 	txrc.bss_conf = &tx->sdata->vif.bss_conf;
 	txrc.skb = tx->skb;
 	txrc.reported_rate.idx = -1;
-	txrc.rate_idx_mask = tx->sdata->rc_rateidx_mask[info->band];
 
-	if (tx->sdata->rc_has_mcs_mask[info->band])
-		txrc.rate_idx_mcs_mask =
-			tx->sdata->rc_rateidx_mcs_mask[info->band];
+	if (unlikely(info->control.flags & IEEE80211_TX_CTRL_SCAN_TX)) {
+		txrc.rate_idx_mask = ~0;
+	} else {
+		txrc.rate_idx_mask = tx->sdata->rc_rateidx_mask[info->band];
+
+		if (tx->sdata->rc_has_mcs_mask[info->band])
+			txrc.rate_idx_mcs_mask =
+				tx->sdata->rc_rateidx_mcs_mask[info->band];
+	}
 
 	txrc.bss = (tx->sdata->vif.type == NL80211_IFTYPE_AP ||
 		    tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
Signature · 1 line
2.43.0
author maintainer
#43 lore raw

PATCH 43/744 drm/amdkfd: Add VRAM accounting for SVM migration

In reply to Greg Kroah-Hartman

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

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

From: Mukul Joshi <[email protected]>

[ Upstream commit 1e214f7faaf5d842754cd5cfcd76308bfedab3b5 ]

Do VRAM accounting when doing migrations to vram to make sure there is enough available VRAM and migrating to VRAM doesn't evict other possible non-unified memory BOs. If migrating to VRAM fails, driver can fall back to using system memory seamlessly.

---
 drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 16 +++++++++++++++-
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c     |  2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +15 -1
index 659313648b200..3263b5fa182d2 100644
@@ -516,10 +516,19 @@ svm_migrate_ram_to_vram(struct svm_range *prange, uint32_t best_loc,
 	start = prange->start << PAGE_SHIFT;
 	end = (prange->last + 1) << PAGE_SHIFT;
 
+	r = amdgpu_amdkfd_reserve_mem_limit(node->adev,
+					prange->npages * PAGE_SIZE,
+					KFD_IOC_ALLOC_MEM_FLAGS_VRAM,
+					node->xcp ? node->xcp->id : 0);
+	if (r) {
+		dev_dbg(node->adev->dev, "failed to reserve VRAM, r: %ld\n", r);
+		return -ENOSPC;
+	}
+
 	r = svm_range_vram_node_new(node, prange, true);
 	if (r) {
 		dev_dbg(node->adev->dev, "fail %ld to alloc vram\n", r);
-		return r;
+		goto out;
 	}
 	ttm_res_offset = prange->offset << PAGE_SHIFT;
 
@@ -549,6 +558,11 @@ svm_migrate_ram_to_vram(struct svm_range *prange, uint32_t best_loc,
 		svm_range_vram_node_free(prange);
 	}
 
+out:
+	amdgpu_amdkfd_unreserve_mem_limit(node->adev,
+					prange->npages * PAGE_SIZE,
+					KFD_IOC_ALLOC_MEM_FLAGS_VRAM,
+					node->xcp ? node->xcp->id : 0);
 	return r < 0 ? r : 0;
 }
 
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +1 -1
index 87e9ca65e58e0..ce76d45549984 100644
@@ -3416,7 +3416,7 @@ svm_range_trigger_migration(struct mm_struct *mm, struct svm_range *prange,
 	r = svm_migrate_to_vram(prange, best_loc, mm, KFD_MIGRATE_TRIGGER_PREFETCH);
 	*migrated = !r;
 
-	return r;
+	return 0;
 }
 
 int svm_range_schedule_evict_svm_bo(struct amdgpu_amdkfd_fence *fence)
Signature · 1 line
2.43.0
author maintainer
#44 lore raw

PATCH 44/744 drm/amdgpu: Fix the ring buffer size for queue VM flush

In reply to Greg Kroah-Hartman

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

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

From: Prike Liang <[email protected]>

[ Upstream commit fe93b0927bc58cb1d64230f45744e527d9d8482c ]

Here are the corrections needed for the queue ring buffer size calculation for the following cases:
- Remove the KIQ VM flush ring usage.
- Add the invalidate TLBs packet for gfx10 and gfx11 queue.
- There's no VM flush and PFP sync, so remove the gfx9 real ring and compute ring buffer usage.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 +--
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +--
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c  | 2 --
 3 files changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -2
index 495eb4cad0e1a..3560a3f2c848e 100644
@@ -9157,7 +9157,7 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_gfx = {
 		7 + /* PIPELINE_SYNC */
 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
-		2 + /* VM_FLUSH */
+		4 + /* VM_FLUSH */
 		8 + /* FENCE for VM_FLUSH */
 		20 + /* GDS switch */
 		4 + /* double SWITCH_BUFFER,
@@ -9248,7 +9248,6 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_kiq = {
 		7 + /* gfx_v10_0_ring_emit_pipeline_sync */
 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
-		2 + /* gfx_v10_0_ring_emit_vm_flush */
 		8 + 8 + 8, /* gfx_v10_0_ring_emit_fence_kiq x3 for user fence, vm fence */
 	.emit_ib_size =	7, /* gfx_v10_0_ring_emit_ib_compute */
 	.emit_ib = gfx_v10_0_ring_emit_ib_compute,
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 -2
index c9058d58c95a7..daab4c7a073ac 100644
@@ -6102,7 +6102,7 @@ static const struct amdgpu_ring_funcs gfx_v11_0_ring_funcs_gfx = {
 		7 + /* PIPELINE_SYNC */
 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
-		2 + /* VM_FLUSH */
+		4 + /* VM_FLUSH */
 		8 + /* FENCE for VM_FLUSH */
 		20 + /* GDS switch */
 		5 + /* COND_EXEC */
@@ -6187,7 +6187,6 @@ static const struct amdgpu_ring_funcs gfx_v11_0_ring_funcs_kiq = {
 		7 + /* gfx_v11_0_ring_emit_pipeline_sync */
 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
-		2 + /* gfx_v11_0_ring_emit_vm_flush */
 		8 + 8 + 8, /* gfx_v11_0_ring_emit_fence_kiq x3 for user fence, vm fence */
 	.emit_ib_size =	7, /* gfx_v11_0_ring_emit_ib_compute */
 	.emit_ib = gfx_v11_0_ring_emit_ib_compute,
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -2
index d7d15b618c374..8168836a08d2e 100644
@@ -6988,7 +6988,6 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
 		7 + /* gfx_v9_0_ring_emit_pipeline_sync */
 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
-		2 + /* gfx_v9_0_ring_emit_vm_flush */
 		8 + 8 + 8 + /* gfx_v9_0_ring_emit_fence x3 for user fence, vm fence */
 		7 + /* gfx_v9_0_emit_mem_sync */
 		5 + /* gfx_v9_0_emit_wave_limit for updating mmSPI_WCL_PIPE_PERCENT_GFX register */
@@ -7026,7 +7025,6 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {
 		7 + /* gfx_v9_0_ring_emit_pipeline_sync */
 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
-		2 + /* gfx_v9_0_ring_emit_vm_flush */
 		8 + 8 + 8, /* gfx_v9_0_ring_emit_fence_kiq x3 for user fence, vm fence */
 	.emit_ib_size =	7, /* gfx_v9_0_ring_emit_ib_compute */
 	.emit_fence = gfx_v9_0_ring_emit_fence_kiq,
Signature · 1 line
2.43.0
author maintainer
#45 lore raw

PATCH 45/744 drm/amdgpu/mes: fix use-after-free issue

In reply to Greg Kroah-Hartman

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

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

From: Jack Xiao <[email protected]>

[ Upstream commit 948255282074d9367e01908b3f5dcf8c10fc9c3d ]

Delete fence fallback timer to fix the ramdom use-after-free issue.

v2: move to amdgpu_mes.c

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -0
index 15c67fa404ff9..c5c55e132af21 100644
@@ -1098,6 +1098,7 @@ void amdgpu_mes_remove_ring(struct amdgpu_device *adev,
 		return;
 
 	amdgpu_mes_remove_hw_queue(adev, ring->hw_queue_id);
+	del_timer_sync(&ring->fence_drv.fallback_timer);
 	amdgpu_ring_fini(ring);
 	kfree(ring);
 }
Signature · 1 line
2.43.0
author maintainer
#46 lore raw

PATCH 46/744 Revert "net: txgbe: fix i2c dev name cannot match clkdev"

In reply to Greg Kroah-Hartman

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

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

From: Duanqiang Wen <[email protected]>

[ Upstream commit 8d6bf83f6740ba52a59e25dad360e1e87ef47666 ]

This reverts commit c644920ce9220d83e070f575a4df711741c07f07. when register i2c dev, txgbe shorten "i2c_designware" to "i2c_dw", will cause this i2c dev can't match platfom driver i2c_designware_platform.

---
 drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c +3 -5
index ad5c213dac077..e457ac9ae6d88 100644
@@ -20,8 +20,6 @@
 #include "txgbe_phy.h"
 #include "txgbe_hw.h"
 
-#define TXGBE_I2C_CLK_DEV_NAME "i2c_dw"
-
 static int txgbe_swnodes_register(struct txgbe *txgbe)
 {
 	struct txgbe_nodes *nodes = &txgbe->nodes;
@@ -553,8 +551,8 @@ static int txgbe_clock_register(struct txgbe *txgbe)
 	char clk_name[32];
 	struct clk *clk;
 
-	snprintf(clk_name, sizeof(clk_name), "%s.%d",
-		 TXGBE_I2C_CLK_DEV_NAME, pci_dev_id(pdev));
+	snprintf(clk_name, sizeof(clk_name), "i2c_dw.%d",
+		 pci_dev_id(pdev));
 
 	clk = clk_register_fixed_rate(NULL, clk_name, NULL, 0, 156250000);
 	if (IS_ERR(clk))
@@ -616,7 +614,7 @@ static int txgbe_i2c_register(struct txgbe *txgbe)
 
 	info.parent = &pdev->dev;
 	info.fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_I2C]);
-	info.name = TXGBE_I2C_CLK_DEV_NAME;
+	info.name = "i2c_designware";
 	info.id = pci_dev_id(pdev);
 
 	info.res = &DEFINE_RES_IRQ(pdev->irq);
Signature · 1 line
2.43.0
author maintainer
#47 lore raw

PATCH 47/744 Revert "net: txgbe: fix clk_name exceed MAX_DEV_ID limits"

In reply to Greg Kroah-Hartman

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

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

From: Duanqiang Wen <[email protected]>

[ Upstream commit edd2d250fb3bb5d70419ae82c1f9dbb9684dffd3 ]

This reverts commit e30cef001da259e8df354b813015d0e5acc08740. commit 99f4570cfba1 ("clkdev: Update clkdev id usage to allow for longer names") can fix clk_name exceed MAX_DEV_ID limits, so this commit is meaningless.

---
 drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c +1 -1
index e457ac9ae6d88..4159c84035fdc 100644
@@ -551,7 +551,7 @@ static int txgbe_clock_register(struct txgbe *txgbe)
 	char clk_name[32];
 	struct clk *clk;
 
-	snprintf(clk_name, sizeof(clk_name), "i2c_dw.%d",
+	snprintf(clk_name, sizeof(clk_name), "i2c_designware.%d",
 		 pci_dev_id(pdev));
 
 	clk = clk_register_fixed_rate(NULL, clk_name, NULL, 0, 156250000);
Signature · 1 line
2.43.0
author maintainer
#48 lore raw

PATCH 48/744 cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n

In reply to Greg Kroah-Hartman

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

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

From: Sean Christopherson <[email protected]>

[ Upstream commit ce0abef6a1d540acef85068e0e82bdf1fbeeb0e9 ]

Explicitly disallow enabling mitigations at runtime for kernels that were built with CONFIG_CPU_MITIGATIONS=n, as some architectures may omit code entirely if mitigations are disabled at compile time.

E.g. on x86, a large pile of Kconfigs are buried behind CPU_MITIGATIONS, and trying to provide sane behavior for retroactively enabling mitigations is extremely difficult, bordering on impossible. E.g. page table isolation and call depth tracking require build-time support, BHI mitigations will still be off without additional kernel parameters, etc.

[ bp: Touchups. ]

---
 Documentation/admin-guide/kernel-parameters.txt |  3 +++
 arch/x86/Kconfig                                |  8 ++++++--
 include/linux/cpu.h                             | 11 +++++++++++
 kernel/cpu.c                                    | 14 ++++++++++----
 4 files changed, 30 insertions(+), 6 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +3 -0
index 66dfc348043d6..8d2f9ed3f1076 100644
@@ -3323,6 +3323,9 @@
 			arch-independent options, each of which is an
 			aggregation of existing arch-specific options.
 
+			Note, "mitigations" is supported if and only if the
+			kernel was built with CPU_MITIGATIONS=y.
+
 			off
 				Disable all optional CPU mitigations.  This
 				improves system performance, but it may also
arch/x86/Kconfig +6 -2
index be9248e5cb71b..82d12c93feabe 100644
@@ -2428,9 +2428,13 @@ menuconfig CPU_MITIGATIONS
 	help
 	  Say Y here to enable options which enable mitigations for hardware
 	  vulnerabilities (usually related to speculative execution).
+	  Mitigations can be disabled or restricted to SMT systems at runtime
+	  via the "mitigations" kernel parameter.
 
-	  If you say N, all mitigations will be disabled. You really
-	  should know what you are doing to say so.
+	  If you say N, all mitigations will be disabled.  This CANNOT be
+	  overridden at runtime.
+
+	  Say 'Y', unless you really know what you are doing.
 
 if CPU_MITIGATIONS
 
include/linux/cpu.h +11 -0
index e990c180282e7..a7d91a167a8b6 100644
@@ -214,7 +214,18 @@ void cpuhp_report_idle_dead(void);
 static inline void cpuhp_report_idle_dead(void) { }
 #endif /* #ifdef CONFIG_HOTPLUG_CPU */
 
+#ifdef CONFIG_CPU_MITIGATIONS
 extern bool cpu_mitigations_off(void);
 extern bool cpu_mitigations_auto_nosmt(void);
+#else
+static inline bool cpu_mitigations_off(void)
+{
+	return true;
+}
+static inline bool cpu_mitigations_auto_nosmt(void)
+{
+	return false;
+}
+#endif
 
 #endif /* _LINUX_CPU_H_ */
kernel/cpu.c +10 -4
index 2dd2fd300e916..4f453226fcf48 100644
@@ -3197,6 +3197,7 @@ void __init boot_cpu_hotplug_init(void)
 	this_cpu_write(cpuhp_state.target, CPUHP_ONLINE);
 }
 
+#ifdef CONFIG_CPU_MITIGATIONS
 /*
  * These are used for a global "mitigations=" cmdline option for toggling
  * optional CPU mitigations.
@@ -3207,9 +3208,7 @@ enum cpu_mitigations {
 	CPU_MITIGATIONS_AUTO_NOSMT,
 };
 
-static enum cpu_mitigations cpu_mitigations __ro_after_init =
-	IS_ENABLED(CONFIG_CPU_MITIGATIONS) ? CPU_MITIGATIONS_AUTO :
-					     CPU_MITIGATIONS_OFF;
+static enum cpu_mitigations cpu_mitigations __ro_after_init = CPU_MITIGATIONS_AUTO;
 
 static int __init mitigations_parse_cmdline(char *arg)
 {
@@ -3225,7 +3224,6 @@ static int __init mitigations_parse_cmdline(char *arg)
 
 	return 0;
 }
-early_param("mitigations", mitigations_parse_cmdline);
 
 /* mitigations=off */
 bool cpu_mitigations_off(void)
@@ -3240,3 +3238,11 @@ bool cpu_mitigations_auto_nosmt(void)
 	return cpu_mitigations == CPU_MITIGATIONS_AUTO_NOSMT;
 }
 EXPORT_SYMBOL_GPL(cpu_mitigations_auto_nosmt);
+#else
+static int __init mitigations_parse_cmdline(char *arg)
+{
+	pr_crit("Kernel compiled without mitigations, ignoring 'mitigations'; system may still be vulnerable\n");
+	return 0;
+}
+#endif
+early_param("mitigations", mitigations_parse_cmdline);
Signature · 1 line
2.43.0
author maintainer
#49 lore raw

PATCH 49/744 LoongArch: Lately init pmu after smp is online

In reply to Greg Kroah-Hartman

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

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

From: Bibo Mao <[email protected]>

[ Upstream commit f3334ebb8a2a1841c2824594dd992e66de19deb2 ]

There is an smp function call named reset_counters() to init PMU registers of every CPU in PMU initialization state. It requires that all CPUs are online. However there is an early_initcall() wrapper for the PMU init funciton init_hw_perf_events(), so that pmu init funciton is called in do_pre_smp_initcalls() which before function smp_init(). Function reset_counters() cannot work on other CPUs since they haven't boot up still.

Here replace the wrapper early_initcall() with pure_initcall(), so that the PMU init function is called after every cpu is online.

---
 arch/loongarch/kernel/perf_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/loongarch/kernel/perf_event.c +1 -1
index 0491bf453cd49..cac7cba81b65f 100644
@@ -884,4 +884,4 @@ static int __init init_hw_perf_events(void)
 
 	return 0;
 }
-early_initcall(init_hw_perf_events);
+pure_initcall(init_hw_perf_events);
Signature · 1 line
2.43.0
author maintainer
#50 lore raw

PATCH 50/744 drm/etnaviv: fix tx clock gating on some GC7000 variants

In reply to Greg Kroah-Hartman

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

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

From: Derek Foreman <[email protected]>

[ Upstream commit d7a5c9de99b3a9a43dce49f2084eb69b5f6a9752 ]

commit 4bce244272513 ("drm/etnaviv: disable tx clock gating for GC7000 rev6203") accidentally applied the fix for i.MX8MN errata ERR050226 to GC2000 instead of GC7000, failing to disable tx clock gating for GC7000 rev 0x6023 as intended.

Additional clean-up further propagated this issue, partially breaking the clock gating fixes added for GC7000 rev 6202 in commit 432f51e7deeda ("drm/etnaviv: add clock gating workaround for GC7000 r6202").

---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +2 -2
index 9276756e1397d..371e1f2733f6f 100644
@@ -632,8 +632,8 @@ static void etnaviv_gpu_enable_mlcg(struct etnaviv_gpu *gpu)
 	/* Disable TX clock gating on affected core revisions. */
 	if (etnaviv_is_model_rev(gpu, GC4000, 0x5222) ||
 	    etnaviv_is_model_rev(gpu, GC2000, 0x5108) ||
-	    etnaviv_is_model_rev(gpu, GC2000, 0x6202) ||
-	    etnaviv_is_model_rev(gpu, GC2000, 0x6203))
+	    etnaviv_is_model_rev(gpu, GC7000, 0x6202) ||
+	    etnaviv_is_model_rev(gpu, GC7000, 0x6203))
 		pmc |= VIVS_PM_MODULE_CONTROLS_DISABLE_MODULE_CLOCK_GATING_TX;
 
 	/* Disable SE and RA clock gating on affected core revisions. */
Signature · 1 line
2.43.0
author maintainer
#51 lore raw

PATCH 51/744 selftests: sud_test: return correct emulated syscall value on RISC-V

In reply to Greg Kroah-Hartman

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

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

From: Clément Léger <[email protected]>

[ Upstream commit 17c67ed752d6a456602b3dbb25c5ae4d3de5deab ]

Currently, the sud_test expects the emulated syscall to return the emulated syscall number. This assumption only works on architectures were the syscall calling convention use the same register for syscall number/syscall return value. This is not the case for RISC-V and thus the return value must be also emulated using the provided ucontext.

---
 .../selftests/syscall_user_dispatch/sud_test.c     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
tools/testing/selftests/syscall_user_dispatch/sud_test.c +14 -0
index b5d592d4099e8..d975a67673299 100644
@@ -158,6 +158,20 @@ static void handle_sigsys(int sig, siginfo_t *info, void *ucontext)
 
 	/* In preparation for sigreturn. */
 	SYSCALL_DISPATCH_OFF(glob_sel);
+
+	/*
+	 * The tests for argument handling assume that `syscall(x) == x`. This
+	 * is a NOP on x86 because the syscall number is passed in %rax, which
+	 * happens to also be the function ABI return register.  Other
+	 * architectures may need to swizzle the arguments around.
+	 */
+#if defined(__riscv)
+/* REG_A7 is not defined in libc headers */
+# define REG_A7 (REG_A0 + 7)
+
+	((ucontext_t *)ucontext)->uc_mcontext.__gregs[REG_A0] =
+			((ucontext_t *)ucontext)->uc_mcontext.__gregs[REG_A7];
+#endif
 }
 
 TEST(dispatch_and_return)
Signature · 1 line
2.43.0
author maintainer
#52 lore raw

PATCH 52/744 sched/isolation: Fix boot crash when maxcpus < first housekeeping CPU

In reply to Greg Kroah-Hartman

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

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

From: Oleg Nesterov <[email protected]>

[ Upstream commit 257bf89d84121280904800acd25cc2c444c717ae ]

housekeeping_setup() checks cpumask_intersects(present, online) to ensure that the kernel will have at least one housekeeping CPU after smp_init(), but this doesn't work if the maxcpus= kernel parameter limits the number of processors available after bootup.

For example, a kernel with "maxcpus=2 nohz_full=0-2" parameters crashes at boot time on a virtual machine with 4 CPUs.

Change housekeeping_setup() to use cpumask_first_and() and check that the returned CPU number is valid and less than setup_max_cpus.

Another corner case is "nohz_full=0" on a machine with a single CPU or with the maxcpus=1 kernel argument. In this case non_housekeeping_mask is empty and tick_nohz_full_setup() makes no sense. And indeed, the kernel hits the WARN_ON(tick_nohz_full_running) in tick_sched_do_timer().

And how should the kernel interpret the "nohz_full=" parameter? It should be silently ignored, but currently cpulist_parse() happily returns the empty cpumask and this leads to the same problem.

Change housekeeping_setup() to check cpumask_empty(non_housekeeping_mask) and do nothing in this case.

---
 kernel/sched/isolation.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
kernel/sched/isolation.c +6 -1
index 373d42c707bc5..82e2f7fc7c267 100644
@@ -109,6 +109,7 @@ static void __init housekeeping_setup_type(enum hk_type type,
 static int __init housekeeping_setup(char *str, unsigned long flags)
 {
 	cpumask_var_t non_housekeeping_mask, housekeeping_staging;
+	unsigned int first_cpu;
 	int err = 0;
 
 	if ((flags & HK_FLAG_TICK) && !(housekeeping.flags & HK_FLAG_TICK)) {
@@ -129,7 +130,8 @@ static int __init housekeeping_setup(char *str, unsigned long flags)
 	cpumask_andnot(housekeeping_staging,
 		       cpu_possible_mask, non_housekeeping_mask);
 
-	if (!cpumask_intersects(cpu_present_mask, housekeeping_staging)) {
+	first_cpu = cpumask_first_and(cpu_present_mask, housekeeping_staging);
+	if (first_cpu >= nr_cpu_ids || first_cpu >= setup_max_cpus) {
 		__cpumask_set_cpu(smp_processor_id(), housekeeping_staging);
 		__cpumask_clear_cpu(smp_processor_id(), non_housekeeping_mask);
 		if (!housekeeping.flags) {
@@ -138,6 +140,9 @@ static int __init housekeeping_setup(char *str, unsigned long flags)
 		}
 	}
 
+	if (cpumask_empty(non_housekeeping_mask))
+		goto free_housekeeping_staging;
+
 	if (!housekeeping.flags) {
 		/* First setup call ("nohz_full=" or "isolcpus=") */
 		enum hk_type type;
Signature · 1 line
2.43.0
author maintainer
#35 lore raw

PATCH 35/744 wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field

In reply to Greg Kroah-Hartman

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

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

From: Richard Kinder <[email protected]>

[ Upstream commit d12b9779cc9ba29d65fbfc728eb8a037871dd331 ]

Logic inside ieee80211_rx_mgmt_beacon accesses the mgmt->u.beacon.timestamp field without first checking whether the beacon received is non-S1G format.

Fix the problem by checking the beacon is non-S1G format to avoid access of the mgmt->u.beacon.timestamp field.

---
 net/mac80211/mlme.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/mac80211/mlme.c +2 -1
index cf01f1f298a3b..42e2c84ed2484 100644
@@ -5979,7 +5979,8 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link,
 			link->u.mgd.dtim_period = elems->dtim_period;
 		link->u.mgd.have_beacon = true;
 		ifmgd->assoc_data->need_beacon = false;
-		if (ieee80211_hw_check(&local->hw, TIMING_BEACON_ONLY)) {
+		if (ieee80211_hw_check(&local->hw, TIMING_BEACON_ONLY) &&
+		    !ieee80211_is_s1g_beacon(hdr->frame_control)) {
 			link->conf->sync_tsf =
 				le64_to_cpu(mgmt->u.beacon.timestamp);
 			link->conf->sync_device_ts =
Signature · 1 line
2.43.0
author maintainer
#53 lore raw

PATCH 53/744 ASoC: Intel: bytcr_rt5640: Apply Asus T100TA quirk to Asus T100TAM too

In reply to Greg Kroah-Hartman

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

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

From: Hans de Goede <[email protected]>

[ Upstream commit e50729d742ec364895f1c389c32315984a987aa5 ]

The Asus T100TA quirk has been using an exact match on a product-name of "T100TA" but there are also T100TAM variants with a slightly higher clocked CPU and a metal backside which need the same quirk.

Sort the existing T100TA (stereo speakers) below the more specific T100TAF (mono speaker) quirk and switch from exact matching to substring matching so that the T100TA quirk will also match on the T100TAM models.

---
 sound/soc/intel/boards/bytcr_rt5640.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
sound/soc/intel/boards/bytcr_rt5640.c +8 -6
index e609249cc38d5..651408c6f399d 100644
@@ -636,28 +636,30 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 					BYT_RT5640_USE_AMCR0F28),
 	},
 	{
+		/* Asus T100TAF, unlike other T100TA* models this one has a mono speaker */
 		.matches = {
 			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
-			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TA"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TAF"),
 		},
 		.driver_data = (void *)(BYT_RT5640_IN1_MAP |
 					BYT_RT5640_JD_SRC_JD2_IN4N |
 					BYT_RT5640_OVCD_TH_2000UA |
 					BYT_RT5640_OVCD_SF_0P75 |
+					BYT_RT5640_MONO_SPEAKER |
+					BYT_RT5640_DIFF_MIC |
+					BYT_RT5640_SSP0_AIF2 |
 					BYT_RT5640_MCLK_EN),
 	},
 	{
+		/* Asus T100TA and T100TAM, must come after T100TAF (mono spk) match */
 		.matches = {
-			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
-			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TAF"),
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "T100TA"),
 		},
 		.driver_data = (void *)(BYT_RT5640_IN1_MAP |
 					BYT_RT5640_JD_SRC_JD2_IN4N |
 					BYT_RT5640_OVCD_TH_2000UA |
 					BYT_RT5640_OVCD_SF_0P75 |
-					BYT_RT5640_MONO_SPEAKER |
-					BYT_RT5640_DIFF_MIC |
-					BYT_RT5640_SSP0_AIF2 |
 					BYT_RT5640_MCLK_EN),
 	},
 	{
Signature · 1 line
2.43.0
author maintainer
#54 lore raw

PATCH 54/744 regulator: irq_helpers: duplicate IRQ name

In reply to Greg Kroah-Hartman

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

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

From: Matti Vaittinen <[email protected]>

[ Upstream commit 7ab681ddedd4b6dd2b047c74af95221c5f827e1d ]

The regulator IRQ helper requires caller to provide pointer to IRQ name which is kept in memory by caller. All other data passed to the helper in the regulator_irq_desc structure is copied. This can cause some confusion and unnecessary complexity.

Make the regulator_irq_helper() to copy also the provided IRQ name information so caller can discard the name after the call to regulator_irq_helper() completes.

---
 drivers/regulator/irq_helpers.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/regulator/irq_helpers.c +3 -0
index fe7ae0f3f46af..5ab1a0befe12f 100644
@@ -352,6 +352,9 @@ void *regulator_irq_helper(struct device *dev,
 
 	h->irq = irq;
 	h->desc = *d;
+	h->desc.name = devm_kstrdup(dev, d->name, GFP_KERNEL);
+	if (!h->desc.name)
+		return ERR_PTR(-ENOMEM);
 
 	ret = init_rdev_state(dev, h, rdev, common_errs, per_rdev_errs,
 			      rdev_amount);
Signature · 1 line
2.43.0
author maintainer
#55 lore raw

PATCH 55/744 ALSA: hda: cs35l56: Exit cache-only after cs35l56_wait_for_firmware_boot()

In reply to Greg Kroah-Hartman

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

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

From: Richard Fitzgerald <[email protected]>

[ Upstream commit 73580ec607dfe125b140ed30c7c0a074db78c558 ]

Adds calls to disable regmap cache-only after a successful return from cs35l56_wait_for_firmware_boot().

This is to prepare for a change in the shared ASoC module that will leave regmap in cache-only mode after cs35l56_system_reset(). This is to prevent register accesses going to the hardware while it is rebooting.

---
 sound/pci/hda/cs35l56_hda.c | 4 ++++
 1 file changed, 4 insertions(+)
sound/pci/hda/cs35l56_hda.c +4 -0
index 27848d6469636..05b1412868fc0 100644
@@ -603,6 +603,8 @@ static int cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
 		ret = cs35l56_wait_for_firmware_boot(&cs35l56->base);
 		if (ret)
 			goto err_powered_up;
+
+		regcache_cache_only(cs35l56->base.regmap, false);
 	}
 
 	/* Disable auto-hibernate so that runtime_pm has control */
@@ -942,6 +944,8 @@ int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int id)
 	if (ret)
 		goto err;
 
+	regcache_cache_only(cs35l56->base.regmap, false);
+
 	ret = cs35l56_set_patch(&cs35l56->base);
 	if (ret)
 		goto err;
Signature · 1 line
2.43.0
author maintainer
#56 lore raw

PATCH 56/744 ASoC: SOF: pcm: Restrict DSP D0i3 during S0ix to IPC3

In reply to Greg Kroah-Hartman

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

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

From: Ranjani Sridharan <[email protected]>

[ Upstream commit 90a2353080eedec855d63f6aadfda14104ee9b06 ]

Introduce a new field in struct sof_ipc_pcm_ops that can be used to restrict DSP D0i3 during S0ix suspend to IPC3. With IPC4, all streams must be stopped before S0ix suspend.

---
 sound/soc/sof/ipc3-pcm.c  |  1 +
 sound/soc/sof/pcm.c       | 13 ++++++-------
 sound/soc/sof/sof-audio.h |  2 ++
 3 files changed, 9 insertions(+), 7 deletions(-)
sound/soc/sof/ipc3-pcm.c +1 -0
index cb58ee8c158a5..720bd9bd2667a 100644
@@ -398,4 +398,5 @@ const struct sof_ipc_pcm_ops ipc3_pcm_ops = {
 	.trigger = sof_ipc3_pcm_trigger,
 	.dai_link_fixup = sof_ipc3_pcm_dai_link_fixup,
 	.reset_hw_params_during_stop = true,
+	.d0i3_supported_in_s0ix = true,
 };
sound/soc/sof/pcm.c +6 -7
index d778717cab10b..8e602e42afee2 100644
@@ -325,14 +325,13 @@ static int sof_pcm_trigger(struct snd_soc_component *component,
 			ipc_first = true;
 		break;
 	case SNDRV_PCM_TRIGGER_SUSPEND:
-		if (sdev->system_suspend_target == SOF_SUSPEND_S0IX &&
+		/*
+		 * If DSP D0I3 is allowed during S0iX, set the suspend_ignored flag for
+		 * D0I3-compatible streams to keep the firmware pipeline running
+		 */
+		if (pcm_ops && pcm_ops->d0i3_supported_in_s0ix &&
+		    sdev->system_suspend_target == SOF_SUSPEND_S0IX &&
 		    spcm->stream[substream->stream].d0i3_compatible) {
-			/*
-			 * trap the event, not sending trigger stop to
-			 * prevent the FW pipelines from being stopped,
-			 * and mark the flag to ignore the upcoming DAPM
-			 * PM events.
-			 */
 			spcm->stream[substream->stream].suspend_ignored = true;
 			return 0;
 		}
sound/soc/sof/sof-audio.h +2 -0
index a6d6bcd00ceec..3606595a7500c 100644
@@ -113,6 +113,7 @@ struct snd_sof_dai_config_data {
  *				  triggers. The FW keeps the host DMA running in this case and
  *				  therefore the host must do the same and should stop the DMA during
  *				  hw_free.
+ * @d0i3_supported_in_s0ix: Allow DSP D0I3 during S0iX
  */
 struct sof_ipc_pcm_ops {
 	int (*hw_params)(struct snd_soc_component *component, struct snd_pcm_substream *substream,
@@ -129,6 +130,7 @@ struct sof_ipc_pcm_ops {
 	bool reset_hw_params_during_stop;
 	bool ipc_first_on_start;
 	bool platform_stop_during_hw_free;
+	bool d0i3_supported_in_s0ix;
 };
 
 /**
Signature · 1 line
2.43.0
author maintainer
#57 lore raw

PATCH 57/744 ASoC: acp: Support microphone from device Acer 315-24p

In reply to Greg Kroah-Hartman

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

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

From: end.to.start <[email protected]>

[ Upstream commit 4b9a474c7c820391c0913d64431ae9e1f52a5143 ]

This patch adds microphone detection for the Acer 315-24p, after which a microphone appears on the device and starts working

---
 sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
 1 file changed, 7 insertions(+)
sound/soc/amd/yc/acp6x-mach.c +7 -0
index 69c68d8e7a6b5..1760b5d42460a 100644
@@ -430,6 +430,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
 			DMI_MATCH(DMI_BOARD_NAME, "MRID6"),
 		}
 	},
+	{
+		.driver_data = &acp6x_card,
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "MDC"),
+			DMI_MATCH(DMI_BOARD_NAME, "Herbag_MDU"),
+		}
+	},
 	{
 		.driver_data = &acp6x_card,
 		.matches = {
Signature · 1 line
2.43.0
author maintainer
#58 lore raw

PATCH 58/744 ASoC: rt5645: Fix the electric noise due to the CBJ contacts floating

In reply to Greg Kroah-Hartman

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

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

From: Derek Fang <[email protected]>

[ Upstream commit 103abab975087e1f01b76fcb54c91dbb65dbc249 ]

The codec leaves tie combo jack's sleeve/ring2 to floating status default. It would cause electric noise while connecting the active speaker jack during boot or shutdown.
This patch requests a gpio to control the additional jack circuit to tie the contacts to the ground or floating.

---
 sound/soc/codecs/rt5645.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
sound/soc/codecs/rt5645.c +25 -0
index e0da151508309..b69f6afa0ae40 100644
@@ -441,6 +441,7 @@ struct rt5645_priv {
 	struct regmap *regmap;
 	struct i2c_client *i2c;
 	struct gpio_desc *gpiod_hp_det;
+	struct gpio_desc *gpiod_cbj_sleeve;
 	struct snd_soc_jack *hp_jack;
 	struct snd_soc_jack *mic_jack;
 	struct snd_soc_jack *btn_jack;
@@ -3183,6 +3184,9 @@ static int rt5645_jack_detect(struct snd_soc_component *component, int jack_inse
 		regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL2,
 			RT5645_CBJ_MN_JD, 0);
 
+		if (rt5645->gpiod_cbj_sleeve)
+			gpiod_set_value(rt5645->gpiod_cbj_sleeve, 1);
+
 		msleep(600);
 		regmap_read(rt5645->regmap, RT5645_IN1_CTRL3, &val);
 		val &= 0x7;
@@ -3199,6 +3203,8 @@ static int rt5645_jack_detect(struct snd_soc_component *component, int jack_inse
 			snd_soc_dapm_disable_pin(dapm, "Mic Det Power");
 			snd_soc_dapm_sync(dapm);
 			rt5645->jack_type = SND_JACK_HEADPHONE;
+			if (rt5645->gpiod_cbj_sleeve)
+				gpiod_set_value(rt5645->gpiod_cbj_sleeve, 0);
 		}
 		if (rt5645->pdata.level_trigger_irq)
 			regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
@@ -3226,6 +3232,9 @@ static int rt5645_jack_detect(struct snd_soc_component *component, int jack_inse
 		if (rt5645->pdata.level_trigger_irq)
 			regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
 				RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
+
+		if (rt5645->gpiod_cbj_sleeve)
+			gpiod_set_value(rt5645->gpiod_cbj_sleeve, 0);
 	}
 
 	return rt5645->jack_type;
@@ -3958,6 +3967,16 @@ static int rt5645_i2c_probe(struct i2c_client *i2c)
 			return ret;
 	}
 
+	rt5645->gpiod_cbj_sleeve = devm_gpiod_get_optional(&i2c->dev, "cbj-sleeve",
+							   GPIOD_OUT_LOW);
+
+	if (IS_ERR(rt5645->gpiod_cbj_sleeve)) {
+		ret = PTR_ERR(rt5645->gpiod_cbj_sleeve);
+		dev_info(&i2c->dev, "failed to initialize gpiod, ret=%d\n", ret);
+		if (ret != -ENOENT)
+			return ret;
+	}
+
 	for (i = 0; i < ARRAY_SIZE(rt5645->supplies); i++)
 		rt5645->supplies[i].supply = rt5645_supply_names[i];
 
@@ -4205,6 +4224,9 @@ static void rt5645_i2c_remove(struct i2c_client *i2c)
 	cancel_delayed_work_sync(&rt5645->jack_detect_work);
 	cancel_delayed_work_sync(&rt5645->rcclock_work);
 
+	if (rt5645->gpiod_cbj_sleeve)
+		gpiod_set_value(rt5645->gpiod_cbj_sleeve, 0);
+
 	regulator_bulk_disable(ARRAY_SIZE(rt5645->supplies), rt5645->supplies);
 }
 
@@ -4220,6 +4242,9 @@ static void rt5645_i2c_shutdown(struct i2c_client *i2c)
 		0);
 	msleep(20);
 	regmap_write(rt5645->regmap, RT5645_RESET, 0);
+
+	if (rt5645->gpiod_cbj_sleeve)
+		gpiod_set_value(rt5645->gpiod_cbj_sleeve, 0);
 }
 
 static int __maybe_unused rt5645_sys_suspend(struct device *dev)
Signature · 1 line
2.43.0
author maintainer
#59 lore raw

PATCH 59/744 ASoC: dt-bindings: rt5645: add cbj sleeve gpio property

In reply to Greg Kroah-Hartman

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

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

From: Derek Fang <[email protected]>

[ Upstream commit 306b38e3fa727d22454a148a364123709e356600 ]

Add an optional gpio property to control external CBJ circuits to avoid some electric noise caused by sleeve/ring2 contacts floating.

---
 Documentation/devicetree/bindings/sound/rt5645.txt | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/sound/rt5645.txt +6 -0
index 41a62fd2ae1ff..c1fa379f5f3ea 100644
@@ -20,6 +20,11 @@ Optional properties:
   a GPIO spec for the external headphone detect pin. If jd-mode = 0,
   we will get the JD status by getting the value of hp-detect-gpios.
 
+- cbj-sleeve-gpios:
+  a GPIO spec to control the external combo jack circuit to tie the sleeve/ring2
+  contacts to the ground or floating. It could avoid some electric noise from the
+  active speaker jacks.
+
 - realtek,in2-differential
   Boolean. Indicate MIC2 input are differential, rather than single-ended.
 
@@ -68,6 +73,7 @@ codec: rt5650@1a {
 	compatible = "realtek,rt5650";
 	reg = <0x1a>;
 	hp-detect-gpios = <&gpio 19 0>;
+	cbj-sleeve-gpios = <&gpio 20 0>;
 	interrupt-parent = <&gpio>;
 	interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
 	realtek,dmic-en = "true";
Signature · 1 line
2.43.0
author maintainer
#60 lore raw

PATCH 60/744 ASoC: rt722-sdca: modify channel number to support 4 channels

In reply to Greg Kroah-Hartman

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

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

From: Jack Yu <[email protected]>

[ Upstream commit cb9946971d7cb717b726710e1a9fa4ded00b9135 ]

Channel numbers of dmic supports 4 channels, modify channels_max regarding to this issue.

---
 sound/soc/codecs/rt722-sdca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt722-sdca.c +1 -1
index 0e1c65a20392a..4338cdb3a7917 100644
@@ -1329,7 +1329,7 @@ static struct snd_soc_dai_driver rt722_sdca_dai[] = {
 		.capture = {
 			.stream_name = "DP6 DMic Capture",
 			.channels_min = 1,
-			.channels_max = 2,
+			.channels_max = 4,
 			.rates = RT722_STEREO_RATES,
 			.formats = RT722_FORMATS,
 		},
Signature · 1 line
2.43.0
author maintainer
#61 lore raw

PATCH 61/744 ASoC: rt722-sdca: add headset microphone vrefo setting

In reply to Greg Kroah-Hartman

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

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

From: Jack Yu <[email protected]>

[ Upstream commit 140e0762ca055d1aa84b17847cde5d9e47f56f76 ]

Add vrefo settings to fix jd and headset mic recording issue.

---
 sound/soc/codecs/rt722-sdca.c | 25 +++++++++++++++++++------
 sound/soc/codecs/rt722-sdca.h |  3 +++
 2 files changed, 22 insertions(+), 6 deletions(-)
sound/soc/codecs/rt722-sdca.c +19 -6
index 4338cdb3a7917..9ff607984ea19 100644
@@ -1438,9 +1438,12 @@ static void rt722_sdca_jack_preset(struct rt722_sdca_priv *rt722)
 	int loop_check, chk_cnt = 100, ret;
 	unsigned int calib_status = 0;
 
-	/* Read eFuse */
-	rt722_sdca_index_write(rt722, RT722_VENDOR_SPK_EFUSE, RT722_DC_CALIB_CTRL,
-		0x4808);
+	/* Config analog bias */
+	rt722_sdca_index_write(rt722, RT722_VENDOR_REG, RT722_ANALOG_BIAS_CTL3,
+		0xa081);
+	/* GE related settings */
+	rt722_sdca_index_write(rt722, RT722_VENDOR_HDA_CTL, RT722_GE_RELATED_CTL2,
+		0xa009);
 	/* Button A, B, C, D bypass mode */
 	rt722_sdca_index_write(rt722, RT722_VENDOR_HDA_CTL, RT722_UMP_HID_CTL4,
 		0xcf00);
@@ -1474,9 +1477,6 @@ static void rt722_sdca_jack_preset(struct rt722_sdca_priv *rt722)
 		if ((calib_status & 0x0040) == 0x0)
 			break;
 	}
-	/* Release HP-JD, EN_CBJ_TIE_GL/R open, en_osw gating auto done bit */
-	rt722_sdca_index_write(rt722, RT722_VENDOR_REG, RT722_DIGITAL_MISC_CTRL4,
-		0x0010);
 	/* Set ADC09 power entity floating control */
 	rt722_sdca_index_write(rt722, RT722_VENDOR_HDA_CTL, RT722_ADC0A_08_PDE_FLOAT_CTL,
 		0x2a12);
@@ -1489,8 +1489,21 @@ static void rt722_sdca_jack_preset(struct rt722_sdca_priv *rt722)
 	/* Set DAC03 and HP power entity floating control */
 	rt722_sdca_index_write(rt722, RT722_VENDOR_HDA_CTL, RT722_DAC03_HP_PDE_FLOAT_CTL,
 		0x4040);
+	rt722_sdca_index_write(rt722, RT722_VENDOR_HDA_CTL, RT722_ENT_FLOAT_CTRL_1,
+		0x4141);
+	rt722_sdca_index_write(rt722, RT722_VENDOR_HDA_CTL, RT722_FLOAT_CTRL_1,
+		0x0101);
 	/* Fine tune PDE40 latency */
 	regmap_write(rt722->regmap, 0x2f58, 0x07);
+	regmap_write(rt722->regmap, 0x2f03, 0x06);
+	/* MIC VRefo */
+	rt722_sdca_index_update_bits(rt722, RT722_VENDOR_REG,
+		RT722_COMBO_JACK_AUTO_CTL1, 0x0200, 0x0200);
+	rt722_sdca_index_update_bits(rt722, RT722_VENDOR_REG,
+		RT722_VREFO_GAT, 0x4000, 0x4000);
+	/* Release HP-JD, EN_CBJ_TIE_GL/R open, en_osw gating auto done bit */
+	rt722_sdca_index_write(rt722, RT722_VENDOR_REG, RT722_DIGITAL_MISC_CTRL4,
+		0x0010);
 }
 
 int rt722_sdca_io_init(struct device *dev, struct sdw_slave *slave)
sound/soc/codecs/rt722-sdca.h +3 -0
index 44af8901352eb..2464361a7958c 100644
@@ -69,6 +69,7 @@ struct rt722_sdca_dmic_kctrl_priv {
 #define RT722_COMBO_JACK_AUTO_CTL2		0x46
 #define RT722_COMBO_JACK_AUTO_CTL3		0x47
 #define RT722_DIGITAL_MISC_CTRL4		0x4a
+#define RT722_VREFO_GAT				0x63
 #define RT722_FSM_CTL				0x67
 #define RT722_SDCA_INTR_REC			0x82
 #define RT722_SW_CONFIG1			0x8a
@@ -127,6 +128,8 @@ struct rt722_sdca_dmic_kctrl_priv {
 #define RT722_UMP_HID_CTL6			0x66
 #define RT722_UMP_HID_CTL7			0x67
 #define RT722_UMP_HID_CTL8			0x68
+#define RT722_FLOAT_CTRL_1			0x70
+#define RT722_ENT_FLOAT_CTRL_1		0x76
 
 /* Parameter & Verb control 01 (0x1a)(NID:20h) */
 #define RT722_HIDDEN_REG_SW_RESET (0x1 << 14)
Signature · 1 line
2.43.0
author maintainer
#36 lore raw

PATCH 36/744 wifi: cfg80211: fix the order of arguments for trace events of the tx_rx_evt class

In reply to Greg Kroah-Hartman

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

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

From: Igor Artemiev <[email protected]>

[ Upstream commit 9ef369973cd2c97cce3388d2c0c7e3c056656e8a ]

The declarations of the tx_rx_evt class and the rdev_set_antenna event use the wrong order of arguments in the TP_ARGS macro.

Fix the order of arguments in the TP_ARGS macro.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

---
 net/wireless/trace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/wireless/trace.h +2 -2
index e89443173c7b4..df92ee4d91d1d 100644
@@ -1747,7 +1747,7 @@ TRACE_EVENT(rdev_return_void_tx_rx,
 
 DECLARE_EVENT_CLASS(tx_rx_evt,
 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
-	TP_ARGS(wiphy, rx, tx),
+	TP_ARGS(wiphy, tx, rx),
 	TP_STRUCT__entry(
 		WIPHY_ENTRY
 		__field(u32, tx)
@@ -1764,7 +1764,7 @@ DECLARE_EVENT_CLASS(tx_rx_evt,
 
 DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
-	TP_ARGS(wiphy, rx, tx)
+	TP_ARGS(wiphy, tx, rx)
 );
 
 DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
Signature · 1 line
2.43.0
author maintainer
#62 lore raw

PATCH 62/744 regulator: qcom-refgen: fix module autoloading

In reply to Greg Kroah-Hartman

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

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

From: Krzysztof Kozlowski <[email protected]>

[ Upstream commit ddd3f34c10002e41ed3cd89c9bd8f1d05a22506a ]

Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded based on the alias from of_device_id table.

---
 drivers/regulator/qcom-refgen-regulator.c | 1 +
 1 file changed, 1 insertion(+)
drivers/regulator/qcom-refgen-regulator.c +1 -0
index 656fe330d38f0..063e12c08e75f 100644
@@ -140,6 +140,7 @@ static const struct of_device_id qcom_refgen_match_table[] = {
 	{ .compatible = "qcom,sm8250-refgen-regulator", .data = &sm8250_refgen_desc },
 	{ }
 };
+MODULE_DEVICE_TABLE(of, qcom_refgen_match_table);
 
 static struct platform_driver qcom_refgen_driver = {
 	.probe = qcom_refgen_probe,
Signature · 1 line
2.43.0
author maintainer
#63 lore raw

PATCH 63/744 regulator: vqmmc-ipq4019: fix module autoloading

In reply to Greg Kroah-Hartman

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

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

From: Krzysztof Kozlowski <[email protected]>

[ Upstream commit 68adb581a39ae63a0ed082c47f01fbbe515efa0e ]

Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded based on the alias from of_device_id table.

---
 drivers/regulator/vqmmc-ipq4019-regulator.c | 1 +
 1 file changed, 1 insertion(+)
drivers/regulator/vqmmc-ipq4019-regulator.c +1 -0
index 086da36abc0b4..4955616517ce9 100644
@@ -84,6 +84,7 @@ static const struct of_device_id regulator_ipq4019_of_match[] = {
 	{ .compatible = "qcom,vqmmc-ipq4019-regulator", },
 	{},
 };
+MODULE_DEVICE_TABLE(of, regulator_ipq4019_of_match);
 
 static struct platform_driver ipq4019_regulator_driver = {
 	.probe = ipq4019_regulator_probe,
Signature · 1 line
2.43.0
author maintainer
#64 lore raw

PATCH 64/744 ASoC: cs35l41: Update DSP1RX5/6 Sources for DSP config

In reply to Greg Kroah-Hartman

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

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

From: Stefan Binding <[email protected]>

[ Upstream commit eefb831d2e4dd58d58002a2ef75ff989e073230d ]

Currently, all ASoC systems are set to use VPMON for DSP1RX5_SRC, however, this is required only for internal boost systems. External boost systems require VBSTMON instead of VPMON to be the input to DSP1RX5_SRC.
Shared Boost Active acts like Internal boost (requires VPMON). Shared Boost Passive acts like External boost (requires VBSTMON) All systems require DSP1RX6_SRC to be set to VBSTMON.

---
 sound/soc/codecs/cs35l41.c | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)
sound/soc/codecs/cs35l41.c +20 -6
index 5456e6bfa242f..bc541293089f0 100644
@@ -1095,6 +1095,7 @@ static int cs35l41_handle_pdata(struct device *dev, struct cs35l41_hw_cfg *hw_cf
 static int cs35l41_dsp_init(struct cs35l41_private *cs35l41)
 {
 	struct wm_adsp *dsp;
+	uint32_t dsp1rx5_src;
 	int ret;
 
 	dsp = &cs35l41->dsp;
@@ -1114,16 +1115,29 @@ static int cs35l41_dsp_init(struct cs35l41_private *cs35l41)
 		return ret;
 	}
 
-	ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX5_SRC,
-			   CS35L41_INPUT_SRC_VPMON);
+	switch (cs35l41->hw_cfg.bst_type) {
+	case CS35L41_INT_BOOST:
+	case CS35L41_SHD_BOOST_ACTV:
+		dsp1rx5_src = CS35L41_INPUT_SRC_VPMON;
+		break;
+	case CS35L41_EXT_BOOST:
+	case CS35L41_SHD_BOOST_PASS:
+		dsp1rx5_src = CS35L41_INPUT_SRC_VBSTMON;
+		break;
+	default:
+		dev_err(cs35l41->dev, "wm_halo_init failed - Invalid Boost Type: %d\n",
+			cs35l41->hw_cfg.bst_type);
+		goto err_dsp;
+	}
+
+	ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX5_SRC, dsp1rx5_src);
 	if (ret < 0) {
-		dev_err(cs35l41->dev, "Write INPUT_SRC_VPMON failed: %d\n", ret);
+		dev_err(cs35l41->dev, "Write DSP1RX5_SRC: %d failed: %d\n", dsp1rx5_src, ret);
 		goto err_dsp;
 	}
-	ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX6_SRC,
-			   CS35L41_INPUT_SRC_CLASSH);
+	ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX6_SRC, CS35L41_INPUT_SRC_VBSTMON);
 	if (ret < 0) {
-		dev_err(cs35l41->dev, "Write INPUT_SRC_CLASSH failed: %d\n", ret);
+		dev_err(cs35l41->dev, "Write CS35L41_INPUT_SRC_VBSTMON failed: %d\n", ret);
 		goto err_dsp;
 	}
 	ret = regmap_write(cs35l41->regmap, CS35L41_DSP1_RX7_SRC,
Signature · 1 line
2.43.0
author maintainer
#65 lore raw

PATCH 65/744 ASoC: rt715: add vendor clear control register

In reply to Greg Kroah-Hartman

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

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

From: Jack Yu <[email protected]>

[ Upstream commit cebfbc89ae2552dbb58cd9b8206a5c8e0e6301e9 ]

Add vendor clear control register in readable register's callback function. This prevents an access failure reported in Intel CI tests.

---
 sound/soc/codecs/rt715-sdw.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/codecs/rt715-sdw.c +1 -0
index 21f37babd148a..376585f5a8dd8 100644
@@ -111,6 +111,7 @@ static bool rt715_readable_register(struct device *dev, unsigned int reg)
 	case 0x839d:
 	case 0x83a7:
 	case 0x83a9:
+	case 0x752001:
 	case 0x752039:
 		return true;
 	default:
Signature · 1 line
2.43.0
author maintainer
#66 lore raw

PATCH 66/744 ASoC: rt715-sdca: volume step modification

In reply to Greg Kroah-Hartman

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

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

From: Jack Yu <[email protected]>

[ Upstream commit bda16500dd0b05e2e047093b36cbe0873c95aeae ]

Volume step (dB/step) modification to fix format error which shown in amixer control.

---
 sound/soc/codecs/rt715-sdca.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt715-sdca.c +4 -4
index 9fa96fd83d4aa..84f1dc453e971 100644
@@ -316,7 +316,7 @@ static int rt715_sdca_set_amp_gain_8ch_get(struct snd_kcontrol *kcontrol,
 	return 0;
 }
 
-static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -17625, 375, 0);
+static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -1725, 75, 0);
 static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, 0, 1000, 0);
 
 static int rt715_sdca_get_volsw(struct snd_kcontrol *kcontrol,
@@ -477,7 +477,7 @@ static const struct snd_kcontrol_new rt715_sdca_snd_controls[] = {
 			RT715_SDCA_FU_VOL_CTRL, CH_01),
 		SDW_SDCA_CTL(FUN_MIC_ARRAY, RT715_SDCA_FU_ADC7_27_VOL,
 			RT715_SDCA_FU_VOL_CTRL, CH_02),
-			0x2f, 0x7f, 0,
+			0x2f, 0x3f, 0,
 		rt715_sdca_set_amp_gain_get, rt715_sdca_set_amp_gain_put,
 		in_vol_tlv),
 	RT715_SDCA_EXT_TLV("FU02 Capture Volume",
@@ -485,13 +485,13 @@ static const struct snd_kcontrol_new rt715_sdca_snd_controls[] = {
 			RT715_SDCA_FU_VOL_CTRL, CH_01),
 		rt715_sdca_set_amp_gain_4ch_get,
 		rt715_sdca_set_amp_gain_4ch_put,
-		in_vol_tlv, 4, 0x7f),
+		in_vol_tlv, 4, 0x3f),
 	RT715_SDCA_EXT_TLV("FU06 Capture Volume",
 		SDW_SDCA_CTL(FUN_MIC_ARRAY, RT715_SDCA_FU_ADC10_11_VOL,
 			RT715_SDCA_FU_VOL_CTRL, CH_01),
 		rt715_sdca_set_amp_gain_4ch_get,
 		rt715_sdca_set_amp_gain_4ch_put,
-		in_vol_tlv, 4, 0x7f),
+		in_vol_tlv, 4, 0x3f),
 	/* MIC Boost Control */
 	RT715_SDCA_BOOST_EXT_TLV("FU0E Boost",
 		SDW_SDCA_CTL(FUN_MIC_ARRAY, RT715_SDCA_FU_DMIC_GAIN_EN,
Signature · 1 line
2.43.0
author maintainer
#67 lore raw

PATCH 67/744 KVM: selftests: Add test for uaccesses to non-existent vgic-v2 CPUIF

In reply to Greg Kroah-Hartman

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

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

From: Oliver Upton <[email protected]>

[ Upstream commit 160933e330f4c5a13931d725a4d952a4b9aefa71 ]

Assert that accesses to a non-existent vgic-v2 CPU interface consistently fail across the various KVM device attr ioctls. This also serves as a regression test for a bug wherein KVM hits a NULL dereference when the CPUID specified in the ioctl is invalid.

Note that there is no need to print the observed errno, as TEST_ASSERT() will take care of it.

---
 tools/testing/selftests/kvm/aarch64/vgic_init.c |   50 ++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
tools/testing/selftests/kvm/aarch64/vgic_init.c +50 -0
@@ -6,6 +6,7 @@
  */
 #define _GNU_SOURCE
 #include <linux/kernel.h>
+#include <linux/bitfield.h>
 #include <sys/syscall.h>
 #include <asm/kvm.h>
 #include <asm/kvm_para.h>
@@ -84,6 +85,18 @@ static struct vm_gic vm_gic_create_with_
 	return v;
 }
 
+static struct vm_gic vm_gic_create_barebones(uint32_t gic_dev_type)
+{
+	struct vm_gic v;
+
+	v.gic_dev_type = gic_dev_type;
+	v.vm = vm_create_barebones();
+	v.gic_fd = kvm_create_device(v.vm, gic_dev_type);
+
+	return v;
+}
+
+
 static void vm_gic_destroy(struct vm_gic *v)
 {
 	close(v->gic_fd);
@@ -357,6 +370,40 @@ static void test_vcpus_then_vgic(uint32_
 	vm_gic_destroy(&v);
 }
 
+#define KVM_VGIC_V2_ATTR(offset, cpu) \
+	(FIELD_PREP(KVM_DEV_ARM_VGIC_OFFSET_MASK, offset) | \
+	 FIELD_PREP(KVM_DEV_ARM_VGIC_CPUID_MASK, cpu))
+
+#define GIC_CPU_CTRL	0x00
+
+static void test_v2_uaccess_cpuif_no_vcpus(void)
+{
+	struct vm_gic v;
+	u64 val = 0;
+	int ret;
+
+	v = vm_gic_create_barebones(KVM_DEV_TYPE_ARM_VGIC_V2);
+	subtest_dist_rdist(&v);
+
+	ret = __kvm_has_device_attr(v.gic_fd, KVM_DEV_ARM_VGIC_GRP_CPU_REGS,
+				    KVM_VGIC_V2_ATTR(GIC_CPU_CTRL, 0));
+	TEST_ASSERT(ret && errno == EINVAL,
+		    "accessed non-existent CPU interface, want errno: %i",
+		    EINVAL);
+	ret = __kvm_device_attr_get(v.gic_fd, KVM_DEV_ARM_VGIC_GRP_CPU_REGS,
+				    KVM_VGIC_V2_ATTR(GIC_CPU_CTRL, 0), &val);
+	TEST_ASSERT(ret && errno == EINVAL,
+		    "accessed non-existent CPU interface, want errno: %i",
+		    EINVAL);
+	ret = __kvm_device_attr_set(v.gic_fd, KVM_DEV_ARM_VGIC_GRP_CPU_REGS,
+				    KVM_VGIC_V2_ATTR(GIC_CPU_CTRL, 0), &val);
+	TEST_ASSERT(ret && errno == EINVAL,
+		    "accessed non-existent CPU interface, want errno: %i",
+		    EINVAL);
+
+	vm_gic_destroy(&v);
+}
+
 static void test_v3_new_redist_regions(void)
 {
 	struct kvm_vcpu *vcpus[NR_VCPUS];
@@ -675,6 +722,9 @@ void run_tests(uint32_t gic_dev_type)
 	test_vcpus_then_vgic(gic_dev_type);
 	test_vgic_then_vcpus(gic_dev_type);
 
+	if (VGIC_DEV_IS_V2(gic_dev_type))
+		test_v2_uaccess_cpuif_no_vcpus();
+
 	if (VGIC_DEV_IS_V3(gic_dev_type)) {
 		test_v3_new_redist_regions();
 		test_v3_typer_accesses();
author maintainer
#68 lore raw

PATCH 68/744 Input: xpad - add support for ASUS ROG RAIKIRI

In reply to Greg Kroah-Hartman

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

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

From: Vicki Pfau <[email protected]>

[ Upstream commit be81415a32ef6d8a8a85529fcfac03d05b3e757d ]

Add the VID/PID for ASUS ROG RAIKIRI to xpad_device and the VID to xpad_table

---
 drivers/input/joystick/xpad.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/input/joystick/xpad.c +2 -0
index 9206253422016..cd97a7a9f812d 100644
@@ -207,6 +207,7 @@ static const struct xpad_device {
 	{ 0x0738, 0xcb29, "Saitek Aviator Stick AV8R02", 0, XTYPE_XBOX360 },
 	{ 0x0738, 0xf738, "Super SFIV FightStick TE S", 0, XTYPE_XBOX360 },
 	{ 0x07ff, 0xffff, "Mad Catz GamePad", 0, XTYPE_XBOX360 },
+	{ 0x0b05, 0x1a38, "ASUS ROG RAIKIRI", 0, XTYPE_XBOXONE },
 	{ 0x0c12, 0x0005, "Intec wireless", 0, XTYPE_XBOX },
 	{ 0x0c12, 0x8801, "Nyko Xbox Controller", 0, XTYPE_XBOX },
 	{ 0x0c12, 0x8802, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
@@ -482,6 +483,7 @@ static const struct usb_device_id xpad_table[] = {
 	{ USB_DEVICE(0x0738, 0x4540) },		/* Mad Catz Beat Pad */
 	XPAD_XBOXONE_VENDOR(0x0738),		/* Mad Catz FightStick TE 2 */
 	XPAD_XBOX360_VENDOR(0x07ff),		/* Mad Catz Gamepad */
+	XPAD_XBOXONE_VENDOR(0x0b05),		/* ASUS controllers */
 	XPAD_XBOX360_VENDOR(0x0c12),		/* Zeroplus X-Box 360 controllers */
 	XPAD_XBOX360_VENDOR(0x0e6f),		/* 0x0e6f Xbox 360 controllers */
 	XPAD_XBOXONE_VENDOR(0x0e6f),		/* 0x0e6f Xbox One controllers */
Signature · 1 line
2.43.0
author maintainer
#69 lore raw

PATCH 69/744 fpga: dfl-pci: add PCI subdevice ID for Intel D5005 card

In reply to Greg Kroah-Hartman

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

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

From: Peter Colberg <[email protected]>

[ Upstream commit bb1dbeceb1c20cfd81271e1bd69892ebd1ee38e0 ]

Add PCI subdevice ID for the Intel D5005 Stratix 10 FPGA card as used with the Open FPGA Stack (OFS) FPGA Interface Manager (FIM).

Unlike the Intel D5005 PAC FIM which exposed a separate PCI device ID, the OFS FIM reuses the same device ID for all DFL-based FPGA cards and differentiates on the subdevice ID. The subdevice ID values were chosen as the numeric part of the FPGA card names in hexadecimal.

---
 drivers/fpga/dfl-pci.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/fpga/dfl-pci.c +3 -0
index 98b8fd16183e4..80cac3a5f9767 100644
@@ -78,6 +78,7 @@ static void cci_pci_free_irq(struct pci_dev *pcidev)
 #define PCIE_DEVICE_ID_SILICOM_PAC_N5011	0x1001
 #define PCIE_DEVICE_ID_INTEL_DFL		0xbcce
 /* PCI Subdevice ID for PCIE_DEVICE_ID_INTEL_DFL */
+#define PCIE_SUBDEVICE_ID_INTEL_D5005		0x138d
 #define PCIE_SUBDEVICE_ID_INTEL_N6000		0x1770
 #define PCIE_SUBDEVICE_ID_INTEL_N6001		0x1771
 #define PCIE_SUBDEVICE_ID_INTEL_C6100		0x17d4
@@ -101,6 +102,8 @@ static struct pci_device_id cci_pcie_id_tbl[] = {
 	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_PAC_D5005_VF),},
 	{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5010),},
 	{PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, PCIE_DEVICE_ID_SILICOM_PAC_N5011),},
+	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
+			PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_D5005),},
 	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL,
 			PCI_VENDOR_ID_INTEL, PCIE_SUBDEVICE_ID_INTEL_N6000),},
 	{PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_DFL_VF,
Signature · 1 line
2.43.0
author maintainer
#70 lore raw

PATCH 70/744 bpf, x86: Fix PROBE_MEM runtime load check

In reply to Greg Kroah-Hartman

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

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

From: Puranjay Mohan <[email protected]>

[ Upstream commit b599d7d26d6ad1fc9975218574bc2ca6d0293cfd ]

When a load is marked PROBE_MEM - e.g. due to PTR_UNTRUSTED access - the address being loaded from is not necessarily valid. The BPF jit sets up exception handlers for each such load which catch page faults and 0 out the destination register.

If the address for the load is outside kernel address space, the load will escape the exception handling and crash the kernel. To prevent this from happening, the emits some instruction to verify that addr is > end of userspace addresses.

x86 has a legacy vsyscall ABI where a page at address 0xffffffffff600000 is mapped with user accessible permissions. The addresses in this page are considered userspace addresses by the fault handler. Therefore, a BPF program accessing this page will crash the kernel.

This patch fixes the runtime checks to also check that the PROBE_MEM address is below VSYSCALL_ADDR.

Example BPF program:

SEC("fentry/tcp_v4_connect")
int BPF_PROG(fentry_tcp_v4_connect, struct sock *sk)

 {
	*(volatile unsigned long *)&sk->sk_tsq_flags;
	return 0;

}

BPF Assembly:

0: (79) r1 = *(u64 *)(r1 +0)
1: (79) r1 = *(u64 *)(r1 +344)
2: (b7) r0 = 0
3: (95) exit

			       x86-64 JIT
			       ==========

            BEFORE                                    AFTER
	    ------                                    -----
 0:   nopl   0x0(%rax,%rax,1)             0:   nopl   0x0(%rax,%rax,1)
 5:   xchg   %ax,%ax                      5:   xchg   %ax,%ax
 7:   push   %rbp                         7:   push   %rbp
 8:   mov    %rsp,%rbp                    8:   mov    %rsp,%rbp
 b:   mov    0x0(%rdi),%rdi               b:   mov    0x0(%rdi),%rdi
-------------------------------------------------------------------------------
 f:   movabs $0x100000000000000,%r11      f:   movabs $0xffffffffff600000,%r10
19:   add    $0x2a0,%rdi                 19:   mov    %rdi,%r11
20:   cmp    %r11,%rdi                   1c:   add    $0x2a0,%r11
23:   jae    0x0000000000000029          23:   sub    %r10,%r11
25:   xor    %edi,%edi                   26:   movabs $0x100000000a00000,%r10
27:   jmp    0x000000000000002d          30:   cmp    %r10,%r11
29:   mov    0x0(%rdi),%rdi              33:   ja     0x0000000000000039
--------------------------------\        35:   xor    %edi,%edi
2d:   xor    %eax,%eax           \       37:   jmp    0x0000000000000040
2f:   leave                       \      39:   mov    0x2a0(%rdi),%rdi
30:   ret                          \--------------------------------------------
                                         40:   xor    %eax,%eax
                                         42:   leave
                                         43:   ret
---
 arch/x86/net/bpf_jit_comp.c | 57 ++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 32 deletions(-)
arch/x86/net/bpf_jit_comp.c +25 -32
index a6a4d3ca8ddc6..878a4c6dd7565 100644
@@ -1458,36 +1458,41 @@ st:			if (is_imm8(insn->off))
 			if (BPF_MODE(insn->code) == BPF_PROBE_MEM ||
 			    BPF_MODE(insn->code) == BPF_PROBE_MEMSX) {
 				/* Conservatively check that src_reg + insn->off is a kernel address:
-				 *   src_reg + insn->off >= TASK_SIZE_MAX + PAGE_SIZE
-				 * src_reg is used as scratch for src_reg += insn->off and restored
-				 * after emit_ldx if necessary
+				 *   src_reg + insn->off > TASK_SIZE_MAX + PAGE_SIZE
+				 *   and
+				 *   src_reg + insn->off < VSYSCALL_ADDR
 				 */
 
-				u64 limit = TASK_SIZE_MAX + PAGE_SIZE;
+				u64 limit = TASK_SIZE_MAX + PAGE_SIZE - VSYSCALL_ADDR;
 				u8 *end_of_jmp;
 
-				/* At end of these emitted checks, insn->off will have been added
-				 * to src_reg, so no need to do relative load with insn->off offset
-				 */
-				insn_off = 0;
+				/* movabsq r10, VSYSCALL_ADDR */
+				emit_mov_imm64(&prog, BPF_REG_AX, (long)VSYSCALL_ADDR >> 32,
+					       (u32)(long)VSYSCALL_ADDR);
 
-				/* movabsq r11, limit */
-				EMIT2(add_1mod(0x48, AUX_REG), add_1reg(0xB8, AUX_REG));
-				EMIT((u32)limit, 4);
-				EMIT(limit >> 32, 4);
+				/* mov src_reg, r11 */
+				EMIT_mov(AUX_REG, src_reg);
 
 				if (insn->off) {
-					/* add src_reg, insn->off */
-					maybe_emit_1mod(&prog, src_reg, true);
-					EMIT2_off32(0x81, add_1reg(0xC0, src_reg), insn->off);
+					/* add r11, insn->off */
+					maybe_emit_1mod(&prog, AUX_REG, true);
+					EMIT2_off32(0x81, add_1reg(0xC0, AUX_REG), insn->off);
 				}
 
-				/* cmp src_reg, r11 */
-				maybe_emit_mod(&prog, src_reg, AUX_REG, true);
-				EMIT2(0x39, add_2reg(0xC0, src_reg, AUX_REG));
+				/* sub r11, r10 */
+				maybe_emit_mod(&prog, AUX_REG, BPF_REG_AX, true);
+				EMIT2(0x29, add_2reg(0xC0, AUX_REG, BPF_REG_AX));
+
+				/* movabsq r10, limit */
+				emit_mov_imm64(&prog, BPF_REG_AX, (long)limit >> 32,
+					       (u32)(long)limit);
+
+				/* cmp r10, r11 */
+				maybe_emit_mod(&prog, AUX_REG, BPF_REG_AX, true);
+				EMIT2(0x39, add_2reg(0xC0, AUX_REG, BPF_REG_AX));
 
-				/* if unsigned '>=', goto load */
-				EMIT2(X86_JAE, 0);
+				/* if unsigned '>', goto load */
+				EMIT2(X86_JA, 0);
 				end_of_jmp = prog;
 
 				/* xor dst_reg, dst_reg */
@@ -1513,18 +1518,6 @@ st:			if (is_imm8(insn->off))
 				/* populate jmp_offset for JMP above */
 				start_of_ldx[-1] = prog - start_of_ldx;
 
-				if (insn->off && src_reg != dst_reg) {
-					/* sub src_reg, insn->off
-					 * Restore src_reg after "add src_reg, insn->off" in prev
-					 * if statement. But if src_reg == dst_reg, emit_ldx
-					 * above already clobbered src_reg, so no need to restore.
-					 * If add src_reg, insn->off was unnecessary, no need to
-					 * restore either.
-					 */
-					maybe_emit_1mod(&prog, src_reg, true);
-					EMIT2_off32(0x81, add_1reg(0xE8, src_reg), insn->off);
-				}
-
 				if (!bpf_prog->aux->extable)
 					break;
 
Signature · 1 line
2.43.0
author maintainer
#71 lore raw

PATCH 71/744 ALSA: emu10k1: make E-MU FPGA writes potentially more reliable

In reply to Greg Kroah-Hartman

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

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

From: Oswald Buddenhagen <[email protected]>

[ Upstream commit 15c7e87aa88f0ab2d51c2e2123b127a6d693ca21 ]

We did not delay after the second strobe signal, so another immediately following access could potentially corrupt the written value.

This is a purely speculative fix with no supporting evidence, but after taking out the spinlocks around the writes, it seems plausible that a modern processor could be actually too fast. Also, it's just cleaner to be consistent.

Message-ID: <[email protected]>

---
 sound/pci/emu10k1/io.c | 1 +
 1 file changed, 1 insertion(+)
sound/pci/emu10k1/io.c +1 -0
index 74df2330015f6..5cb8acf5b158c 100644
@@ -285,6 +285,7 @@ static void snd_emu1010_fpga_write_locked(struct snd_emu10k1 *emu, u32 reg, u32
 	outw(value, emu->port + A_GPIO);
 	udelay(10);
 	outw(value | 0x80 , emu->port + A_GPIO);  /* High bit clocks the value into the fpga. */
+	udelay(10);
 }
 
 void snd_emu1010_fpga_write(struct snd_emu10k1 *emu, u32 reg, u32 value)
Signature · 1 line
2.43.0
author maintainer
#37 lore raw

PATCH 37/744 dt-bindings: rockchip: grf: Add missing type to pcie-phy node

In reply to Greg Kroah-Hartman

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

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

From: Rob Herring <[email protected]>

[ Upstream commit d41201c90f825f19a46afbfb502f22f612d8ccc4 ]

'pcie-phy' is missing any type. Add 'type: object' to indicate it's a node.

---
 Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/soc/rockchip/grf.yaml +1 -0
index e4fa6a07b4fa2..be6ffec2b0749 100644
@@ -163,6 +163,7 @@ allOf:
           unevaluatedProperties: false
 
         pcie-phy:
+          type: object
           description:
             Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt
 
Signature · 1 line
2.43.0
author maintainer
#72 lore raw

PATCH 72/744 softirq: Fix suspicious RCU usage in __do_softirq()

In reply to Greg Kroah-Hartman

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

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

From: Zqiang <[email protected]>

[ Upstream commit 1dd1eff161bd55968d3d46bc36def62d71fb4785 ]

Currently, the condition "__this_cpu_read(ksoftirqd) == current" is used to invoke rcu_softirq_qs() in ksoftirqd tasks context for non-RT kernels.

This works correctly as long as the context is actually task context but this condition is wrong when:

- the current task is ksoftirqd
- the task is interrupted in a RCU read side critical section
- __do_softirq() is invoked on return from interrupt

Syzkaller triggered the following scenario:

-> finish_task_switch()

    -> put_task_struct_rcu_user()
      -> call_rcu(&task->rcu, delayed_put_task_struct)
        -> __kasan_record_aux_stack()
          -> pfn_valid()
            -> rcu_read_lock_sched()
              <interrupt>
                __irq_exit_rcu()
                -> __do_softirq)()
                   -> if (!IS_ENABLED(CONFIG_PREEMPT_RT) &&
                     __this_cpu_read(ksoftirqd) == current)
                     -> rcu_softirq_qs()
                       -> RCU_LOCKDEP_WARN(lock_is_held(&rcu_sched_lock_map))

The rcu quiescent state is reported in the rcu-read critical section, so the lockdep warning is triggered.

Fix this by splitting out the inner working of __do_softirq() into a helper function which takes an argument to distinguish between ksoftirqd task context and interrupted context and invoke it from the relevant call sites with the proper context information and use that for the conditional invocation of rcu_softirq_qs().

---
 kernel/softirq.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
kernel/softirq.c +8 -4
index 210cf5f8d92c2..bd9716d7bb638 100644
@@ -507,7 +507,7 @@ static inline bool lockdep_softirq_start(void) { return false; }
 static inline void lockdep_softirq_end(bool in_hardirq) { }
 #endif
 
-asmlinkage __visible void __softirq_entry __do_softirq(void)
+static void handle_softirqs(bool ksirqd)
 {
 	unsigned long end = jiffies + MAX_SOFTIRQ_TIME;
 	unsigned long old_flags = current->flags;
@@ -562,8 +562,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
 		pending >>= softirq_bit;
 	}
 
-	if (!IS_ENABLED(CONFIG_PREEMPT_RT) &&
-	    __this_cpu_read(ksoftirqd) == current)
+	if (!IS_ENABLED(CONFIG_PREEMPT_RT) && ksirqd)
 		rcu_softirq_qs();
 
 	local_irq_disable();
@@ -583,6 +582,11 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
 	current_restore_flags(old_flags, PF_MEMALLOC);
 }
 
+asmlinkage __visible void __softirq_entry __do_softirq(void)
+{
+	handle_softirqs(false);
+}
+
 /**
  * irq_enter_rcu - Enter an interrupt context with RCU watching
  */
@@ -918,7 +922,7 @@ static void run_ksoftirqd(unsigned int cpu)
 		 * We can safely run softirq on inline stack, as we are not deep
 		 * in the task stack here.
 		 */
-		__do_softirq();
+		handle_softirqs(true);
 		ksoftirqd_run_end();
 		cond_resched();
 		return;
Signature · 1 line
2.43.0
author maintainer
#73 lore raw

PATCH 73/744 platform/x86: ISST: Add Grand Ridge to HPM CPU list

In reply to Greg Kroah-Hartman

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

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

From: Srinivas Pandruvada <[email protected]>

[ Upstream commit 515a3c3a5489a890c7c3c1df3855eb4868a27598 ]

Add Grand Ridge (ATOM_CRESTMONT) to hpm_cpu_ids, so that MSR 0x54 can be used.

---
 drivers/platform/x86/intel/speed_select_if/isst_if_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/intel/speed_select_if/isst_if_common.c +1 -0
index 30951f7131cd9..1accdaaf282c5 100644
@@ -721,6 +721,7 @@ static struct miscdevice isst_if_char_driver = {
 static const struct x86_cpu_id hpm_cpu_ids[] = {
 	X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_D,	NULL),
 	X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_X,	NULL),
+	X86_MATCH_INTEL_FAM6_MODEL(ATOM_CRESTMONT,	NULL),
 	X86_MATCH_INTEL_FAM6_MODEL(ATOM_CRESTMONT_X,	NULL),
 	{}
 };
Signature · 1 line
2.43.0
author maintainer
#74 lore raw

PATCH 74/744 ASoC: da7219-aad: fix usage of device_get_named_child_node()

In reply to Greg Kroah-Hartman

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

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

From: Pierre-Louis Bossart <[email protected]>

[ Upstream commit e8a6a5ad73acbafd98e8fd3f0cbf6e379771bb76 ]

The documentation for device_get_named_child_node() mentions this important point:

"
The caller is responsible for calling fwnode_handle_put() on the returned fwnode pointer.
"

Add fwnode_handle_put() to avoid a leaked reference.

---
 sound/soc/codecs/da7219-aad.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
sound/soc/codecs/da7219-aad.c +5 -1
index 8537c96307a97..9b0c470181706 100644
@@ -671,8 +671,10 @@ static struct da7219_aad_pdata *da7219_aad_fw_to_pdata(struct device *dev)
 		return NULL;
 
 	aad_pdata = devm_kzalloc(dev, sizeof(*aad_pdata), GFP_KERNEL);
-	if (!aad_pdata)
+	if (!aad_pdata) {
+		fwnode_handle_put(aad_np);
 		return NULL;
+	}
 
 	aad_pdata->irq = i2c->irq;
 
@@ -753,6 +755,8 @@ static struct da7219_aad_pdata *da7219_aad_fw_to_pdata(struct device *dev)
 	else
 		aad_pdata->adc_1bit_rpt = DA7219_AAD_ADC_1BIT_RPT_1;
 
+	fwnode_handle_put(aad_np);
+
 	return aad_pdata;
 }
 
Signature · 1 line
2.43.0
author maintainer
#75 lore raw

PATCH 75/744 ALSA: hda: intel-dsp-config: harden I2C/I2S codec detection

In reply to Greg Kroah-Hartman

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

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

From: Pierre-Louis Bossart <[email protected]>

[ Upstream commit 79ac4c1443eaec0d09355307043a9149287f23c1 ]

The SOF driver is selected whenever specific I2C/I2S HIDs are reported as 'present' in the ACPI DSDT. In some cases, an HID is reported but the hardware does not actually rely on I2C/I2S. This false positive leads to an invalid selection of the SOF driver and as a result an invalid topology is loaded.

This patch hardens the detection with a check that the NHLT table is consistent with the report of an I2S-based codec in DSDT. This table should expose at least one SSP endpoint configured for an I2S-codec connection.

Tested on Huawei Matebook D14 (NBLB-WAX9N) using an HDaudio codec with an invalid ES8336 ACPI HID reported:

[    7.858249] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[    7.858312] snd_hda_intel 0000:00:1f.3: snd_intel_dsp_find_config: no valid SSP found for HID ESSX8336, skipped

Message-ID: <[email protected]>

---
 sound/hda/intel-dsp-config.c | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)
sound/hda/intel-dsp-config.c +25 -2
index 6a384b922e4fa..d1f6cdcf1866e 100644
@@ -557,9 +557,32 @@ static const struct config_entry *snd_intel_dsp_find_config
 		if (table->codec_hid) {
 			int i;
 
-			for (i = 0; i < table->codec_hid->num_codecs; i++)
-				if (acpi_dev_present(table->codec_hid->codecs[i], NULL, -1))
+			for (i = 0; i < table->codec_hid->num_codecs; i++) {
+				struct nhlt_acpi_table *nhlt;
+				bool ssp_found = false;
+
+				if (!acpi_dev_present(table->codec_hid->codecs[i], NULL, -1))
+					continue;
+
+				nhlt = intel_nhlt_init(&pci->dev);
+				if (!nhlt) {
+					dev_warn(&pci->dev, "%s: NHLT table not found, skipped HID %s\n",
+						 __func__, table->codec_hid->codecs[i]);
+					continue;
+				}
+
+				if (intel_nhlt_has_endpoint_type(nhlt, NHLT_LINK_SSP) &&
+				    intel_nhlt_ssp_endpoint_mask(nhlt, NHLT_DEVICE_I2S))
+					ssp_found = true;
+
+				intel_nhlt_free(nhlt);
+
+				if (ssp_found)
 					break;
+
+				dev_warn(&pci->dev, "%s: no valid SSP found for HID %s, skipped\n",
+					 __func__, table->codec_hid->codecs[i]);
+			}
 			if (i == table->codec_hid->num_codecs)
 				continue;
 		}
Signature · 1 line
2.43.0
author maintainer
#38 lore raw

PATCH 38/744 HID: mcp-2221: cancel delayed_work only when CONFIG_IIO is enabled

In reply to Greg Kroah-Hartman

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

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

From: Abdelrahman Morsy <[email protected]>

[ Upstream commit 3cba9cfcc1520a2307a29f6fab887bcfc121c417 ]

If the device is unplugged and CONFIG_IIO is not supported, this will result in a warning message at kernel/workqueue.

Only cancel delayed work in mcp2221_remove(), when CONFIG_IIO is enabled.

---
 drivers/hid/hid-mcp2221.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/hid/hid-mcp2221.c +2 -0
index aef0785c91cc2..c5bfca8ac5e6e 100644
@@ -922,9 +922,11 @@ static void mcp2221_hid_unregister(void *ptr)
 /* This is needed to be sure hid_hw_stop() isn't called twice by the subsystem */
 static void mcp2221_remove(struct hid_device *hdev)
 {
+#if IS_REACHABLE(CONFIG_IIO)
 	struct mcp2221 *mcp = hid_get_drvdata(hdev);
 
 	cancel_delayed_work_sync(&mcp->init_work);
+#endif
 }
 
 #if IS_REACHABLE(CONFIG_IIO)
Signature · 1 line
2.43.0
author maintainer
#39 lore raw

PATCH 39/744 net: usb: qmi_wwan: add Telit FN920C04 compositions

In reply to Greg Kroah-Hartman

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

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

From: Daniele Palmas <[email protected]>

[ Upstream commit 0b8fe5bd73249dc20be2e88a12041f8920797b59 ]

Add the following Telit FN920C04 compositions:

0x10a0: rmnet + tty (AT/NMEA) + tty (AT) + tty (diag)

T:  Bus=03 Lev=01 Prnt=03 Port=06 Cnt=01 Dev#=  5 Spd=480  MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1bc7 ProdID=10a0 Rev=05.15
S:  Manufacturer=Telit Cinterion
S:  Product=FN920
S:  SerialNumber=92c4c4d8
C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

0x10a4: rmnet + tty (AT) + tty (AT) + tty (diag)

T:  Bus=03 Lev=01 Prnt=03 Port=06 Cnt=01 Dev#=  8 Spd=480  MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1bc7 ProdID=10a4 Rev=05.15
S:  Manufacturer=Telit Cinterion
S:  Product=FN920
S:  SerialNumber=92c4c4d8
C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

0x10a9: rmnet + tty (AT) + tty (diag) + DPL (data packet logging) + adb

T:  Bus=03 Lev=01 Prnt=03 Port=06 Cnt=01 Dev#=  9 Spd=480  MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1bc7 ProdID=10a9 Rev=05.15
S:  Manufacturer=Telit Cinterion
S:  Product=FN920
S:  SerialNumber=92c4c4d8
C:  #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:  If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
---
 drivers/net/usb/qmi_wwan.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/usb/qmi_wwan.c +3 -0
index edc34402e787f..a5469cf5cf670 100644
@@ -1368,6 +1368,9 @@ static const struct usb_device_id products[] = {
 	{QMI_QUIRK_SET_DTR(0x1bc7, 0x1060, 2)},	/* Telit LN920 */
 	{QMI_QUIRK_SET_DTR(0x1bc7, 0x1070, 2)},	/* Telit FN990 */
 	{QMI_QUIRK_SET_DTR(0x1bc7, 0x1080, 2)}, /* Telit FE990 */
+	{QMI_QUIRK_SET_DTR(0x1bc7, 0x10a0, 0)}, /* Telit FN920C04 */
+	{QMI_QUIRK_SET_DTR(0x1bc7, 0x10a4, 0)}, /* Telit FN920C04 */
+	{QMI_QUIRK_SET_DTR(0x1bc7, 0x10a9, 0)}, /* Telit FN920C04 */
 	{QMI_FIXED_INTF(0x1bc7, 0x1100, 3)},	/* Telit ME910 */
 	{QMI_FIXED_INTF(0x1bc7, 0x1101, 3)},	/* Telit ME910 dual modem */
 	{QMI_FIXED_INTF(0x1bc7, 0x1200, 5)},	/* Telit LE920 */
Signature · 1 line
2.43.0
author maintainer
#40 lore raw

PATCH 40/744 drm/amd/display: Set color_mgmt_changed to true on unsuspend

In reply to Greg Kroah-Hartman

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

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

From: Joshua Ashton <[email protected]>

[ Upstream commit 2eb9dd497a698dc384c0dd3e0311d541eb2e13dd ]

Otherwise we can end up with a frame on unsuspend where color management is not applied when userspace has not committed themselves.

Fixes re-applying color management on Steam Deck/Gamescope on S3 resume.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
index 98dd07e3726af..7ed6bb61fe0ad 100644
@@ -2956,6 +2956,7 @@ static int dm_resume(void *handle)
 			dc_stream_release(dm_new_crtc_state->stream);
 			dm_new_crtc_state->stream = NULL;
 		}
+		dm_new_crtc_state->base.color_mgmt_changed = true;
 	}
 
 	for_each_new_plane_in_state(dm->cached_state, plane, new_plane_state, i) {
Signature · 1 line
2.43.0
author maintainer
#41 lore raw

PATCH 41/744 drm/amdgpu: Update BO eviction priorities

In reply to Greg Kroah-Hartman

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

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

From: Felix Kuehling <[email protected]>

[ Upstream commit b0b13d532105e0e682d95214933bb8483a063184 ]

Make SVM BOs more likely to get evicted than other BOs. These BOs opportunistically use available VRAM, but can fall back relatively seamlessly to system memory. It also avoids SVM migrations evicting other, more important BOs as they will evict other SVM allocations first.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -0
index a348d320575e0..4e9ae52ef9fdb 100644
@@ -613,6 +613,8 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
 	else
 		amdgpu_bo_placement_from_domain(bo, bp->domain);
 	if (bp->type == ttm_bo_type_kernel)
+		bo->tbo.priority = 2;
+	else if (!(bp->flags & AMDGPU_GEM_CREATE_DISCARDABLE))
 		bo->tbo.priority = 1;
 
 	if (!bp->destroy)
Signature · 1 line
2.43.0
author maintainer
#42 lore raw

PATCH 42/744 drm/amd/pm: Restore config space after reset

In reply to Greg Kroah-Hartman

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

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

From: Lijo Lazar <[email protected]>

[ Upstream commit 30d1cda8ce31ab49051ff7159280c542a738b23d ]

During mode-2 reset, pci config space registers are affected at device side. However, certain platforms have switches which assign virtual BAR addresses and returns the same even after device is reset. This affects pci_restore_state() as it doesn't issue another config write, if the value read is same as the saved value.

Add a workaround to write saved config space values from driver side. Presently, these switches are in platforms with SMU v13.0.6 SOCs, hence restrict the workaround only to those.

---
 .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c  | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +25 -0
index 6a28f8d5bff7d..be4b7b64f8785 100644
@@ -2039,6 +2039,17 @@ static ssize_t smu_v13_0_6_get_gpu_metrics(struct smu_context *smu, void **table
 	return sizeof(struct gpu_metrics_v1_3);
 }
 
+static void smu_v13_0_6_restore_pci_config(struct smu_context *smu)
+{
+	struct amdgpu_device *adev = smu->adev;
+	int i;
+
+	for (i = 0; i < 16; i++)
+		pci_write_config_dword(adev->pdev, i * 4,
+				       adev->pdev->saved_config_space[i]);
+	pci_restore_msi_state(adev->pdev);
+}
+
 static int smu_v13_0_6_mode2_reset(struct smu_context *smu)
 {
 	int ret = 0, index;
@@ -2060,6 +2071,20 @@ static int smu_v13_0_6_mode2_reset(struct smu_context *smu)
 	/* Restore the config space saved during init */
 	amdgpu_device_load_pci_state(adev->pdev);
 
+	/* Certain platforms have switches which assign virtual BAR values to
+	 * devices. OS uses the virtual BAR values and device behind the switch
+	 * is assgined another BAR value. When device's config space registers
+	 * are queried, switch returns the virtual BAR values. When mode-2 reset
+	 * is performed, switch is unaware of it, and will continue to return
+	 * the same virtual values to the OS.This affects
+	 * pci_restore_config_space() API as it doesn't write the value saved if
+	 * the current value read from config space is the same as what is
+	 * saved. As a workaround, make sure the config space is restored
+	 * always.
+	 */
+	if (!(adev->flags & AMD_IS_APU))
+		smu_v13_0_6_restore_pci_config(smu);
+
 	dev_dbg(smu->adev->dev, "wait for reset ack\n");
 	do {
 		ret = smu_cmn_wait_for_response(smu);
Signature · 1 line
2.43.0
author maintainer
#33 lore raw

PATCH 33/744 KEYS: asymmetric: Add missing dependencies of FIPS_SIGNATURE_SELFTEST

In reply to Greg Kroah-Hartman

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

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

From: Eric Biggers <[email protected]>

commit 9d2fd8bdc12f403a5c35c971936a0e1d5cb5108e upstream.

Since the signature self-test uses RSA and SHA-256, it must only be enabled when those algorithms are enabled. Otherwise it fails and panics the kernel on boot-up.

---
 crypto/asymmetric_keys/Kconfig |    2 ++
 1 file changed, 2 insertions(+)
crypto/asymmetric_keys/Kconfig +2 -0
@@ -86,5 +86,7 @@ config FIPS_SIGNATURE_SELFTEST
 	depends on ASYMMETRIC_KEY_TYPE
 	depends on PKCS7_MESSAGE_PARSER=X509_CERTIFICATE_PARSER
 	depends on X509_CERTIFICATE_PARSER
+	depends on CRYPTO_RSA
+	depends on CRYPTO_SHA256
 
 endif # ASYMMETRIC_KEY_TYPE
author maintainer
#77 lore raw

PATCH 77/744 drm/amd/display: Add dtbclk access to dcn315

In reply to Greg Kroah-Hartman

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

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

From: Swapnil Patel <[email protected]>

[ Upstream commit a01b64f31d65bdc917d1afb4cec9915beb6931be ]

[Why & How]

Currently DCN315 clk manager is missing code to enable/disable dtbclk. Because of this, "optimized_required" flag is constantly set and this prevents FreeSync from engaging for certain high bandwidth display Modes which require DTBCLK.

---
 .../drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c    | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +8 -0
index 8776055bbeaae..d4d3f58a613f7 100644
@@ -145,6 +145,10 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
 	 */
 	clk_mgr_base->clks.zstate_support = new_clocks->zstate_support;
 	if (safe_to_lower) {
+		if (clk_mgr_base->clks.dtbclk_en && !new_clocks->dtbclk_en) {
+			dcn315_smu_set_dtbclk(clk_mgr, false);
+			clk_mgr_base->clks.dtbclk_en = new_clocks->dtbclk_en;
+		}
 		/* check that we're not already in lower */
 		if (clk_mgr_base->clks.pwr_state != DCN_PWR_STATE_LOW_POWER) {
 			display_count = dcn315_get_active_display_cnt_wa(dc, context);
@@ -160,6 +164,10 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
 			}
 		}
 	} else {
+		if (!clk_mgr_base->clks.dtbclk_en && new_clocks->dtbclk_en) {
+			dcn315_smu_set_dtbclk(clk_mgr, true);
+			clk_mgr_base->clks.dtbclk_en = new_clocks->dtbclk_en;
+		}
 		/* check that we're not already in D0 */
 		if (clk_mgr_base->clks.pwr_state != DCN_PWR_STATE_MISSION_MODE) {
 			union display_idle_optimization_u idle_info = { 0 };
Signature · 1 line
2.43.0
author maintainer
#82 lore raw

PATCH 82/744 drm/amdkfd: Flush the process wq before creating a kfd_process

In reply to Greg Kroah-Hartman

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

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

From: Lancelot SIX <[email protected]>

[ Upstream commit f5b9053398e70a0c10aa9cb4dd5910ab6bc457c5 ]

There is a race condition when re-creating a kfd_process for a process. This has been observed when a process under the debugger executes exec(3). In this scenario:
- The process executes exec.
- This will eventually release the process's mm, which will cause the kfd_process object associated with the process to be freed (kfd_process_free_notifier decrements the reference count to the kfd_process to 0). This causes kfd_process_ref_release to enqueue kfd_process_wq_release to the kfd_process_wq.
- The debugger receives the PTRACE_EVENT_EXEC notification, and tries to re-enable AMDGPU traps (KFD_IOC_DBG_TRAP_ENABLE).
- When handling this request, KFD tries to re-create a kfd_process. This eventually calls kfd_create_process and kobject_init_and_add.

At this point the call to kobject_init_and_add can fail because the old kfd_process.kobj has not been freed yet by kfd_process_wq_release.

This patch proposes to avoid this race by making sure to drain kfd_process_wq before creating a new kfd_process object. This way, we know that any cleanup task is done executing when we reach kobject_init_and_add.

---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_process.c +8 -0
index 7a1a574106fac..d98e45aec76b4 100644
@@ -828,6 +828,14 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
 	if (process) {
 		pr_debug("Process already found\n");
 	} else {
+		/* If the process just called exec(3), it is possible that the
+		 * cleanup of the kfd_process (following the release of the mm
+		 * of the old process image) is still in the cleanup work queue.
+		 * Make sure to drain any job before trying to recreate any
+		 * resource for this process.
+		 */
+		flush_workqueue(kfd_process_wq);
+
 		process = create_process(thread);
 		if (IS_ERR(process))
 			goto out;
Signature · 1 line
2.43.0
author maintainer
#83 lore raw

PATCH 83/744 x86/mm: Remove broken vsyscall emulation code from the page fault code

In reply to Greg Kroah-Hartman

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

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

From: Linus Torvalds <[email protected]>

[ Upstream commit 02b670c1f88e78f42a6c5aee155c7b26960ca054 ]

The syzbot-reported stack trace from hell in this discussion thread actually has three nested page faults:

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

... and I think that's actually the important thing here:

- the first page fault is from user space, and triggers the vsyscall emulation.

- the second page fault is from __do_sys_gettimeofday(), and that should just have caused the exception that then sets the return value to -EFAULT

- the third nested page fault is due to _raw_spin_unlock_irqrestore() -> preempt_schedule() -> trace_sched_switch(), which then causes a BPF trace program to run, which does that bpf_probe_read_compat(), which causes that page fault under pagefault_disable().

It's quite the nasty backtrace, and there's a lot going on.

The problem is literally the vsyscall emulation, which sets

        current->thread.sig_on_uaccess_err = 1;

and that causes the fixup_exception() code to send the signal *despite* the exception being caught.

And I think that is in fact completely bogus. It's completely bogus exactly because it sends that signal even when it *shouldn't* be sent - like for the BPF user mode trace gathering.

In other words, I think the whole "sig_on_uaccess_err" thing is entirely broken, because it makes any nested page-faults do all the wrong things.

Now, arguably, I don't think anybody should enable vsyscall emulation any more, but this test case clearly does.

I think we should just make the "send SIGSEGV" be something that the vsyscall emulation does on its own, not this broken per-thread state for something that isn't actually per thread.

The x86 page fault code actually tried to deal with the "incorrect nesting" by having that:

                if (in_interrupt())
                        return;

which ignores the sig_on_uaccess_err case when it happens in interrupts, but as shown by this example, these nested page faults do not need to be about interrupts at all.

IOW, I think the only right thing is to remove that horrendously broken code.

The attached patch looks like the ObviouslyCorrect(tm) thing to do.

NOTE! This broken code goes back to this commit in 2011:

4fc3490114bb ("x86-64: Set siginfo and context on vsyscall emulation faults")

... and back then the reason was to get all the siginfo details right. Honestly, I do not for a moment believe that it's worth getting the siginfo details right here, but part of the commit says:

This fixes issues with UML when vsyscall=emulate.

... and so my patch to remove this garbage will probably break UML in this situation.

I do not believe that anybody should be running with vsyscall=emulate in 2024 in the first place, much less if you are doing things like UML. But let's see if somebody screams.

---
 arch/x86/entry/vsyscall/vsyscall_64.c | 28 ++---------------------
 arch/x86/include/asm/processor.h      |  1 -
 arch/x86/mm/fault.c                   | 33 +--------------------------
 3 files changed, 3 insertions(+), 59 deletions(-)
arch/x86/entry/vsyscall/vsyscall_64.c +2 -26
index e0ca8120aea87..1245000a8792f 100644
@@ -98,11 +98,6 @@ static int addr_to_vsyscall_nr(unsigned long addr)
 
 static bool write_ok_or_segv(unsigned long ptr, size_t size)
 {
-	/*
-	 * XXX: if access_ok, get_user, and put_user handled
-	 * sig_on_uaccess_err, this could go away.
-	 */
-
 	if (!access_ok((void __user *)ptr, size)) {
 		struct thread_struct *thread = &current->thread;
 
@@ -120,10 +115,8 @@ static bool write_ok_or_segv(unsigned long ptr, size_t size)
 bool emulate_vsyscall(unsigned long error_code,
 		      struct pt_regs *regs, unsigned long address)
 {
-	struct task_struct *tsk;
 	unsigned long caller;
 	int vsyscall_nr, syscall_nr, tmp;
-	int prev_sig_on_uaccess_err;
 	long ret;
 	unsigned long orig_dx;
 
@@ -172,8 +165,6 @@ bool emulate_vsyscall(unsigned long error_code,
 		goto sigsegv;
 	}
 
-	tsk = current;
-
 	/*
 	 * Check for access_ok violations and find the syscall nr.
 	 *
@@ -234,12 +225,8 @@ bool emulate_vsyscall(unsigned long error_code,
 		goto do_ret;  /* skip requested */
 
 	/*
-	 * With a real vsyscall, page faults cause SIGSEGV.  We want to
-	 * preserve that behavior to make writing exploits harder.
+	 * With a real vsyscall, page faults cause SIGSEGV.
 	 */
-	prev_sig_on_uaccess_err = current->thread.sig_on_uaccess_err;
-	current->thread.sig_on_uaccess_err = 1;
-
 	ret = -EFAULT;
 	switch (vsyscall_nr) {
 	case 0:
@@ -262,23 +249,12 @@ bool emulate_vsyscall(unsigned long error_code,
 		break;
 	}
 
-	current->thread.sig_on_uaccess_err = prev_sig_on_uaccess_err;
-
 check_fault:
 	if (ret == -EFAULT) {
 		/* Bad news -- userspace fed a bad pointer to a vsyscall. */
 		warn_bad_vsyscall(KERN_INFO, regs,
 				  "vsyscall fault (exploit attempt?)");
-
-		/*
-		 * If we failed to generate a signal for any reason,
-		 * generate one here.  (This should be impossible.)
-		 */
-		if (WARN_ON_ONCE(!sigismember(&tsk->pending.signal, SIGBUS) &&
-				 !sigismember(&tsk->pending.signal, SIGSEGV)))
-			goto sigsegv;
-
-		return true;  /* Don't emulate the ret. */
+		goto sigsegv;
 	}
 
 	regs->ax = ret;
arch/x86/include/asm/processor.h +0 -1
index 191f1d8f05061..6e19d0f226000 100644
@@ -464,7 +464,6 @@ struct thread_struct {
 	unsigned long		iopl_emul;
 
 	unsigned int		iopl_warn:1;
-	unsigned int		sig_on_uaccess_err:1;
 
 	/*
 	 * Protection Keys Register for Userspace.  Loaded immediately on
arch/x86/mm/fault.c +1 -32
index e238517968836..6529b3e2cff3c 100644
@@ -717,39 +717,8 @@ kernelmode_fixup_or_oops(struct pt_regs *regs, unsigned long error_code,
 	WARN_ON_ONCE(user_mode(regs));
 
 	/* Are we prepared to handle this kernel fault? */
-	if (fixup_exception(regs, X86_TRAP_PF, error_code, address)) {
-		/*
-		 * Any interrupt that takes a fault gets the fixup. This makes
-		 * the below recursive fault logic only apply to a faults from
-		 * task context.
-		 */
-		if (in_interrupt())
-			return;
-
-		/*
-		 * Per the above we're !in_interrupt(), aka. task context.
-		 *
-		 * In this case we need to make sure we're not recursively
-		 * faulting through the emulate_vsyscall() logic.
-		 */
-		if (current->thread.sig_on_uaccess_err && signal) {
-			sanitize_error_code(address, &error_code);
-
-			set_signal_archinfo(address, error_code);
-
-			if (si_code == SEGV_PKUERR) {
-				force_sig_pkuerr((void __user *)address, pkey);
-			} else {
-				/* XXX: hwpoison faults will set the wrong code. */
-				force_sig_fault(signal, si_code, (void __user *)address);
-			}
-		}
-
-		/*
-		 * Barring that, we can do the fixup and be happy.
-		 */
+	if (fixup_exception(regs, X86_TRAP_PF, error_code, address))
 		return;
-	}
 
 	/*
 	 * AMD erratum #91 manifests as a spurious page fault on a PREFETCH
Signature · 1 line
2.43.0
author maintainer
#84 lore raw

PATCH 84/744 nvme: find numa distance only if controller has valid numa id

In reply to Greg Kroah-Hartman

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

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

From: Nilay Shroff <[email protected]>

[ Upstream commit 863fe60ed27f2c85172654a63c5b827e72c8b2e6 ]

On system where native nvme multipath is configured and iopolicy is set to numa but the nvme controller numa node id is undefined or -1 (NUMA_NO_NODE) then avoid calculating node distance for finding optimal io path. In such case we may access numa distance table with invalid index and that may potentially refer to incorrect memory. So this patch ensures that if the nvme controller numa node id is -1 then instead of calculating node distance for finding optimal io path, we set the numa node distance of such controller to default 10 (LOCAL_DISTANCE).

---
 drivers/nvme/host/multipath.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/multipath.c +2 -1
index 0a88d7bdc5e37..b39553b8378b5 100644
@@ -246,7 +246,8 @@ static struct nvme_ns *__nvme_find_path(struct nvme_ns_head *head, int node)
 		if (nvme_path_is_disabled(ns))
 			continue;
 
-		if (READ_ONCE(head->subsys->iopolicy) == NVME_IOPOLICY_NUMA)
+		if (ns->ctrl->numa_node != NUMA_NO_NODE &&
+		    READ_ONCE(head->subsys->iopolicy) == NVME_IOPOLICY_NUMA)
 			distance = node_distance(node, ns->ctrl->numa_node);
 		else
 			distance = LOCAL_DISTANCE;
Signature · 1 line
2.43.0
author maintainer
#85 lore raw

PATCH 85/744 nvmet-auth: return the error code to the nvmet_auth_host_hash() callers

In reply to Greg Kroah-Hartman

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

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

From: Maurizio Lombardi <[email protected]>

[ Upstream commit 46b8f9f74f6d500871985e22eb19560b21f3bc81 ]

If the nvmet_auth_host_hash() function fails, the error code should be returned to its callers.

---
 drivers/nvme/target/auth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/auth.c +1 -1
index 4dcddcf95279b..1f7d492c4dc26 100644
@@ -368,7 +368,7 @@ int nvmet_auth_host_hash(struct nvmet_req *req, u8 *response,
 	kfree_sensitive(host_response);
 out_free_tfm:
 	crypto_free_shash(shash_tfm);
-	return 0;
+	return ret;
 }
 
 int nvmet_auth_ctrl_hash(struct nvmet_req *req, u8 *response,
Signature · 1 line
2.43.0
author maintainer
#86 lore raw

PATCH 86/744 nvmet-auth: replace pr_debug() with pr_err() to report an error.

In reply to Greg Kroah-Hartman

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

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

From: Maurizio Lombardi <[email protected]>

[ Upstream commit 445f9119e70368ccc964575c2a6d3176966a9d65 ]

In nvmet_auth_host_hash(), if a mismatch is detected in the hash length the kernel should print an error.

---
 drivers/nvme/target/auth.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/nvme/target/auth.c +3 -3
index 1f7d492c4dc26..e900525b78665 100644
@@ -284,9 +284,9 @@ int nvmet_auth_host_hash(struct nvmet_req *req, u8 *response,
 	}
 
 	if (shash_len != crypto_shash_digestsize(shash_tfm)) {
-		pr_debug("%s: hash len mismatch (len %d digest %d)\n",
-			 __func__, shash_len,
-			 crypto_shash_digestsize(shash_tfm));
+		pr_err("%s: hash len mismatch (len %d digest %d)\n",
+			__func__, shash_len,
+			crypto_shash_digestsize(shash_tfm));
 		ret = -EINVAL;
 		goto out_free_tfm;
 	}
Signature · 1 line
2.43.0
author maintainer
#87 lore raw

PATCH 87/744 nvme: cancel pending I/O if nvme controller is in terminal state

In reply to Greg Kroah-Hartman

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

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

From: Nilay Shroff <[email protected]>

[ Upstream commit 25bb3534ee21e39eb9301c4edd7182eb83cb0d07 ]

While I/O is running, if the pci bus error occurs then in-flight I/O can not complete. Worst, if at this time, user (logically) hot-unplug the nvme disk then the nvme_remove() code path can't forward progress until in-flight I/O is cancelled. So these sequence of events may potentially hang hot-unplug code path indefinitely. This patch helps cancel the pending/in-flight I/O from the nvme request timeout handler in case the nvme controller is in the terminal (DEAD/DELETING/DELETING_NOIO) state and that helps nvme_remove() code path forward progress and finish successfully.

---
 drivers/nvme/host/core.c | 21 ---------------------
 drivers/nvme/host/nvme.h | 21 +++++++++++++++++++++
 drivers/nvme/host/pci.c  |  8 +++++++-
 3 files changed, 28 insertions(+), 22 deletions(-)
drivers/nvme/host/core.c +0 -21
index 2db71e222fa7d..35eaa5c6c0c15 100644
@@ -587,27 +587,6 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 }
 EXPORT_SYMBOL_GPL(nvme_change_ctrl_state);
 
-/*
- * Returns true for sink states that can't ever transition back to live.
- */
-static bool nvme_state_terminal(struct nvme_ctrl *ctrl)
-{
-	switch (nvme_ctrl_state(ctrl)) {
-	case NVME_CTRL_NEW:
-	case NVME_CTRL_LIVE:
-	case NVME_CTRL_RESETTING:
-	case NVME_CTRL_CONNECTING:
-		return false;
-	case NVME_CTRL_DELETING:
-	case NVME_CTRL_DELETING_NOIO:
-	case NVME_CTRL_DEAD:
-		return true;
-	default:
-		WARN_ONCE(1, "Unhandled ctrl state:%d", ctrl->state);
-		return true;
-	}
-}
-
 /*
  * Waits for the controller state to be resetting, or returns false if it is
  * not possible to ever transition to that state.
drivers/nvme/host/nvme.h +21 -0
index 176e372a5a796..2c510c4e21c66 100644
@@ -740,6 +740,27 @@ static inline bool nvme_is_aen_req(u16 qid, __u16 command_id)
 		nvme_tag_from_cid(command_id) >= NVME_AQ_BLK_MQ_DEPTH;
 }
 
+/*
+ * Returns true for sink states that can't ever transition back to live.
+ */
+static inline bool nvme_state_terminal(struct nvme_ctrl *ctrl)
+{
+	switch (nvme_ctrl_state(ctrl)) {
+	case NVME_CTRL_NEW:
+	case NVME_CTRL_LIVE:
+	case NVME_CTRL_RESETTING:
+	case NVME_CTRL_CONNECTING:
+		return false;
+	case NVME_CTRL_DELETING:
+	case NVME_CTRL_DELETING_NOIO:
+	case NVME_CTRL_DEAD:
+		return true;
+	default:
+		WARN_ONCE(1, "Unhandled ctrl state:%d", ctrl->state);
+		return true;
+	}
+}
+
 void nvme_complete_rq(struct request *req);
 void nvme_complete_batch_req(struct request *req);
 
drivers/nvme/host/pci.c +7 -1
index e47172bd84efe..8d5ed4cb35d96 100644
@@ -1286,6 +1286,9 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req)
 	struct nvme_command cmd = { };
 	u32 csts = readl(dev->bar + NVME_REG_CSTS);
 
+	if (nvme_state_terminal(&dev->ctrl))
+		goto disable;
+
 	/* If PCI error recovery process is happening, we cannot reset or
 	 * the recovery mechanism will surely fail.
 	 */
@@ -1388,8 +1391,11 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req)
 	return BLK_EH_RESET_TIMER;
 
 disable:
-	if (!nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_RESETTING))
+	if (!nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_RESETTING)) {
+		if (nvme_state_terminal(&dev->ctrl))
+			nvme_dev_disable(dev, true);
 		return BLK_EH_DONE;
+	}
 
 	nvme_dev_disable(dev, false);
 	if (nvme_try_sched_reset(&dev->ctrl))
Signature · 1 line
2.43.0
author maintainer
#88 lore raw

PATCH 88/744 nvmet-tcp: fix possible memory leak when tearing down a controller

In reply to Greg Kroah-Hartman

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

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

From: Sagi Grimberg <[email protected]>

[ Upstream commit 6825bdde44340c5a9121f6d6fa25cc885bd9e821 ]

When we teardown the controller, we wait for pending I/Os to complete (sq->ref on all queues to drop to zero) and then we go over the commands, and free their command buffers in case they are still fetching data from the host (e.g. processing nvme writes) and have yet to take a reference on the sq.

However, we may miss the case where commands have failed before executing and are queued for sending a response, but will never occur because the queue socket is already down. In this case we may miss deallocating command buffers.

Solve this by freeing all commands buffers as nvmet_tcp_free_cmd_buffers is idempotent anyways.

---
 drivers/nvme/target/tcp.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/nvme/target/tcp.c +4 -7
index 8e5d547aa16cb..3d302815c6f36 100644
@@ -324,6 +324,7 @@ static int nvmet_tcp_check_ddgst(struct nvmet_tcp_queue *queue, void *pdu)
 	return 0;
 }
 
+/* If cmd buffers are NULL, no operation is performed */
 static void nvmet_tcp_free_cmd_buffers(struct nvmet_tcp_cmd *cmd)
 {
 	kfree(cmd->iov);
@@ -1476,13 +1477,9 @@ static void nvmet_tcp_free_cmd_data_in_buffers(struct nvmet_tcp_queue *queue)
 	struct nvmet_tcp_cmd *cmd = queue->cmds;
 	int i;
 
-	for (i = 0; i < queue->nr_cmds; i++, cmd++) {
-		if (nvmet_tcp_need_data_in(cmd))
-			nvmet_tcp_free_cmd_buffers(cmd);
-	}
-
-	if (!queue->nr_cmds && nvmet_tcp_need_data_in(&queue->connect))
-		nvmet_tcp_free_cmd_buffers(&queue->connect);
+	for (i = 0; i < queue->nr_cmds; i++, cmd++)
+		nvmet_tcp_free_cmd_buffers(cmd);
+	nvmet_tcp_free_cmd_buffers(&queue->connect);
 }
 
 static void nvmet_tcp_release_queue_work(struct work_struct *w)
Signature · 1 line
2.43.0
author maintainer
#89 lore raw

PATCH 89/744 nvmet: fix nvme status code when namespace is disabled

In reply to Greg Kroah-Hartman

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

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

From: Sagi Grimberg <[email protected]>

[ Upstream commit 505363957fad35f7aed9a2b0d8dad73451a80fb5 ]

If the user disabled a nvmet namespace, it is removed from the subsystem namespaces list. When nvmet processes a command directed to an nsid that was disabled, it cannot differentiate between a nsid that is disabled vs. a non-existent namespace, and resorts to return NVME_SC_INVALID_NS with the dnr bit set.

This translates to a non-retryable status for the host, which translates to a user error. We should expect disabled namespaces to not cause an I/O error in a multipath environment.

Address this by searching a configfs item for the namespace nvmet failed to find, and if we found one, conclude that the namespace is disabled (perhaps temporarily). Return NVME_SC_INTERNAL_PATH_ERROR in this case and keep DNR bit cleared.

---
 drivers/nvme/target/configfs.c | 13 +++++++++++++
 drivers/nvme/target/core.c     |  5 ++++-
 drivers/nvme/target/nvmet.h    |  1 +
 3 files changed, 18 insertions(+), 1 deletion(-)
drivers/nvme/target/configfs.c +13 -0
index 01b2a3d1a5e6c..3670a1103863b 100644
@@ -616,6 +616,19 @@ static struct configfs_attribute *nvmet_ns_attrs[] = {
 	NULL,
 };
 
+bool nvmet_subsys_nsid_exists(struct nvmet_subsys *subsys, u32 nsid)
+{
+	struct config_item *ns_item;
+	char name[4] = {};
+
+	if (sprintf(name, "%u", nsid) <= 0)
+		return false;
+	mutex_lock(&subsys->namespaces_group.cg_subsys->su_mutex);
+	ns_item = config_group_find_item(&subsys->namespaces_group, name);
+	mutex_unlock(&subsys->namespaces_group.cg_subsys->su_mutex);
+	return ns_item != NULL;
+}
+
 static void nvmet_ns_release(struct config_item *item)
 {
 	struct nvmet_ns *ns = to_nvmet_ns(item);
drivers/nvme/target/core.c +4 -1
index 3935165048e74..ce7e945cb4f7e 100644
@@ -425,10 +425,13 @@ void nvmet_stop_keep_alive_timer(struct nvmet_ctrl *ctrl)
 u16 nvmet_req_find_ns(struct nvmet_req *req)
 {
 	u32 nsid = le32_to_cpu(req->cmd->common.nsid);
+	struct nvmet_subsys *subsys = nvmet_req_subsys(req);
 
-	req->ns = xa_load(&nvmet_req_subsys(req)->namespaces, nsid);
+	req->ns = xa_load(&subsys->namespaces, nsid);
 	if (unlikely(!req->ns)) {
 		req->error_loc = offsetof(struct nvme_common_command, nsid);
+		if (nvmet_subsys_nsid_exists(subsys, nsid))
+			return NVME_SC_INTERNAL_PATH_ERROR;
 		return NVME_SC_INVALID_NS | NVME_SC_DNR;
 	}
 
drivers/nvme/target/nvmet.h +1 -0
index 8cfd60f3b5648..15b00ed7be16a 100644
@@ -530,6 +530,7 @@ void nvmet_subsys_disc_changed(struct nvmet_subsys *subsys,
 		struct nvmet_host *host);
 void nvmet_add_async_event(struct nvmet_ctrl *ctrl, u8 event_type,
 		u8 event_info, u8 log_page);
+bool nvmet_subsys_nsid_exists(struct nvmet_subsys *subsys, u32 nsid);
 
 #define NVMET_QUEUE_SIZE	1024
 #define NVMET_NR_QUEUES		128
Signature · 1 line
2.43.0
author maintainer
#90 lore raw

PATCH 90/744 epoll: be better about file lifetimes

In reply to Greg Kroah-Hartman

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

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

From: Linus Torvalds <[email protected]>

[ Upstream commit 4efaa5acf0a1d2b5947f98abb3acf8bfd966422b ]

epoll can call out to vfs_poll() with a file pointer that may race with the last 'fput()'. That would make f_count go down to zero, and while the ep->mtx locking means that the resulting file pointer tear-down will be blocked until the poll returns, it means that f_count is already dead, and any use of it won't actually get a reference to the file any
more: it's dead regardless.

Make sure we have a valid ref on the file pointer before we call down to vfs_poll() from the epoll routines.

---
 fs/eventpoll.c | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)
fs/eventpoll.c +37 -1
index 1d9a71a0c4c16..0ed73bc7d4652 100644
@@ -876,6 +876,34 @@ static __poll_t __ep_eventpoll_poll(struct file *file, poll_table *wait, int dep
 	return res;
 }
 
+/*
+ * The ffd.file pointer may be in the process of being torn down due to
+ * being closed, but we may not have finished eventpoll_release() yet.
+ *
+ * Normally, even with the atomic_long_inc_not_zero, the file may have
+ * been free'd and then gotten re-allocated to something else (since
+ * files are not RCU-delayed, they are SLAB_TYPESAFE_BY_RCU).
+ *
+ * But for epoll, users hold the ep->mtx mutex, and as such any file in
+ * the process of being free'd will block in eventpoll_release_file()
+ * and thus the underlying file allocation will not be free'd, and the
+ * file re-use cannot happen.
+ *
+ * For the same reason we can avoid a rcu_read_lock() around the
+ * operation - 'ffd.file' cannot go away even if the refcount has
+ * reached zero (but we must still not call out to ->poll() functions
+ * etc).
+ */
+static struct file *epi_fget(const struct epitem *epi)
+{
+	struct file *file;
+
+	file = epi->ffd.file;
+	if (!atomic_long_inc_not_zero(&file->f_count))
+		file = NULL;
+	return file;
+}
+
 /*
  * Differs from ep_eventpoll_poll() in that internal callers already have
  * the ep->mtx so we need to start from depth=1, such that mutex_lock_nested()
@@ -884,14 +912,22 @@ static __poll_t __ep_eventpoll_poll(struct file *file, poll_table *wait, int dep
 static __poll_t ep_item_poll(const struct epitem *epi, poll_table *pt,
 				 int depth)
 {
-	struct file *file = epi->ffd.file;
+	struct file *file = epi_fget(epi);
 	__poll_t res;
 
+	/*
+	 * We could return EPOLLERR | EPOLLHUP or something, but let's
+	 * treat this more as "file doesn't exist, poll didn't happen".
+	 */
+	if (!file)
+		return 0;
+
 	pt->_key = epi->event.events;
 	if (!is_file_epoll(file))
 		res = vfs_poll(file, pt);
 	else
 		res = __ep_eventpoll_poll(file, pt, depth);
+	fput(file);
 	return res & epi->event.events;
 }
 
Signature · 1 line
2.43.0
author maintainer
#91 lore raw

PATCH 91/744 ksmbd: fix uninitialized symbol share in smb2_tree_connect()

In reply to Greg Kroah-Hartman

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

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

From: Namjae Jeon <[email protected]>

[ Upstream commit bc642d7bfdac3bfd838a1cd6651955ae2eb8535a ]

Fix uninitialized symbol 'share' in smb2_tree_connect().

Fixes e9d8c2f95ab8 ("ksmbd: add continuous availability share parameter")
---
 fs/smb/server/smb2pdu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/smb/server/smb2pdu.c +2 -2
index 1e536ae277618..6a15c5d64f415 100644
@@ -1926,7 +1926,7 @@ int smb2_tree_connect(struct ksmbd_work *work)
 	struct ksmbd_session *sess = work->sess;
 	char *treename = NULL, *name = NULL;
 	struct ksmbd_tree_conn_status status;
-	struct ksmbd_share_config *share;
+	struct ksmbd_share_config *share = NULL;
 	int rc = -EINVAL;
 
 	WORK_BUFFERS(work, req, rsp);
@@ -1988,7 +1988,7 @@ int smb2_tree_connect(struct ksmbd_work *work)
 	write_unlock(&sess->tree_conns_lock);
 	rsp->StructureSize = cpu_to_le16(16);
 out_err1:
-	if (server_conf.flags & KSMBD_GLOBAL_FLAG_DURABLE_HANDLE &&
+	if (server_conf.flags & KSMBD_GLOBAL_FLAG_DURABLE_HANDLE && share &&
 	    test_share_config_flag(share,
 				   KSMBD_SHARE_FLAG_CONTINUOUS_AVAILABILITY))
 		rsp->Capabilities = SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY;
Signature · 1 line
2.43.0
author maintainer
#78 lore raw

PATCH 78/744 drm/amd/display: Allocate zero bw after bw alloc enable

In reply to Greg Kroah-Hartman

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

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

From: Meenakshikumar Somasundaram <[email protected]>

[ Upstream commit 46fe9cb1a9e62f4e6229f48ae303ef8e6c1fdc64 ]

[Why]
During DP tunnel creation, CM preallocates BW and reduces estimated BW of other DPIA. CM release preallocation only when allocation is complete. Display mode validation logic validates timings based on bw available per host router. In multi display setup, this causes bw allocation failure when allocation greater than estimated bw.

[How]
Do zero alloc to make the CM to release preallocation and update estimated BW correctly for all DPIAs per host router.

---
 .../amd/display/dc/link/protocols/link_dp_dpia_bw.c    | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c +9 -1
index 5491b707cec88..5a965c26bf209 100644
@@ -270,7 +270,7 @@ static void set_usb4_req_bw_req(struct dc_link *link, int req_bw)
 
 	/* Error check whether requested and allocated are equal */
 	req_bw = requested_bw * (Kbps_TO_Gbps / link->dpia_bw_alloc_config.bw_granularity);
-	if (req_bw == link->dpia_bw_alloc_config.allocated_bw) {
+	if (req_bw && (req_bw == link->dpia_bw_alloc_config.allocated_bw)) {
 		DC_LOG_ERROR("%s: Request bw equals to allocated bw for link(%d)\n",
 			__func__, link->link_index);
 	}
@@ -341,6 +341,14 @@ bool link_dp_dpia_set_dptx_usb4_bw_alloc_support(struct dc_link *link)
 			ret = true;
 			init_usb4_bw_struct(link);
 			link->dpia_bw_alloc_config.bw_alloc_enabled = true;
+
+			/*
+			 * During DP tunnel creation, CM preallocates BW and reduces estimated BW of other
+			 * DPIA. CM release preallocation only when allocation is complete. Do zero alloc
+			 * to make the CM to release preallocation and update estimated BW correctly for
+			 * all DPIAs per host router
+			 */
+			link_dp_dpia_allocate_usb4_bandwidth_for_stream(link, 0);
 		}
 	}
 
Signature · 1 line
2.43.0
author maintainer
#92 lore raw

PATCH 92/744 nvmet: prevent sprintf() overflow in nvmet_subsys_nsid_exists()

In reply to Greg Kroah-Hartman

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

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

From: Dan Carpenter <[email protected]>

[ Upstream commit d15dcd0f1a4753b57e66c64c8dc2a9779ff96aab ]

The nsid value is a u32 that comes from nvmet_req_find_ns(). It's endian data and we're on an error path and both of those raise red flags. So let's make this safer.

1) Make the buffer large enough for any u32.
2) Remove the unnecessary initialization.
3) Use snprintf() instead of sprintf() for even more safety.
4) The sprintf() function returns the number of bytes printed, not counting the NUL terminator. It is impossible for the return value to be <= 0 so delete that.

Fixes 505363957fad ("nvmet: fix nvme status code when namespace is disabled")
---
 drivers/nvme/target/configfs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nvme/target/configfs.c +2 -3
index 3670a1103863b..f999e18e4561d 100644
@@ -619,10 +619,9 @@ static struct configfs_attribute *nvmet_ns_attrs[] = {
 bool nvmet_subsys_nsid_exists(struct nvmet_subsys *subsys, u32 nsid)
 {
 	struct config_item *ns_item;
-	char name[4] = {};
+	char name[12];
 
-	if (sprintf(name, "%u", nsid) <= 0)
-		return false;
+	snprintf(name, sizeof(name), "%u", nsid);
 	mutex_lock(&subsys->namespaces_group.cg_subsys->su_mutex);
 	ns_item = config_group_find_item(&subsys->namespaces_group, name);
 	mutex_unlock(&subsys->namespaces_group.cg_subsys->su_mutex);
Signature · 1 line
2.43.0
author maintainer
#93 lore raw

PATCH 93/744 openpromfs: finish conversion to the new mount API

In reply to Greg Kroah-Hartman

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

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

From: Eric Sandeen <[email protected]>

[ Upstream commit 8f27829974b025d4df2e78894105d75e3bf349f0 ]

The original mount API conversion inexplicably left out the change from ->remount_fs to ->reconfigure; do that now.

Fixes 7ab2fa7693c3 ("vfs: Convert openpromfs to use the new mount API")
---
 fs/openpromfs/inode.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
fs/openpromfs/inode.c +4 -4
index b2457cb97fa00..e62e809a55265 100644
@@ -355,10 +355,10 @@ static struct inode *openprom_iget(struct super_block *sb, ino_t ino)
 	return inode;
 }
 
-static int openprom_remount(struct super_block *sb, int *flags, char *data)
+static int openpromfs_reconfigure(struct fs_context *fc)
 {
-	sync_filesystem(sb);
-	*flags |= SB_NOATIME;
+	sync_filesystem(fc->root->d_sb);
+	fc->sb_flags |= SB_NOATIME;
 	return 0;
 }
 
@@ -366,7 +366,6 @@ static const struct super_operations openprom_sops = {
 	.alloc_inode	= openprom_alloc_inode,
 	.free_inode	= openprom_free_inode,
 	.statfs		= simple_statfs,
-	.remount_fs	= openprom_remount,
 };
 
 static int openprom_fill_super(struct super_block *s, struct fs_context *fc)
@@ -415,6 +414,7 @@ static int openpromfs_get_tree(struct fs_context *fc)
 
 static const struct fs_context_operations openpromfs_context_ops = {
 	.get_tree	= openpromfs_get_tree,
+	.reconfigure	= openpromfs_reconfigure,
 };
 
 static int openpromfs_init_fs_context(struct fs_context *fc)
Signature · 1 line
2.43.0
author maintainer
#94 lore raw

PATCH 94/744 crypto: bcm - Fix pointer arithmetic

In reply to Greg Kroah-Hartman

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

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

From: Aleksandr Mishin <[email protected]>

[ Upstream commit 2b3460cbf454c6b03d7429e9ffc4fe09322eb1a9 ]

In spu2_dump_omd() value of ptr is increased by ciph_key_len instead of hash_iv_len which could lead to going beyond the buffer boundaries.
Fix this bug by changing ciph_key_len to hash_iv_len.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver")
---
 drivers/crypto/bcm/spu2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/bcm/spu2.c +1 -1
index 07989bb8c220a..3fdc64b5a65e7 100644
@@ -495,7 +495,7 @@ static void spu2_dump_omd(u8 *omd, u16 hash_key_len, u16 ciph_key_len,
 	if (hash_iv_len) {
 		packet_log("  Hash IV Length %u bytes\n", hash_iv_len);
 		packet_dump("  hash IV: ", ptr, hash_iv_len);
-		ptr += ciph_key_len;
+		ptr += hash_iv_len;
 	}
 
 	if (ciph_iv_len) {
Signature · 1 line
2.43.0
author maintainer
#95 lore raw

PATCH 95/744 mm/slub, kunit: Use inverted data to corrupt kmem cache

In reply to Greg Kroah-Hartman

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

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

From: Guenter Roeck <[email protected]>

[ Upstream commit b1080c667b3b2c8c38a7fa83ca5567124887abae ]

Two failure patterns are seen randomly when running slub_kunit tests with CONFIG_SLAB_FREELIST_RANDOM and CONFIG_SLAB_FREELIST_HARDENED enabled.

Pattern 1:
# test_clobber_zone: pass:1 fail:0 skip:0 total:1 ok 1 test_clobber_zone
# test_next_pointer: EXPECTATION FAILED at lib/slub_kunit.c:72 Expected 3 == slab_errors, but
slab_errors == 0 (0x0)
# test_next_pointer: EXPECTATION FAILED at lib/slub_kunit.c:84 Expected 2 == slab_errors, but
slab_errors == 0 (0x0)
# test_next_pointer: pass:0 fail:1 skip:0 total:1 not ok 2 test_next_pointer

In this case, test_next_pointer() overwrites p[s->offset], but the data at p[s->offset] is already 0x12.

Pattern 2:
ok 1 test_clobber_zone
# test_next_pointer: EXPECTATION FAILED at lib/slub_kunit.c:72 Expected 3 == slab_errors, but
slab_errors == 2 (0x2)
# test_next_pointer: pass:0 fail:1 skip:0 total:1 not ok 2 test_next_pointer

In this case, p[s->offset] has a value other than 0x12, but one of the expected failures is nevertheless missing.

Invert data instead of writing a fixed value to corrupt the cache data structures to fix the problem.

Fixes 1f9f78b1b376 ("mm/slub, kunit: add a KUnit test for SLUB debugging functionality")
Cc Oliver Glitta <[email protected]>
Cc Vlastimil Babka <[email protected]>
CC Daniel Latypov <[email protected]>
Cc Marco Elver <[email protected]>
---
 lib/slub_kunit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/slub_kunit.c +1 -1
index d4a3730b08fa7..4ce9604388069 100644
@@ -55,7 +55,7 @@ static void test_next_pointer(struct kunit *test)
 
 	ptr_addr = (unsigned long *)(p + s->offset);
 	tmp = *ptr_addr;
-	p[s->offset] = 0x12;
+	p[s->offset] = ~p[s->offset];
 
 	/*
 	 * Expecting three errors.
Signature · 1 line
2.43.0
author maintainer
#96 lore raw

PATCH 96/744 firmware: raspberrypi: Use correct device for DMA mappings

In reply to Greg Kroah-Hartman

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

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

From: Laurent Pinchart <[email protected]>

[ Upstream commit df518a0ae1b982a4dcf2235464016c0c4576a34d ]

The buffer used to transfer data over the mailbox interface is mapped using the client's device. This is incorrect, as the device performing the DMA transfer is the mailbox itself. Fix it by using the mailbox controller device instead.

This requires including the mailbox_controller.h header to dereference the mbox_chan and mbox_controller structures. The header is not meant to be included by clients. This could be fixed by extending the client API with a function to access the controller's device.

---
 drivers/firmware/raspberrypi.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/firmware/raspberrypi.c +4 -3
index f66efaa5196d9..428ae54d3196c 100644
@@ -9,6 +9,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/kref.h>
 #include <linux/mailbox_client.h>
+#include <linux/mailbox_controller.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
@@ -97,8 +98,8 @@ int rpi_firmware_property_list(struct rpi_firmware *fw,
 	if (size & 3)
 		return -EINVAL;
 
-	buf = dma_alloc_coherent(fw->cl.dev, PAGE_ALIGN(size), &bus_addr,
-				 GFP_ATOMIC);
+	buf = dma_alloc_coherent(fw->chan->mbox->dev, PAGE_ALIGN(size),
+				 &bus_addr, GFP_ATOMIC);
 	if (!buf)
 		return -ENOMEM;
 
@@ -126,7 +127,7 @@ int rpi_firmware_property_list(struct rpi_firmware *fw,
 		ret = -EINVAL;
 	}
 
-	dma_free_coherent(fw->cl.dev, PAGE_ALIGN(size), buf, bus_addr);
+	dma_free_coherent(fw->chan->mbox->dev, PAGE_ALIGN(size), buf, bus_addr);
 
 	return ret;
 }
Signature · 1 line
2.43.0
author maintainer
#97 lore raw

PATCH 97/744 ecryptfs: Fix buffer size for tag 66 packet

In reply to Greg Kroah-Hartman

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

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

From: Brian Kubisiak <[email protected]>

[ Upstream commit 85a6a1aff08ec9f5b929d345d066e2830e8818e5 ]

The 'TAG 66 Packet Format' description is missing the cipher code and checksum fields that are packed into the message packet. As a result, the buffer allocated for the packet is 3 bytes too small and write_tag_66_packet() will write up to 3 bytes past the end of the buffer.

Fix this by increasing the size of the allocation so the whole packet will always fit in the buffer.

This fixes the below kasan slab-out-of-bounds bug:

  BUG: KASAN: slab-out-of-bounds in ecryptfs_generate_key_packet_set+0x7d6/0xde0
  Write of size 1 at addr ffff88800afbb2a5 by task touch/181

  CPU: 0 PID: 181 Comm: touch Not tainted 6.6.13-gnu #1 4c9534092be820851bb687b82d1f92a426598dc6
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2/GNU Guix 04/01/2014
  Call Trace:
   <TASK>
   dump_stack_lvl+0x4c/0x70
   print_report+0xc5/0x610
   ? ecryptfs_generate_key_packet_set+0x7d6/0xde0
   ? kasan_complete_mode_report_info+0x44/0x210
   ? ecryptfs_generate_key_packet_set+0x7d6/0xde0
   kasan_report+0xc2/0x110
   ? ecryptfs_generate_key_packet_set+0x7d6/0xde0
   __asan_store1+0x62/0x80
   ecryptfs_generate_key_packet_set+0x7d6/0xde0
   ? __pfx_ecryptfs_generate_key_packet_set+0x10/0x10
   ? __alloc_pages+0x2e2/0x540
   ? __pfx_ovl_open+0x10/0x10 [overlay 30837f11141636a8e1793533a02e6e2e885dad1d]
   ? dentry_open+0x8f/0xd0
   ecryptfs_write_metadata+0x30a/0x550
   ? __pfx_ecryptfs_write_metadata+0x10/0x10
   ? ecryptfs_get_lower_file+0x6b/0x190
   ecryptfs_initialize_file+0x77/0x150
   ecryptfs_create+0x1c2/0x2f0
   path_openat+0x17cf/0x1ba0
   ? __pfx_path_openat+0x10/0x10
   do_filp_open+0x15e/0x290
   ? __pfx_do_filp_open+0x10/0x10
   ? __kasan_check_write+0x18/0x30
   ? _raw_spin_lock+0x86/0xf0
   ? __pfx__raw_spin_lock+0x10/0x10
   ? __kasan_check_write+0x18/0x30
   ? alloc_fd+0xf4/0x330
   do_sys_openat2+0x122/0x160
   ? __pfx_do_sys_openat2+0x10/0x10
   __x64_sys_openat+0xef/0x170
   ? __pfx___x64_sys_openat+0x10/0x10
   do_syscall_64+0x60/0xd0
   entry_SYSCALL_64_after_hwframe+0x6e/0xd8
  RIP: 0033:0x7f00a703fd67
  Code: 25 00 00 41 00 3d 00 00 41 00 74 37 64 8b 04 25 18 00 00 00 85 c0 75 5b 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 85 00 00 00 48 83 c4 68 5d 41 5c c3 0f 1f
  RSP: 002b:00007ffc088e30b0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
  RAX: ffffffffffffffda RBX: 00007ffc088e3368 RCX: 00007f00a703fd67
  RDX: 0000000000000941 RSI: 00007ffc088e48d7 RDI: 00000000ffffff9c
  RBP: 00007ffc088e48d7 R08: 0000000000000001 R09: 0000000000000000
  R10: 00000000000001b6 R11: 0000000000000246 R12: 0000000000000941
  R13: 0000000000000000 R14: 00007ffc088e48d7 R15: 00007f00a7180040
   </TASK>

  Allocated by task 181:
   kasan_save_stack+0x2f/0x60
   kasan_set_track+0x29/0x40
   kasan_save_alloc_info+0x25/0x40
   __kasan_kmalloc+0xc5/0xd0
   __kmalloc+0x66/0x160
   ecryptfs_generate_key_packet_set+0x6d2/0xde0
   ecryptfs_write_metadata+0x30a/0x550
   ecryptfs_initialize_file+0x77/0x150
   ecryptfs_create+0x1c2/0x2f0
   path_openat+0x17cf/0x1ba0
   do_filp_open+0x15e/0x290
   do_sys_openat2+0x122/0x160
   __x64_sys_openat+0xef/0x170
   do_syscall_64+0x60/0xd0
   entry_SYSCALL_64_after_hwframe+0x6e/0xd8
---
 fs/ecryptfs/keystore.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/ecryptfs/keystore.c +3 -1
index 3fe41964c0d8d..7f9f68c00ef63 100644
@@ -300,9 +300,11 @@ write_tag_66_packet(char *signature, u8 cipher_code,
 	 *         | Key Identifier Size      | 1 or 2 bytes |
 	 *         | Key Identifier           | arbitrary    |
 	 *         | File Encryption Key Size | 1 or 2 bytes |
+	 *         | Cipher Code              | 1 byte       |
 	 *         | File Encryption Key      | arbitrary    |
+	 *         | Checksum                 | 2 bytes      |
 	 */
-	data_len = (5 + ECRYPTFS_SIG_SIZE_HEX + crypt_stat->key_size);
+	data_len = (8 + ECRYPTFS_SIG_SIZE_HEX + crypt_stat->key_size);
 	*packet = kmalloc(data_len, GFP_KERNEL);
 	message = *packet;
 	if (!message) {
Signature · 1 line
2.43.0
author maintainer
#98 lore raw

PATCH 98/744 nilfs2: fix out-of-range warning

In reply to Greg Kroah-Hartman

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

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

From: Arnd Bergmann <[email protected]>

[ Upstream commit c473bcdd80d4ab2ae79a7a509a6712818366e32a ]

clang-14 points out that v_size is always smaller than a 64KB page size if that is configured by the CPU architecture:

fs/nilfs2/ioctl.c:63:19: error: result of comparison of constant 65536 with expression of type '__u16' (aka 'unsigned short') is always false [-Werror,-Wtautological-constant-out-of-range-compare]

        if (argv->v_size > PAGE_SIZE)
            ~~~~~~~~~~~~ ^ ~~~~~~~~~

This is ok, so just shut up that warning with a cast.

---
 fs/nilfs2/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nilfs2/ioctl.c +1 -1
index 40ffade49f389..53022bfe0b72d 100644
@@ -60,7 +60,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs,
 	if (argv->v_nmembs == 0)
 		return 0;
 
-	if (argv->v_size > PAGE_SIZE)
+	if ((size_t)argv->v_size > PAGE_SIZE)
 		return -EINVAL;
 
 	/*
Signature · 1 line
2.43.0
author maintainer
#99 lore raw

PATCH 99/744 parisc: add missing export of __cmpxchg_u8()

In reply to Greg Kroah-Hartman

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

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

From: Al Viro <[email protected]>

[ Upstream commit c57e5dccb06decf3cb6c272ab138c033727149b5 ]

__cmpxchg_u8() had been added (initially) for the sake of drivers/phy/ti/phy-tusb1210.c; the thing is, that drivers is modular, so we need an export

Fixes b344d6a83d01 "parisc: add support for cmpxchg on u8 pointers"
---
 arch/parisc/kernel/parisc_ksyms.c | 1 +
 1 file changed, 1 insertion(+)
arch/parisc/kernel/parisc_ksyms.c +1 -0
index 6f0c92e8149d8..dcf61cbd31470 100644
@@ -22,6 +22,7 @@ EXPORT_SYMBOL(memset);
 #include <linux/atomic.h>
 EXPORT_SYMBOL(__xchg8);
 EXPORT_SYMBOL(__xchg32);
+EXPORT_SYMBOL(__cmpxchg_u8);
 EXPORT_SYMBOL(__cmpxchg_u32);
 EXPORT_SYMBOL(__cmpxchg_u64);
 #ifdef CONFIG_SMP
Signature · 1 line
2.43.0
author maintainer
#100 lore raw

PATCH 100/744 crypto: ccp - drop platform ifdef checks

In reply to Greg Kroah-Hartman

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

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

From: Arnd Bergmann <[email protected]>

[ Upstream commit 42c2d7d02977ef09d434b1f5b354f5bc6c1027ab ]

When both ACPI and OF are disabled, the dev_vdata variable is unused:

drivers/crypto/ccp/sp-platform.c:33:34: error: unused variable 'dev_vdata' [-Werror,-Wunused-const-variable]

This is not a useful configuration, and there is not much point in saving a few bytes when only one of the two is enabled, so just remove all these ifdef checks and rely on of_match_node() and acpi_match_device() returning NULL when these subsystems are disabled.

Fixes 6c5063434098 ("crypto: ccp - Add ACPI support")
---
 drivers/crypto/ccp/sp-platform.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/crypto/ccp/sp-platform.c +2 -12
index 7d79a8744f9a6..c43ad7e1acf7e 100644
@@ -39,44 +39,38 @@ static const struct sp_dev_vdata dev_vdata[] = {
 	},
 };
 
-#ifdef CONFIG_ACPI
 static const struct acpi_device_id sp_acpi_match[] = {
 	{ "AMDI0C00", (kernel_ulong_t)&dev_vdata[0] },
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, sp_acpi_match);
-#endif
 
-#ifdef CONFIG_OF
 static const struct of_device_id sp_of_match[] = {
 	{ .compatible = "amd,ccp-seattle-v1a",
 	  .data = (const void *)&dev_vdata[0] },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, sp_of_match);
-#endif
 
 static struct sp_dev_vdata *sp_get_of_version(struct platform_device *pdev)
 {
-#ifdef CONFIG_OF
 	const struct of_device_id *match;
 
 	match = of_match_node(sp_of_match, pdev->dev.of_node);
 	if (match && match->data)
 		return (struct sp_dev_vdata *)match->data;
-#endif
+
 	return NULL;
 }
 
 static struct sp_dev_vdata *sp_get_acpi_version(struct platform_device *pdev)
 {
-#ifdef CONFIG_ACPI
 	const struct acpi_device_id *match;
 
 	match = acpi_match_device(sp_acpi_match, &pdev->dev);
 	if (match && match->driver_data)
 		return (struct sp_dev_vdata *)match->driver_data;
-#endif
+
 	return NULL;
 }
 
@@ -214,12 +208,8 @@ static int sp_platform_resume(struct platform_device *pdev)
 static struct platform_driver sp_platform_driver = {
 	.driver = {
 		.name = "ccp",
-#ifdef CONFIG_ACPI
 		.acpi_match_table = sp_acpi_match,
-#endif
-#ifdef CONFIG_OF
 		.of_match_table = sp_of_match,
-#endif
 	},
 	.probe = sp_platform_probe,
 	.remove = sp_platform_remove,
Signature · 1 line
2.43.0
author maintainer
#101 lore raw

PATCH 101/744 crypto: x86/nh-avx2 - add missing vzeroupper

In reply to Greg Kroah-Hartman

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

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

From: Eric Biggers <[email protected]>

[ Upstream commit 4ad096cca942959871d8ff73826d30f81f856f6e ]

Since nh_avx2() uses ymm registers, execute vzeroupper before returning from it. This is necessary to avoid reducing the performance of SSE code.

Fixes 0f961f9f670e ("crypto: x86/nhpoly1305 - add AVX2 accelerated NHPoly1305")
---
 arch/x86/crypto/nh-avx2-x86_64.S | 1 +
 1 file changed, 1 insertion(+)
arch/x86/crypto/nh-avx2-x86_64.S +1 -0
index ef73a3ab87263..791386d9a83aa 100644
@@ -154,5 +154,6 @@ SYM_TYPED_FUNC_START(nh_avx2)
 	vpaddq		T1, T0, T0
 	vpaddq		T4, T0, T0
 	vmovdqu		T0, (HASH)
+	vzeroupper
 	RET
 SYM_FUNC_END(nh_avx2)
Signature · 1 line
2.43.0
author maintainer
#79 lore raw

PATCH 79/744 drm/amd/display: Add VCO speed parameter for DCN31 FPU

In reply to Greg Kroah-Hartman

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

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

From: Rodrigo Siqueira <[email protected]>

[ Upstream commit 0e62103bdcbc88281e16add299a946fb3bd02fbe ]

Add VCO speed parameters in the bounding box array.

---
 drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c +2 -0
index deb6d162a2d5c..7307b7b8d8ad7 100644
@@ -291,6 +291,7 @@ static struct _vcs_dpi_soc_bounding_box_st dcn3_15_soc = {
 	.do_urgent_latency_adjustment = false,
 	.urgent_latency_adjustment_fabric_clock_component_us = 0,
 	.urgent_latency_adjustment_fabric_clock_reference_mhz = 0,
+	.dispclk_dppclk_vco_speed_mhz = 2400.0,
 	.num_chans = 4,
 	.dummy_pstate_latency_us = 10.0
 };
@@ -438,6 +439,7 @@ static struct _vcs_dpi_soc_bounding_box_st dcn3_16_soc = {
 	.do_urgent_latency_adjustment = false,
 	.urgent_latency_adjustment_fabric_clock_component_us = 0,
 	.urgent_latency_adjustment_fabric_clock_reference_mhz = 0,
+	.dispclk_dppclk_vco_speed_mhz = 2500.0,
 };
 
 void dcn31_zero_pipe_dcc_fraction(display_e2e_pipe_params_st *pipes,
Signature · 1 line
2.43.0
author maintainer
#102 lore raw

PATCH 102/744 crypto: x86/sha256-avx2 - add missing vzeroupper

In reply to Greg Kroah-Hartman

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

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

From: Eric Biggers <[email protected]>

[ Upstream commit 57ce8a4e162599cf9adafef1f29763160a8e5564 ]

Since sha256_transform_rorx() uses ymm registers, execute vzeroupper before returning from it. This is necessary to avoid reducing the performance of SSE code.

Fixes d34a460092d8 ("crypto: sha256 - Optimized sha256 x86_64 routine using AVX2's RORX instructions")
---
 arch/x86/crypto/sha256-avx2-asm.S | 1 +
 1 file changed, 1 insertion(+)
arch/x86/crypto/sha256-avx2-asm.S +1 -0
index 9918212faf914..0ffb072be9561 100644
@@ -716,6 +716,7 @@ SYM_TYPED_FUNC_START(sha256_transform_rorx)
 	popq	%r13
 	popq	%r12
 	popq	%rbx
+	vzeroupper
 	RET
 SYM_FUNC_END(sha256_transform_rorx)
 
Signature · 1 line
2.43.0
author maintainer
#103 lore raw

PATCH 103/744 crypto: x86/sha512-avx2 - add missing vzeroupper

In reply to Greg Kroah-Hartman

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

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

From: Eric Biggers <[email protected]>

[ Upstream commit 6a24fdfe1edbafacdacd53516654d99068f20eec ]

Since sha512_transform_rorx() uses ymm registers, execute vzeroupper before returning from it. This is necessary to avoid reducing the performance of SSE code.

Fixes e01d69cb0195 ("crypto: sha512 - Optimized SHA512 x86_64 assembly routine using AVX instructions.")
---
 arch/x86/crypto/sha512-avx2-asm.S | 1 +
 1 file changed, 1 insertion(+)
arch/x86/crypto/sha512-avx2-asm.S +1 -0
index f08496cd68708..24973f42c43ff 100644
@@ -680,6 +680,7 @@ SYM_TYPED_FUNC_START(sha512_transform_rorx)
 	pop	%r12
 	pop	%rbx
 
+	vzeroupper
 	RET
 SYM_FUNC_END(sha512_transform_rorx)
 
Signature · 1 line
2.43.0
author maintainer
#104 lore raw

PATCH 104/744 s390/cio: fix tracepoint subchannel type field

In reply to Greg Kroah-Hartman

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

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

From: Peter Oberparleiter <[email protected]>

[ Upstream commit 8692a24d0fae19f674d51726d179ad04ba95d958 ]

The subchannel-type field "st" of s390_cio_stsch and s390_cio_msch tracepoints is incorrectly filled with the subchannel-enabled SCHIB value "ena". Fix this by assigning the correct value.

Fixes d1de8633d96a ("s390 cio: Rewrite trace point class s390_class_schib")
---
 drivers/s390/cio/trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/cio/trace.h +1 -1
index 86993de253451..a4c5c6736b310 100644
@@ -50,7 +50,7 @@ DECLARE_EVENT_CLASS(s390_class_schib,
 		__entry->devno = schib->pmcw.dev;
 		__entry->schib = *schib;
 		__entry->pmcw_ena = schib->pmcw.ena;
-		__entry->pmcw_st = schib->pmcw.ena;
+		__entry->pmcw_st = schib->pmcw.st;
 		__entry->pmcw_dnv = schib->pmcw.dnv;
 		__entry->pmcw_dev = schib->pmcw.dev;
 		__entry->pmcw_lpm = schib->pmcw.lpm;
Signature · 1 line
2.43.0
author maintainer
#105 lore raw

PATCH 105/744 io_uring: use the right type for work_llist empty check

In reply to Greg Kroah-Hartman

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

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

From: Jens Axboe <[email protected]>

[ Upstream commit 22537c9f79417fed70b352d54d01d2586fee9521 ]

io_task_work_pending() uses wq_list_empty() on ctx->work_llist, but it's not an io_wq_work_list, it's a struct llist_head. They both have ->first as head-of-list, and it turns out the checks are identical. But be proper and use the right helper.

Fixes dac6a0eae793 ("io_uring: ensure iopoll runs local task work as well")
---
 io_uring/io_uring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/io_uring.h +1 -1
index 411c883b37a95..19ac1b2f1ea45 100644
@@ -304,7 +304,7 @@ static inline int io_run_task_work(void)
 
 static inline bool io_task_work_pending(struct io_ring_ctx *ctx)
 {
-	return task_work_pending(current) || !wq_list_empty(&ctx->work_llist);
+	return task_work_pending(current) || !llist_empty(&ctx->work_llist);
 }
 
 static inline void io_tw_lock(struct io_ring_ctx *ctx, struct io_tw_state *ts)
Signature · 1 line
2.43.0
author maintainer
#106 lore raw

PATCH 106/744 rcu-tasks: Fix show_rcu_tasks_trace_gp_kthread buffer overflow

In reply to Greg Kroah-Hartman

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

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

From: Nikita Kiryushin <[email protected]>

[ Upstream commit cc5645fddb0ce28492b15520306d092730dffa48 ]

There is a possibility of buffer overflow in show_rcu_tasks_trace_gp_kthread() if counters, passed to sprintf() are huge. Counter numbers, needed for this are unrealistically high, but buffer overflow is still possible.

Use snprintf() with buffer size instead of sprintf().

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes edf3775f0ad6 ("rcu-tasks: Add count for idle tasks on offline CPUs")
---
 kernel/rcu/tasks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rcu/tasks.h +1 -1
index 65e000ca332cc..305e960c08ac5 100644
@@ -1938,7 +1938,7 @@ void show_rcu_tasks_trace_gp_kthread(void)
 {
 	char buf[64];
 
-	sprintf(buf, "N%lu h:%lu/%lu/%lu",
+	snprintf(buf, sizeof(buf), "N%lu h:%lu/%lu/%lu",
 		data_race(n_trc_holdouts),
 		data_race(n_heavy_reader_ofl_updates),
 		data_race(n_heavy_reader_updates),
Signature · 1 line
2.43.0
author maintainer
#107 lore raw

PATCH 107/744 rcu: Fix buffer overflow in print_cpu_stall_info()

In reply to Greg Kroah-Hartman

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

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

From: Nikita Kiryushin <[email protected]>

[ Upstream commit 3758f7d9917bd7ef0482c4184c0ad673b4c4e069 ]

The rcuc-starvation output from print_cpu_stall_info() might overflow the buffer if there is a huge difference in jiffies difference. The situation might seem improbable, but computers sometimes get very confused about time, which can result in full-sized integers, and, in this case, buffer overflow.

Also, the unsigned jiffies difference is printed using %ld, which is normally for signed integers. This is intentional for debugging purposes, but it is not obvious from the code.

This commit therefore changes sprintf() to snprintf() and adds a clarifying comment about intention of %ld format.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes 245a62982502 ("rcu: Dump rcuc kthread status for CPUs not reporting quiescent state")
---
 kernel/rcu/tree_stall.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/rcu/tree_stall.h +2 -1
index e09f4f624261e..11a1fac3a5898 100644
@@ -503,7 +503,8 @@ static void print_cpu_stall_info(int cpu)
 			rcu_dynticks_in_eqs(rcu_dynticks_snap(cpu));
 	rcuc_starved = rcu_is_rcuc_kthread_starving(rdp, &j);
 	if (rcuc_starved)
-		sprintf(buf, " rcuc=%ld jiffies(starved)", j);
+		// Print signed value, as negative values indicate a probable bug.
+		snprintf(buf, sizeof(buf), " rcuc=%ld jiffies(starved)", j);
 	pr_err("\t%d-%c%c%c%c: (%lu %s) idle=%04x/%ld/%#lx softirq=%u/%u fqs=%ld%s%s\n",
 	       cpu,
 	       "O."[!!cpu_online(cpu)],
Signature · 1 line
2.43.0
author maintainer
#108 lore raw

PATCH 108/744 ARM: configs: sunxi: Enable DRM_DW_HDMI

In reply to Greg Kroah-Hartman

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

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

From: Maxime Ripard <[email protected]>

[ Upstream commit deff401b14e2d832b25b55862ad6c73378fe034e ]

Commit 4fc8cb47fcfd ("drm/display: Move HDMI helpers into display-helper module") turned the DRM_DW_HDMI dependency of DRM_SUN8I_DW_HDMI into a depends on which ended up disabling the driver in the defconfig. Make sure it's still enabled.

---
 arch/arm/configs/sunxi_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/sunxi_defconfig +1 -0
index bddc82f789421..a83d29fed1756 100644
@@ -110,6 +110,7 @@ CONFIG_DRM_PANEL_LVDS=y
 CONFIG_DRM_PANEL_SIMPLE=y
 CONFIG_DRM_PANEL_EDP=y
 CONFIG_DRM_SIMPLE_BRIDGE=y
+CONFIG_DRM_DW_HDMI=y
 CONFIG_DRM_LIMA=y
 CONFIG_FB_SIMPLE=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
Signature · 1 line
2.43.0
author maintainer
#80 lore raw

PATCH 80/744 drm/amd/display: Fix DC mode screen flickering on DCN321

In reply to Greg Kroah-Hartman

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

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

From: Leo Ma <[email protected]>

[ Upstream commit ce649bd2d834db83ecc2756a362c9a1ec61658a5 ]

[Why && How]
Screen flickering saw on 4K@60 eDP with high refresh rate external monitor when booting up in DC mode. DC Mode Capping is disabled which caused wrong UCLK being used.

---
 .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c  | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +12 -3
index e9345f6554dbc..2428a4763b85f 100644
@@ -547,8 +547,12 @@ static void dcn32_update_clocks(struct clk_mgr *clk_mgr_base,
 					 * since we calculate mode support based on softmax being the max UCLK
 					 * frequency.
 					 */
-					dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK,
-							dc->clk_mgr->bw_params->dc_mode_softmax_memclk);
+					if (dc->debug.disable_dc_mode_overwrite) {
+						dcn30_smu_set_hard_max_by_freq(clk_mgr, PPCLK_UCLK, dc->clk_mgr->bw_params->max_memclk_mhz);
+						dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK, dc->clk_mgr->bw_params->max_memclk_mhz);
+					} else
+						dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK,
+								dc->clk_mgr->bw_params->dc_mode_softmax_memclk);
 				} else {
 					dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK, dc->clk_mgr->bw_params->max_memclk_mhz);
 				}
@@ -581,8 +585,13 @@ static void dcn32_update_clocks(struct clk_mgr *clk_mgr_base,
 		/* set UCLK to requested value if P-State switching is supported, or to re-enable P-State switching */
 		if (clk_mgr_base->clks.p_state_change_support &&
 				(update_uclk || !clk_mgr_base->clks.prev_p_state_change_support) &&
-				!dc->work_arounds.clock_update_disable_mask.uclk)
+				!dc->work_arounds.clock_update_disable_mask.uclk) {
+			if (dc->clk_mgr->dc_mode_softmax_enabled && dc->debug.disable_dc_mode_overwrite)
+				dcn30_smu_set_hard_max_by_freq(clk_mgr, PPCLK_UCLK,
+						max((int)dc->clk_mgr->bw_params->dc_mode_softmax_memclk, khz_to_mhz_ceil(clk_mgr_base->clks.dramclk_khz)));
+
 			dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK, khz_to_mhz_ceil(clk_mgr_base->clks.dramclk_khz));
+		}
 
 		if (clk_mgr_base->clks.num_ways != new_clocks->num_ways &&
 				clk_mgr_base->clks.num_ways > new_clocks->num_ways) {
Signature · 1 line
2.43.0
author maintainer
#109 lore raw

PATCH 109/744 jffs2: prevent xattr node from overflowing the eraseblock

In reply to Greg Kroah-Hartman

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

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

From: Ilya Denisyev <[email protected]>

[ Upstream commit c6854e5a267c28300ff045480b5a7ee7f6f1d913 ]

Add a check to make sure that the requested xattr node size is no larger than the eraseblock minus the cleanmarker.

Unlike the usual inode nodes, the xattr nodes aren't split into parts and spread across multiple eraseblocks, which means that a xattr node must not occupy more than one eraseblock. If the requested xattr value is too large, the xattr node can spill onto the next eraseblock, overwriting the nodes and causing errors such as:

jffs2: argh. node added in wrong place at 0x0000b050(2)
jffs2: nextblock 0x0000a000, expected at 0000b00c
jffs2: error: (823) do_verify_xattr_datum: node CRC failed at 0x01e050, read=0xfc892c93, calc=0x000000
jffs2: notice: (823) jffs2_get_inode_nodes: Node header CRC failed at 0x01e00c. {848f,2fc4,0fef511f,59a3d171}
jffs2: Node at 0x0000000c with length 0x00001044 would run over the end of the erase block
jffs2: Perhaps the file system was created with the wrong erase size?
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x1044 instead

This breaks the filesystem and can lead to KASAN crashes such as:

BUG: KASAN: slab-out-of-bounds in jffs2_sum_add_kvec+0x125e/0x15d0
Read of size 4 at addr ffff88802c31e914 by task repro/830
CPU: 0 PID: 830 Comm: repro Not tainted 6.9.0-rc3+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS Arch Linux 1.16.3-1-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xc6/0x120
 print_report+0xc4/0x620
 ? __virt_addr_valid+0x308/0x5b0
 kasan_report+0xc1/0xf0
 ? jffs2_sum_add_kvec+0x125e/0x15d0
 ? jffs2_sum_add_kvec+0x125e/0x15d0
 jffs2_sum_add_kvec+0x125e/0x15d0
 jffs2_flash_direct_writev+0xa8/0xd0
 jffs2_flash_writev+0x9c9/0xef0
 ? __x64_sys_setxattr+0xc4/0x160
 ? do_syscall_64+0x69/0x140
 ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
 [...]

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes aa98d7cf59b5 ("[JFFS2][XATTR] XATTR support on JFFS2 (version. 5)")
---
 fs/jffs2/xattr.c | 3 +++
 1 file changed, 3 insertions(+)
fs/jffs2/xattr.c +3 -0
index 3b6bdc9a49e1b..23c1f6a120f0c 100644
@@ -1110,6 +1110,9 @@ int do_jffs2_setxattr(struct inode *inode, int xprefix, const char *xname,
 		return rc;
 
 	request = PAD(sizeof(struct jffs2_raw_xattr) + strlen(xname) + 1 + size);
+	if (request > c->sector_size - c->cleanmarker_size)
+		return -ERANGE;
+
 	rc = jffs2_reserve_space(c, request, &length,
 				 ALLOC_NORMAL, JFFS2_SUMMARY_XATTR_SIZE);
 	if (rc) {
Signature · 1 line
2.43.0
author maintainer
#81 lore raw

PATCH 81/744 drm/amd/display: Disable seamless boot on 128b/132b encoding

In reply to Greg Kroah-Hartman

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

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

From: Sung Joon Kim <[email protected]>

[ Upstream commit 6f0c228ed9184287031a66b46a79e5a3d2e73a86 ]

[why]
preOS will not support display mode programming and link training for UHBR rates.

[how]
If we detect a sink that's UHBR capable, disable seamless boot

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -0
index 46b10ff8f6d41..72db370e2f21f 100644
@@ -1710,6 +1710,9 @@ bool dc_validate_boot_timing(const struct dc *dc,
 		return false;
 	}
 
+	if (link->dpcd_caps.channel_coding_cap.bits.DP_128b_132b_SUPPORTED)
+		return false;
+
 	if (dc->link_srv->edp_is_ilr_optimization_required(link, crtc_timing)) {
 		DC_LOG_EVENT_LINK_TRAINING("Seamless boot disabled to optimize eDP link rate\n");
 		return false;
Signature · 1 line
2.43.0
author maintainer
#76 lore raw

PATCH 76/744 drm/amdgpu: Fix VRAM memory accounting

In reply to Greg Kroah-Hartman

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

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

From: Mukul Joshi <[email protected]>

[ Upstream commit f06446ef23216090d1ee8ede1a7d7ae430c22dcc ]

Subtract the VRAM pinned memory when checking for available memory in amdgpu_amdkfd_reserve_mem_limit function since that memory is not available for use.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +1 -1
index 15c5a2533ba60..704567885c7a4 100644
@@ -213,7 +213,7 @@ int amdgpu_amdkfd_reserve_mem_limit(struct amdgpu_device *adev,
 	    (kfd_mem_limit.ttm_mem_used + ttm_mem_needed >
 	     kfd_mem_limit.max_ttm_mem_limit) ||
 	    (adev && xcp_id >= 0 && adev->kfd.vram_used[xcp_id] + vram_needed >
-	     vram_size - reserved_for_pt)) {
+	     vram_size - reserved_for_pt - atomic64_read(&adev->vram_pin_size))) {
 		ret = -ENOMEM;
 		goto release;
 	}
Signature · 1 line
2.43.0
author maintainer
#113 lore raw

PATCH 113/744 soc: qcom: pmic_glink: dont traverse clients list without a lock

In reply to Greg Kroah-Hartman

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

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit 635ce0db89567ba62f64b79e8c6664ba3eff6516 ]

Take the client_lock before traversing the clients list at the pmic_glink_state_notify_clients() function. This is required to keep the list traversal safe from concurrent modification.

---
 drivers/soc/qcom/pmic_glink.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/soc/qcom/pmic_glink.c +4 -0
index d5a4e71633ed6..c6dca5278e61b 100644
@@ -118,10 +118,12 @@ static int pmic_glink_rpmsg_callback(struct rpmsg_device *rpdev, void *data,
 
 	hdr = data;
 
+	mutex_lock(&pg->client_lock);
 	list_for_each_entry(client, &pg->clients, node) {
 		if (client->id == le32_to_cpu(hdr->owner))
 			client->cb(data, len, client->priv);
 	}
+	mutex_unlock(&pg->client_lock);
 
 	return 0;
 }
@@ -171,8 +173,10 @@ static void pmic_glink_state_notify_clients(struct pmic_glink *pg)
 	}
 
 	if (new_state != pg->client_state) {
+		mutex_lock(&pg->client_lock);
 		list_for_each_entry(client, &pg->clients, node)
 			client->pdr_notify(client->priv, new_state);
+		mutex_unlock(&pg->client_lock);
 		pg->client_state = new_state;
 	}
 }
Signature · 1 line
2.43.0
author maintainer
#114 lore raw

PATCH 114/744 soc: qcom: pmic_glink: notify clients about the current state

In reply to Greg Kroah-Hartman

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

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit d6cbce2cd354c9a37a558f290a8f1dfd20584f99 ]

In case the client is registered after the pmic-glink recived a response from the Protection Domain mapper, it is going to miss the notification about the state. Notify clients about the current state upon registration.

---
 drivers/soc/qcom/pmic_glink.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/soc/qcom/pmic_glink.c +5 -0
index c6dca5278e61b..062ff7b12de6a 100644
@@ -86,9 +86,14 @@ struct pmic_glink_client *devm_pmic_glink_register_client(struct device *dev,
 	client->pdr_notify = pdr;
 	client->priv = priv;
 
+	mutex_lock(&pg->state_lock);
 	mutex_lock(&pg->client_lock);
+
 	list_add(&client->node, &pg->clients);
+	client->pdr_notify(client->priv, pg->client_state);
+
 	mutex_unlock(&pg->client_lock);
+	mutex_unlock(&pg->state_lock);
 
 	devres_add(dev, client);
 
Signature · 1 line
2.43.0
author maintainer
#115 lore raw

PATCH 115/744 firmware: qcom: scm: Fix __scm and waitq completion variable initialization

In reply to Greg Kroah-Hartman

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

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

From: Mukesh Ojha <[email protected]>

[ Upstream commit 2e4955167ec5c04534cebea9e8273a907e7a75e1 ]

It is possible qcom_scm_is_available() gives wrong indication that if __scm is initialized while __scm->dev is not and similar issue is also possible with __scm->waitq_comp.

Fix this appropriately by the use of release barrier and read barrier that will make sure if __scm is initialized so, is all of its field variable.

Fixes d0f6fa7ba2d6 ("firmware: qcom: scm: Convert SCM to platform driver")
Fixes 6bf325992236 ("firmware: qcom: scm: Add wait-queue handling logic")
---
 drivers/firmware/qcom_scm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/firmware/qcom_scm.c +5 -5
index 69831f1d91e3f..ff7c155239e31 100644
@@ -1333,7 +1333,7 @@ static int qcom_scm_find_dload_address(struct device *dev, u64 *addr)
  */
 bool qcom_scm_is_available(void)
 {
-	return !!__scm;
+	return !!READ_ONCE(__scm);
 }
 EXPORT_SYMBOL_GPL(qcom_scm_is_available);
 
@@ -1414,10 +1414,12 @@ static int qcom_scm_probe(struct platform_device *pdev)
 	if (!scm)
 		return -ENOMEM;
 
+	scm->dev = &pdev->dev;
 	ret = qcom_scm_find_dload_address(&pdev->dev, &scm->dload_mode_addr);
 	if (ret < 0)
 		return ret;
 
+	init_completion(&scm->waitq_comp);
 	mutex_init(&scm->scm_bw_lock);
 
 	scm->path = devm_of_icc_get(&pdev->dev, NULL);
@@ -1449,10 +1451,8 @@ static int qcom_scm_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	__scm = scm;
-	__scm->dev = &pdev->dev;
-
-	init_completion(&__scm->waitq_comp);
+	/* Let all above stores be available after this */
+	smp_store_release(&__scm, scm);
 
 	irq = platform_get_irq_optional(pdev, 0);
 	if (irq < 0) {
Signature · 1 line
2.43.0
author maintainer
#116 lore raw

PATCH 116/744 soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE

In reply to Greg Kroah-Hartman

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

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

From: Chun-Kuang Hu <[email protected]>

[ Upstream commit ed4d5ab179b9f0a60da87c650a31f1816db9b4b4 ]

For cmdq jump command, offset 0 means relative jump and offset 1 means absolute jump. cmdq_pkt_jump() is absolute jump, so fix the typo of CMDQ_JUMP_RELATIVE in cmdq_pkt_jump().

---
 drivers/soc/mediatek/mtk-cmdq-helper.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/soc/mediatek/mtk-cmdq-helper.c +3 -2
index b0cd071c4719b..0b2e5690dacfa 100644
@@ -14,7 +14,8 @@
 #define CMDQ_POLL_ENABLE_MASK	BIT(0)
 #define CMDQ_EOC_IRQ_EN		BIT(0)
 #define CMDQ_REG_TYPE		1
-#define CMDQ_JUMP_RELATIVE	1
+#define CMDQ_JUMP_RELATIVE	0
+#define CMDQ_JUMP_ABSOLUTE	1
 
 struct cmdq_instruction {
 	union {
@@ -397,7 +398,7 @@ int cmdq_pkt_jump(struct cmdq_pkt *pkt, dma_addr_t addr)
 	struct cmdq_instruction inst = {};
 
 	inst.op = CMDQ_CODE_JUMP;
-	inst.offset = CMDQ_JUMP_RELATIVE;
+	inst.offset = CMDQ_JUMP_ABSOLUTE;
 	inst.value = addr >>
 		cmdq_get_shift_pa(((struct cmdq_client *)pkt->cl)->chan);
 	return cmdq_pkt_append_command(pkt, inst);
Signature · 1 line
2.43.0
author maintainer
#117 lore raw

PATCH 117/744 null_blk: Fix missing mutex_destroy() at module removal

In reply to Greg Kroah-Hartman

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

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

From: Zhu Yanjun <[email protected]>

[ Upstream commit 07d1b99825f40f9c0d93e6b99d79a08d0717bac1 ]

When a mutex lock is not used any more, the function mutex_destroy should be called to mark the mutex lock uninitialized.

Fixes f2298c0403b0 ("null_blk: multi queue aware block test driver")
---
 drivers/block/null_blk/main.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/block/null_blk/main.c +2 -0
index 9544746de1683..cc4dcb951fd24 100644
@@ -2352,6 +2352,8 @@ static void __exit null_exit(void)
 
 	if (g_queue_mode == NULL_Q_MQ && shared_tags)
 		blk_mq_free_tag_set(&tag_set);
+
+	mutex_destroy(&lock);
 }
 
 module_init(null_init);
Signature · 1 line
2.43.0
author maintainer
#118 lore raw

PATCH 118/744 kunit/fortify: Fix mismatched kvalloc()/vfree() usage

In reply to Greg Kroah-Hartman

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

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

From: Kees Cook <[email protected]>

[ Upstream commit 998b18072ceb0613629c256b409f4d299829c7ec ]

The kv*() family of tests were accidentally freeing with vfree() instead of kvfree(). Use kvfree() instead.

Fixes 9124a2640148 ("kunit/fortify: Validate __alloc_size attribute results")
---
 lib/fortify_kunit.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
lib/fortify_kunit.c +8 -8
index c8c33cbaae9ec..24f8d6fda2b3b 100644
@@ -228,28 +228,28 @@ DEFINE_ALLOC_SIZE_TEST_PAIR(vmalloc)
 									\
 	checker((expected_pages) * PAGE_SIZE,				\
 		kvmalloc((alloc_pages) * PAGE_SIZE, gfp),		\
-		vfree(p));						\
+		kvfree(p));						\
 	checker((expected_pages) * PAGE_SIZE,				\
 		kvmalloc_node((alloc_pages) * PAGE_SIZE, gfp, NUMA_NO_NODE), \
-		vfree(p));						\
+		kvfree(p));						\
 	checker((expected_pages) * PAGE_SIZE,				\
 		kvzalloc((alloc_pages) * PAGE_SIZE, gfp),		\
-		vfree(p));						\
+		kvfree(p));						\
 	checker((expected_pages) * PAGE_SIZE,				\
 		kvzalloc_node((alloc_pages) * PAGE_SIZE, gfp, NUMA_NO_NODE), \
-		vfree(p));						\
+		kvfree(p));						\
 	checker((expected_pages) * PAGE_SIZE,				\
 		kvcalloc(1, (alloc_pages) * PAGE_SIZE, gfp),		\
-		vfree(p));						\
+		kvfree(p));						\
 	checker((expected_pages) * PAGE_SIZE,				\
 		kvcalloc((alloc_pages) * PAGE_SIZE, 1, gfp),		\
-		vfree(p));						\
+		kvfree(p));						\
 	checker((expected_pages) * PAGE_SIZE,				\
 		kvmalloc_array(1, (alloc_pages) * PAGE_SIZE, gfp),	\
-		vfree(p));						\
+		kvfree(p));						\
 	checker((expected_pages) * PAGE_SIZE,				\
 		kvmalloc_array((alloc_pages) * PAGE_SIZE, 1, gfp),	\
-		vfree(p));						\
+		kvfree(p));						\
 									\
 	prev_size = (expected_pages) * PAGE_SIZE;			\
 	orig = kvmalloc(prev_size, gfp);				\
Signature · 1 line
2.43.0
author maintainer
#119 lore raw

PATCH 119/744 soc: qcom: pmic_glink: Make client-lock non-sleeping

In reply to Greg Kroah-Hartman

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

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

From: Bjorn Andersson <[email protected]>

[ Upstream commit 9329933699b32d467a99befa20415c4b2172389a ]

The recently introduced commit '635ce0db8956 ("soc: qcom: pmic_glink:
don't traverse clients list without a lock")' ensured that the clients list is not modified while traversed.

But the callback is made from the GLINK IRQ handler and as such this mutual exclusion can not be provided by a (sleepable) mutex.

Replace the mutex with a spinlock.

---
 drivers/soc/qcom/pmic_glink.c | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)
drivers/soc/qcom/pmic_glink.c +15 -10
index 062ff7b12de6a..61a359938b6c4 100644
@@ -11,6 +11,7 @@
 #include <linux/slab.h>
 #include <linux/soc/qcom/pdr.h>
 #include <linux/soc/qcom/pmic_glink.h>
+#include <linux/spinlock.h>
 
 enum {
 	PMIC_GLINK_CLIENT_BATT = 0,
@@ -39,7 +40,7 @@ struct pmic_glink {
 	unsigned int pdr_state;
 
 	/* serializing clients list updates */
-	struct mutex client_lock;
+	spinlock_t client_lock;
 	struct list_head clients;
 };
 
@@ -61,10 +62,11 @@ static void _devm_pmic_glink_release_client(struct device *dev, void *res)
 {
 	struct pmic_glink_client *client = (struct pmic_glink_client *)res;
 	struct pmic_glink *pg = client->pg;
+	unsigned long flags;
 
-	mutex_lock(&pg->client_lock);
+	spin_lock_irqsave(&pg->client_lock, flags);
 	list_del(&client->node);
-	mutex_unlock(&pg->client_lock);
+	spin_unlock_irqrestore(&pg->client_lock, flags);
 }
 
 struct pmic_glink_client *devm_pmic_glink_register_client(struct device *dev,
@@ -75,6 +77,7 @@ struct pmic_glink_client *devm_pmic_glink_register_client(struct device *dev,
 {
 	struct pmic_glink_client *client;
 	struct pmic_glink *pg = dev_get_drvdata(dev->parent);
+	unsigned long flags;
 
 	client = devres_alloc(_devm_pmic_glink_release_client, sizeof(*client), GFP_KERNEL);
 	if (!client)
@@ -87,12 +90,12 @@ struct pmic_glink_client *devm_pmic_glink_register_client(struct device *dev,
 	client->priv = priv;
 
 	mutex_lock(&pg->state_lock);
-	mutex_lock(&pg->client_lock);
+	spin_lock_irqsave(&pg->client_lock, flags);
 
 	list_add(&client->node, &pg->clients);
 	client->pdr_notify(client->priv, pg->client_state);
 
-	mutex_unlock(&pg->client_lock);
+	spin_unlock_irqrestore(&pg->client_lock, flags);
 	mutex_unlock(&pg->state_lock);
 
 	devres_add(dev, client);
@@ -115,6 +118,7 @@ static int pmic_glink_rpmsg_callback(struct rpmsg_device *rpdev, void *data,
 	struct pmic_glink_client *client;
 	struct pmic_glink_hdr *hdr;
 	struct pmic_glink *pg = dev_get_drvdata(&rpdev->dev);
+	unsigned long flags;
 
 	if (len < sizeof(*hdr)) {
 		dev_warn(pg->dev, "ignoring truncated message\n");
@@ -123,12 +127,12 @@ static int pmic_glink_rpmsg_callback(struct rpmsg_device *rpdev, void *data,
 
 	hdr = data;
 
-	mutex_lock(&pg->client_lock);
+	spin_lock_irqsave(&pg->client_lock, flags);
 	list_for_each_entry(client, &pg->clients, node) {
 		if (client->id == le32_to_cpu(hdr->owner))
 			client->cb(data, len, client->priv);
 	}
-	mutex_unlock(&pg->client_lock);
+	spin_unlock_irqrestore(&pg->client_lock, flags);
 
 	return 0;
 }
@@ -168,6 +172,7 @@ static void pmic_glink_state_notify_clients(struct pmic_glink *pg)
 {
 	struct pmic_glink_client *client;
 	unsigned int new_state = pg->client_state;
+	unsigned long flags;
 
 	if (pg->client_state != SERVREG_SERVICE_STATE_UP) {
 		if (pg->pdr_state == SERVREG_SERVICE_STATE_UP && pg->ept)
@@ -178,10 +183,10 @@ static void pmic_glink_state_notify_clients(struct pmic_glink *pg)
 	}
 
 	if (new_state != pg->client_state) {
-		mutex_lock(&pg->client_lock);
+		spin_lock_irqsave(&pg->client_lock, flags);
 		list_for_each_entry(client, &pg->clients, node)
 			client->pdr_notify(client->priv, new_state);
-		mutex_unlock(&pg->client_lock);
+		spin_unlock_irqrestore(&pg->client_lock, flags);
 		pg->client_state = new_state;
 	}
 }
@@ -268,7 +273,7 @@ static int pmic_glink_probe(struct platform_device *pdev)
 	pg->dev = &pdev->dev;
 
 	INIT_LIST_HEAD(&pg->clients);
-	mutex_init(&pg->client_lock);
+	spin_lock_init(&pg->client_lock);
 	mutex_init(&pg->state_lock);
 
 	match_data = (unsigned long *)of_device_get_match_data(&pdev->dev);
Signature · 1 line
2.43.0
author maintainer
#120 lore raw

PATCH 120/744 lkdtm: Disable CFI checking for perms functions

In reply to Greg Kroah-Hartman

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

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

From: Kees Cook <[email protected]>

[ Upstream commit fb28a8862dc4b5bf8e44578338f35d9c6c68339d ]

The EXEC_RODATA test plays a lot of tricks to live in the .rodata section, and once again ran into objtool's (completely reasonable) assumptions that executable code should live in an executable section. However, this manifested only under CONFIG_CFI_CLANG=y, as one of the .cfi_sites was pointing into the .rodata section.

Since we're testing non-CFI execution properties in perms.c (and rodata.c), we can disable CFI for the involved functions, and remove the CFI arguments from rodata.c entirely.

---
 drivers/misc/lkdtm/Makefile | 2 +-
 drivers/misc/lkdtm/perms.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/misc/lkdtm/Makefile +1 -1
index 95ef971b5e1cb..b28701138b4bc 100644
@@ -19,7 +19,7 @@ KASAN_SANITIZE_rodata.o			:= n
 KCSAN_SANITIZE_rodata.o			:= n
 KCOV_INSTRUMENT_rodata.o		:= n
 OBJECT_FILES_NON_STANDARD_rodata.o	:= y
-CFLAGS_REMOVE_rodata.o			+= $(CC_FLAGS_LTO) $(RETHUNK_CFLAGS)
+CFLAGS_REMOVE_rodata.o			+= $(CC_FLAGS_LTO) $(RETHUNK_CFLAGS) $(CC_FLAGS_CFI)
 
 OBJCOPYFLAGS :=
 OBJCOPYFLAGS_rodata_objcopy.o	:= \
drivers/misc/lkdtm/perms.c +1 -1
index b93404d656509..5b861dbff27e9 100644
@@ -61,7 +61,7 @@ static void *setup_function_descriptor(func_desc_t *fdesc, void *dst)
 	return fdesc;
 }
 
-static noinline void execute_location(void *dst, bool write)
+static noinline __nocfi void execute_location(void *dst, bool write)
 {
 	void (*func)(void);
 	func_desc_t fdesc;
Signature · 1 line
2.43.0
author maintainer
#121 lore raw

PATCH 121/744 md: fix resync softlockup when bitmap size is less than array size

In reply to Greg Kroah-Hartman

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

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

From: Yu Kuai <[email protected]>

[ Upstream commit f0e729af2eb6bee9eb58c4df1087f14ebaefe26b ]

Is is reported that for dm-raid10, lvextend + lvchange --syncaction will trigger following softlockup:

kernel:watchdog: BUG: soft lockup - CPU#3 stuck for 26s! [mdX_resync:6976]

CPU: 7 PID: 3588 Comm: mdX_resync Kdump: loaded Not tainted 6.9.0-rc4-next-20240419 #1
RIP: 0010:_raw_spin_unlock_irq+0x13/0x30
Call Trace:
 <TASK>
 md_bitmap_start_sync+0x6b/0xf0
 raid10_sync_request+0x25c/0x1b40 [raid10]
 md_do_sync+0x64b/0x1020
 md_thread+0xa7/0x170
 kthread+0xcf/0x100
 ret_from_fork+0x30/0x50
 ret_from_fork_asm+0x1a/0x30

And the detailed process is as follows:

md_do_sync
j = mddev->resync_min
while (j < max_sectors)
sectors = raid10_sync_request(mddev, j, &skipped)
if (!md_bitmap_start_sync(..., &sync_blocks))

    // md_bitmap_start_sync set sync_blocks to 0
    return sync_blocks + sectors_skippe;

// sectors = 0;
j += sectors;
// j never change

Root cause is that commit 301867b1c168 ("md/raid10: check slab-out-of-bounds in md_bitmap_get_counter") return early from md_bitmap_get_counter(), without setting returned blocks.

Fix this problem by always set returned blocks from md_bitmap_get_counter"(), as it used to be.

Noted that this patch just fix the softlockup problem in kernel, the case that bitmap size doesn't match array size still need to be fixed.

Fixes 301867b1c168 ("md/raid10: check slab-out-of-bounds in md_bitmap_get_counter")
Reported-and-tested-by Nigel Croxon <[email protected]>
---
 drivers/md/md-bitmap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/md/md-bitmap.c +3 -3
index 42d4c38ba54d5..d9235ee7dcc46 100644
@@ -1427,7 +1427,7 @@ __acquires(bitmap->lock)
 	sector_t chunk = offset >> bitmap->chunkshift;
 	unsigned long page = chunk >> PAGE_COUNTER_SHIFT;
 	unsigned long pageoff = (chunk & PAGE_COUNTER_MASK) << COUNTER_BYTE_SHIFT;
-	sector_t csize;
+	sector_t csize = ((sector_t)1) << bitmap->chunkshift;
 	int err;
 
 	if (page >= bitmap->pages) {
@@ -1436,6 +1436,7 @@ __acquires(bitmap->lock)
 		 * End-of-device while looking for a whole page or
 		 * user set a huge number to sysfs bitmap_set_bits.
 		 */
+		*blocks = csize - (offset & (csize - 1));
 		return NULL;
 	}
 	err = md_bitmap_checkpage(bitmap, page, create, 0);
@@ -1444,8 +1445,7 @@ __acquires(bitmap->lock)
 	    bitmap->bp[page].map == NULL)
 		csize = ((sector_t)1) << (bitmap->chunkshift +
 					  PAGE_COUNTER_SHIFT);
-	else
-		csize = ((sector_t)1) << bitmap->chunkshift;
+
 	*blocks = csize - (offset & (csize - 1));
 
 	if (err < 0)
Signature · 1 line
2.43.0
author maintainer
#122 lore raw

PATCH 122/744 crypto: qat - specify firmware files for 402xx

In reply to Greg Kroah-Hartman

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

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

From: Giovanni Cabiddu <[email protected]>

[ Upstream commit a3dc1f2b6b932a13f139d3be3c765155542c1070 ]

The 4xxx driver can probe 4xxx and 402xx devices. However, the driver only specifies the firmware images required for 4xxx.
This might result in external tools missing these binaries, if required, in the initramfs.

Specify the firmware image used by 402xx with the MODULE_FIRMWARE() macros in the 4xxx driver.

Fixes a3e8c919b993 ("crypto: qat - add support for 402xx devices")
---
 drivers/crypto/intel/qat/qat_4xxx/adf_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/crypto/intel/qat/qat_4xxx/adf_drv.c +2 -0
index 90f5c1ca7b8d8..f6f9e20f74b54 100644
@@ -463,7 +463,9 @@ module_pci_driver(adf_driver);
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_AUTHOR("Intel");
 MODULE_FIRMWARE(ADF_4XXX_FW);
+MODULE_FIRMWARE(ADF_402XX_FW);
 MODULE_FIRMWARE(ADF_4XXX_MMP);
+MODULE_FIRMWARE(ADF_402XX_MMP);
 MODULE_DESCRIPTION("Intel(R) QuickAssist Technology");
 MODULE_VERSION(ADF_DRV_VERSION);
 MODULE_SOFTDEP("pre: crypto-intel_qat");
Signature · 1 line
2.43.0
author maintainer
#123 lore raw

PATCH 123/744 block: refine the EOF check in blkdev_iomap_begin

In reply to Greg Kroah-Hartman

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

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

From: Christoph Hellwig <[email protected]>

[ Upstream commit 0c12028aec837f5a002009bbf68d179d506510e8 ]

blkdev_iomap_begin rounds down the offset to the logical block size before stashing it in iomap->offset and checking that it still is inside the inode size.

Check the i_size check to the raw pos value so that we don't try a zero size write if iter->pos is unaligned.

Fixes 487c607df790 ("block: use iomap for writes to block devices")
Reported-by [email protected]
---
 block/fops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/fops.c +1 -1
index 73e42742543f6..1df187b306792 100644
@@ -387,7 +387,7 @@ static int blkdev_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
 
 	iomap->bdev = bdev;
 	iomap->offset = ALIGN_DOWN(offset, bdev_logical_block_size(bdev));
-	if (iomap->offset >= isize)
+	if (offset >= isize)
 		return -EIO;
 	iomap->type = IOMAP_MAPPED;
 	iomap->addr = iomap->offset;
Signature · 1 line
2.43.0
author maintainer
#124 lore raw

PATCH 124/744 block: fix and simplify blkdevparts= cmdline parsing

In reply to Greg Kroah-Hartman

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

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

From: INAGAKI Hiroshi <[email protected]>

[ Upstream commit bc2e07dfd2c49aaa4b52302cf7b55cf94e025f79 ]

Fix the cmdline parsing of the "blkdevparts=" parameter using strsep(), which makes the code simpler.

Before commit 146afeb235cc ("block: use strscpy() to instead of strncpy()"), we used a strncpy() to copy a block device name and partition names. The commit simply replaced a strncpy() and NULL termination with a strscpy(). It did not update calculations of length passed to strscpy(). While the length passed to strncpy() is just a length of valid characters without NULL termination ('\0'), strscpy() takes it as a length of the destination buffer, including a NULL termination.

Since the source buffer is not necessarily NULL terminated, the current code copies "length - 1" characters and puts a NULL character in the destination buffer. It replaces the last character with NULL and breaks the parsing.

As an example, that buffer will be passed to parse_parts() and breaks parsing sub-partitions due to the missing ')' at the end, like the following.

example (Check Point V-80 & OpenWrt):

- Linux Kernel 6.6

  [    0.000000] Kernel command line: console=ttyS0,115200 earlycon=uart8250,mmio32,0xf0512000 crashkernel=30M mvpp2x.queue_mode=1 blkdevparts=mmcblk1:48M@10M(kernel-1),1M(dtb-1),720M(rootfs-1),48M(kernel-2),1M(dtb-2),720M(rootfs-2),300M(default_sw),650M(logs),1M(preset_cfg),1M(adsl),-(storage) maxcpus=4
  ...
  [    0.884016] mmc1: new HS200 MMC card at address 0001
  [    0.889951] mmcblk1: mmc1:0001 004GA0 3.69 GiB
  [    0.895043] cmdline partition format is invalid.
  [    0.895704]  mmcblk1: p1
  [    0.903447] mmcblk1boot0: mmc1:0001 004GA0 2.00 MiB
  [    0.908667] mmcblk1boot1: mmc1:0001 004GA0 2.00 MiB
  [    0.913765] mmcblk1rpmb: mmc1:0001 004GA0 512 KiB, chardev (248:0)

1. "48M@10M(kernel-1),..." is passed to strscpy() with length=17 from parse_parts()
2. strscpy() returns -E2BIG and the destination buffer has

     "48M@10M(kernel-1\0"

3. "48M@10M(kernel-1\0" is passed to parse_subpart()
4. parse_subpart() fails to find ')' when parsing a partition name, and returns error

- Linux Kernel 6.1

  [    0.000000] Kernel command line: console=ttyS0,115200 earlycon=uart8250,mmio32,0xf0512000 crashkernel=30M mvpp2x.queue_mode=1 blkdevparts=mmcblk1:48M@10M(kernel-1),1M(dtb-1),720M(rootfs-1),48M(kernel-2),1M(dtb-2),720M(rootfs-2),300M(default_sw),650M(logs),1M(preset_cfg),1M(adsl),-(storage) maxcpus=4
  ...
  [    0.953142] mmc1: new HS200 MMC card at address 0001
  [    0.959114] mmcblk1: mmc1:0001 004GA0 3.69 GiB
  [    0.964259]  mmcblk1: p1(kernel-1) p2(dtb-1) p3(rootfs-1) p4(kernel-2) p5(dtb-2) 6(rootfs-2) p7(default_sw) p8(logs) p9(preset_cfg) p10(adsl) p11(storage)
  [    0.979174] mmcblk1boot0: mmc1:0001 004GA0 2.00 MiB
  [    0.984674] mmcblk1boot1: mmc1:0001 004GA0 2.00 MiB
  [    0.989926] mmcblk1rpmb: mmc1:0001 004GA0 512 KiB, chardev (248:0

By the way, strscpy() takes a length of destination buffer and it is often confusing when copying characters with a specified length. Using strsep() helps to separate the string by the specified character. Then, we can use strscpy() naturally with the size of the destination buffer.

Separating the string on the fly is also useful to omit the redundant string copy, reducing memory usage and improve the code readability.

---
 block/partitions/cmdline.c | 49 ++++++++++----------------------------
 1 file changed, 12 insertions(+), 37 deletions(-)
block/partitions/cmdline.c +12 -37
index c03bc105e5753..152c85df92b20 100644
@@ -70,8 +70,8 @@ static int parse_subpart(struct cmdline_subpart **subpart, char *partdef)
 	}
 
 	if (*partdef == '(') {
-		int length;
-		char *next = strchr(++partdef, ')');
+		partdef++;
+		char *next = strsep(&partdef, ")");
 
 		if (!next) {
 			pr_warn("cmdline partition format is invalid.");
@@ -79,11 +79,7 @@ static int parse_subpart(struct cmdline_subpart **subpart, char *partdef)
 			goto fail;
 		}
 
-		length = min_t(int, next - partdef,
-			       sizeof(new_subpart->name) - 1);
-		strscpy(new_subpart->name, partdef, length);
-
-		partdef = ++next;
+		strscpy(new_subpart->name, next, sizeof(new_subpart->name));
 	} else
 		new_subpart->name[0] = '\0';
 
@@ -117,14 +113,12 @@ static void free_subpart(struct cmdline_parts *parts)
 	}
 }
 
-static int parse_parts(struct cmdline_parts **parts, const char *bdevdef)
+static int parse_parts(struct cmdline_parts **parts, char *bdevdef)
 {
 	int ret = -EINVAL;
 	char *next;
-	int length;
 	struct cmdline_subpart **next_subpart;
 	struct cmdline_parts *newparts;
-	char buf[BDEVNAME_SIZE + 32 + 4];
 
 	*parts = NULL;
 
@@ -132,28 +126,19 @@ static int parse_parts(struct cmdline_parts **parts, const char *bdevdef)
 	if (!newparts)
 		return -ENOMEM;
 
-	next = strchr(bdevdef, ':');
+	next = strsep(&bdevdef, ":");
 	if (!next) {
 		pr_warn("cmdline partition has no block device.");
 		goto fail;
 	}
 
-	length = min_t(int, next - bdevdef, sizeof(newparts->name) - 1);
-	strscpy(newparts->name, bdevdef, length);
+	strscpy(newparts->name, next, sizeof(newparts->name));
 	newparts->nr_subparts = 0;
 
 	next_subpart = &newparts->subpart;
 
-	while (next && *(++next)) {
-		bdevdef = next;
-		next = strchr(bdevdef, ',');
-
-		length = (!next) ? (sizeof(buf) - 1) :
-			min_t(int, next - bdevdef, sizeof(buf) - 1);
-
-		strscpy(buf, bdevdef, length);
-
-		ret = parse_subpart(next_subpart, buf);
+	while ((next = strsep(&bdevdef, ","))) {
+		ret = parse_subpart(next_subpart, next);
 		if (ret)
 			goto fail;
 
@@ -199,24 +184,17 @@ static int cmdline_parts_parse(struct cmdline_parts **parts,
 
 	*parts = NULL;
 
-	next = pbuf = buf = kstrdup(cmdline, GFP_KERNEL);
+	pbuf = buf = kstrdup(cmdline, GFP_KERNEL);
 	if (!buf)
 		return -ENOMEM;
 
 	next_parts = parts;
 
-	while (next && *pbuf) {
-		next = strchr(pbuf, ';');
-		if (next)
-			*next = '\0';
-
-		ret = parse_parts(next_parts, pbuf);
+	while ((next = strsep(&pbuf, ";"))) {
+		ret = parse_parts(next_parts, next);
 		if (ret)
 			goto fail;
 
-		if (next)
-			pbuf = ++next;
-
 		next_parts = &(*next_parts)->next_parts;
 	}
 
@@ -250,7 +228,6 @@ static struct cmdline_parts *bdev_parts;
 static int add_part(int slot, struct cmdline_subpart *subpart,
 		struct parsed_partitions *state)
 {
-	int label_min;
 	struct partition_meta_info *info;
 	char tmp[sizeof(info->volname) + 4];
 
@@ -262,9 +239,7 @@ static int add_part(int slot, struct cmdline_subpart *subpart,
 
 	info = &state->parts[slot].info;
 
-	label_min = min_t(int, sizeof(info->volname) - 1,
-			  sizeof(subpart->name));
-	strscpy(info->volname, subpart->name, label_min);
+	strscpy(info->volname, subpart->name, sizeof(info->volname));
 
 	snprintf(tmp, sizeof(tmp), "(%s)", info->volname);
 	strlcat(state->pp_buf, tmp, PAGE_SIZE);
Signature · 1 line
2.43.0
author maintainer
#125 lore raw

PATCH 125/744 block: support to account io_ticks precisely

In reply to Greg Kroah-Hartman

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

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

From: Yu Kuai <[email protected]>

[ Upstream commit 99dc422335d8b2bd4d105797241d3e715bae90e9 ]

Currently, io_ticks is accounted based on sampling, specifically update_io_ticks() will always account io_ticks by 1 jiffies from bdev_start_io_acct()/blk_account_io_start(), and the result can be inaccurate, for example(HZ is 250):

Test script:
fio -filename=/dev/sda -bs=4k -rw=write -direct=1 -name=test -thinktime=4ms

Test result: util is about 90%, while the disk is really idle.

This behaviour is introduced by commit 5b18b5a73760 ("block: delete part_round_stats and switch to less precise counting"), however, there was a key point that is missed that this patch also improve performance a lot:

Before the commit:
part_round_stats:
if (part->stamp != now)
stats |= 1;

part_in_flight()
-> there can be lots of task here in 1 jiffies.
part_round_stats_single()
__part_stat_add()
part->stamp = now;

After the commit:
update_io_ticks:
stamp = part->bd_stamp;
if (time_after(now, stamp))
if (try_cmpxchg())

    __part_stat_add()
    -> only one task can reach here in 1 jiffies.

Hence in order to account io_ticks precisely, we only need to know if there are IO inflight at most once in one jiffies. Noted that for rq-based device, iterating tags should not be used here because 'tags->lock' is grabbed in blk_mq_find_and_get_req(), hence part_stat_lock_inc/dec() and part_in_flight() is used to trace inflight. The additional overhead is quite little:

- per cpu add/dec for each IO for rq-based device;
- per cpu sum for each jiffies;

And it's verified by null-blk that there are no performance degration under heavy IO pressure.

Fixes 5b18b5a73760 ("block: delete part_round_stats and switch to less precise counting")
---
 block/blk-core.c  | 9 +++++----
 block/blk-merge.c | 2 ++
 block/blk-mq.c    | 4 ++++
 block/blk.h       | 1 +
 block/genhd.c     | 2 +-
 5 files changed, 13 insertions(+), 5 deletions(-)
block/blk-core.c +5 -4
index a3726d8cf8738..bf058cea9016a 100644
@@ -950,10 +950,11 @@ void update_io_ticks(struct block_device *part, unsigned long now, bool end)
 	unsigned long stamp;
 again:
 	stamp = READ_ONCE(part->bd_stamp);
-	if (unlikely(time_after(now, stamp))) {
-		if (likely(try_cmpxchg(&part->bd_stamp, &stamp, now)))
-			__part_stat_add(part, io_ticks, end ? now - stamp : 1);
-	}
+	if (unlikely(time_after(now, stamp)) &&
+	    likely(try_cmpxchg(&part->bd_stamp, &stamp, now)) &&
+	    (end || part_in_flight(part)))
+		__part_stat_add(part, io_ticks, now - stamp);
+
 	if (part->bd_partno) {
 		part = bdev_whole(part);
 		goto again;
block/blk-merge.c +2 -0
index 65e75efa9bd36..07bf758c523a9 100644
@@ -783,6 +783,8 @@ static void blk_account_io_merge_request(struct request *req)
 	if (blk_do_io_stat(req)) {
 		part_stat_lock();
 		part_stat_inc(req->part, merges[op_stat_group(req_op(req))]);
+		part_stat_local_dec(req->part,
+				    in_flight[op_is_write(req_op(req))]);
 		part_stat_unlock();
 	}
 }
block/blk-mq.c +4 -0
index 257b0addd47e5..4c91889affa7c 100644
@@ -994,6 +994,8 @@ static inline void blk_account_io_done(struct request *req, u64 now)
 		update_io_ticks(req->part, jiffies, true);
 		part_stat_inc(req->part, ios[sgrp]);
 		part_stat_add(req->part, nsecs[sgrp], now - req->start_time_ns);
+		part_stat_local_dec(req->part,
+				    in_flight[op_is_write(req_op(req))]);
 		part_stat_unlock();
 	}
 }
@@ -1016,6 +1018,8 @@ static inline void blk_account_io_start(struct request *req)
 
 		part_stat_lock();
 		update_io_ticks(req->part, jiffies, false);
+		part_stat_local_inc(req->part,
+				    in_flight[op_is_write(req_op(req))]);
 		part_stat_unlock();
 	}
 }
block/blk.h +1 -0
index 08a358bc0919e..67915b04b3c17 100644
@@ -344,6 +344,7 @@ static inline bool blk_do_io_stat(struct request *rq)
 }
 
 void update_io_ticks(struct block_device *part, unsigned long now, bool end);
+unsigned int part_in_flight(struct block_device *part);
 
 static inline void req_set_nomerge(struct request_queue *q, struct request *req)
 {
block/genhd.c +1 -1
index 2ef1e08d70ecd..33b1ebf6ef82d 100644
@@ -118,7 +118,7 @@ static void part_stat_read_all(struct block_device *part,
 	}
 }
 
-static unsigned int part_in_flight(struct block_device *part)
+unsigned int part_in_flight(struct block_device *part)
 {
 	unsigned int inflight = 0;
 	int cpu;
Signature · 1 line
2.43.0
author maintainer
#126 lore raw

PATCH 126/744 wifi: ath10k: poll service ready message before failing

In reply to Greg Kroah-Hartman

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

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

From: Baochen Qiang <[email protected]>

[ Upstream commit e57b7d62a1b2f496caf0beba81cec3c90fad80d5 ]

Currently host relies on CE interrupts to get notified that the service ready message is ready. This results in timeout issue if the interrupt is not fired, due to some unknown reasons. See below logs:

[76321.937866] ath10k_pci 0000:02:00.0: wmi service ready event not received
...
[76322.016738] ath10k_pci 0000:02:00.0: Could not init core: -110

And finally it causes WLAN interface bring up failure.

Change to give it one more chance here by polling CE rings, before failing directly.

Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00157-QCARMSWPZ-1

---
 drivers/net/wireless/ath/ath10k/wmi.c | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/wmi.c +23 -3
index 05fa7d4c0e1ab..ee08a4c668f7a 100644
@@ -1762,12 +1762,32 @@ void ath10k_wmi_put_wmi_channel(struct ath10k *ar, struct wmi_channel *ch,
 
 int ath10k_wmi_wait_for_service_ready(struct ath10k *ar)
 {
-	unsigned long time_left;
+	unsigned long time_left, i;
 
 	time_left = wait_for_completion_timeout(&ar->wmi.service_ready,
 						WMI_SERVICE_READY_TIMEOUT_HZ);
-	if (!time_left)
-		return -ETIMEDOUT;
+	if (!time_left) {
+		/* Sometimes the PCI HIF doesn't receive interrupt
+		 * for the service ready message even if the buffer
+		 * was completed. PCIe sniffer shows that it's
+		 * because the corresponding CE ring doesn't fires
+		 * it. Workaround here by polling CE rings once.
+		 */
+		ath10k_warn(ar, "failed to receive service ready completion, polling..\n");
+
+		for (i = 0; i < CE_COUNT; i++)
+			ath10k_hif_send_complete_check(ar, i, 1);
+
+		time_left = wait_for_completion_timeout(&ar->wmi.service_ready,
+							WMI_SERVICE_READY_TIMEOUT_HZ);
+		if (!time_left) {
+			ath10k_warn(ar, "polling timed out\n");
+			return -ETIMEDOUT;
+		}
+
+		ath10k_warn(ar, "service ready completion received, continuing normally\n");
+	}
+
 	return 0;
 }
 
Signature · 1 line
2.43.0
author maintainer
#127 lore raw

PATCH 127/744 wifi: brcmfmac: pcie: handle randbuf allocation failure

In reply to Greg Kroah-Hartman

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

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

From: Duoming Zhou <[email protected]>

[ Upstream commit 316f790ebcf94bdf59f794b7cdea4068dc676d4c ]

The kzalloc() in brcmf_pcie_download_fw_nvram() will return null if the physical memory has run out. As a result, if we use get_random_bytes() to generate random bytes in the randbuf, the null pointer dereference bug will happen.

In order to prevent allocation failure, this patch adds a separate function using buffer on kernel stack to generate random bytes in the randbuf, which could prevent the kernel stack from overflow.

Fixes 91918ce88d9f ("wifi: brcmfmac: pcie: Provide a buffer of random bytes to the device")
---
 .../wireless/broadcom/brcm80211/brcmfmac/pcie.c   | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +10 -5
index 80220685f5e45..a43af82691401 100644
@@ -1675,6 +1675,15 @@ struct brcmf_random_seed_footer {
 #define BRCMF_RANDOM_SEED_MAGIC		0xfeedc0de
 #define BRCMF_RANDOM_SEED_LENGTH	0x100
 
+static noinline_for_stack void
+brcmf_pcie_provide_random_bytes(struct brcmf_pciedev_info *devinfo, u32 address)
+{
+	u8 randbuf[BRCMF_RANDOM_SEED_LENGTH];
+
+	get_random_bytes(randbuf, BRCMF_RANDOM_SEED_LENGTH);
+	memcpy_toio(devinfo->tcm + address, randbuf, BRCMF_RANDOM_SEED_LENGTH);
+}
+
 static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo,
 					const struct firmware *fw, void *nvram,
 					u32 nvram_len)
@@ -1717,7 +1726,6 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo,
 				.length = cpu_to_le32(rand_len),
 				.magic = cpu_to_le32(BRCMF_RANDOM_SEED_MAGIC),
 			};
-			void *randbuf;
 
 			/* Some Apple chips/firmwares expect a buffer of random
 			 * data to be present before NVRAM
@@ -1729,10 +1737,7 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo,
 				    sizeof(footer));
 
 			address -= rand_len;
-			randbuf = kzalloc(rand_len, GFP_KERNEL);
-			get_random_bytes(randbuf, rand_len);
-			memcpy_toio(devinfo->tcm + address, randbuf, rand_len);
-			kfree(randbuf);
+			brcmf_pcie_provide_random_bytes(devinfo, address);
 		}
 	} else {
 		brcmf_dbg(PCIE, "No matching NVRAM file found %s\n",
Signature · 1 line
2.43.0
author maintainer
#128 lore raw

PATCH 128/744 wifi: ath11k: dont force enable power save on non-running vdevs

In reply to Greg Kroah-Hartman

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

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

From: Baochen Qiang <[email protected]>

[ Upstream commit 01296b39d3515f20a1db64d3c421c592b1e264a0 ]

Currently we force enable power save on non-running vdevs, this results in unexpected ping latency in below scenarios:
1. disable power save from userspace.
2. trigger suspend/resume.

With step 1 power save is disabled successfully and we get a good latency:

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=5.13 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=5.45 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=5.99 ms 64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=6.34 ms 64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=4.47 ms 64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=6.45 ms

While after step 2, the latency becomes much larger:

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=17.7 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=15.0 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=14.3 ms 64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=16.5 ms 64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=20.1 ms

The reason is, with step 2, power save is force enabled due to vdev not running, although mac80211 was trying to disable it to honor userspace configuration:

ath11k_pci 0000:03:00.0: wmi cmd sta powersave mode psmode 1 vdev id 0

Call Trace:
 ath11k_wmi_pdev_set_ps_mode
 ath11k_mac_op_bss_info_changed
 ieee80211_bss_info_change_notify
 ieee80211_reconfig
 ieee80211_resume
 wiphy_resume

This logic is taken from ath10k where it was added due to below comment:

Firmware doesn't behave nicely and consumes more power than necessary if PS is disabled on a non-started vdev.

However we don't know whether such an issue also occurs to ath11k firmware or not. But even if it does, it's not appropriate because it goes against userspace, even cfg/mac80211 don't know we have enabled it in fact.

Remove it to fix this issue. In this way we not only get a better latency, but also, and the most important, keeps the consistency between userspace and kernel/driver. The biggest price for that would be the power consumption, which is not that important, compared with the consistency.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30

Fixes b2beffa7d9a6 ("ath11k: enable 802.11 power save mode in station mode")
---
 drivers/net/wireless/ath/ath11k/mac.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +1 -8
index b75cb49c27466..445f59ad1fc08 100644
@@ -1233,14 +1233,7 @@ static int ath11k_mac_vif_setup_ps(struct ath11k_vif *arvif)
 
 	enable_ps = arvif->ps;
 
-	if (!arvif->is_started) {
-		/* mac80211 can update vif powersave state while disconnected.
-		 * Firmware doesn't behave nicely and consumes more power than
-		 * necessary if PS is disabled on a non-started vdev. Hence
-		 * force-enable PS for non-running vdevs.
-		 */
-		psmode = WMI_STA_PS_MODE_ENABLED;
-	} else if (enable_ps) {
+	if (enable_ps) {
 		psmode = WMI_STA_PS_MODE_ENABLED;
 		param = WMI_STA_PS_PARAM_INACTIVITY_TIME;
 
Signature · 1 line
2.43.0