mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 18:36:00 +00:00
fc84bc5378
There are two registers controlling the GCS state of EL0, GCSPR_EL0 which is the current GCS pointer and GCSCRE0_EL1 which has enable bits for the specific GCS functionality enabled for EL0. Manage these on context switch and process lifetime events, GCS is reset on exec(). Also ensure that any changes to the GCS memory are visible to other PEs and that changes from other PEs are visible on this one by issuing a GCSB DSYNC when moving to or from a thread with GCS. Since the current GCS configuration of a thread will be visible to userspace we store the configuration in the format used with userspace and provide a helper which configures the system register as needed. On systems that support GCS we always allow access to GCSPR_EL0, this facilitates reporting of GCS faults if userspace implements disabling of GCS on error - the GCS can still be discovered and examined even if GCS has been disabled. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241001-arm64-gcs-v13-21-222b78d87eee@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
19 lines
694 B
Makefile
19 lines
694 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
obj-y := dma-mapping.o extable.o fault.o init.o \
|
|
cache.o copypage.o flush.o \
|
|
ioremap.o mmap.o pgd.o mem_encrypt.o mmu.o \
|
|
context.o proc.o pageattr.o fixmap.o
|
|
obj-$(CONFIG_ARM64_CONTPTE) += contpte.o
|
|
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
|
|
obj-$(CONFIG_PTDUMP_CORE) += ptdump.o
|
|
obj-$(CONFIG_PTDUMP_DEBUGFS) += ptdump_debugfs.o
|
|
obj-$(CONFIG_TRANS_TABLE) += trans_pgd.o
|
|
obj-$(CONFIG_TRANS_TABLE) += trans_pgd-asm.o
|
|
obj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o
|
|
obj-$(CONFIG_ARM64_MTE) += mteswap.o
|
|
obj-$(CONFIG_ARM64_GCS) += gcs.o
|
|
KASAN_SANITIZE_physaddr.o += n
|
|
|
|
obj-$(CONFIG_KASAN) += kasan_init.o
|
|
KASAN_SANITIZE_kasan_init.o := n
|