> On Oct 11, 2018, at 5:52 AM, Josh Poimboeuf wrote:
>
>> On Wed, Oct 10, 2018 at 10:07:38PM -0500, Josh Poimboeuf wrote:
>>> On Wed, Oct 10, 2018 at 02:13:22PM -0700, Andy Lutomirski wrote:
On Wed, Oct 10, 2018 at 11:17 AM Josh Poimboeuf
wrote:
> On Wed, Oct 10, 2018 at
On Wed, Oct 10, 2018 at 10:07:38PM -0500, Josh Poimboeuf wrote:
> On Wed, Oct 10, 2018 at 02:13:22PM -0700, Andy Lutomirski wrote:
> > On Wed, Oct 10, 2018 at 11:17 AM Josh Poimboeuf wrote:
> > >
> > > On Wed, Oct 10, 2018 at 01:16:05PM -0500, Josh Poimboeuf wrote:
> > > > On Wed, Oct 10, 2018 at
On Wed, Oct 10, 2018 at 02:13:22PM -0700, Andy Lutomirski wrote:
> On Wed, Oct 10, 2018 at 11:17 AM Josh Poimboeuf wrote:
> >
> > On Wed, Oct 10, 2018 at 01:16:05PM -0500, Josh Poimboeuf wrote:
> > > On Wed, Oct 10, 2018 at 11:03:43AM -0700, Andy Lutomirski wrote:
> > > > > +#define DECLARE_STATIC
On Wed, Oct 10, 2018 at 11:17 AM Josh Poimboeuf wrote:
>
> On Wed, Oct 10, 2018 at 01:16:05PM -0500, Josh Poimboeuf wrote:
> > On Wed, Oct 10, 2018 at 11:03:43AM -0700, Andy Lutomirski wrote:
> > > > +#define DECLARE_STATIC_CALL(tramp, func)
> > > > \
> > > > +
On Wed, Oct 10, 2018 at 1:16 PM Josh Poimboeuf wrote:
>
> On Wed, Oct 10, 2018 at 02:56:08PM -0400, Steven Rostedt wrote:
> > On Wed, 10 Oct 2018 13:33:30 -0500
> > Josh Poimboeuf wrote:
> >
> > > Re-reading your suggestion, I may have misunderstood what you're
> > > suggesting here, but I'm thin
On Wed, Oct 10, 2018 at 02:56:08PM -0400, Steven Rostedt wrote:
> On Wed, 10 Oct 2018 13:33:30 -0500
> Josh Poimboeuf wrote:
>
> > Re-reading your suggestion, I may have misunderstood what you're
> > suggesting here, but I'm thinking about doing something like what you
> > proposed earlier:
> >
On Wed, 10 Oct 2018 13:33:30 -0500
Josh Poimboeuf wrote:
> Re-reading your suggestion, I may have misunderstood what you're
> suggesting here, but I'm thinking about doing something like what you
> proposed earlier:
>
> GLOBAL(tramp)
> jmp *current_func(%rip)
> ENDPROC(tramp)
>
>
On Wed, Oct 10, 2018 at 01:16:05PM -0500, Josh Poimboeuf wrote:
> > > +#define DEFINE_STATIC_CALL(tramp, func)
> > > \
> > > + DECLARE_STATIC_CALL(tramp, func); \
> > > + asm(".pushsection .text, \"ax\"
On Wed, Oct 10, 2018 at 01:16:05PM -0500, Josh Poimboeuf wrote:
> On Wed, Oct 10, 2018 at 11:03:43AM -0700, Andy Lutomirski wrote:
> > > +#define DECLARE_STATIC_CALL(tramp, func) \
> > > + extern typeof(func) tramp; \
> > > +
On Wed, Oct 10, 2018 at 11:03:43AM -0700, Andy Lutomirski wrote:
> > +#define DECLARE_STATIC_CALL(tramp, func) \
> > + extern typeof(func) tramp; \
> > + static void __used __section(.discard.static_call_tramps) \
On Wed, Oct 10, 2018 at 10:52 AM Josh Poimboeuf wrote:
>
> On Mon, Oct 08, 2018 at 11:57:50PM -0400, Steven Rostedt wrote:
> > On Mon, 8 Oct 2018 21:17:10 -0500
> > Josh Poimboeuf wrote:
> >
> > > I'm not really convinced we need objtool for this, maybe I'll try
> > > whipping up a POC.
> >
> > A
On Mon, Oct 08, 2018 at 11:57:50PM -0400, Steven Rostedt wrote:
> On Mon, 8 Oct 2018 21:17:10 -0500
> Josh Poimboeuf wrote:
>
> > I'm not really convinced we need objtool for this, maybe I'll try
> > whipping up a POC.
>
> Awesome!
>
> I wasn't thinking of actually having objtool itself perform
On Mon, 8 Oct 2018 23:55:34 -0400
Steven Rostedt wrote:
> On Tue, 9 Oct 2018 12:44:01 +0900
> Masami Hiramatsu wrote:
>
> > On Fri, 05 Oct 2018 21:51:11 -0400
> > Steven Rostedt wrote:
> >
> > > +typedef long dynfunc_t;
> > > +
> > > +struct dynfunc_struct;
> > > +
> > > +#define arch_dynfunc
From: Masami Hiramatsu
> Sent: 09 October 2018 04:44
...
> I think we can replace the first 5 bytes of the default function
> to jmp instruction (to alternative function) instead of making
> this trampoline.
Or have a trampoline that is just a jump instruction and overwrite
the target address at r
On Mon, 8 Oct 2018 21:17:10 -0500
Josh Poimboeuf wrote:
> I'm not really convinced we need objtool for this, maybe I'll try
> whipping up a POC.
Awesome!
I wasn't thinking of actually having objtool itself perform this task,
but instead breaking the internals of objtool up into more of a generi
On Tue, 9 Oct 2018 12:44:01 +0900
Masami Hiramatsu wrote:
> On Fri, 05 Oct 2018 21:51:11 -0400
> Steven Rostedt wrote:
>
> > +typedef long dynfunc_t;
> > +
> > +struct dynfunc_struct;
> > +
> > +#define arch_dynfunc_trampoline(name, def) \
> > + asm volatile ( \
> > +
On Fri, 05 Oct 2018 21:51:11 -0400
Steven Rostedt wrote:
> +typedef long dynfunc_t;
> +
> +struct dynfunc_struct;
> +
> +#define arch_dynfunc_trampoline(name, def) \
> + asm volatile ( \
> + ".globl dynfunc_" #name "; \n\t"\
> + "dynfunc_" #name ": \
On Mon, Oct 08, 2018 at 09:29:56AM -0700, Andy Lutomirski wrote:
>
>
> > On Oct 8, 2018, at 8:57 AM, Peter Zijlstra wrote:
> >
> > On Mon, Oct 08, 2018 at 01:33:14AM -0700, Andy Lutomirski wrote:
> >>> Can't we hijack the relocation records for these functions before they
> >>> get thrown out i
On Mon, Oct 8, 2018 at 10:44 AM Jiri Kosina wrote:
>
> On Mon, 8 Oct 2018, Ard Biesheuvel wrote:
>
> > Does that mean that architectures could opt out of doing the whole
> > objtool + relocation processing thing, and instead take the hit of
> > going through the trampoline for all calls?
>
> There
On 8 October 2018 at 19:44, Jiri Kosina wrote:
> On Mon, 8 Oct 2018, Ard Biesheuvel wrote:
>
>> Does that mean that architectures could opt out of doing the whole
>> objtool + relocation processing thing, and instead take the hit of
>> going through the trampoline for all calls?
>
> There are arch
On Mon, 8 Oct 2018, Ard Biesheuvel wrote:
> Does that mean that architectures could opt out of doing the whole
> objtool + relocation processing thing, and instead take the hit of
> going through the trampoline for all calls?
There are architectures that aren't [currently] supported by objtool at
On Mon, Oct 8, 2018 at 10:30 AM Ard Biesheuvel
wrote:
>
> On 8 October 2018 at 19:25, Andy Lutomirski wrote:
> > On Mon, Oct 8, 2018 at 9:40 AM Peter Zijlstra wrote:
> >>
> >> On Mon, Oct 08, 2018 at 09:29:56AM -0700, Andy Lutomirski wrote:
> >> >
> >> >
> >> > > On Oct 8, 2018, at 8:57 AM, Pete
On 8 October 2018 at 19:25, Andy Lutomirski wrote:
> On Mon, Oct 8, 2018 at 9:40 AM Peter Zijlstra wrote:
>>
>> On Mon, Oct 08, 2018 at 09:29:56AM -0700, Andy Lutomirski wrote:
>> >
>> >
>> > > On Oct 8, 2018, at 8:57 AM, Peter Zijlstra wrote:
>> > >
>> > > On Mon, Oct 08, 2018 at 01:33:14AM -07
On Mon, Oct 8, 2018 at 9:40 AM Peter Zijlstra wrote:
>
> On Mon, Oct 08, 2018 at 09:29:56AM -0700, Andy Lutomirski wrote:
> >
> >
> > > On Oct 8, 2018, at 8:57 AM, Peter Zijlstra wrote:
> > >
> > > On Mon, Oct 08, 2018 at 01:33:14AM -0700, Andy Lutomirski wrote:
> > >>> Can't we hijack the reloca
On Mon, Oct 08, 2018 at 09:29:56AM -0700, Andy Lutomirski wrote:
>
>
> > On Oct 8, 2018, at 8:57 AM, Peter Zijlstra wrote:
> >
> > On Mon, Oct 08, 2018 at 01:33:14AM -0700, Andy Lutomirski wrote:
> >>> Can't we hijack the relocation records for these functions before they
> >>> get thrown out i
On Mon, 8 Oct 2018 09:29:56 -0700
Andy Lutomirski wrote:
> > On Oct 8, 2018, at 8:57 AM, Peter Zijlstra wrote:
> >
> > On Mon, Oct 08, 2018 at 01:33:14AM -0700, Andy Lutomirski wrote:
> >>> Can't we hijack the relocation records for these functions before they
> >>> get thrown out in the (fin
On Mon, 8 Oct 2018 17:57:57 +0200
Peter Zijlstra wrote:
> On Mon, Oct 08, 2018 at 01:33:14AM -0700, Andy Lutomirski wrote:
> > > Can't we hijack the relocation records for these functions before they
> > > get thrown out in the (final) link pass or something?
> >
> > I could be talking out my
> On Oct 8, 2018, at 8:57 AM, Peter Zijlstra wrote:
>
> On Mon, Oct 08, 2018 at 01:33:14AM -0700, Andy Lutomirski wrote:
>>> Can't we hijack the relocation records for these functions before they
>>> get thrown out in the (final) link pass or something?
>>
>> I could be talking out my arse he
On Mon, Oct 08, 2018 at 01:33:14AM -0700, Andy Lutomirski wrote:
> > Can't we hijack the relocation records for these functions before they
> > get thrown out in the (final) link pass or something?
>
> I could be talking out my arse here, but I thought we could do this,
> too, then changed my mind
On 6 October 2018 at 15:39, Steven Rostedt wrote:
> On Sat, 6 Oct 2018 14:12:11 +0200
> Peter Zijlstra wrote:
>
>> On Fri, Oct 05, 2018 at 09:51:11PM -0400, Steven Rostedt wrote:
>> > +#define arch_dynfunc_trampoline(name, def) \
>> > + asm volatile ( \
>> > + ".globl
> On Oct 8, 2018, at 12:21 AM, Peter Zijlstra wrote:
>
>> On Sat, Oct 06, 2018 at 09:39:05AM -0400, Steven Rostedt wrote:
>> On Sat, 6 Oct 2018 14:12:11 +0200
>> Peter Zijlstra wrote:
>>
On Fri, Oct 05, 2018 at 09:51:11PM -0400, Steven Rostedt wrote:
+#define arch_dynfunc_trampolin
On Sat, Oct 06, 2018 at 09:39:05AM -0400, Steven Rostedt wrote:
> On Sat, 6 Oct 2018 14:12:11 +0200
> Peter Zijlstra wrote:
>
> > On Fri, Oct 05, 2018 at 09:51:11PM -0400, Steven Rostedt wrote:
> > > +#define arch_dynfunc_trampoline(name, def) \
> > > + asm volatile (
On Sat, 6 Oct 2018 08:13:18 -0700
Andy Lutomirski wrote:
> > Perhaps a gcc plugin might work too.
> >
>
> My suggestion was to have objtool do the dirty work. Josh said something
> suspiciously like “sounds fun” on IRC :)
>
objtool does basically the same thing as recordmcount does. Josh a
On Fri, 5 Oct 2018 22:03:51 -0400
Steven Rostedt wrote:
> On Fri, 05 Oct 2018 21:51:11 -0400
> Steven Rostedt wrote:
>
> > +#ifndef PARAMS
> > +#define PARAMS(x...) x
> > +#endif
> > +
> > +#ifndef ARGS
> > +#define ARGS(x...) x
> > +#endif
> > +
>
> This is also leftover from the first atte
> On Oct 6, 2018, at 6:39 AM, Steven Rostedt wrote:
>
> On Sat, 6 Oct 2018 14:12:11 +0200
> Peter Zijlstra wrote:
>
>>> On Fri, Oct 05, 2018 at 09:51:11PM -0400, Steven Rostedt wrote:
>>> +#define arch_dynfunc_trampoline(name, def)\
>>> +asm volatile (\
>>> +".glo
On Sat, 6 Oct 2018 14:12:11 +0200
Peter Zijlstra wrote:
> On Fri, Oct 05, 2018 at 09:51:11PM -0400, Steven Rostedt wrote:
> > +#define arch_dynfunc_trampoline(name, def) \
> > + asm volatile ( \
> > + ".globl dynfunc_" #name "; \n\t"\
> > + "dynfunc_" #name
On Fri, Oct 05, 2018 at 09:51:11PM -0400, Steven Rostedt wrote:
> +#define arch_dynfunc_trampoline(name, def) \
> + asm volatile ( \
> + ".globl dynfunc_" #name "; \n\t"\
> + "dynfunc_" #name ": \n\t" \
> + "jmp " #def " \n\t"
On Fri, 05 Oct 2018 21:51:11 -0400
Steven Rostedt wrote:
> +#ifndef PARAMS
> +#define PARAMS(x...) x
> +#endif
> +
> +#ifndef ARGS
> +#define ARGS(x...) x
> +#endif
> +
This is also leftover from the first attempt and can be nuked.
Yeah, yeah, I should have reviewed my patches better before sen
On Fri, 05 Oct 2018 21:51:11 -0400
Steven Rostedt wrote:
> +#define arch_dynfunc_trampoline(name, def) \
> + asm volatile ( \
> + ".globl dynfunc_" #name "; \n\t"\
> + "dynfunc_" #name ": \n\t" \
> + "jmp " #def " \n\t"
On Fri, 05 Oct 2018 21:51:11 -0400
Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)"
>
> Signed-off-by: Steven Rostedt (VMware)
> ---
> include/asm-generic/vmlinux.lds.h | 4 +
> include/linux/jump_function.h | 93
> kernel/Makefile | 2 +-
> kernel/j
From: "Steven Rostedt (VMware)"
Signed-off-by: Steven Rostedt (VMware)
---
include/asm-generic/vmlinux.lds.h | 4 +
include/linux/jump_function.h | 93
kernel/Makefile | 2 +-
kernel/jump_function.c| 368 ++
4 files cha
41 matches
Mail list logo