Browse Source

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>
(cherry picked from commit 1b21fe27e7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
stable-8.2
Richard Henderson 3 years ago
committed by Michael Tokarev
parent
commit
1e0f028de7
  1. BIN
      linux-user/riscv/vdso-32.so
  2. BIN
      linux-user/riscv/vdso-64.so
  3. 8
      linux-user/riscv/vdso.S

BIN
linux-user/riscv/vdso-32.so

Binary file not shown.

BIN
linux-user/riscv/vdso-64.so

Binary file not shown.

8
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

Loading…
Cancel
Save