diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2014-06-06 14:16:21 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-07-04 16:16:52 +0100 |
commit | 974c8e450b9327a03453a4a450a2030b1bd42b5f (patch) | |
tree | c0e2539e84fe0b169ebd350368ca0b6da543ae53 /arch/arm64/include | |
parent | 923b8f5044da753e4985ab15c1374ced2cdf616c (diff) | |
download | linux-974c8e450b9327a03453a4a450a2030b1bd42b5f.tar.bz2 |
arm64: fix el2_setup check of CurrentEL
The CurrentEL system register reports the Current Exception Level
of the CPU. It doesn't say anything about the stack handling, and
yet we compare it to PSR_MODE_EL2t and PSR_MODE_EL2h.
It works by chance because PSR_MODE_EL2t happens to match the right
bits, but that's otherwise a very bad idea. Just check for the EL
value instead.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
[catalin.marinas@arm.com: fixed arch/arm64/kernel/efi-entry.S]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/ptrace.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index a429b5940be2..501000fadb6f 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -21,6 +21,10 @@ #include <uapi/asm/ptrace.h> +/* Current Exception Level values, as contained in CurrentEL */ +#define CurrentEL_EL1 (1 << 2) +#define CurrentEL_EL2 (2 << 2) + /* AArch32-specific ptrace requests */ #define COMPAT_PTRACE_GETREGS 12 #define COMPAT_PTRACE_SETREGS 13 |