exynos-linux-stable/arch/s390/mm
Gerald Schaefer 22338c5565 s390/mm: fix write access check in gup_huge_pmd()
commit ba385c0594e723d41790ecfb12c610e6f90c7785 upstream.

The check for the _SEGMENT_ENTRY_PROTECT bit in gup_huge_pmd() is the
wrong way around. It must not be set for write==1, and not be checked for
write==0. Fix this similar to how it was fixed for ptes long time ago in
commit 25591b0703 ("[S390] fix get_user_pages_fast").

One impact of this bug would be unnecessarily using the gup slow path for
write==0 on r/w mappings. A potentially more severe impact would be that
gup_huge_pmd() will succeed for write==1 on r/o mappings.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-05 09:44:01 +02:00
..
cmm.c s390: convert use of typedef ctl_table to struct ctl_table 2013-10-28 08:36:25 +01:00
dump_pagetables.c s390/pgtable: get rid of _REGION3_ENTRY_RO 2016-06-13 15:58:14 +02:00
extmem.c s390: Use pr_warn instead of pr_warning 2016-03-07 13:12:04 +01:00
fault.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-10-04 14:05:52 -07:00
gmap.c s390/mm: avoid empty zero pages for KVM guests to avoid postcopy hangs 2017-09-09 17:39:41 +02:00
gup.c s390/mm: fix write access check in gup_huge_pmd() 2017-10-05 09:44:01 +02:00
hugetlbpage.c s390/mm: use hugetlb_bad_size() 2016-10-17 11:25:26 +02:00
init.c s390/mm: fix zone calculation in arch_add_memory() 2016-10-24 10:26:17 +02:00
maccess.c s390/maccess: reduce stnsm instructions 2016-02-17 09:05:04 +01:00
Makefile s390/extable: use generic search and sort routines 2016-03-22 15:36:02 -07:00
mem_detect.c s390/mem_detect: use unsigned longs 2016-01-11 12:27:11 +01:00
mmap.c mm: larger stack guard gap, between vmas 2017-06-24 07:11:18 +02:00
page-states.c s390/mm: use basic block for essa inline assembly 2016-06-28 09:32:29 +02:00
pageattr.c s390/mm: merge local / non-local IPTE helper 2016-08-24 09:23:55 +02:00
pgalloc.c - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
pgtable.c KVM: s390: Fix guest migration for huge guests resulting in panic 2017-03-18 19:14:34 +08:00
vmem.c s390: add proper __ro_after_init support 2016-06-13 15:58:23 +02:00