summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps.c
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2020-11-13 00:01:28 +0200
committerBorislav Petkov <bp@suse.de>2020-11-18 18:02:50 +0100
commitcd072dab453a9b4a9f7927f9eddca5a156fbd87d (patch)
tree49a6ae31ca05a6a9cfc4c3d7731876219c4a0513 /arch/x86/kernel/traps.c
parent8382c668ce4f367d902f4a340a1bfa9e46096ec1 (diff)
downloadlinux-cd072dab453a9b4a9f7927f9eddca5a156fbd87d.tar.bz2
x86/fault: Add a helper function to sanitize error code
vDSO exception fixup is a replacement for signals in limited situations. Signals and vDSO exception fixup need to provide similar information to userspace, including the hardware error code. That hardware error code needs to be sanitized. For instance, if userspace accesses a kernel address, the error code could indicate to userspace whether the address had a Present=1 PTE. That can leak information about the kernel layout to userspace, which is bad. The existing signal code does this sanitization, but fairly late in the signal process. The vDSO exception code runs before the sanitization happens. Move error code sanitization out of the signal code and into a helper. Call the helper in the signal code. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Jethro Beekman <jethro@fortanix.com> Link: https://lkml.kernel.org/r/20201112220135.165028-18-jarkko@kernel.org
Diffstat (limited to 'arch/x86/kernel/traps.c')
0 files changed, 0 insertions, 0 deletions