]> git.baikalelectronics.ru Git - kernel.git/commit
objtool: Fix pv_ops noinstr validation
authorPeter Zijlstra <peterz@infradead.org>
Thu, 2 Dec 2021 20:45:34 +0000 (21:45 +0100)
committerBorislav Petkov <bp@suse.de>
Fri, 3 Dec 2021 08:11:42 +0000 (09:11 +0100)
commitfacad562a3091f6f599c4e236445e264c3a48e61
tree7f348e2cd7069cf1c3a77fadaeba47effa4cd1b6
parentec875a14e16aa073d1b168a48cfd07bf270c41df
objtool: Fix pv_ops noinstr validation

Boris reported that in one of his randconfig builds, objtool got
infinitely stuck. Turns out there's trivial list corruption in the
pv_ops tracking when a function is both in a static table and in a code
assignment.

Avoid re-adding function to the pv_ops[] lists when they're already on
it.

Fixes: 5f2643e372a2 ("objtool: Support pv_opsindirect calls for noinstr")
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Borislav Petkov <bp@alien8.de>
Link: https://lkml.kernel.org/r/20211202204534.GA16608@worktop.programming.kicks-ass.net
tools/objtool/elf.c
tools/objtool/objtool.c