kernel-fxtec-pro1x/arch/s390
Gerald Schaefer 84fc4e58e4 s390/mm: fix set_huge_pte_at() for empty ptes
[ Upstream commit ac8372f3b4e41015549b331a4f350224661e7fc6 ]

On s390, the layout of normal and large ptes (i.e. pmds/puds) differs.
Therefore, set_huge_pte_at() does a conversion from a normal pte to
the corresponding large pmd/pud. So, when converting an empty pte, this
should result in an empty pmd/pud, which would return true for
pmd/pud_none().

However, after conversion we also mark the pmd/pud as large, and
therefore present. For empty ptes, this will result in an empty pmd/pud
that is also marked as large, and pmd/pud_none() would not return true.

There is currently no issue with this behaviour, as set_huge_pte_at()
does not seem to be called for empty ptes. It would be valid though, so
let's fix this by not marking empty ptes as large in set_huge_pte_at().

This was found by testing a patch from from Anshuman Khandual, which is
currently discussed on LKML ("mm/debug: Add more arch page table helper
tests").

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-07 13:17:56 +02:00
..
appldata s390/appldata: reuse generic proc handler functions 2018-07-06 08:48:08 +02:00
boot s390: make 'install' not depend on vmlinux 2020-03-11 14:14:53 +01:00
configs s390: update defconfigs 2018-04-27 06:51:31 +02:00
crypto s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding 2019-10-05 13:09:55 +02:00
hypfs hypfs: Fix error number left in struct pointer member 2019-10-07 18:57:15 +02:00
include s390/qdio: fill SL with absolute addresses 2020-03-11 14:14:54 +01:00
kernel s390/ftrace: save traced function caller 2020-06-07 13:17:55 +02:00
kvm KVM: s390: Return last valid slot if approx index is out-of-bounds 2020-04-29 16:31:30 +02:00
lib s390/mm: fix page table upgrade vs 2ndary address mode accesses 2020-04-29 16:31:35 +02:00
mm s390/mm: fix set_huge_pte_at() for empty ptes 2020-06-07 13:17:56 +02:00
net s390/bpf: use 32-bit index for tail calls 2019-09-21 07:16:51 +02:00
numa s390/mm: Fix ERROR: "__node_distance" undefined! 2018-11-27 16:13:03 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci s390/pci: Fix possible deadlock in recover_store() 2020-02-24 08:34:38 +01:00
purgatory s390/purgatory: do not build purgatory with kcov, kasan and friends 2020-01-12 12:17:21 +01:00
scripts s390/build: add *.o.chkbss files to targets list 2018-07-02 12:32:23 +02:00
tools Minor code cleanups for PPC. 2018-08-19 10:38:36 -07:00
defconfig crypto: speck - remove Speck 2018-11-13 11:08:46 -08:00
Kbuild s390/kexec_file: Add purgatory 2018-04-16 09:10:22 +02:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2018-08-24 09:31:34 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile s390: make 'install' not depend on vmlinux 2020-03-11 14:14:53 +01:00