diff options
author | Dave Martin <Dave.Martin@arm.com> | 2017-03-27 10:10:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-31 04:31:46 -0400 |
commit | d77bd2d6a478468127da79e6920b44c467baaa9e (patch) | |
tree | 40c50c76df6661f7618f39696e52e99de8880003 /arch/c6x/kernel | |
parent | dd6054234bd82065134f62ca0b5e2695c0d859b7 (diff) |
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>
Diffstat (limited to 'arch/c6x/kernel')
-rw-r--r-- | arch/c6x/kernel/ptrace.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/c6x/kernel/ptrace.c b/arch/c6x/kernel/ptrace.c index 3c494e84444d..a511ac16a8e3 100644 --- a/arch/c6x/kernel/ptrace.c +++ b/arch/c6x/kernel/ptrace.c | |||
@@ -69,46 +69,6 @@ static int gpr_get(struct task_struct *target, | |||
69 | 0, sizeof(*regs)); | 69 | 0, sizeof(*regs)); |
70 | } | 70 | } |
71 | 71 | ||
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 | ®s, | ||
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 | ®s, | ||
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 | ®s, | ||
108 | (PT_CSR + 1) * sizeof(long), -1); | ||
109 | return ret; | ||
110 | } | ||
111 | |||
112 | enum c6x_regset { | 72 | enum c6x_regset { |
113 | REGSET_GPR, | 73 | REGSET_GPR, |
114 | }; | 74 | }; |
@@ -120,7 +80,6 @@ static const struct user_regset c6x_regsets[] = { | |||
120 | .size = sizeof(u32), | 80 | .size = sizeof(u32), |
121 | .align = sizeof(u32), | 81 | .align = sizeof(u32), |
122 | .get = gpr_get, | 82 | .get = gpr_get, |
123 | .set = gpr_set | ||
124 | }, | 83 | }, |
125 | }; | 84 | }; |
126 | 85 | ||