Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334173
b: refs/heads/master
c: 7606c37
h: refs/heads/master
i:
  334171: 24cd35d
v: v3
  • Loading branch information
Catalin Marinas committed Oct 11, 2012
1 parent 8ce5e2f commit 5fd0222
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3d447a97f24f7c1e14767e1974b8e5bc219bc07
refs/heads/master: 7606c37d4a447ea3b0efb2165d3ccf516b7d8696
2 changes: 1 addition & 1 deletion trunk/arch/arm64/include/asm/hwcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define HWCAP_FP (1 << 0)
#define HWCAP_ASIMD (1 << 1)

#ifdef __KERNEL__
#define COMPAT_HWCAP_HALF (1 << 1)
#define COMPAT_HWCAP_THUMB (1 << 2)
#define COMPAT_HWCAP_FAST_MULT (1 << 4)
Expand All @@ -35,7 +36,6 @@
#define COMPAT_HWCAP_IDIVT (1 << 18)
#define COMPAT_HWCAP_IDIV (COMPAT_HWCAP_IDIVA|COMPAT_HWCAP_IDIVT)

#ifdef __KERNEL__
#ifndef __ASSEMBLY__
/*
* This yields a mask that user programs can use to figure out what
Expand Down
12 changes: 9 additions & 3 deletions trunk/arch/arm64/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <asm/hwcap.h>

#ifdef __KERNEL__
/* AArch32-specific ptrace requests */
#define COMPAT_PTRACE_GETREGS 12
#define COMPAT_PTRACE_SETREGS 13
Expand All @@ -32,6 +33,7 @@
#define COMPAT_PTRACE_SETVFPREGS 28
#define COMPAT_PTRACE_GETHBPREGS 29
#define COMPAT_PTRACE_SETHBPREGS 30
#endif

/*
* PSR bits
Expand All @@ -47,9 +49,11 @@

/* AArch32 CPSR bits */
#define PSR_MODE32_BIT 0x00000010
#ifdef __KERNEL__
#define COMPAT_PSR_MODE_USR 0x00000010
#define COMPAT_PSR_T_BIT 0x00000020
#define COMPAT_PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */
#endif

/* AArch64 SPSR bits */
#define PSR_F_BIT 0x00000040
Expand All @@ -70,13 +74,15 @@
#define PSR_x 0x0000ff00 /* Extension */
#define PSR_c 0x000000ff /* Control */

#ifdef __KERNEL__
/*
* These are 'magic' values for PTRACE_PEEKUSR that return info about where a
* process is located in memory.
*/
#define PT_TEXT_ADDR 0x10000
#define PT_DATA_ADDR 0x10004
#define PT_TEXT_END_ADDR 0x10008
#define COMPAT_PT_TEXT_ADDR 0x10000
#define COMPAT_PT_DATA_ADDR 0x10004
#define COMPAT_PT_TEXT_END_ADDR 0x10008
#endif

#ifndef __ASSEMBLY__

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm64/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,11 +823,11 @@ static int compat_ptrace_read_user(struct task_struct *tsk, compat_ulong_t off,
if (off & 3)
return -EIO;

if (off == PT_TEXT_ADDR)
if (off == COMPAT_PT_TEXT_ADDR)
tmp = tsk->mm->start_code;
else if (off == PT_DATA_ADDR)
else if (off == COMPAT_PT_DATA_ADDR)
tmp = tsk->mm->start_data;
else if (off == PT_TEXT_END_ADDR)
else if (off == COMPAT_PT_TEXT_END_ADDR)
tmp = tsk->mm->end_code;
else if (off < sizeof(compat_elf_gregset_t))
return copy_regset_to_user(tsk, &user_aarch32_view,
Expand Down

0 comments on commit 5fd0222

Please sign in to comment.