linux/arch/s390/mm
Heiko Carstens b514ad872a s390/mm: Fix __ptep_rdp() inline assembly
[ Upstream commit 31475b8811 ]

When a zero ASCE is passed to the __ptep_rdp() inline assembly, the
generated instruction should have the R3 field of the instruction set to
zero. However the inline assembly is written incorrectly: for such cases a
zero is loaded into a register allocated by the compiler and this register
is then used by the instruction.

This means that selected TLB entries may not be flushed since the specified
ASCE does not match the one which was used when the selected TLB entries
were created.

Fix this by removing the asce and opt parameters of __ptep_rdp(), since
all callers always pass zero, and use a hard-coded register zero for
the R3 field.

Fixes: 0807b85652 ("s390/mm: add support for RDP (Reset DAT-Protection)")
Cc: stable@vger.kernel.org
Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-12-01 11:43:37 +01:00
..
cmm.c s390/mm: Add cond_resched() to cmm_alloc/free_pages() 2024-09-05 15:17:23 +02:00
dump_pagetables.c s390/mm: Fix memory leak in add_marker() when kvrealloc() fails 2025-11-13 15:34:00 -05:00
extable.c s390/fpu: Add fpc exception handler / remove fixup section again 2025-02-17 10:05:44 +01:00
extmem.c s390/extmem: fix virtual vs physical address confusion 2024-02-09 13:58:16 +01:00
fault.c s390/mm/fault: convert do_secure_storage_access() from follow_page() to folio_walk 2024-09-01 20:26:01 -07:00
gmap.c s390: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
hugetlbpage.c mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() 2025-03-13 13:02:17 +01:00
init.c memblock: updates for 6.12-rc1 2024-09-25 11:35:19 -07:00
maccess.c s390/uaccess: Make s390_kernel_write() usable for decompressor 2024-07-23 16:02:31 +02:00
Makefile s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support 2024-03-13 09:23:49 +01:00
mmap.c mm: make arch_get_unmapped_area() take vm_flags by default 2024-09-09 16:39:13 -07:00
page-states.c s390/cmma: rework no-dat handling 2023-11-05 22:34:58 +01:00
pageattr.c s390/pageattr: Implement missing kernel_page_present() 2024-12-05 14:01:11 +01:00
pfault.c s390/pfault: use consistent comment style 2023-07-29 14:57:18 +02:00
pgalloc.c s390/mm: Use __GFP_ACCOUNT for user page table allocations 2025-10-29 14:08:53 +01:00
pgtable.c s390/mm: Fix __ptep_rdp() inline assembly 2025-12-01 11:43:37 +01:00
physaddr.c s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support 2024-03-13 09:23:49 +01:00
vmem.c s390/mm: Allocate page table with PAGE_SIZE granularity 2025-08-15 12:14:07 +02:00