From 8c2c9526bf748cb3f4bdbde2d45c5c623c341bca Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 8 Aug 2019 08:23:47 +0200 Subject: [PATCH] 4.9-stable patches added patches: libceph-use-kbasename-and-kill-ceph_file_part.patch objtool-add-machine_real_restart-to-the-noreturn-list.patch objtool-add-rewind_stack_do_exit-to-the-noreturn-list.patch --- ...se-kbasename-and-kill-ceph_file_part.patch | 65 +++++++++++++++++++ ...ne_real_restart-to-the-noreturn-list.patch | 37 +++++++++++ ...d_stack_do_exit-to-the-noreturn-list.patch | 34 ++++++++++ queue-4.9/series | 3 + 4 files changed, 139 insertions(+) create mode 100644 queue-4.9/libceph-use-kbasename-and-kill-ceph_file_part.patch create mode 100644 queue-4.9/objtool-add-machine_real_restart-to-the-noreturn-list.patch create mode 100644 queue-4.9/objtool-add-rewind_stack_do_exit-to-the-noreturn-list.patch diff --git a/queue-4.9/libceph-use-kbasename-and-kill-ceph_file_part.patch b/queue-4.9/libceph-use-kbasename-and-kill-ceph_file_part.patch new file mode 100644 index 00000000000..01159a19d9c --- /dev/null +++ b/queue-4.9/libceph-use-kbasename-and-kill-ceph_file_part.patch @@ -0,0 +1,65 @@ +From 6f4dbd149d2a151b89d1a5bbf7530ee5546c7908 Mon Sep 17 00:00:00 2001 +From: Ilya Dryomov +Date: Fri, 19 May 2017 11:33:16 +0200 +Subject: libceph: use kbasename() and kill ceph_file_part() + +From: Ilya Dryomov + +commit 6f4dbd149d2a151b89d1a5bbf7530ee5546c7908 upstream. + +Signed-off-by: Ilya Dryomov +Reviewed-by: Alex Elder +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/ceph/ceph_debug.h | 6 +++--- + net/ceph/ceph_common.c | 13 ------------- + 2 files changed, 3 insertions(+), 16 deletions(-) + +--- a/include/linux/ceph/ceph_debug.h ++++ b/include/linux/ceph/ceph_debug.h +@@ -3,6 +3,8 @@ + + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #ifdef CONFIG_CEPH_LIB_PRETTYDEBUG + + /* +@@ -12,12 +14,10 @@ + */ + + # if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) +-extern const char *ceph_file_part(const char *s, int len); + # define dout(fmt, ...) \ + pr_debug("%.*s %12.12s:%-4d : " fmt, \ + 8 - (int)sizeof(KBUILD_MODNAME), " ", \ +- ceph_file_part(__FILE__, sizeof(__FILE__)), \ +- __LINE__, ##__VA_ARGS__) ++ kbasename(__FILE__), __LINE__, ##__VA_ARGS__) + # else + /* faux printk call just to see any compiler warnings. */ + # define dout(fmt, ...) do { \ +--- a/net/ceph/ceph_common.c ++++ b/net/ceph/ceph_common.c +@@ -45,19 +45,6 @@ bool libceph_compatible(void *data) + } + EXPORT_SYMBOL(libceph_compatible); + +-/* +- * find filename portion of a path (/foo/bar/baz -> baz) +- */ +-const char *ceph_file_part(const char *s, int len) +-{ +- const char *e = s + len; +- +- while (e != s && *(e-1) != '/') +- e--; +- return e; +-} +-EXPORT_SYMBOL(ceph_file_part); +- + const char *ceph_msg_type_name(int type) + { + switch (type) { diff --git a/queue-4.9/objtool-add-machine_real_restart-to-the-noreturn-list.patch b/queue-4.9/objtool-add-machine_real_restart-to-the-noreturn-list.patch new file mode 100644 index 00000000000..310835c0a6c --- /dev/null +++ b/queue-4.9/objtool-add-machine_real_restart-to-the-noreturn-list.patch @@ -0,0 +1,37 @@ +From 684fb246578b9e81fc7b4ca5c71eae22edb650b2 Mon Sep 17 00:00:00 2001 +From: Josh Poimboeuf +Date: Tue, 19 Jun 2018 10:47:50 -0500 +Subject: objtool: Add machine_real_restart() to the noreturn list + +From: Josh Poimboeuf + +commit 684fb246578b9e81fc7b4ca5c71eae22edb650b2 upstream. + +machine_real_restart() is annotated as '__noreturn", so add it to the +objtool noreturn list. This fixes the following warning with clang and +CONFIG_CC_OPTIMIZE_FOR_SIZE=y: + + arch/x86/kernel/reboot.o: warning: objtool: native_machine_emergency_restart() falls through to next function machine_power_off() + +Reported-by: Matthias Kaehlcke +Signed-off-by: Josh Poimboeuf +Signed-off-by: Thomas Gleixner +Tested-by: Matthias Kaehlcke +Reviewed-by: Matthias Kaehlcke +Link: https://lkml.kernel.org/r/791712792aa4431bdd55bf1beb33a169ddf3b4a2.1529423255.git.jpoimboe@redhat.com +Signed-off-by: Greg Kroah-Hartman + +--- + tools/objtool/check.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/tools/objtool/check.c ++++ b/tools/objtool/check.c +@@ -165,6 +165,7 @@ static int __dead_end_function(struct ob + "__reiserfs_panic", + "lbug_with_loc", + "fortify_panic", ++ "machine_real_restart", + }; + + if (func->bind == STB_WEAK) diff --git a/queue-4.9/objtool-add-rewind_stack_do_exit-to-the-noreturn-list.patch b/queue-4.9/objtool-add-rewind_stack_do_exit-to-the-noreturn-list.patch new file mode 100644 index 00000000000..78aa5a5c651 --- /dev/null +++ b/queue-4.9/objtool-add-rewind_stack_do_exit-to-the-noreturn-list.patch @@ -0,0 +1,34 @@ +From 4fa5ecda2bf96be7464eb406df8aba9d89260227 Mon Sep 17 00:00:00 2001 +From: Josh Poimboeuf +Date: Thu, 4 Apr 2019 12:17:35 -0500 +Subject: objtool: Add rewind_stack_do_exit() to the noreturn list + +From: Josh Poimboeuf + +commit 4fa5ecda2bf96be7464eb406df8aba9d89260227 upstream. + +This fixes the following warning seen on GCC 7.3: + + arch/x86/kernel/dumpstack.o: warning: objtool: oops_end() falls through to next function show_regs() + +Reported-by: kbuild test robot +Signed-off-by: Josh Poimboeuf +Signed-off-by: Thomas Gleixner +Cc: Peter Zijlstra +Link: https://lkml.kernel.org/r/3418ebf5a5a9f6ed7e80954c741c0b904b67b5dc.1554398240.git.jpoimboe@redhat.com +Signed-off-by: Greg Kroah-Hartman + +--- + tools/objtool/check.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/tools/objtool/check.c ++++ b/tools/objtool/check.c +@@ -166,6 +166,7 @@ static int __dead_end_function(struct ob + "lbug_with_loc", + "fortify_panic", + "machine_real_restart", ++ "rewind_stack_do_exit", + }; + + if (func->bind == STB_WEAK) diff --git a/queue-4.9/series b/queue-4.9/series index 1eca6e92054..dbf9239e526 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -9,3 +9,6 @@ hid-wacom-fix-bit-shift-for-cintiq-companion-2.patch hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch rdma-directly-cast-the-sockaddr-union-to-sockaddr.patch ib-directly-cast-the-sockaddr-union-to-aockaddr.patch +objtool-add-machine_real_restart-to-the-noreturn-list.patch +objtool-add-rewind_stack_do_exit-to-the-noreturn-list.patch +libceph-use-kbasename-and-kill-ceph_file_part.patch -- 2.47.3