Re: [RFC PATCH v2 11/20] objtool: Flesh out warning related to pv_ops[] calls

From
Peter Zijlstra <peterz@infradead.org>
Date
2023-08-01 18:13:10
Also in
bpf, kvm, linux-doc, linux-kselftest, linux-mm, lkml, rcu
Reply to
Josh Poimboeuf, 2023-08-01
On Tue, Aug 01, 2023 at 11:06:36AM -0500, Josh Poimboeuf wrote:
On Mon, Jul 31, 2023 at 11:46:12PM +0200, Peter Zijlstra wrote:
quoted
quoted
Ideally it would only print a single warning for this case, something
like:

  vmlinux.o: warning: objtool: __flush_tlb_all_noinstr+0x4: indirect call to native_flush_tlb_local() leaves .noinstr.text section
But then what for the case where there are multiple implementations and
more than one isn't noinstr?
The warning would be in the loop in pv_call_dest(), so it would
potentially print multiple warnings, one for each potential dest.
quoted
IIRC that is where these double prints came from. One is the callsite
(always one) and the second is the offending implementation (but there
could be more).
It's confusing to warn about the call site and the destination in two
separate warnings.  That's why I'm proposing combining them into a
single warning (which still could end up as multiple warnings if there
are multiple affected dests).
quoted
quoted
I left out "pv_ops[1]" because it's already long enough :-)
The index number is useful when also looking at the assembler, which
IIRC is an indexed indirect call.
Ok, so something like so?

  vmlinux.o: warning: objtool: __flush_tlb_all_noinstr+0x4: indirect call to pv_ops[1] (native_flush_tlb_local) leaves .noinstr.text section
Sure, that all would work I suppose.
Thread (76 messages) 76 messages, 12 authors, last reply 2023-10-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help