Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1337294
| From | Zhi-zhou Zhang <zhizhou.zh@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] arm64: add architecture specified current_pt_regs |
| Date | 2016-02-18 12:50 +0100 |
| Message-ID | <r3vfQ-4SJ-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: zhizhou <zhizhou.zh@gmail.com>
This patch is based on the implementation of arm. The generic
current_pt_regs is implemented with current->stack. It need to access
memory that would be too expensive.
Signed-off-by: zhizhou <zhizhou.zh@gmail.com>
---
arch/arm64/include/asm/ptrace.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index e9e5467..1865d54 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -185,5 +185,9 @@ static inline int valid_user_regs(struct user_pt_regs *regs)
extern unsigned long profile_pc(struct pt_regs *regs);
+#define current_pt_regs(void) ({ (struct pt_regs *) \
+ ((current_stack_pointer | (THREAD_SIZE - 1)) - 0xf) - 1; \
+})
+
#endif /* __ASSEMBLY__ */
#endif
--
2.5.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] arm64: add architecture specified current_pt_regs Zhi-zhou Zhang <zhizhou.zh@gmail.com> - 2016-02-18 12:50 +0100
Re: [PATCH] arm64: add architecture specified current_pt_regs Catalin Marinas <catalin.marinas@arm.com> - 2016-02-18 13:00 +0100
Re: [PATCH] arm64: add architecture specified current_pt_regs Zhi-zhou <zhizhou.zh@gmail.com> - 2016-02-19 03:40 +0100
Re: [PATCH] arm64: add architecture specified current_pt_regs Will Deacon <will.deacon@arm.com> - 2016-02-19 11:40 +0100
Re: [PATCH] arm64: add architecture specified current_pt_regs Zhizhou Zhang <zhizhou.zh@gmail.com> - 2016-02-19 13:10 +0100
csiph-web