summaryrefslogtreecommitdiffstats
path: root/tools/objtool
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2018-01-10 12:28:16 +0100
committerThomas Gleixner <tglx@linutronix.de>2018-01-10 19:36:22 +0100
commit612e8e9350fd19cae6900cf36ea0c6892d1a0dca (patch)
tree8f5c3f1f6ae856deb97fae715cdb0c692a900d63 /tools/objtool
parent9ecccfaa7cb5249bd31bdceb93fcf5bedb8a24d8 (diff)
downloadlinux-612e8e9350fd19cae6900cf36ea0c6892d1a0dca.tar.bz2
x86/alternatives: Fix optimize_nops() checking
The alternatives code checks only the first byte whether it is a NOP, but with NOPs in front of the payload and having actual instructions after it breaks the "optimized' test. Make sure to scan all bytes before deciding to optimize the NOPs in there. Reported-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jiri Kosina <jikos@kernel.org> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Andrew Lutomirski <luto@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org> Cc: Paul Turner <pjt@google.com> Link: https://lkml.kernel.org/r/20180110112815.mgciyf5acwacphkq@pd.tnic
Diffstat (limited to 'tools/objtool')
0 files changed, 0 insertions, 0 deletions