diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-03-18 05:58:09 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2016-03-21 08:05:34 -0400 |
commit | b660950c60a7278f9d8deb7c32a162031207c758 (patch) | |
tree | 88cc6e9dc4440ac6f50182bbbedcca3062f5344d | |
parent | 2776e0e8ef683a42fe3e9a5facf576b73579700e (diff) |
arm64/kernel: fix incorrect EL0 check in inv_entry macro
The implementation of macro inv_entry refers to its 'el' argument without
the required leading backslash, which results in an undefined symbol
'el' to be passed into the kernel_entry macro rather than the index of
the exception level as intended.
This undefined symbol strangely enough does not result in build failures,
although it is visible in vmlinux:
$ nm -n vmlinux |head
U el
0000000000000000 A _kernel_flags_le_hi32
0000000000000000 A _kernel_offset_le_hi32
0000000000000000 A _kernel_size_le_hi32
000000000000000a A _kernel_flags_le_lo32
.....
However, it does result in incorrect code being generated for invalid
exceptions taken from EL0, since the argument check in kernel_entry
assumes EL1 if its argument does not equal '0'.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | arch/arm64/kernel/entry.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 1f7f5a2b61bf..12e8d2bcb3f9 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S | |||
@@ -277,7 +277,7 @@ END(vectors) | |||
277 | * Invalid mode handlers | 277 | * Invalid mode handlers |
278 | */ | 278 | */ |
279 | .macro inv_entry, el, reason, regsize = 64 | 279 | .macro inv_entry, el, reason, regsize = 64 |
280 | kernel_entry el, \regsize | 280 | kernel_entry \el, \regsize |
281 | mov x0, sp | 281 | mov x0, sp |
282 | mov x1, #\reason | 282 | mov x1, #\reason |
283 | mrs x2, esr_el1 | 283 | mrs x2, esr_el1 |