diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-26 11:55:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-26 11:55:12 +0100 |
commit | 7ebe01b6be41903765870bb1305943ddf740e65e (patch) | |
tree | 1c5b841274a14a9a8732d2eb54f00f9348d84acd | |
parent | 4dca1a6a36e1d0b49e882ea092c0786c520b7bfe (diff) | |
download | stable-queue-7ebe01b6be41903765870bb1305943ddf740e65e.tar.gz |
5.15-stable patches
added patches:
scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch
-rw-r--r-- | queue-5.15/scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch | 38 | ||||
-rw-r--r-- | queue-5.15/series | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/queue-5.15/scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch b/queue-5.15/scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch new file mode 100644 index 00000000000..21e94df398b --- /dev/null +++ b/queue-5.15/scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch @@ -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 +@@ -699,7 +699,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, diff --git a/queue-5.15/series b/queue-5.15/series index 0d76d5b2322..cee25355641 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -407,3 +407,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 scsi-elx-efct-fix-memory-leak-in-efct_hw_parse_filte.patch +scsi-qedf-use-designated-initializer-for-struct-qed_fcoe_cb_ops.patch |