]> git.baikalelectronics.ru Git - kernel.git/commit
kasan: arm64: set TCR_EL1.TBID1 when enabled
authorPeter Collingbourne <pcc@google.com>
Sat, 21 Nov 2020 09:59:02 +0000 (01:59 -0800)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 25 Nov 2020 16:53:19 +0000 (16:53 +0000)
commit0ad4bbd154d0a45fa503c95c5905a7cc5e0475a1
tree274247e95ef4c456f3ef4e8530929054138bfb1c
parent92da560d37a3dc992417c5a652625be5b5530f03
kasan: arm64: set TCR_EL1.TBID1 when enabled

On hardware supporting pointer authentication, we previously ended up
enabling TBI on instruction accesses when tag-based ASAN was enabled,
but this was costing us 8 bits of PAC entropy, which was unnecessary
since tag-based ASAN does not require TBI on instruction accesses. Get
them back by setting TCR_EL1.TBID1.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@google.com>
Link: https://linux-review.googlesource.com/id/I3dded7824be2e70ea64df0aabab9598d5aebfcc4
Link: https://lore.kernel.org/r/20f64e26fc8a1309caa446fffcb1b4e2fe9e229f.1605952129.git.pcc@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/pgtable-hwdef.h
arch/arm64/mm/proc.S