2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-20 16:46:23 +08:00

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: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Steven Rostedt 2009-02-10 11:53:23 -05:00 committed by Ingo Molnar
parent 7d6d49b1f5
commit f47a454db9

View File

@ -488,8 +488,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"
"3:\n" "3:\n"
@ -501,9 +501,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
_ASM_EXTABLE(1b, 4b) _ASM_EXTABLE(1b, 4b)
_ASM_EXTABLE(2b, 4b) _ASM_EXTABLE(2b, 4b)
: [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"
); );