From: Greg Kroah-Hartman Date: Mon, 5 Jun 2023 18:52:09 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.14.317~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e5b52d7f68a959723ae2cd7917b641873a324ecc;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: kernel-extable.c-use-address-of-operator-on-section-symbols.patch --- diff --git a/queue-4.19/kernel-extable.c-use-address-of-operator-on-section-symbols.patch b/queue-4.19/kernel-extable.c-use-address-of-operator-on-section-symbols.patch new file mode 100644 index 00000000000..1c82ef8f657 --- /dev/null +++ b/queue-4.19/kernel-extable.c-use-address-of-operator-on-section-symbols.patch @@ -0,0 +1,46 @@ +From 63174f61dfaef58dc0e813eaf6602636794f8942 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Mon, 6 Apr 2020 20:09:27 -0700 +Subject: kernel/extable.c: use address-of operator on section symbols + +From: Nathan Chancellor + +commit 63174f61dfaef58dc0e813eaf6602636794f8942 upstream. + +Clang warns: + +../kernel/extable.c:37:52: warning: array comparison always evaluates to +a constant [-Wtautological-compare] + if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) { + ^ +1 warning generated. + +These are not true arrays, they are linker defined symbols, which are just +addresses. Using the address of operator silences the warning and does +not change the resulting assembly with either clang/ld.lld or gcc/ld +(tested with diff + objdump -Dr). + +Suggested-by: Nick Desaulniers +Signed-off-by: Nathan Chancellor +Signed-off-by: Andrew Morton +Reviewed-by: Andrew Morton +Link: https://github.com/ClangBuiltLinux/linux/issues/892 +Link: http://lkml.kernel.org/r/20200219202036.45702-1-natechancellor@gmail.com +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + kernel/extable.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/kernel/extable.c ++++ b/kernel/extable.c +@@ -46,7 +46,8 @@ u32 __initdata __visible main_extable_so + /* Sort the kernel's built-in exception table */ + void __init sort_main_extable(void) + { +- if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) { ++ if (main_extable_sort_needed && ++ &__stop___ex_table > &__start___ex_table) { + pr_notice("Sorting __ex_table...\n"); + sort_extable(__start___ex_table, __stop___ex_table); + } diff --git a/queue-4.19/series b/queue-4.19/series index 2cf65edf303..5e58b090c93 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -71,3 +71,4 @@ x86-boot-wrap-literal-addresses-in-absolute_pointer.patch acpi-thermal-drop-an-always-true-check.patch gcc-12-disable-wdangling-pointer-warning-for-now.patch eth-sun-cassini-remove-dead-code.patch +kernel-extable.c-use-address-of-operator-on-section-symbols.patch