[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210322225053.428615-2-avagin@gmail.com>
Date: Mon, 22 Mar 2021 15:50:50 -0700
From: Andrei Vagin <avagin@...il.com>
To: Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>
Cc: Oleg Nesterov <oleg@...hat.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Andrei Vagin <avagin@...il.com>,
Dave Martin <Dave.Martin@....com>,
Keno Fischer <keno@...iacomputing.com>
Subject: [PATCH 1/4] arm64: expose orig_x0 in the user_pt_regs structure
orig_x0 is recorded at the start of the syscall entry and then it is
used for resetting the argument back to its original value during
syscall restarts.
If orig_x0 isn't available from user-space, this makes it tricky to
manage arguments of restarted system calls.
Cc: Keno Fischer <keno@...iacomputing.com>
Signed-off-by: Andrei Vagin <avagin@...il.com>
---
arch/arm64/include/asm/ptrace.h | 2 +-
arch/arm64/include/uapi/asm/ptrace.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index e58bca832dff..d4cdf98ac003 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -183,9 +183,9 @@ struct pt_regs {
u64 sp;
u64 pc;
u64 pstate;
+ u64 orig_x0;
};
};
- u64 orig_x0;
#ifdef __AARCH64EB__
u32 unused2;
s32 syscallno;
diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
index 758ae984ff97..3c118c5b0893 100644
--- a/arch/arm64/include/uapi/asm/ptrace.h
+++ b/arch/arm64/include/uapi/asm/ptrace.h
@@ -90,6 +90,7 @@ struct user_pt_regs {
__u64 sp;
__u64 pc;
__u64 pstate;
+ __u64 orig_x0;
};
struct user_fpsimd_state {
--
2.29.2
Powered by blists - more mailing lists