summaryrefslogtreecommitdiffstats
path: root/tools/objtool
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-04-28 19:57:59 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-04-30 20:14:31 +0200
commit1ff865e343c2b59469d7e41d370a980a3f972c71 (patch)
tree079fbd5fce19b9fbca6162f603eb3af11c704af3 /tools/objtool
parent7117f16bf460ef8cd132e6e80c989677397b4868 (diff)
downloadlinux-1ff865e343c2b59469d7e41d370a980a3f972c71.tar.bz2
x86,smap: Fix smap_{save,restore}() alternatives
As reported by objtool: lib/ubsan.o: warning: objtool: .altinstr_replacement+0x0: alternative modifies stack lib/ubsan.o: warning: objtool: .altinstr_replacement+0x7: alternative modifies stack the smap_{save,restore}() alternatives violate (the newly enforced) rule on stack invariance. That is, due to there only being a single ORC table it must be valid to any alternative. These alternatives violate this with the direct result that unwinds will not be correct when it hits between the PUSH and POP instructions. Rewrite the functions to only have a conditional jump. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lkml.kernel.org/r/20200429101802.GI13592@hirez.programming.kicks-ass.net
Diffstat (limited to 'tools/objtool')
0 files changed, 0 insertions, 0 deletions