linux_old1/arch/s390/mm
Gerald Schaefer ba385c0594 s390/mm: fix write access check in gup_huge_pmd()
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.

Cc: <stable@vger.kernel.org>
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2017-09-19 08:36:20 +02:00
..
Makefile s390/extable: use generic search and sort routines 2016-03-22 15:36:02 -07:00
cmm.c s390: mm: Audit and remove any unnecessary uses of module.h 2017-02-17 07:40:35 +01:00
dump_pagetables.c s390/mm: implement 5 level pages tables 2017-06-12 16:25:54 +02:00
extmem.c s390: mm: Audit and remove any unnecessary uses of module.h 2017-02-17 07:40:35 +01:00
fault.c s390/mm: use new mm defines instead of magic values 2017-07-26 08:25:09 +02:00
gmap.c s390/mm: use a single lock for the fields in mm_context_t 2017-09-06 09:24:43 +02:00
gup.c s390/mm: fix write access check in gup_huge_pmd() 2017-09-19 08:36:20 +02:00
hugetlbpage.c mm/hugetlb: add size parameter to huge_pte_offset() 2017-07-06 16:24:34 -07:00
init.c s390/mm: prevent memory offline for memory blocks with cma areas 2017-08-09 09:09:28 -04:00
maccess.c s390/maccess: reduce stnsm instructions 2016-02-17 09:05:04 +01:00
mem_detect.c s390: mm: Audit and remove any unnecessary uses of module.h 2017-02-17 07:40:35 +01:00
mmap.c s390/mm: fix BUG_ON in crst_table_upgrade 2017-08-31 14:03:21 +02:00
page-states.c s390/mm: tag normal pages vs pages used in page tables 2017-07-25 06:55:28 +02:00
pageattr.c s390/mm,vmem: simplify region and segment table allocation code 2017-07-26 08:25:12 +02:00
pgalloc.c s390/mm: use a single lock for the fields in mm_context_t 2017-09-06 09:24:43 +02:00
pgtable.c KVM: s390: Fixes and features for 4.14 2017-09-07 16:46:46 +02:00
vmem.c s390/mm,vmem: simplify region and segment table allocation code 2017-07-26 08:25:12 +02:00