]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: entry: Ensure branch through syscall table is bounded under speculation
authorWill Deacon <will.deacon@arm.com>
Mon, 5 Feb 2018 15:34:20 +0000 (15:34 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 6 Feb 2018 22:53:35 +0000 (22:53 +0000)
commit51d43721eda3af6af473cbdc1dfdae093ac530a8
treefb62ec15844bee34626b37a80ec6d82d6ee3f26a
parent1ac995c717862aa3442ff86858cf331e55663a3f
arm64: entry: Ensure branch through syscall table is bounded under speculation

In a similar manner to array_index_mask_nospec, this patch introduces an
assembly macro (mask_nospec64) which can be used to bound a value under
speculation. This macro is then used to ensure that the indirect branch
through the syscall table is bounded under speculation, with out-of-range
addresses speculating as calls to sys_io_setup (0).

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/assembler.h
arch/arm64/kernel/entry.S