diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-17 14:54:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-17 14:54:56 -0500 |
commit | 88dc7fca18001fd883e5ace775afa316b68c8f2c (patch) | |
tree | 224bd71272b4cbc268ced27d9b3160fabb5755d8 /tools | |
parent | dd43f3465d138439db451a5e7ddccefc5af2fa85 (diff) | |
parent | 6cfb521ac0d5b97470883ff9b7facae264b7ab12 (diff) |
Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 pti bits and fixes from Thomas Gleixner:
"This last update contains:
- An objtool fix to prevent a segfault with the gold linker by
changing the invocation order. That's not just for gold, it's a
general robustness improvement.
- An improved error message for objtool which spares tearing hairs.
- Make KASAN fail loudly if there is not enough memory instead of
oopsing at some random place later
- RSB fill on context switch to prevent RSB underflow and speculation
through other units.
- Make the retpoline/RSB functionality work reliably for both Intel
and AMD
- Add retpoline to the module version magic so mismatch can be
detected
- A small (non-fix) update for cpufeatures which prevents cpu feature
clashing for the upcoming extra mitigation bits to ease
backporting"
* 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
module: Add retpoline tag to VERMAGIC
x86/cpufeature: Move processor tracing out of scattered features
objtool: Improve error message for bad file argument
objtool: Fix seg fault with gold linker
x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros
x86/retpoline: Fill RSB on context switch for affected CPUs
x86/kasan: Panic if there is not enough memory to boot
Diffstat (limited to 'tools')
-rw-r--r-- | tools/objtool/elf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index 24460155c82c..c1c338661699 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <stdlib.h> | 26 | #include <stdlib.h> |
27 | #include <string.h> | 27 | #include <string.h> |
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | #include <errno.h> | ||
29 | 30 | ||
30 | #include "elf.h" | 31 | #include "elf.h" |
31 | #include "warn.h" | 32 | #include "warn.h" |
@@ -358,7 +359,8 @@ struct elf *elf_open(const char *name, int flags) | |||
358 | 359 | ||
359 | elf->fd = open(name, flags); | 360 | elf->fd = open(name, flags); |
360 | if (elf->fd == -1) { | 361 | if (elf->fd == -1) { |
361 | perror("open"); | 362 | fprintf(stderr, "objtool: Can't open '%s': %s\n", |
363 | name, strerror(errno)); | ||
362 | goto err; | 364 | goto err; |
363 | } | 365 | } |
364 | 366 | ||