]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop x86-entry-work-around-clang-__bdos-bug.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Oct 2022 12:55:17 +0000 (14:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Oct 2022 12:55:17 +0000 (14:55 +0200)
From 4.14, 4.19, and 5.4

queue-4.14/series
queue-4.14/x86-entry-work-around-clang-__bdos-bug.patch [deleted file]
queue-4.19/series
queue-4.19/x86-entry-work-around-clang-__bdos-bug.patch [deleted file]
queue-5.4/series
queue-5.4/x86-entry-work-around-clang-__bdos-bug.patch [deleted file]

index 6821ec9673749bf706861bc1c7f705ee303d858e..45ec48d7390a225c7c9a1875a1a014235700929d 100644 (file)
@@ -162,7 +162,6 @@ acpi-video-add-toshiba-satellite-portege-z830-quirk.patch
 mips-bcm47xx-cast-memcmp-of-function-to-void.patch
 powercap-intel_rapl-fix-ubsan-shift-out-of-bounds-is.patch
 thermal-intel_powerclamp-use-get_cpu-instead-of-smp_.patch
-x86-entry-work-around-clang-__bdos-bug.patch
 nfsd-return-nfserr_serverfault-if-splice_ok-but-buf-.patch
 wifi-brcmfmac-fix-invalid-address-access-when-enabli.patch
 openvswitch-fix-double-reporting-of-drops-in-dropwat.patch
diff --git a/queue-4.14/x86-entry-work-around-clang-__bdos-bug.patch b/queue-4.14/x86-entry-work-around-clang-__bdos-bug.patch
deleted file mode 100644 (file)
index 444d95e..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From f1b4f28618b408ecd7e79649ee4c509f12961bd8 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 19 Sep 2022 19:45:14 -0700
-Subject: x86/entry: Work around Clang __bdos() bug
-
-From: Kees Cook <keescook@chromium.org>
-
-[ Upstream commit 3e1730842f142add55dc658929221521a9ea62b6 ]
-
-Clang produces a false positive when building with CONFIG_FORTIFY_SOURCE=y
-and CONFIG_UBSAN_BOUNDS=y when operating on an array with a dynamic
-offset. Work around this by using a direct assignment of an empty
-instance. Avoids this warning:
-
-../include/linux/fortify-string.h:309:4: warning: call to __write_overflow_field declared with 'warn
-ing' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wat
-tribute-warning]
-                        __write_overflow_field(p_size_field, size);
-                        ^
-
-which was isolated to the memset() call in xen_load_idt().
-
-Note that this looks very much like another bug that was worked around:
-https://github.com/ClangBuiltLinux/linux/issues/1592
-
-Cc: Juergen Gross <jgross@suse.com>
-Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-Cc: Thomas Gleixner <tglx@linutronix.de>
-Cc: Ingo Molnar <mingo@redhat.com>
-Cc: Borislav Petkov <bp@alien8.de>
-Cc: Dave Hansen <dave.hansen@linux.intel.com>
-Cc: x86@kernel.org
-Cc: "H. Peter Anvin" <hpa@zytor.com>
-Cc: xen-devel@lists.xenproject.org
-Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-Link: https://lore.kernel.org/lkml/41527d69-e8ab-3f86-ff37-6b298c01d5bc@oracle.com
-Signed-off-by: Kees Cook <keescook@chromium.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/enlighten_pv.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
-index 88d084a57b14..3f38541c28d2 100644
---- a/arch/x86/xen/enlighten_pv.c
-+++ b/arch/x86/xen/enlighten_pv.c
-@@ -753,6 +753,7 @@ static void xen_load_idt(const struct desc_ptr *desc)
- {
-       static DEFINE_SPINLOCK(lock);
-       static struct trap_info traps[257];
-+      static const struct trap_info zero = { };
-       unsigned out;
-       trace_xen_cpu_load_idt(desc);
-@@ -762,7 +763,7 @@ static void xen_load_idt(const struct desc_ptr *desc)
-       memcpy(this_cpu_ptr(&idt_desc), desc, sizeof(idt_desc));
-       out = xen_convert_trap_info(desc, traps, false);
--      memset(&traps[out], 0, sizeof(traps[0]));
-+      traps[out] = zero;
-       xen_mc_flush();
-       if (HYPERVISOR_set_trap_table(traps))
--- 
-2.35.1
-
index b0406d0d283564442856369fec78115b00569c6c..a7abe030ec4f7fd631a2d9e3b2bdb6cff01441ed 100644 (file)
@@ -171,7 +171,6 @@ acpi-video-add-toshiba-satellite-portege-z830-quirk.patch
 mips-bcm47xx-cast-memcmp-of-function-to-void.patch
 powercap-intel_rapl-fix-ubsan-shift-out-of-bounds-is.patch
 thermal-intel_powerclamp-use-get_cpu-instead-of-smp_.patch
-x86-entry-work-around-clang-__bdos-bug.patch
 nfsd-return-nfserr_serverfault-if-splice_ok-but-buf-.patch
 wifi-brcmfmac-fix-invalid-address-access-when-enabli.patch
 openvswitch-fix-double-reporting-of-drops-in-dropwat.patch
diff --git a/queue-4.19/x86-entry-work-around-clang-__bdos-bug.patch b/queue-4.19/x86-entry-work-around-clang-__bdos-bug.patch
deleted file mode 100644 (file)
index 2ac7598..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From 9e7ded7771dcd598caa07ce83f226733267b7975 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 19 Sep 2022 19:45:14 -0700
-Subject: x86/entry: Work around Clang __bdos() bug
-
-From: Kees Cook <keescook@chromium.org>
-
-[ Upstream commit 3e1730842f142add55dc658929221521a9ea62b6 ]
-
-Clang produces a false positive when building with CONFIG_FORTIFY_SOURCE=y
-and CONFIG_UBSAN_BOUNDS=y when operating on an array with a dynamic
-offset. Work around this by using a direct assignment of an empty
-instance. Avoids this warning:
-
-../include/linux/fortify-string.h:309:4: warning: call to __write_overflow_field declared with 'warn
-ing' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wat
-tribute-warning]
-                        __write_overflow_field(p_size_field, size);
-                        ^
-
-which was isolated to the memset() call in xen_load_idt().
-
-Note that this looks very much like another bug that was worked around:
-https://github.com/ClangBuiltLinux/linux/issues/1592
-
-Cc: Juergen Gross <jgross@suse.com>
-Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-Cc: Thomas Gleixner <tglx@linutronix.de>
-Cc: Ingo Molnar <mingo@redhat.com>
-Cc: Borislav Petkov <bp@alien8.de>
-Cc: Dave Hansen <dave.hansen@linux.intel.com>
-Cc: x86@kernel.org
-Cc: "H. Peter Anvin" <hpa@zytor.com>
-Cc: xen-devel@lists.xenproject.org
-Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-Link: https://lore.kernel.org/lkml/41527d69-e8ab-3f86-ff37-6b298c01d5bc@oracle.com
-Signed-off-by: Kees Cook <keescook@chromium.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/enlighten_pv.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
-index 8f1ff8dad2ce..04bfd9c3987b 100644
---- a/arch/x86/xen/enlighten_pv.c
-+++ b/arch/x86/xen/enlighten_pv.c
-@@ -752,6 +752,7 @@ static void xen_load_idt(const struct desc_ptr *desc)
- {
-       static DEFINE_SPINLOCK(lock);
-       static struct trap_info traps[257];
-+      static const struct trap_info zero = { };
-       unsigned out;
-       trace_xen_cpu_load_idt(desc);
-@@ -761,7 +762,7 @@ static void xen_load_idt(const struct desc_ptr *desc)
-       memcpy(this_cpu_ptr(&idt_desc), desc, sizeof(idt_desc));
-       out = xen_convert_trap_info(desc, traps, false);
--      memset(&traps[out], 0, sizeof(traps[0]));
-+      traps[out] = zero;
-       xen_mc_flush();
-       if (HYPERVISOR_set_trap_table(traps))
--- 
-2.35.1
-
index 486631e06be8e3f3480445a65320cdc5394a443e..7c9eb96339a98c290e1c2a2931af54b77c668bd1 100644 (file)
@@ -186,7 +186,6 @@ acpi-video-add-toshiba-satellite-portege-z830-quirk.patch
 mips-bcm47xx-cast-memcmp-of-function-to-void.patch
 powercap-intel_rapl-fix-ubsan-shift-out-of-bounds-is.patch
 thermal-intel_powerclamp-use-get_cpu-instead-of-smp_.patch
-x86-entry-work-around-clang-__bdos-bug.patch
 nfsd-return-nfserr_serverfault-if-splice_ok-but-buf-.patch
 wifi-brcmfmac-fix-invalid-address-access-when-enabli.patch
 bpftool-clear-errno-after-libcap-s-checks.patch
diff --git a/queue-5.4/x86-entry-work-around-clang-__bdos-bug.patch b/queue-5.4/x86-entry-work-around-clang-__bdos-bug.patch
deleted file mode 100644 (file)
index d5391cd..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From 09aef0473b1b1f38de9591dc12b498ca4163b981 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 19 Sep 2022 19:45:14 -0700
-Subject: x86/entry: Work around Clang __bdos() bug
-
-From: Kees Cook <keescook@chromium.org>
-
-[ Upstream commit 3e1730842f142add55dc658929221521a9ea62b6 ]
-
-Clang produces a false positive when building with CONFIG_FORTIFY_SOURCE=y
-and CONFIG_UBSAN_BOUNDS=y when operating on an array with a dynamic
-offset. Work around this by using a direct assignment of an empty
-instance. Avoids this warning:
-
-../include/linux/fortify-string.h:309:4: warning: call to __write_overflow_field declared with 'warn
-ing' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wat
-tribute-warning]
-                        __write_overflow_field(p_size_field, size);
-                        ^
-
-which was isolated to the memset() call in xen_load_idt().
-
-Note that this looks very much like another bug that was worked around:
-https://github.com/ClangBuiltLinux/linux/issues/1592
-
-Cc: Juergen Gross <jgross@suse.com>
-Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-Cc: Thomas Gleixner <tglx@linutronix.de>
-Cc: Ingo Molnar <mingo@redhat.com>
-Cc: Borislav Petkov <bp@alien8.de>
-Cc: Dave Hansen <dave.hansen@linux.intel.com>
-Cc: x86@kernel.org
-Cc: "H. Peter Anvin" <hpa@zytor.com>
-Cc: xen-devel@lists.xenproject.org
-Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-Link: https://lore.kernel.org/lkml/41527d69-e8ab-3f86-ff37-6b298c01d5bc@oracle.com
-Signed-off-by: Kees Cook <keescook@chromium.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/enlighten_pv.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
-index 65cf405cd975..26b35e75b701 100644
---- a/arch/x86/xen/enlighten_pv.c
-+++ b/arch/x86/xen/enlighten_pv.c
-@@ -759,6 +759,7 @@ static void xen_load_idt(const struct desc_ptr *desc)
- {
-       static DEFINE_SPINLOCK(lock);
-       static struct trap_info traps[257];
-+      static const struct trap_info zero = { };
-       unsigned out;
-       trace_xen_cpu_load_idt(desc);
-@@ -768,7 +769,7 @@ static void xen_load_idt(const struct desc_ptr *desc)
-       memcpy(this_cpu_ptr(&idt_desc), desc, sizeof(idt_desc));
-       out = xen_convert_trap_info(desc, traps, false);
--      memset(&traps[out], 0, sizeof(traps[0]));
-+      traps[out] = zero;
-       xen_mc_flush();
-       if (HYPERVISOR_set_trap_table(traps))
--- 
-2.35.1
-