projects
/
wrapfs-5.3.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97d8bdf
)
arm64: entry.S: Add ventry overflow sanity checks
author
James Morse
<james.morse@arm.com>
Wed, 17 Nov 2021 15:15:26 +0000
(15:15 +0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 11 Mar 2022 11:11:51 +0000
(12:11 +0100)
commit
4330e2c5c04c27bebf89d34e0bc14e6943413067
upstream.
Subsequent patches add even more code to the ventry slots.
Ensure kernels that overflow a ventry slot don't get built.
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/entry.S
patch
|
blob
|
history
diff --git
a/arch/arm64/kernel/entry.S
b/arch/arm64/kernel/entry.S
index fe83d6d67ec3dc72ae9e3a3d07d4eb8e5149b7c7..53079b665cc3af363b3b6543cb2c2b7af5e9a278 100644
(file)
--- a/
arch/arm64/kernel/entry.S
+++ b/
arch/arm64/kernel/entry.S
@@
-62,6
+62,7
@@
.macro kernel_ventry, el, label, regsize = 64
.align 7
+.Lventry_start\@:
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
.if \el == 0
alternative_if ARM64_UNMAP_KERNEL_AT_EL0
@@
-120,6
+121,7
@@
alternative_else_nop_endif
mrs x0, tpidrro_el0
#endif
b el\()\el\()_\label
+.org .Lventry_start\@ + 128 // Did we overflow the ventry slot?
.endm
.macro tramp_alias, dst, sym
@@
-832,6
+834,7
@@
alternative_else_nop_endif
add x30, x30, #(1b - tramp_vectors)
isb
ret
+.org 1b + 128 // Did we overflow the ventry slot?
.endm
.macro tramp_exit, regsize = 64