]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/kernel: fix incorrect EL0 check in inv_entry macro
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 18 Mar 2016 09:58:09 +0000 (10:58 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 21 Mar 2016 12:05:34 +0000 (12:05 +0000)
commit1a29dc5c1381a2330ad378e805aa10752336e5a1
tree88cc6e9dc4440ac6f50182bbbedcca3062f5344d
parente7b615f45654ebcb327daebbbc8a0deeb0749b6f
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>
arch/arm64/kernel/entry.S