WSL2-Linux-Kernel/arch/powerpc/lib
Nicholas Piggin 9a32a7e78b powerpc/64s: flush L1D after user accesses
IBM Power9 processors can speculatively operate on data in the L1 cache
before it has been completely validated, via a way-prediction mechanism. It
is not possible for an attacker to determine the contents of impermissible
memory using this method, since these systems implement a combination of
hardware and software security measures to prevent scenarios where
protected data could be leaked.

However these measures don't address the scenario where an attacker induces
the operating system to speculatively execute instructions using data that
the attacker controls. This can be used for example to speculatively bypass
"kernel user access prevention" techniques, as discovered by Anthony
Steinhauser of Google's Safeside Project. This is not an attack by itself,
but there is a possibility it could be used in conjunction with
side-channels or other weaknesses in the privileged code to construct an
attack.

This issue can be mitigated by flushing the L1 cache between privilege
boundaries of concern. This patch flushes the L1 cache after user accesses.

This is part of the fix for CVE-2020-4788.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2020-11-19 23:47:18 +11:00
..
Makefile x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}() 2020-10-06 11:18:04 +02:00
alloc.c
checksum_32.S powerpc32: don't adjust unmoved stack pointer in csum_partial_copy_generic() epilogue 2020-10-14 16:04:13 -07:00
checksum_64.S ppc: propagate the calling conventions change down to csum_partial_copy_generic() 2020-08-20 15:45:22 -04:00
checksum_wrappers.c ppc: propagate the calling conventions change down to csum_partial_copy_generic() 2020-08-20 15:45:22 -04:00
code-patching.c powerpc/uaccess: Switch __patch_instruction() to __put_user_asm_goto() 2020-09-15 22:13:32 +10:00
copy_32.S
copy_mc_64.S x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}() 2020-10-06 11:18:04 +02:00
copypage_64.S
copypage_power7.S
copyuser_64.S
copyuser_power7.S
crtsavres.S
div64.S
error-inject.c
feature-fixups-test.S powerpc: Test prefixed instructions in feature fixups 2020-05-19 00:11:02 +10:00
feature-fixups.c powerpc/64s: flush L1D after user accesses 2020-11-19 23:47:18 +11:00
hweight_64.S
inst.c maccess: rename probe_user_{read,write} to copy_{from,to}_user_nofault 2020-06-17 10:57:41 -07:00
ldstfp.S
locks.c powerpc/pseries: Move some PAPR paravirt functions to their own file 2020-07-26 23:34:26 +10:00
mem_64.S
memcmp_32.S
memcmp_64.S
memcpy_64.S
memcpy_power7.S
pmem.c powerpc/lib: remove memcpy_flushcache redundant return 2020-07-27 00:01:31 +10:00
quad.S
rheap.c
sstep.c Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00
string.S
string_32.S
string_64.S
strlen_32.S
test_code-patching.S powerpc: Test prefixed code patching 2020-05-19 00:11:02 +10:00
test_emulate_step.c powerpc/test_emulate_step: Add testcases for divde[.] and divdeu[.] instructions 2020-07-29 23:47:52 +10:00
test_emulate_step_exec_instr.S powerpc/sstep: Add tests for Prefixed Add Immediate 2020-07-23 17:25:21 +10:00
vmx-helper.c
xor_vmx.c
xor_vmx.h
xor_vmx_glue.c