]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2024 10:33:09 +0000 (11:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2024 10:33:09 +0000 (11:33 +0100)
broke the build

queue-5.10/series
queue-5.10/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch [deleted file]
queue-5.15/series
queue-5.15/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch [deleted file]
queue-5.4/series
queue-5.4/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch [deleted file]
queue-6.1/series
queue-6.1/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch [deleted file]

index 4700afd88cf8ca29efc093bebb64dded6802971f..1fb7080c557ad84b7bd51639bac4fca1bb355cb2 100644 (file)
@@ -371,7 +371,6 @@ scsi-qla2xxx-fix-use-after-free-on-unload.patch
 scsi-qla2xxx-remove-check-req_sg_cnt-should-be-equal-to-rsp_sg_cnt.patch
 nilfs2-fix-potential-out-of-bounds-memory-access-in-nilfs_find_entry.patch
 bcache-revert-replacing-is_err_or_null-with-is_err-again.patch
-x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch
 bpf-fix-oob-devmap-writes-when-deleting-elements.patch
 dma-buf-fix-dma_fence_array_signaled-v4.patch
 regmap-detach-regmap-from-dev-on-regmap_exit.patch
diff --git a/queue-5.10/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch b/queue-5.10/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch
deleted file mode 100644 (file)
index 34f1e5e..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-From 07fa619f2a40c221ea27747a3323cabc59ab25eb Mon Sep 17 00:00:00 2001
-From: David Woodhouse <dwmw@amazon.co.uk>
-Date: Thu, 5 Dec 2024 15:05:07 +0000
-Subject: x86/kexec: Restore GDT on return from ::preserve_context kexec
-
-From: David Woodhouse <dwmw@amazon.co.uk>
-
-commit 07fa619f2a40c221ea27747a3323cabc59ab25eb upstream.
-
-The restore_processor_state() function explicitly states that "the asm code
-that gets us here will have restored a usable GDT". That wasn't true in the
-case of returning from a ::preserve_context kexec. Make it so.
-
-Without this, the kernel was depending on the called function to reload a
-GDT which is appropriate for the kernel before returning.
-
-Test program:
-
- #include <unistd.h>
- #include <errno.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <linux/kexec.h>
- #include <linux/reboot.h>
- #include <sys/reboot.h>
- #include <sys/syscall.h>
-
- int main (void)
- {
-        struct kexec_segment segment = {};
-       unsigned char purgatory[] = {
-               0x66, 0xba, 0xf8, 0x03, // mov $0x3f8, %dx
-               0xb0, 0x42,             // mov $0x42, %al
-               0xee,                   // outb %al, (%dx)
-               0xc3,                   // ret
-       };
-       int ret;
-
-       segment.buf = &purgatory;
-       segment.bufsz = sizeof(purgatory);
-       segment.mem = (void *)0x400000;
-       segment.memsz = 0x1000;
-       ret = syscall(__NR_kexec_load, 0x400000, 1, &segment, KEXEC_PRESERVE_CONTEXT);
-       if (ret) {
-               perror("kexec_load");
-               exit(1);
-       }
-
-       ret = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC);
-       if (ret) {
-               perror("kexec reboot");
-               exit(1);
-       }
-       printf("Success\n");
-       return 0;
- }
-
-Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Cc: stable@vger.kernel.org
-Link: https://lore.kernel.org/r/20241205153343.3275139-2-dwmw2@infradead.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/x86/kernel/relocate_kernel_64.S |    7 +++++++
- 1 file changed, 7 insertions(+)
-
---- a/arch/x86/kernel/relocate_kernel_64.S
-+++ b/arch/x86/kernel/relocate_kernel_64.S
-@@ -229,6 +229,13 @@ SYM_CODE_START_LOCAL_NOALIGN(virtual_map
-       movq    CR0(%r8), %r8
-       movq    %rax, %cr3
-       movq    %r8, %cr0
-+
-+#ifdef CONFIG_KEXEC_JUMP
-+      /* Saved in save_processor_state. */
-+      movq    $saved_context, %rax
-+      lgdt    saved_context_gdt_desc(%rax)
-+#endif
-+
-       movq    %rbp, %rax
-       popf
index 956c6f4753a39efe80e799f353bb213ef2782548..6fcc4e1eca38cbb7dbc9dc4e422e1b143faa4cdc 100644 (file)
@@ -460,7 +460,6 @@ scsi-qla2xxx-remove-check-req_sg_cnt-should-be-equal-to-rsp_sg_cnt.patch
 scsi-ufs-core-sysfs-prevent-div-by-zero.patch
 nilfs2-fix-potential-out-of-bounds-memory-access-in-nilfs_find_entry.patch
 bcache-revert-replacing-is_err_or_null-with-is_err-again.patch
-x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch
 bpf-fix-oob-devmap-writes-when-deleting-elements.patch
 dma-buf-fix-dma_fence_array_signaled-v4.patch
 xsk-fix-oob-map-writes-when-deleting-elements.patch
diff --git a/queue-5.15/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch b/queue-5.15/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch
deleted file mode 100644 (file)
index 34f1e5e..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-From 07fa619f2a40c221ea27747a3323cabc59ab25eb Mon Sep 17 00:00:00 2001
-From: David Woodhouse <dwmw@amazon.co.uk>
-Date: Thu, 5 Dec 2024 15:05:07 +0000
-Subject: x86/kexec: Restore GDT on return from ::preserve_context kexec
-
-From: David Woodhouse <dwmw@amazon.co.uk>
-
-commit 07fa619f2a40c221ea27747a3323cabc59ab25eb upstream.
-
-The restore_processor_state() function explicitly states that "the asm code
-that gets us here will have restored a usable GDT". That wasn't true in the
-case of returning from a ::preserve_context kexec. Make it so.
-
-Without this, the kernel was depending on the called function to reload a
-GDT which is appropriate for the kernel before returning.
-
-Test program:
-
- #include <unistd.h>
- #include <errno.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <linux/kexec.h>
- #include <linux/reboot.h>
- #include <sys/reboot.h>
- #include <sys/syscall.h>
-
- int main (void)
- {
-        struct kexec_segment segment = {};
-       unsigned char purgatory[] = {
-               0x66, 0xba, 0xf8, 0x03, // mov $0x3f8, %dx
-               0xb0, 0x42,             // mov $0x42, %al
-               0xee,                   // outb %al, (%dx)
-               0xc3,                   // ret
-       };
-       int ret;
-
-       segment.buf = &purgatory;
-       segment.bufsz = sizeof(purgatory);
-       segment.mem = (void *)0x400000;
-       segment.memsz = 0x1000;
-       ret = syscall(__NR_kexec_load, 0x400000, 1, &segment, KEXEC_PRESERVE_CONTEXT);
-       if (ret) {
-               perror("kexec_load");
-               exit(1);
-       }
-
-       ret = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC);
-       if (ret) {
-               perror("kexec reboot");
-               exit(1);
-       }
-       printf("Success\n");
-       return 0;
- }
-
-Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Cc: stable@vger.kernel.org
-Link: https://lore.kernel.org/r/20241205153343.3275139-2-dwmw2@infradead.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/x86/kernel/relocate_kernel_64.S |    7 +++++++
- 1 file changed, 7 insertions(+)
-
---- a/arch/x86/kernel/relocate_kernel_64.S
-+++ b/arch/x86/kernel/relocate_kernel_64.S
-@@ -229,6 +229,13 @@ SYM_CODE_START_LOCAL_NOALIGN(virtual_map
-       movq    CR0(%r8), %r8
-       movq    %rax, %cr3
-       movq    %r8, %cr0
-+
-+#ifdef CONFIG_KEXEC_JUMP
-+      /* Saved in save_processor_state. */
-+      movq    $saved_context, %rax
-+      lgdt    saved_context_gdt_desc(%rax)
-+#endif
-+
-       movq    %rbp, %rax
-       popf
index 5ddf72011ba62975a1192c1d6c31e2673d42c178..d6bb66fb0a19c6ed1a3a75514dc4fdb5a8b08210 100644 (file)
@@ -260,7 +260,6 @@ scsi-qla2xxx-supported-speed-displayed-incorrectly-for-vports.patch
 scsi-qla2xxx-remove-check-req_sg_cnt-should-be-equal-to-rsp_sg_cnt.patch
 nilfs2-fix-potential-out-of-bounds-memory-access-in-nilfs_find_entry.patch
 bcache-revert-replacing-is_err_or_null-with-is_err-again.patch
-x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch
 dma-buf-fix-dma_fence_array_signaled-v4.patch
 regmap-detach-regmap-from-dev-on-regmap_exit.patch
 mmc-core-further-prevent-card-detect-during-shutdown.patch
diff --git a/queue-5.4/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch b/queue-5.4/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch
deleted file mode 100644 (file)
index ea55ef6..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-From 07fa619f2a40c221ea27747a3323cabc59ab25eb Mon Sep 17 00:00:00 2001
-From: David Woodhouse <dwmw@amazon.co.uk>
-Date: Thu, 5 Dec 2024 15:05:07 +0000
-Subject: x86/kexec: Restore GDT on return from ::preserve_context kexec
-
-From: David Woodhouse <dwmw@amazon.co.uk>
-
-commit 07fa619f2a40c221ea27747a3323cabc59ab25eb upstream.
-
-The restore_processor_state() function explicitly states that "the asm code
-that gets us here will have restored a usable GDT". That wasn't true in the
-case of returning from a ::preserve_context kexec. Make it so.
-
-Without this, the kernel was depending on the called function to reload a
-GDT which is appropriate for the kernel before returning.
-
-Test program:
-
- #include <unistd.h>
- #include <errno.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <linux/kexec.h>
- #include <linux/reboot.h>
- #include <sys/reboot.h>
- #include <sys/syscall.h>
-
- int main (void)
- {
-        struct kexec_segment segment = {};
-       unsigned char purgatory[] = {
-               0x66, 0xba, 0xf8, 0x03, // mov $0x3f8, %dx
-               0xb0, 0x42,             // mov $0x42, %al
-               0xee,                   // outb %al, (%dx)
-               0xc3,                   // ret
-       };
-       int ret;
-
-       segment.buf = &purgatory;
-       segment.bufsz = sizeof(purgatory);
-       segment.mem = (void *)0x400000;
-       segment.memsz = 0x1000;
-       ret = syscall(__NR_kexec_load, 0x400000, 1, &segment, KEXEC_PRESERVE_CONTEXT);
-       if (ret) {
-               perror("kexec_load");
-               exit(1);
-       }
-
-       ret = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC);
-       if (ret) {
-               perror("kexec reboot");
-               exit(1);
-       }
-       printf("Success\n");
-       return 0;
- }
-
-Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Cc: stable@vger.kernel.org
-Link: https://lore.kernel.org/r/20241205153343.3275139-2-dwmw2@infradead.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/x86/kernel/relocate_kernel_64.S |    7 +++++++
- 1 file changed, 7 insertions(+)
-
---- a/arch/x86/kernel/relocate_kernel_64.S
-+++ b/arch/x86/kernel/relocate_kernel_64.S
-@@ -218,6 +218,13 @@ virtual_mapped:
-       movq    CR0(%r8), %r8
-       movq    %rax, %cr3
-       movq    %r8, %cr0
-+
-+#ifdef CONFIG_KEXEC_JUMP
-+      /* Saved in save_processor_state. */
-+      movq    $saved_context, %rax
-+      lgdt    saved_context_gdt_desc(%rax)
-+#endif
-+
-       movq    %rbp, %rax
-       popf
index a8a2092e2eea6c3783e3fbd833277632a02185f9..250e05c265b8a7f3f5d423025b47d0c6fc80d07d 100644 (file)
@@ -641,7 +641,6 @@ drm-dp_mst-verify-request-type-in-the-corresponding-down-message-reply.patch
 drm-dp_mst-fix-resetting-msg-rx-state-after-topology-removal.patch
 drm-amdgpu-hdp5.2-do-a-posting-read-when-flushing-hdp.patch
 modpost-add-.irqentry.text-to-other_sections.patch
-x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch
 bpf-fix-oob-devmap-writes-when-deleting-elements.patch
 dma-buf-fix-dma_fence_array_signaled-v4.patch
 dma-fence-fix-reference-leak-on-fence-merge-failure-path.patch
diff --git a/queue-6.1/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch b/queue-6.1/x86-kexec-restore-gdt-on-return-from-preserve_context-kexec.patch
deleted file mode 100644 (file)
index 238066c..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-From 07fa619f2a40c221ea27747a3323cabc59ab25eb Mon Sep 17 00:00:00 2001
-From: David Woodhouse <dwmw@amazon.co.uk>
-Date: Thu, 5 Dec 2024 15:05:07 +0000
-Subject: x86/kexec: Restore GDT on return from ::preserve_context kexec
-
-From: David Woodhouse <dwmw@amazon.co.uk>
-
-commit 07fa619f2a40c221ea27747a3323cabc59ab25eb upstream.
-
-The restore_processor_state() function explicitly states that "the asm code
-that gets us here will have restored a usable GDT". That wasn't true in the
-case of returning from a ::preserve_context kexec. Make it so.
-
-Without this, the kernel was depending on the called function to reload a
-GDT which is appropriate for the kernel before returning.
-
-Test program:
-
- #include <unistd.h>
- #include <errno.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <linux/kexec.h>
- #include <linux/reboot.h>
- #include <sys/reboot.h>
- #include <sys/syscall.h>
-
- int main (void)
- {
-        struct kexec_segment segment = {};
-       unsigned char purgatory[] = {
-               0x66, 0xba, 0xf8, 0x03, // mov $0x3f8, %dx
-               0xb0, 0x42,             // mov $0x42, %al
-               0xee,                   // outb %al, (%dx)
-               0xc3,                   // ret
-       };
-       int ret;
-
-       segment.buf = &purgatory;
-       segment.bufsz = sizeof(purgatory);
-       segment.mem = (void *)0x400000;
-       segment.memsz = 0x1000;
-       ret = syscall(__NR_kexec_load, 0x400000, 1, &segment, KEXEC_PRESERVE_CONTEXT);
-       if (ret) {
-               perror("kexec_load");
-               exit(1);
-       }
-
-       ret = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC);
-       if (ret) {
-               perror("kexec reboot");
-               exit(1);
-       }
-       printf("Success\n");
-       return 0;
- }
-
-Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Cc: stable@vger.kernel.org
-Link: https://lore.kernel.org/r/20241205153343.3275139-2-dwmw2@infradead.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/x86/kernel/relocate_kernel_64.S |    7 +++++++
- 1 file changed, 7 insertions(+)
-
---- a/arch/x86/kernel/relocate_kernel_64.S
-+++ b/arch/x86/kernel/relocate_kernel_64.S
-@@ -239,6 +239,13 @@ SYM_CODE_START_LOCAL_NOALIGN(virtual_map
-       movq    CR0(%r8), %r8
-       movq    %rax, %cr3
-       movq    %r8, %cr0
-+
-+#ifdef CONFIG_KEXEC_JUMP
-+      /* Saved in save_processor_state. */
-+      movq    $saved_context, %rax
-+      lgdt    saved_context_gdt_desc(%rax)
-+#endif
-+
-       movq    %rbp, %rax
-       popf