aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/Makefile
diff options
context:
space:
mode:
authorGravatar Rick Edgecombe <rick.p.edgecombe@intel.com> 2023-07-06 16:38:58 -0700
committerGravatar Dave Hansen <dave.hansen@linux.intel.com> 2023-08-02 15:01:51 -0700
commitc6b53dcec07c842af75123d9b29684bdbd36a407 (patch)
tree33567f59d47efd79f97bed34171fae30c1e49194 /arch/x86/kernel/Makefile
parentx86/kbuild: Fix Documentation/ reference (diff)
downloadlinux-c6b53dcec07c842af75123d9b29684bdbd36a407.tar.gz
linux-c6b53dcec07c842af75123d9b29684bdbd36a407.tar.bz2
linux-c6b53dcec07c842af75123d9b29684bdbd36a407.zip
x86/shstk: Don't retry vm_munmap() on -EINTR
The existing comment around handling vm_munmap() failure when freeing a shadow stack is wrong. It asserts that vm_munmap() returns -EINTR when the mmap lock is only being held for a short time, and so the caller should retry. Based on this wrong understanding, unmap_shadow_stack() will loop retrying vm_munmap(). What -EINTR actually means in this case is that the process is going away (see ae79878), and the whole MM will be torn down soon. In order to facilitate this, the task should not linger in the kernel, but actually do the opposite. So don't loop in this scenario, just abandon the operation and let exit_mmap() clean it up. Also, update the comment to reflect the actual meaning of the error code. Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20230706233858.446232-1-rick.p.edgecombe%40intel.com
Diffstat (limited to 'arch/x86/kernel/Makefile')
0 files changed, 0 insertions, 0 deletions