aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-01-13 09:02:38 +1100
committerRichard Henderson <richard.henderson@linaro.org>2024-01-23 13:22:46 +1000
commit1b21fe27e75a59bfe2513f5abcc6a18cfc35cfc8 (patch)
treee4342d33e612adf1fad58911dfc0669c8fa0c356 /linux-user
parentc1ddc18f37108498f45d57afd6bf33a23b703648 (diff)
downloadqemu-1b21fe27e75a59bfe2513f5abcc6a18cfc35cfc8.zip
qemu-1b21fe27e75a59bfe2513f5abcc6a18cfc35cfc8.tar.gz
qemu-1b21fe27e75a59bfe2513f5abcc6a18cfc35cfc8.tar.bz2
linux-user/riscv: Adjust vdso signal frame cfa offsets
A typo in sizeof_reg put the registers at the wrong offset. Simplify the expressions to use positive addresses from the start of uc_mcontext instead of negative addresses from the end of uc_mcontext. Reported-by: Vineet Gupta <vineetg@rivosinc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user')
-rwxr-xr-xlinux-user/riscv/vdso-32.sobin2900 -> 2980 bytes
-rwxr-xr-xlinux-user/riscv/vdso-64.sobin3856 -> 3944 bytes
-rw-r--r--linux-user/riscv/vdso.S8
3 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/riscv/vdso-32.so b/linux-user/riscv/vdso-32.so
index 1ad1e5c..c2ce2a4 100755
--- a/linux-user/riscv/vdso-32.so
+++ b/linux-user/riscv/vdso-32.so
Binary files differ
diff --git a/linux-user/riscv/vdso-64.so b/linux-user/riscv/vdso-64.so
index 83992be..ae49f5b 100755
--- a/linux-user/riscv/vdso-64.so
+++ b/linux-user/riscv/vdso-64.so
Binary files differ
diff --git a/linux-user/riscv/vdso.S b/linux-user/riscv/vdso.S
index a86d8fc..c372752 100644
--- a/linux-user/riscv/vdso.S
+++ b/linux-user/riscv/vdso.S
@@ -101,12 +101,12 @@ endf __vdso_flush_icache
.cfi_startproc simple
.cfi_signal_frame
-#define sizeof_reg (__riscv_xlen / 4)
+#define sizeof_reg (__riscv_xlen / 8)
#define sizeof_freg 8
-#define B_GR (offsetof_uc_mcontext - sizeof_rt_sigframe)
-#define B_FR (offsetof_uc_mcontext - sizeof_rt_sigframe + offsetof_freg0)
+#define B_GR 0
+#define B_FR offsetof_freg0
- .cfi_def_cfa 2, sizeof_rt_sigframe
+ .cfi_def_cfa 2, offsetof_uc_mcontext
/* Return address */
.cfi_return_column 64