|
@@ -551,6 +551,32 @@ static int tls_set(struct task_struct *target, const struct user_regset *regset,
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int system_call_get(struct task_struct *target,
|
|
|
|
+ const struct user_regset *regset,
|
|
|
|
+ unsigned int pos, unsigned int count,
|
|
|
|
+ void *kbuf, void __user *ubuf)
|
|
|
|
+{
|
|
|
|
+ int syscallno = task_pt_regs(target)->syscallno;
|
|
|
|
+
|
|
|
|
+ return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
|
|
|
|
+ &syscallno, 0, -1);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static int system_call_set(struct task_struct *target,
|
|
|
|
+ const struct user_regset *regset,
|
|
|
|
+ unsigned int pos, unsigned int count,
|
|
|
|
+ const void *kbuf, const void __user *ubuf)
|
|
|
|
+{
|
|
|
|
+ int syscallno, ret;
|
|
|
|
+
|
|
|
|
+ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &syscallno, 0, -1);
|
|
|
|
+ if (ret)
|
|
|
|
+ return ret;
|
|
|
|
+
|
|
|
|
+ task_pt_regs(target)->syscallno = syscallno;
|
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
+
|
|
enum aarch64_regset {
|
|
enum aarch64_regset {
|
|
REGSET_GPR,
|
|
REGSET_GPR,
|
|
REGSET_FPR,
|
|
REGSET_FPR,
|
|
@@ -559,6 +585,7 @@ enum aarch64_regset {
|
|
REGSET_HW_BREAK,
|
|
REGSET_HW_BREAK,
|
|
REGSET_HW_WATCH,
|
|
REGSET_HW_WATCH,
|
|
#endif
|
|
#endif
|
|
|
|
+ REGSET_SYSTEM_CALL,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct user_regset aarch64_regsets[] = {
|
|
static const struct user_regset aarch64_regsets[] = {
|
|
@@ -608,6 +635,14 @@ static const struct user_regset aarch64_regsets[] = {
|
|
.set = hw_break_set,
|
|
.set = hw_break_set,
|
|
},
|
|
},
|
|
#endif
|
|
#endif
|
|
|
|
+ [REGSET_SYSTEM_CALL] = {
|
|
|
|
+ .core_note_type = NT_ARM_SYSTEM_CALL,
|
|
|
|
+ .n = 1,
|
|
|
|
+ .size = sizeof(int),
|
|
|
|
+ .align = sizeof(int),
|
|
|
|
+ .get = system_call_get,
|
|
|
|
+ .set = system_call_set,
|
|
|
|
+ },
|
|
};
|
|
};
|
|
|
|
|
|
static const struct user_regset_view user_aarch64_view = {
|
|
static const struct user_regset_view user_aarch64_view = {
|