summaryrefslogtreecommitdiff
path: root/Documentation/arch
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.ibm.com>2023-06-13 03:11:07 +0300
committerDave Hansen <dave.hansen@linux.intel.com>2023-08-03 01:01:51 +0300
commit680ed2f15e70d079c8148589a3ce9426fc0ff914 (patch)
treec22c5326d8e7770ad97377f44714a005333f5147 /Documentation/arch
parent2fab02b25ae7cf5f714ab456b03d9a3fe5ae98c9 (diff)
downloadlinux-680ed2f15e70d079c8148589a3ce9426fc0ff914.tar.xz
x86/shstk: Add ARCH_SHSTK_UNLOCK
Userspace loaders may lock features before a CRIU restore operation has the chance to set them to whatever state is required by the process being restored. Allow a way for CRIU to unlock features. Add it as an arch_prctl() like the other shadow stack operations, but restrict it being called by the ptrace arch_pctl() interface. [Merged into recent API changes, added commit log and docs] Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: David Hildenbrand <david@redhat.com> Tested-by: Pengfei Xu <pengfei.xu@intel.com> Tested-by: John Allen <john.allen@amd.com> Tested-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/all/20230613001108.3040476-42-rick.p.edgecombe%40intel.com
Diffstat (limited to 'Documentation/arch')
-rw-r--r--Documentation/arch/x86/shstk.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/arch/x86/shstk.rst b/Documentation/arch/x86/shstk.rst
index f09afa504ec0..f3553cc8c758 100644
--- a/Documentation/arch/x86/shstk.rst
+++ b/Documentation/arch/x86/shstk.rst
@@ -75,6 +75,10 @@ arch_prctl(ARCH_SHSTK_LOCK, unsigned long features)
are ignored. The mask is ORed with the existing value. So any feature bits
set here cannot be enabled or disabled afterwards.
+arch_prctl(ARCH_SHSTK_UNLOCK, unsigned long features)
+ Unlock features. 'features' is a mask of all features to unlock. All
+ bits set are processed, unset bits are ignored. Only works via ptrace.
+
The return values are as follows. On success, return 0. On error, errno can
be::