Re: [RFC PATCH 1/1] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation

2019-04-24 Thread Steven Rostedt
On Wed, 24 Apr 2019 08:20:12 +0200 Nicolai Stange wrote: > Alright, if there's a use case beyond live patching, I can try to handle > 32 bits alongside, of course. > > However, some care will be needed when determining the actual context > from ftrace_int3_handler(): tracing anything before the

Re: [RFC PATCH 1/1] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation

2019-04-23 Thread Nicolai Stange
Steven Rostedt writes: > On Tue, 23 Apr 2019 20:15:49 +0200 > Nicolai Stange wrote: >> Steven Rostedt writes: >> > For 32 bit, we could add 4 variables on the thread_info and make 4 >> > trampolines, one for each context (normal, softirq, irq and NMI), and >> > have them use the variable stored

Re: [RFC PATCH 1/1] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation

2019-04-23 Thread Steven Rostedt
On Tue, 23 Apr 2019 20:15:49 +0200 Nicolai Stange wrote: > > This can be made much simpler by making a hardcoded ftrace_int3_tramp > > that does the following: > > > > ftrace_int3_tramp > > push%r11 > > jmp ftrace_caller > > > But wouldn't this mean that ftrace_caller could ne

Re: [RFC PATCH 1/1] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation

2019-04-23 Thread Nicolai Stange
Hi Steven, many thanks for having a look! Steven Rostedt writes: > I just found this in my Inbox, and this looks to be a legit issue. > > On Thu, 26 Jul 2018 12:40:29 +0200 > Nicolai Stange wrote: > > You still working on this? Yes, this still needs to get fixed somehow, preferably at the ftr

Re: [RFC PATCH 1/1] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation

2019-04-19 Thread Steven Rostedt
I just found this in my Inbox, and this looks to be a legit issue. On Thu, 26 Jul 2018 12:40:29 +0200 Nicolai Stange wrote: Nicolai, You still working on this? > With dynamic ftrace, ftrace patches call sites in a three steps: > 1. Put a breakpoint at the to be patched location, > 2. update

[RFC PATCH 1/1] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation

2018-07-26 Thread Nicolai Stange
With dynamic ftrace, ftrace patches call sites in a three steps: 1. Put a breakpoint at the to be patched location, 2. update call site and 3. finally remove the breakpoint again. Note that the breakpoint ftrace_int3_handler() simply makes execution to skip over the to be patched function. This p