linux/arch/x86/kernel/cpu
Jarkko Sakkinen 947c6e11fa x86/sgx: Add ptrace() support for the SGX driver
Enclave memory is normally inaccessible from outside the enclave. This
makes enclaves hard to debug. However, enclaves can be put in a debug
mode when they are being built. In that mode, enclave data *can* be read
and/or written by using the ENCLS[EDBGRD] and ENCLS[EDBGWR] functions.

This is obviously only for debugging and destroys all the protections
present with normal enclaves. But, enclaves know their own debug status
and can adjust their behavior appropriately.

Add a vm_ops->access() implementation which can be used to read and write
memory inside debug enclaves.  This is typically used via ptrace() APIs.

 [ bp: Massage. ]

Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Jethro Beekman <jethro@fortanix.com>
Link: https://lkml.kernel.org/r/20201112220135.165028-23-jarkko@kernel.org
2020-11-18 18:04:11 +01:00
..
mce task_work: cleanup notification modes 2020-10-17 15:05:30 -06:00
microcode x86/microcode: Do not select FW_LOADER 2020-06-15 11:59:19 +02:00
mtrr treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
resctrl task_work: cleanup notification modes 2020-10-17 15:05:30 -06:00
sgx x86/sgx: Add ptrace() support for the SGX driver 2020-11-18 18:04:11 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
acrn.c x86/acrn: Remove redundant chars from ACRN signature 2020-08-07 01:32:00 +02:00
amd.c x86/cpufeatures: Add SEV-ES CPU feature 2020-09-07 19:45:24 +02:00
aperfmperf.c x86/cpu: Disable frequency requests via aperfmperf IPI for nohz_full CPUs 2019-06-22 17:23:48 +02:00
bugs.c x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP 2020-11-05 21:43:34 +01:00
cacheinfo.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
centaur.c x86/cpu/centaur: Add Centaur family >=7 CPUs initialization support 2020-09-11 10:53:19 +02:00
common.c This feature enhances the current guest memory encryption support 2020-10-14 10:21:34 -07:00
cpu.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
cpuid-deps.c * Misc cleanups to the resctrl code in preparation for the ARM side, by 2020-10-12 10:53:32 -07:00
cyrix.c
feat_ctl.c x86/cpu/intel: Add a nosgx kernel parameter 2020-11-17 14:36:13 +01:00
hygon.c locking/seqlock, headers: Untangle the spaghetti monster 2020-08-06 16:13:13 +02:00
hypervisor.c x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable 2019-07-17 08:09:59 +02:00
intel_epb.c x86: intel_epb: Do not build when CONFIG_PM is unset 2019-05-30 10:58:36 +02:00
intel_pconfig.c
intel.c A set of locking fixes and updates: 2020-08-10 19:07:44 -07:00
Makefile x86/sgx: Initialize metadata for Enclave Page Cache (EPC) sections 2020-11-17 14:36:13 +01:00
match.c x86/cpu: Add a steppings field to struct x86_cpu_id 2020-04-20 12:19:21 +02:00
mkcapflags.sh x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* 2020-01-13 18:36:02 +01:00
mshyperv.c Drivers: hv: vmbus: Add parsing of VMbus interrupt in ACPI DSDT 2020-10-14 19:14:51 +00:00
perfctr-watchdog.c x86/perf: Add hardware performance events support for Zhaoxin CPU. 2020-04-30 20:14:35 +02:00
powerflags.c
proc.c x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* 2020-01-13 18:36:02 +01:00
rdrand.c x86/rdrand: Sanity-check RDRAND output 2019-10-01 19:55:32 +02:00
scattered.c This feature enhances the current guest memory encryption support 2020-10-14 10:21:34 -07:00
topology.c x86/mm/pat: Rename <asm/pat.h> => <asm/memtype.h> 2019-12-10 10:12:55 +01:00
transmeta.c
tsx.c Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 12:46:42 -08:00
umc.c
umwait.c KVM: VMX: Stop context switching MSR_IA32_UMWAIT_CONTROL 2020-06-22 20:54:57 -04:00
vmware.c x86/vmware: Add VMware-specific handling for VMMCALL under SEV-ES 2020-09-09 11:33:20 +02:00
zhaoxin.c x86/cpu: Reinitialize IA32_FEAT_CTL MSR on BSP during wakeup 2020-06-15 14:18:37 +02:00