android_kernel_xiaomi_sm8450/arch
Juergen Gross cba85e1cb7 x86/mm: Fix __swp_entry_to_pte() for Xen PV guests
[ Upstream commit 0f88130e8a6fd185b0aeb5d8e286083735f2585a ]

Normally __swp_entry_to_pte() is never called with a value translating
to a valid PTE. The only known exception is pte_swap_tests(), resulting
in a WARN splat in Xen PV guests, as __pte_to_swp_entry() did
translate the PFN of the valid PTE to a guest local PFN, while
__swp_entry_to_pte() doesn't do the opposite translation.

Fix that by using __pte() in __swp_entry_to_pte() instead of open
coding the native variant of it.

For correctness do the similar conversion for __swp_entry_to_pmd().

Fixes: 05289402d7 ("mm/debug_vm_pgtable: add tests validating arch helpers for core MM features")
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230306123259.12461-1-jgross@suse.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-27 08:43:35 +02:00
..
alpha alpha: fix R_ALPHA_LITERAL reloc for large modules 2023-03-17 08:45:14 +01:00
arc arch: setup PF_IO_WORKER threads like PF_KTHREAD 2023-01-04 11:39:22 +01:00
arm ARM: 9303/1: kprobes: avoid missing-declaration warnings 2023-07-27 08:43:34 +02:00
arm64 arm64: Add missing Set/Way CMO encodings 2023-06-28 10:28:14 +02:00
c6x c6x: add support for TIF_NOTIFY_SIGNAL 2023-01-04 11:39:21 +01:00
csky csky: Fix function name in csky_alignment() and die() 2023-02-01 08:23:20 +01:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-01 08:23:19 +01:00
hexagon hexagon: Fix function name in die() 2023-02-01 08:23:19 +01:00
ia64 ia64: fix an addr to taddr in huge_pte_offset() 2023-05-17 11:48:06 +02:00
m68k m68k: Move signal frame following exception on 68020/030 2023-05-30 12:57:56 +01:00
microblaze exit: Add and use make_task_dead. 2023-02-01 08:23:19 +01:00
mips Remove DECnet support from kernel 2023-06-21 15:45:38 +02:00
nds32 exit: Add and use make_task_dead. 2023-02-01 08:23:19 +01:00
nios2 nios2: dts: Fix tse_mac "max-frame-size" property 2023-06-21 15:45:37 +02:00
openrisc openrisc: Properly store r31 to pt_regs on unhandled exceptions 2023-05-17 11:48:03 +02:00
parisc parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu() 2023-06-21 15:45:36 +02:00
powerpc Remove DECnet support from kernel 2023-06-21 15:45:38 +02:00
riscv riscv: fix kprobe __user string arg print fault issue 2023-06-14 11:09:57 +02:00
s390 s390/purgatory: disable branch profiling 2023-06-28 10:28:15 +02:00
sh sh: nmi_debug: fix return value of __setup handler 2023-05-17 11:48:15 +02:00
sparc sparc: allow PM configs for sparc32 COMPILE_TEST 2023-03-11 16:39:40 +01:00
um um: Fix build w/o CONFIG_PM_SLEEP 2023-06-21 15:45:41 +02:00
x86 x86/mm: Fix __swp_entry_to_pte() for Xen PV guests 2023-07-27 08:43:35 +02:00
xtensa xtensa: fix KASAN report for show_stack 2023-04-05 11:23:51 +02:00
.gitignore
Kconfig arch/cc: Introduce a function to check for confidential computing features 2021-11-18 14:04:32 +01:00