summaryrefslogtreecommitdiff
path: root/arch/hexagon/kernel
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2023-10-26 13:31:14 +0200
committerArnd Bergmann <arnd@arndb.de>2023-11-23 10:38:58 +0100
commit280ac17856ec438757810c9123ddf2294b07c46f (patch)
treea84d69539620193a3adbbbe06df757b721416519 /arch/hexagon/kernel
parentb85ea95d086471afb4ad062012a4d73cd328fa86 (diff)
hexagon: Remove CONFIG_HEXAGON_ARCH_VERSION from uapi header
uapi headers should not expose CONFIG switches since they are not available in userspace. Fix it in arch/hexagon/include/uapi/asm/user.h by always defining the cs0 and cs1 entries instead of pad values. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/hexagon/kernel')
-rw-r--r--arch/hexagon/kernel/ptrace.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/hexagon/kernel/ptrace.c b/arch/hexagon/kernel/ptrace.c
index 125f19995b76..905b06790ab7 100644
--- a/arch/hexagon/kernel/ptrace.c
+++ b/arch/hexagon/kernel/ptrace.c
@@ -74,7 +74,7 @@ static int genregs_set(struct task_struct *target,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf)
{
- int ret;
+ int ret, ignore_offset;
unsigned long bucket;
struct pt_regs *regs = task_pt_regs(target);
@@ -111,12 +111,15 @@ static int genregs_set(struct task_struct *target,
#if CONFIG_HEXAGON_ARCH_VERSION >=4
INEXT(&regs->cs0, cs0);
INEXT(&regs->cs1, cs1);
+ ignore_offset = offsetof(struct user_regs_struct, pad1);
+#else
+ ignore_offset = offsetof(struct user_regs_struct, cs0);
#endif
/* Ignore the rest, if needed */
if (!ret)
user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
- offsetof(struct user_regs_struct, pad1), -1);
+ ignore_offset, -1);
else
return ret;