]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2025 10:55:11 +0000 (11:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2025 10:55:11 +0000 (11:55 +0100)
added patches:
scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch

queue-5.10/scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch b/queue-5.10/scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch
new file mode 100644 (file)
index 0000000..509f97e
--- /dev/null
@@ -0,0 +1,38 @@
+From d8720235d5b5cad86c1f07f65117ef2a96f8bec7 Mon Sep 17 00:00:00 2001
+From: Kees Cook <kees@kernel.org>
+Date: Fri, 2 May 2025 15:41:57 -0700
+Subject: scsi: qedf: Use designated initializer for struct qed_fcoe_cb_ops
+
+From: Kees Cook <kees@kernel.org>
+
+commit d8720235d5b5cad86c1f07f65117ef2a96f8bec7 upstream.
+
+Recent fixes to the randstruct GCC plugin allowed it to notice
+that this structure is entirely function pointers and is therefore
+subject to randomization, but doing so requires that it always use
+designated initializers. Explicitly specify the "common" member as being
+initialized. Silences:
+
+drivers/scsi/qedf/qedf_main.c:702:9: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
+  702 |         {
+      |         ^
+
+Fixes: 035f7f87b729 ("randstruct: Enable Clang support")
+Link: https://lore.kernel.org/r/20250502224156.work.617-kees@kernel.org
+Signed-off-by: Kees Cook <kees@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/qedf/qedf_main.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/scsi/qedf/qedf_main.c
++++ b/drivers/scsi/qedf/qedf_main.c
+@@ -692,7 +692,7 @@ static u32 qedf_get_login_failures(void
+ }
+ static struct qed_fcoe_cb_ops qedf_cb_ops = {
+-      {
++      .common = {
+               .link_update = qedf_link_update,
+               .bw_update = qedf_bw_update,
+               .schedule_recovery_handler = qedf_schedule_recovery_handler,
index 9016b957eab83b2fca188d7c15a34b67305fad82..dfa5ae02fa2f4311ae37144b817e699cb18a5f89 100644 (file)
@@ -348,3 +348,4 @@ s390-pci-fix-__pcilg_mio_inuser-inline-assembly.patch
 perf-fix-sample-vs-do_exit.patch
 arm64-ptrace-fix-stack-out-of-bounds-read-in-regs_ge.patch
 bpf-fix-precision-backtracking-instruction-iteration.patch
+scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch