]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: add sentinel to kpti_safe_list
authorMark Rutland <mark.rutland@arm.com>
Mon, 23 Apr 2018 10:41:33 +0000 (11:41 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 23 Apr 2018 16:27:20 +0000 (17:27 +0100)
commit0c9f6bcdc78cf9f1bba23ca96b023398db2a1e4b
tree995bc77185edac2f6fd7cc5e00fcdae4eb99859e
parent973749235e9a82e6427f10ff5051544290b05216
arm64: add sentinel to kpti_safe_list

We're missing a sentinel entry in kpti_safe_list. Thus is_midr_in_range_list()
can walk past the end of kpti_safe_list. Depending on the contents of memory,
this could erroneously match a CPU's MIDR, cause a data abort, or other bad
outcomes.

Add the sentinel entry to avoid this.

Fixes: badc6b4ef119158b ("arm64: capabilities: Add support for checks based on a list of MIDRs")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/cpufeature.c