lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 Oct 2021 13:22:38 +0800
From:   Chen Lu <181250012@...il.nju.edu.cn>
To:     palmer@...belt.com
Cc:     paul.walmsley@...ive.com, aou@...s.berkeley.edu, alex@...ti.fr,
        vitaly.wool@...sulko.com, anup@...infault.org, seanga2@...il.com,
        wangkefeng.wang@...wei.com, linux-riscv@...ts.infradead.org,
        linux-kernel@...r.kernel.org, yuzihao@....ac.cn,
        Chen Lu <181250012@...il.nju.edu.cn>
Subject: [PATCH] riscv: fix misalgned trap vector base address

* The trap vector marked by label .Lsecondary_park should align on a
  4-byte boundary. If not, CSR_TVEC may be set to an incorrect address.
* This bug is introduced at commit e011995e826f8 ("RISC-V: Move relocate
  and few other functions out of __init").
* This bug is exposed with an educational emualtor.

Signed-off-by: Chen Lu <181250012@...il.nju.edu.cn>
---
 arch/riscv/kernel/head.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
index fce5184b22c3..52c5ff9804c5 100644
--- a/arch/riscv/kernel/head.S
+++ b/arch/riscv/kernel/head.S
@@ -193,6 +193,7 @@ setup_trap_vector:
 	csrw CSR_SCRATCH, zero
 	ret
 
+.align 2
 .Lsecondary_park:
 	/* We lack SMP support or have too many harts, so park this hart */
 	wfi
-- 
2.30.2



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ