Skip to content

Commit 6e174bb

Browse files
Dave Martingregkh
authored andcommitted
c6x/ptrace: Remove useless PTRACE_SETREGSET implementation
commit fb411b837b587a32046dc4f369acb93a10b1def8 upstream. gpr_set won't work correctly and can never have been tested, and the correct behaviour is not clear due to the endianness-dependent task layout. So, just remove it. The core code will now return -EOPNOTSUPPORT when trying to set NT_PRSTATUS on this architecture until/unless a correct implementation is supplied. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 800791e commit 6e174bb

1 file changed

Lines changed: 0 additions & 41 deletions

File tree

arch/c6x/kernel/ptrace.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -69,46 +69,6 @@ static int gpr_get(struct task_struct *target,
6969
0, sizeof(*regs));
7070
}
7171

72-
static int gpr_set(struct task_struct *target,
73-
const struct user_regset *regset,
74-
unsigned int pos, unsigned int count,
75-
const void *kbuf, const void __user *ubuf)
76-
{
77-
int ret;
78-
struct pt_regs *regs = task_pt_regs(target);
79-
80-
/* Don't copyin TSR or CSR */
81-
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
82-
&regs,
83-
0, PT_TSR * sizeof(long));
84-
if (ret)
85-
return ret;
86-
87-
ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
88-
PT_TSR * sizeof(long),
89-
(PT_TSR + 1) * sizeof(long));
90-
if (ret)
91-
return ret;
92-
93-
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
94-
&regs,
95-
(PT_TSR + 1) * sizeof(long),
96-
PT_CSR * sizeof(long));
97-
if (ret)
98-
return ret;
99-
100-
ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
101-
PT_CSR * sizeof(long),
102-
(PT_CSR + 1) * sizeof(long));
103-
if (ret)
104-
return ret;
105-
106-
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
107-
&regs,
108-
(PT_CSR + 1) * sizeof(long), -1);
109-
return ret;
110-
}
111-
11272
enum c6x_regset {
11373
REGSET_GPR,
11474
};
@@ -120,7 +80,6 @@ static const struct user_regset c6x_regsets[] = {
12080
.size = sizeof(u32),
12181
.align = sizeof(u32),
12282
.get = gpr_get,
123-
.set = gpr_set
12483
},
12584
};
12685

0 commit comments

Comments
 (0)