mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 05:56:08 +07:00
975a2396e3
commit 68d54ceeec0e5fee4fb8048e6a04c193f32525ca upstream.
The ptrace(PTRACE_PEEKMTETAGS) implementation checks whether the user
page has valid tags (mapped with PROT_MTE) by testing the PG_mte_tagged
page flag. If this bit is cleared, ptrace(PTRACE_PEEKMTETAGS) returns
-EIO.
A newly created (PROT_MTE) mapping points to the zero page which had its
tags zeroed during cpu_enable_mte(). If there were no prior writes to
this mapping, ptrace(PTRACE_PEEKMTETAGS) fails with -EIO since the zero
page does not have the PG_mte_tagged flag set.
Set PG_mte_tagged on the zero page when its tags are cleared during
boot. In addition, to avoid ptrace(PTRACE_PEEKMTETAGS) succeeding on
!PROT_MTE mappings pointing to the zero page, change the
__access_remote_tags() check to (vm_flags & VM_MTE) instead of
PG_mte_tagged.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Fixes:
|
||
---|---|---|
.. | ||
probes | ||
vdso | ||
vdso32 | ||
.gitignore | ||
acpi_numa.c | ||
acpi_parking_protocol.c | ||
acpi.c | ||
alternative.c | ||
armv8_deprecated.c | ||
asm-offsets.c | ||
cacheinfo.c | ||
cpu_errata.c | ||
cpu_ops.c | ||
cpu-reset.h | ||
cpu-reset.S | ||
cpufeature.c | ||
cpuidle.c | ||
cpuinfo.c | ||
crash_core.c | ||
crash_dump.c | ||
debug-monitors.c | ||
efi-entry.S | ||
efi-header.S | ||
efi-rt-wrapper.S | ||
efi.c | ||
entry-common.c | ||
entry-fpsimd.S | ||
entry-ftrace.S | ||
entry.S | ||
fpsimd.c | ||
ftrace.c | ||
head.S | ||
hibernate-asm.S | ||
hibernate.c | ||
hw_breakpoint.c | ||
hyp-stub.S | ||
image-vars.h | ||
image.h | ||
insn.c | ||
io.c | ||
irq.c | ||
jump_label.c | ||
kaslr.c | ||
kexec_image.c | ||
kgdb.c | ||
kuser32.S | ||
machine_kexec_file.c | ||
machine_kexec.c | ||
Makefile | ||
module-plts.c | ||
module.c | ||
mte.c | ||
paravirt.c | ||
pci.c | ||
perf_callchain.c | ||
perf_event.c | ||
perf_regs.c | ||
pointer_auth.c | ||
process.c | ||
proton-pack.c | ||
psci.c | ||
ptrace.c | ||
reloc_test_core.c | ||
reloc_test_syms.S | ||
relocate_kernel.S | ||
return_address.c | ||
scs.c | ||
sdei.c | ||
setup.c | ||
signal32.c | ||
signal.c | ||
sigreturn32.S | ||
sleep.S | ||
smccc-call.S | ||
smp_spin_table.c | ||
smp.c | ||
stacktrace.c | ||
suspend.c | ||
sys32.c | ||
sys_compat.c | ||
sys.c | ||
syscall.c | ||
time.c | ||
topology.c | ||
trace-events-emulation.h | ||
traps.c | ||
vdso.c | ||
vmlinux.lds.S |