]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: vdso: Map the vDSO text with guarded pages when built for BTI
authorMark Brown <broonie@kernel.org>
Wed, 6 May 2020 19:51:38 +0000 (20:51 +0100)
committerWill Deacon <will@kernel.org>
Thu, 7 May 2020 16:53:20 +0000 (17:53 +0100)
commit7fa9eb84fd1a7f31be75a58f00d87f1cdbb52bb0
treeaafb7fa55f386ff52ba423c749653bb36c5f8e25
parent6a0260183e60f3219cb971a27e52ae39506c387a
arm64: vdso: Map the vDSO text with guarded pages when built for BTI

The kernel is responsible for mapping the vDSO into userspace processes,
including mapping the text section as executable. Handle the mapping of
the vDSO for BTI similarly, mapping the text section as guarded pages so
the BTI annotations in the vDSO become effective when they are present.

This will mean that we can have BTI active for the vDSO in processes that
do not otherwise support BTI. This should not be an issue for any expected
use of the vDSO.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-12-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/vdso.c