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 <[email protected]>
Cc: <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
ctmarinas authored and wildea01 committed Aug 29, 2014
1 parent 5b75a6a commit 2520d03
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 @@ -137,7 +137,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)

static inline unsigned long regs_return_value(struct pt_regs *regs)
{
Expand Down

0 comments on commit 2520d03

Please sign in to comment.