| .. | .. |
|---|
| 127 | 127 | unsigned long tmp; |
|---|
| 128 | 128 | long ret = -EIO; |
|---|
| 129 | 129 | |
|---|
| 130 | + unsigned long user_regs_struct_size = sizeof(struct user_regs_struct); |
|---|
| 131 | +#ifdef CONFIG_64BIT |
|---|
| 132 | + if (is_compat_task()) |
|---|
| 133 | + user_regs_struct_size /= 2; |
|---|
| 134 | +#endif |
|---|
| 135 | + |
|---|
| 130 | 136 | switch (request) { |
|---|
| 131 | 137 | |
|---|
| 132 | 138 | /* Read the word at location addr in the USER area. For ptraced |
|---|
| .. | .. |
|---|
| 182 | 188 | return copy_regset_to_user(child, |
|---|
| 183 | 189 | task_user_regset_view(current), |
|---|
| 184 | 190 | REGSET_GENERAL, |
|---|
| 185 | | - 0, sizeof(struct user_regs_struct), |
|---|
| 191 | + 0, user_regs_struct_size, |
|---|
| 186 | 192 | datap); |
|---|
| 187 | 193 | |
|---|
| 188 | 194 | case PTRACE_SETREGS: /* Set all gp regs in the child. */ |
|---|
| 189 | 195 | return copy_regset_from_user(child, |
|---|
| 190 | 196 | task_user_regset_view(current), |
|---|
| 191 | 197 | REGSET_GENERAL, |
|---|
| 192 | | - 0, sizeof(struct user_regs_struct), |
|---|
| 198 | + 0, user_regs_struct_size, |
|---|
| 193 | 199 | datap); |
|---|
| 194 | 200 | |
|---|
| 195 | 201 | case PTRACE_GETFPREGS: /* Get the child FPU state. */ |
|---|
| .. | .. |
|---|
| 303 | 309 | } |
|---|
| 304 | 310 | } |
|---|
| 305 | 311 | break; |
|---|
| 312 | + case PTRACE_GETREGS: |
|---|
| 313 | + case PTRACE_SETREGS: |
|---|
| 314 | + case PTRACE_GETFPREGS: |
|---|
| 315 | + case PTRACE_SETFPREGS: |
|---|
| 316 | + return arch_ptrace(child, request, addr, data); |
|---|
| 306 | 317 | |
|---|
| 307 | 318 | default: |
|---|
| 308 | 319 | ret = compat_ptrace_request(child, request, addr, data); |
|---|