]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Implement array_index_mask_nospec()
authorRobin Murphy <robin.murphy@arm.com>
Mon, 5 Feb 2018 15:34:17 +0000 (15:34 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 6 Feb 2018 22:53:30 +0000 (22:53 +0000)
commit56dd263265620a69a6ea17dd568825540639884b
tree0cd3dd01891e13b6ba99ee80eefe75e661ec473e
parentb5d4340c2c2dab546e53949b4a246e6265033369
arm64: Implement array_index_mask_nospec()

Provide an optimised, assembly implementation of array_index_mask_nospec()
for arm64 so that the compiler is not in a position to transform the code
in ways which affect its ability to inhibit speculation (e.g. by introducing
conditional branches).

This is similar to the sequence used by x86, modulo architectural differences
in the carry/borrow flags.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/barrier.h