linux-user/riscv: Use abi type for target_ucontext
PATCH v2 1/1 linux-user/riscv: Use abi type for target_ucontext
We should not use types dependend on host arch for target_ucontext. This bug is found when run rv32 applications.
Signed-off-by LIU Zhiwei <[email protected]>
Reviewed-by Richard Henderson <[email protected]>
Reviewed-by Daniel Henrique Barboza <[email protected]>
---
v2:
- Use abi_ptr instead of abi_ulong for uc_link. (Suggest by Philippe Mathieu-Daudé)
--- linux-user/riscv/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
linux-user/riscv/signal.c +2 -2
@@ -38,8 +38,8 @@ struct target_sigcontext { };/* cf. riscv-linux:arch/riscv/include/uapi/asm/ptrace.h */ struct target_ucontext { -unsigned long uc_flags; -struct target_ucontext *uc_link; +abi_ulong uc_flags; +abi_ptr uc_link;target_stack_t uc_stack;target_sigset_t uc_sigmask;uint8_t __unused[1024 /8 -sizeof (target_sigset_t)];
Signature · 1 line
2.17.1
Quoted 6 lines · LIU Zhiwei
We should not use types dependend on host arch for
target_ucontext. This bug is found when run rv32 applications.Signed-off-by LIU Zhiwei <[email protected]>Reviewed-by Richard Henderson <[email protected]>Reviewed-by Daniel Henrique Barboza <[email protected]>
Quoted 6 lines
---
v2:
- Useabi_ptrinstead ofabi_ulongforuc_link. (Suggest by Philippe Mathieu-Daudé)--- linux-user/riscv/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Alistair Francis
AppliedQuoted 7 lines · LIU Zhiwei
We should not use types dependend on host arch for
target_ucontext. This bug is found when run rv32 applications.Signed-off-by LIU Zhiwei <[email protected]>Reviewed-by Richard Henderson <[email protected]>Reviewed-by Daniel Henrique Barboza <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 26 lines
---
v2:
- Useabi_ptrinstead ofabi_ulongforuc_link. (Suggest by Philippe Mathieu-Daudé)--- linux-user/riscv/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)linux-user/riscv/signal.c +2
-3@@ -38,8 +38,8 @@ struct target_sigcontext { };/* cf. riscv-linux:arch/riscv/include/uapi/asm/ptrace.h */ struct target_ucontext { -unsigned long uc_flags; -struct target_ucontext *uc_link; +abi_ulong uc_flags; +abi_ptr uc_link;target_stack_t uc_stack;target_sigset_t uc_sigmask;uint8_t __unused[1024 /8 -sizeof (target_sigset_t)]; --2.17.1