aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/mmu.h
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-09-14 17:29:39 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-09-20 13:20:29 +0200
commitd1befa65823e9c6d013883b8a41d081ec338c489 (patch)
treee41d581c2cd188884a016bd9f689eb57ae60f1f5 /arch/s390/include/asm/mmu.h
parents390/zcrypt: enable AP bus scan without a valid default domain (diff)
downloadlinux-dev-d1befa65823e9c6d013883b8a41d081ec338c489.tar.xz
linux-dev-d1befa65823e9c6d013883b8a41d081ec338c489.zip
s390/vdso: avoid 64-bit vdso mapping for compat tasks
vdso_fault used is_compat_task function (on s390 it tests "current" thread_info flags) to distinguish compat tasks and map 31-bit vdso pages. But "current" task might not correspond to mm context. When 31-bit compat inferior is executed under gdb, gdb does PTRACE_PEEKTEXT on vdso page, causing vdso_fault with "current" being 64-bit gdb process. So, 31-bit inferior ends up with 64-bit vdso mapped. To avoid this problem a new compat_mm flag has been introduced into mm context. This flag is used in vdso_fault and vdso_mremap instead of is_compat_task. Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/mmu.h')
-rw-r--r--arch/s390/include/asm/mmu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/include/asm/mmu.h b/arch/s390/include/asm/mmu.h
index a8418e1379eb..bcfb6371086f 100644
--- a/arch/s390/include/asm/mmu.h
+++ b/arch/s390/include/asm/mmu.h
@@ -32,6 +32,8 @@ typedef struct {
unsigned int uses_cmm:1;
/* The gmaps associated with this context are allowed to use huge pages. */
unsigned int allow_gmap_hpage_1m:1;
+ /* The mmu context is for compat task */
+ unsigned int compat_mm:1;
} mm_context_t;
#define INIT_MM_CONTEXT(name) \