Skip to content

Commit

Permalink
ARM: 5866/1: arm ptrace: use unsigned types for kernel pt_regs
Browse files Browse the repository at this point in the history
Make registers unsigned for kernel space. This is important for
example in the perf events where the PC is stored into a u64. We
don't want it sign extended so make the regs unsigned to prevent
casts throughout the kernel.

Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Jamie Iles authored and Russell King committed Jan 8, 2010
1 parent 8784895 commit 092a4e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,15 @@
* stack during a system call. Note that sizeof(struct pt_regs)
* has to be a multiple of 8.
*/
#ifndef __KERNEL__
struct pt_regs {
long uregs[18];
};
#else /* __KERNEL__ */
struct pt_regs {
unsigned long uregs[18];
};
#endif /* __KERNEL__ */

#define ARM_cpsr uregs[16]
#define ARM_pc uregs[15]
Expand Down

0 comments on commit 092a4e9

Please sign in to comment.