]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Jan 2018 14:00:40 +0000 (15:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Jan 2018 14:00:40 +0000 (15:00 +0100)
added patches:
objtool-fix-clang-enum-conversion-warning.patch
objtool-fix-seg-fault-caused-by-missing-parameter.patch
objtool-fix-seg-fault-with-clang-compiled-objects.patch

queue-4.14/objtool-fix-clang-enum-conversion-warning.patch [new file with mode: 0644]
queue-4.14/objtool-fix-seg-fault-caused-by-missing-parameter.patch [new file with mode: 0644]
queue-4.14/objtool-fix-seg-fault-with-clang-compiled-objects.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/objtool-fix-clang-enum-conversion-warning.patch b/queue-4.14/objtool-fix-clang-enum-conversion-warning.patch
new file mode 100644 (file)
index 0000000..b1a69d8
--- /dev/null
@@ -0,0 +1,50 @@
+From e7e83dd3ff1dd2f9e60213f6eedc7e5b08192062 Mon Sep 17 00:00:00 2001
+From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
+Date: Tue, 26 Dec 2017 15:27:20 -0600
+Subject: objtool: Fix Clang enum conversion warning
+
+From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
+
+commit e7e83dd3ff1dd2f9e60213f6eedc7e5b08192062 upstream.
+
+Fix the following Clang enum conversion warning:
+
+  arch/x86/decode.c:141:20: error: implicit conversion from enumeration
+  type 'enum op_src_type' to different enumeration
+  type 'enum op_dest_type' [-Werror,-Wenum-conversion]
+
+    op->dest.type = OP_SRC_REG;
+                 ~ ^~~~~~~~~~
+
+It just happened to work before because OP_SRC_REG and OP_DEST_REG have
+the same value.
+
+Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
+Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
+Reviewed-by: Nicholas Mc Guire <der.herr@hofr.at>
+Reviewed-by: Nick Desaulniers <nick.desaulniers@gmail.com>
+Cc: Jiri Slaby <jslaby@suse.cz>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Fixes: baa41469a7b9 ("objtool: Implement stack validation 2.0")
+Link: http://lkml.kernel.org/r/b4156c5738bae781c392e7a3691aed4514ebbdf2.1514323568.git.jpoimboe@redhat.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/objtool/arch/x86/decode.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/objtool/arch/x86/decode.c
++++ b/tools/objtool/arch/x86/decode.c
+@@ -138,7 +138,7 @@ int arch_decode_instruction(struct elf *
+                       *type = INSN_STACK;
+                       op->src.type = OP_SRC_ADD;
+                       op->src.reg = op_to_cfi_reg[modrm_reg][rex_r];
+-                      op->dest.type = OP_SRC_REG;
++                      op->dest.type = OP_DEST_REG;
+                       op->dest.reg = CFI_SP;
+               }
+               break;
diff --git a/queue-4.14/objtool-fix-seg-fault-caused-by-missing-parameter.patch b/queue-4.14/objtool-fix-seg-fault-caused-by-missing-parameter.patch
new file mode 100644 (file)
index 0000000..bc8230c
--- /dev/null
@@ -0,0 +1,45 @@
+From d89e426499cf36b96161bd32970d6783f1fbcb0e Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact@emersion.fr>
+Date: Sat, 30 Dec 2017 14:43:31 -0600
+Subject: objtool: Fix seg fault caused by missing parameter
+
+From: Simon Ser <contact@emersion.fr>
+
+commit d89e426499cf36b96161bd32970d6783f1fbcb0e upstream.
+
+Fix a seg fault when no parameter is provided to 'objtool orc'.
+
+Signed-off-by: Simon Ser <contact@emersion.fr>
+Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/9172803ec7ebb72535bcd0b7f966ae96d515968e.1514666459.git.jpoimboe@redhat.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/objtool/builtin-orc.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/tools/objtool/builtin-orc.c
++++ b/tools/objtool/builtin-orc.c
+@@ -44,6 +44,9 @@ int cmd_orc(int argc, const char **argv)
+       const char *objname;
+       argc--; argv++;
++      if (argc <= 0)
++              usage_with_options(orc_usage, check_options);
++
+       if (!strncmp(argv[0], "gen", 3)) {
+               argc = parse_options(argc, argv, check_options, orc_usage, 0);
+               if (argc != 1)
+@@ -52,7 +55,6 @@ int cmd_orc(int argc, const char **argv)
+               objname = argv[0];
+               return check(objname, no_fp, no_unreachable, true);
+-
+       }
+       if (!strcmp(argv[0], "dump")) {
diff --git a/queue-4.14/objtool-fix-seg-fault-with-clang-compiled-objects.patch b/queue-4.14/objtool-fix-seg-fault-with-clang-compiled-objects.patch
new file mode 100644 (file)
index 0000000..bafc8b8
--- /dev/null
@@ -0,0 +1,38 @@
+From ce90aaf5cde4ce057b297bb6c955caf16ef00ee6 Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact@emersion.fr>
+Date: Sat, 30 Dec 2017 14:43:32 -0600
+Subject: objtool: Fix seg fault with clang-compiled objects
+
+From: Simon Ser <contact@emersion.fr>
+
+commit ce90aaf5cde4ce057b297bb6c955caf16ef00ee6 upstream.
+
+Fix a seg fault which happens when an input file provided to 'objtool
+orc generate' doesn't have a '.shstrtab' section (for instance, object
+files produced by clang don't have this section).
+
+Signed-off-by: Simon Ser <contact@emersion.fr>
+Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/c0f2231683e9bed40fac1f13ce2c33b8389854bc.1514666459.git.jpoimboe@redhat.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/objtool/orc_gen.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/tools/objtool/orc_gen.c
++++ b/tools/objtool/orc_gen.c
+@@ -165,6 +165,8 @@ int create_orc_sections(struct objtool_f
+       /* create .orc_unwind_ip and .rela.orc_unwind_ip sections */
+       sec = elf_create_section(file->elf, ".orc_unwind_ip", sizeof(int), idx);
++      if (!sec)
++              return -1;
+       ip_relasec = elf_create_rela_section(file->elf, sec);
+       if (!ip_relasec)
index 98d0e9bc534f33af36281e2c8260cfd08d76bce5..d4cc4b67e6594100a803d9f1f1868b725d332757 100644 (file)
@@ -1,2 +1,5 @@
 tools-objtool-makefile-don-t-assume-sync-check.sh-is-executable.patch
 drm-nouveau-disp-gf119-add-missing-drive-vfunc-ptr.patch
+objtool-fix-seg-fault-with-clang-compiled-objects.patch
+objtool-fix-clang-enum-conversion-warning.patch
+objtool-fix-seg-fault-caused-by-missing-parameter.patch