linux/arch/riscv
Guo Ren 324373f476
riscv: compat: Using seperated vdso_maps for compat_vdso_info
This is a fixup for vdso implementation which caused musl to
fail.

[   11.600082] Run /sbin/init as init process
[   11.628561] init[1]: unhandled signal 11 code 0x1 at
0x0000000000000000 in libc.so[ffffff8ad39000+a4000]
[   11.629398] CPU: 0 PID: 1 Comm: init Not tainted
5.18.0-rc7-next-20220520 #1
[   11.629462] Hardware name: riscv-virtio,qemu (DT)
[   11.629546] epc : 00ffffff8ada1100 ra : 00ffffff8ada13c8 sp :
00ffffffc58199f0
[   11.629586]  gp : 00ffffff8ad39000 tp : 00ffffff8ade0998 t0 :
ffffffffffffffff
[   11.629598]  t1 : 00ffffffc5819fd0 t2 : 0000000000000000 s0 :
00ffffff8ade0cc0
[   11.629610]  s1 : 00ffffff8ade0cc0 a0 : 0000000000000000 a1 :
00ffffffc5819a00
[   11.629622]  a2 : 0000000000000001 a3 : 000000000000001e a4 :
00ffffffc5819b00
[   11.629634]  a5 : 00ffffffc5819b00 a6 : 0000000000000000 a7 :
0000000000000000
[   11.629645]  s2 : 00ffffff8ade0ac8 s3 : 00ffffff8ade0ec8 s4 :
00ffffff8ade0728
[   11.629656]  s5 : 00ffffff8ade0a90 s6 : 0000000000000000 s7 :
00ffffffc5819e40
[   11.629667]  s8 : 00ffffff8ade0ca0 s9 : 00ffffff8addba50 s10:
0000000000000000
[   11.629678]  s11: 0000000000000000 t3 : 0000000000000002 t4 :
0000000000000001
[   11.629688]  t5 : 0000000000020000 t6 : ffffffffffffffff
[   11.629699] status: 0000000000004020 badaddr: 0000000000000000
cause: 000000000000000d

The last __vdso_init(&compat_vdso_info) replaces the data in normal
vdso_info. This is an obvious bug.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220525160404.2930984-1-guoren@kernel.org
Fixes: 3092eb4563 ("riscv: compat: vdso: Add setup additional pages implementation")
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2022-05-25 17:24:06 -07:00
..
boot riscv: dts: rename the node name of dma 2022-04-20 17:37:43 -07:00
configs RISC-V: K210 defconfigs: Drop redundant MEMBARRIER=n 2022-03-31 17:19:27 -07:00
errata riscv: add memory-type errata for T-Head 2022-05-11 21:36:33 -07:00
include riscv: atomic: Add custom conditional atomic operation implementation 2022-05-21 10:31:47 -07:00
kernel riscv: compat: Using seperated vdso_maps for compat_vdso_info 2022-05-25 17:24:06 -07:00
kvm RISC-V: KVM: Implement SBI HSM suspend call 2022-03-11 19:02:39 +05:30
lib riscv: Fixed misaligned memory access. Fixed pointer comparison. 2022-03-10 10:24:04 -08:00
mm riscv: support for Svpbmt and D1 memory types 2022-05-12 09:12:09 -07:00
net riscv: bpf: Fix eBPF's exception tables 2022-01-19 10:50:02 -08:00
purgatory RISC-V: Add purgatory 2022-05-19 12:18:59 -07:00
Kbuild RISC-V: Add purgatory 2022-05-19 12:18:59 -07:00
Kconfig asm-generic: New generic ticket-based spinlock 2022-05-20 10:14:08 -07:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.erratas riscv: add memory-type errata for T-Head 2022-05-11 21:36:33 -07:00
Kconfig.socs riscv: integrate alternatives better into the main architecture 2022-05-11 21:36:31 -07:00
Makefile RISC-V: Add support for rv32 userspace via COMPAT 2022-05-19 09:51:59 -07:00