]> code.ossystems Code Review - openembedded-core.git/blob
462fdba2ed7587f92e9eaa8862a53bfc36f29b3e
[openembedded-core.git] /
1 From 0dede80d25ae2005f8af7235809fc09a7c47c62e Mon Sep 17 00:00:00 2001
2 From: Dave Martin <Dave.Martin@arm.com>
3 Date: Tue, 11 Dec 2018 19:26:46 +0000
4 Subject: [PATCH 2/3] arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition
5
6 SVE_PT_REGS_OFFSET is supposed to indicate the offset for skipping
7 over the ptrace NT_ARM_SVE header (struct user_sve_header) to the
8 start of the SVE register data proper.
9
10 However, currently SVE_PT_REGS_OFFSET is defined in terms of struct
11 sve_context, which is wrong: that structure describes the SVE
12 header in the signal frame, not in the ptrace regset.
13
14 This patch fixes the definition to use the ptrace header structure
15 struct user_sve_header instead.
16
17 By good fortune, the to structures are the same size anyway, so
18 there is no functional or ABI change.
19
20 Signed-off-by: Dave Martin <Dave.Martin@arm.com>
21 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
22
23 Upstream-Status: Submitted [https://www.spinics.net/lists/arm-kernel/msg694800.html]
24 ---
25  arch/arm64/include/uapi/asm/ptrace.h | 2 +-
26  1 file changed, 1 insertion(+), 1 deletion(-)
27
28 diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
29 index 98c4ce55d9c3..ad64d2c92ef5 100644
30 --- a/arch/arm64/include/uapi/asm/ptrace.h
31 +++ b/arch/arm64/include/uapi/asm/ptrace.h
32 @@ -130,7 +130,7 @@ struct user_sve_header {
33  
34  /* Offset from the start of struct user_sve_header to the register data */
35  #define SVE_PT_REGS_OFFSET                                     \
36 -       ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1))      \
37 +       ((sizeof(struct user_sve_header) + (SVE_VQ_BYTES - 1))  \
38                 / SVE_VQ_BYTES * SVE_VQ_BYTES)
39  
40  /*
41 -- 
42 2.5.0
43