lkml.org 
[lkml]   [2019]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 0/6] Static calls
On Fri, Jan 11, 2019 at 1:22 PM Josh Poimboeuf <jpoimboe@redhat.com> wrote:
>
> On Fri, Jan 11, 2019 at 12:46:39PM -0800, Linus Torvalds wrote:
> > On Fri, Jan 11, 2019 at 12:31 PM Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> > >
> > > I was referring to the fact that a single static call key update will
> > > usually result in patching multiple call sites. But you're right, it's
> > > only 1-2 trampolines per text_poke_bp() invocation. Though eventually
> > > we may want to batch all the writes like what Daniel has proposed for
> > > jump labels, to reduce IPIs.
> >
> > Yeah, my suggestion doesn't allow for batching, since it would
> > basically generate one trampoline for every rewritten instruction.
>
> As Andy said, I think batching would still be possible, it's just that
> we'd have to create multiple trampolines at a time.
>
> Or... we could do a hybrid approach: create a single custom trampoline
> which has the call destination patched in, but put the return address in
> %rax -- which is always clobbered, even for callee-saved PV ops. Like:
>

One think I particularly like about the current design is that there
are no requirements at all on the calling convention. I think it
seems fragile to add a calling convention constraint that only applies
when there's a race. I'd rather do a longjmp-like hack or a stack gap
adding hack than make the actual static calls more fragile.

\
 
 \ /
  Last update: 2019-01-13 00:54    [W:0.092 / U:2.988 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site