lkml.org 
[lkml]   [2020]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 14/18] static_call: Add static_cond_call()
On Wed, May 06, 2020 at 10:01:12AM -0400, Mathieu Desnoyers wrote:
> ----- On May 6, 2020, at 9:55 AM, Peter Zijlstra peterz@infradead.org wrote:
>
> > On Tue, May 05, 2020 at 04:27:44PM -0400, Mathieu Desnoyers wrote:
> >> Actually, if the goal is to do code patching of the call, I wonder
> >> what makes it OK to "guess" all the call patterns generated by the compiler ?
> >
> > We're not guessing, have have objtool read the compiler output and
> > record the location for us. The compiler can generate whatever it likes.
>
> So is the plan to adapt objtool if future compilers change the generated
> instruction patterns ?

If needed, sure. I don't really see what a compiler can do differently
though.

objtool looks for:

JMP/CALL __SCT__##foo

and writes a .static_call_sites table entry for it. Anything else we
can't rewrite anyway and will have to keep relying on the trampoline
working (which we also update, so that's fine).

\
 
 \ /
  Last update: 2020-05-06 18:20    [W:0.083 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site