Commit 96665788 authored by Steven Rostedt's avatar Steven Rostedt

tracing, x86: fix constraint for parent variable

The constraint used for retrieving and restoring the parent function
pointer is incorrect. The parent variable is a pointer, and the
address of the pointer is modified by the asm statement and not
the pointer itself. It is incorrect to pass it in as an output
constraint since the asm will never update the pointer.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
parent 667d2412
...@@ -468,8 +468,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) ...@@ -468,8 +468,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
* ignore such a protection. * ignore such a protection.
*/ */
asm volatile( asm volatile(
"1: " _ASM_MOV " (%[parent_old]), %[old]\n" "1: " _ASM_MOV " (%[parent]), %[old]\n"
"2: " _ASM_MOV " %[return_hooker], (%[parent_replaced])\n" "2: " _ASM_MOV " %[return_hooker], (%[parent])\n"
" movl $0, %[faulted]\n" " movl $0, %[faulted]\n"
".section .fixup, \"ax\"\n" ".section .fixup, \"ax\"\n"
...@@ -479,9 +479,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) ...@@ -479,9 +479,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
_ASM_EXTABLE(1b, 3b) _ASM_EXTABLE(1b, 3b)
_ASM_EXTABLE(2b, 3b) _ASM_EXTABLE(2b, 3b)
: [parent_replaced] "=r" (parent), [old] "=r" (old), : [old] "=r" (old), [faulted] "=r" (faulted)
[faulted] "=r" (faulted) : [parent] "r" (parent), [return_hooker] "r" (return_hooker)
: [parent_old] "0" (parent), [return_hooker] "r" (return_hooker)
: "memory" : "memory"
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment