[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offs
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets |
Date: |
Sun, 28 Jan 2024 20:50:24 +0300 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
(cherry picked from commit 1b21fe27e75a59bfe2513f5abcc6a18cfc35cfc8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/linux-user/riscv/vdso-32.so b/linux-user/riscv/vdso-32.so
index 1ad1e5cbbb..c2ce2a4757 100755
Binary files a/linux-user/riscv/vdso-32.so and b/linux-user/riscv/vdso-32.so
differ
diff --git a/linux-user/riscv/vdso-64.so b/linux-user/riscv/vdso-64.so
index 83992bebe6..ae49f5b043 100755
Binary files a/linux-user/riscv/vdso-64.so and b/linux-user/riscv/vdso-64.so
differ
diff --git a/linux-user/riscv/vdso.S b/linux-user/riscv/vdso.S
index a86d8fc488..c37275233a 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
--
2.39.2
- [Stable-8.2.1 00/71] Patch Round-up for stable 8.2.1, frozen on 2024-01-27, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 56/71] accel/tcg: Revert mapping of PCREL translation block to multiple virtual addresses, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 55/71] acpi/tests/avocado/bits: wait for 200 seconds for SHUTDOWN event from bits VM, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 57/71] tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 59/71] block/io: clear BDRV_BLOCK_RECURSE flag after recursing in bdrv_co_block_status, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 58/71] coroutine-ucontext: Save fake stack for pooled coroutine, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets,
Michael Tokarev <=
- [Stable-8.2.1 62/71] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 60/71] linux-user: Fixed cpu restore with pc 0 on SIGBUS, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 64/71] block/blklogwrites: Fix a bug when logging "write zeroes" operations., Michael Tokarev, 2024/01/28
- [Stable-8.2.1 65/71] iotests: add filter_qmp_generated_node_ids(), Michael Tokarev, 2024/01/28
- [Stable-8.2.1 67/71] monitor: only run coroutine commands in qemu_aio_context, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 63/71] virtio-net: correctly copy vnet header when flushing TX, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 66/71] iotests: port 141 to Python for reliable QMP testing, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 68/71] qtest: bump aspeed_smc-test timeout to 6 minutes, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 70/71] target/arm: Fix A64 scalar SQSHRN and SQRSHRN, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 69/71] target/xtensa: fix OOB TLB entry access, Michael Tokarev, 2024/01/28