Skip to content

Commit

Permalink
arm64: Add brackets around user_stack_pointer()
Browse files Browse the repository at this point in the history
Commit 5f888a1 (ARM64: perf: support dwarf unwinding in compat mode)
changes user_stack_pointer() to return the compat SP for 32-bit tasks
but without brackets around the whole definition, with possible issues
on the call sites (noticed with a subsequent fix for KSTK_ESP).

Fixes: 5f888a1 (ARM64: perf: support dwarf unwinding in compat mode)
Reported-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
ctmarinas authored and greghackmann committed Aug 29, 2014
1 parent dc52724 commit 597ff3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ struct pt_regs {
(!((regs)->pstate & PSR_F_BIT))

#define user_stack_pointer(regs) \
(!compat_user_mode(regs)) ? ((regs)->sp) : ((regs)->compat_sp)
(!compat_user_mode(regs) ? (regs)->sp : (regs)->compat_sp)

/*
* Are the current registers suitable for user mode? (used to maintain
Expand Down

0 comments on commit 597ff3a

Please sign in to comment.