Skip to content

Commit 2115fbf

Browse files
heicarstVasily Gorbik
authored andcommitted
s390: remove compat vdso code
Remove compat vdso code, since there is hardly any compat user space left. Still existing compat user space will have to use system calls instead. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent aa137a6 commit 2115fbf

File tree

13 files changed

+3
-638
lines changed

13 files changed

+3
-638
lines changed

arch/s390/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,6 @@ config COMPAT
427427
(and some other stuff like libraries and such) is needed for
428428
executing 31 bit applications. It is safe to say "Y".
429429

430-
config COMPAT_VDSO
431-
def_bool COMPAT && !CC_IS_CLANG
432-
433430
config SYSVIPC_COMPAT
434431
def_bool y if COMPAT && SYSVIPC
435432

arch/s390/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ zfcpdump:
157157

158158
vdso_install:
159159
$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@
160-
$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso32 $@
161160

162161
archclean:
163162
$(Q)$(MAKE) $(clean)=$(boot)

arch/s390/kernel/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,3 @@ obj-$(CONFIG_TRACEPOINTS) += trace.o
8181

8282
# vdso
8383
obj-y += vdso64/
84-
obj-$(CONFIG_COMPAT_VDSO) += vdso32/

arch/s390/kernel/vdso.c

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@
2929
#include <asm/vdso.h>
3030
#include <asm/facility.h>
3131

32-
#ifdef CONFIG_COMPAT_VDSO
33-
extern char vdso32_start, vdso32_end;
34-
static void *vdso32_kbase = &vdso32_start;
35-
static unsigned int vdso32_pages;
36-
static struct page **vdso32_pagelist;
37-
#endif
38-
3932
extern char vdso64_start, vdso64_end;
4033
static void *vdso64_kbase = &vdso64_start;
4134
static unsigned int vdso64_pages;
@@ -55,12 +48,6 @@ static vm_fault_t vdso_fault(const struct vm_special_mapping *sm,
5548

5649
vdso_pagelist = vdso64_pagelist;
5750
vdso_pages = vdso64_pages;
58-
#ifdef CONFIG_COMPAT_VDSO
59-
if (vma->vm_mm->context.compat_mm) {
60-
vdso_pagelist = vdso32_pagelist;
61-
vdso_pages = vdso32_pages;
62-
}
63-
#endif
6451

6552
if (vmf->pgoff >= vdso_pages)
6653
return VM_FAULT_SIGBUS;
@@ -76,10 +63,6 @@ static int vdso_mremap(const struct vm_special_mapping *sm,
7663
unsigned long vdso_pages;
7764

7865
vdso_pages = vdso64_pages;
79-
#ifdef CONFIG_COMPAT_VDSO
80-
if (vma->vm_mm->context.compat_mm)
81-
vdso_pages = vdso32_pages;
82-
#endif
8366

8467
if ((vdso_pages << PAGE_SHIFT) != vma->vm_end - vma->vm_start)
8568
return -EINVAL;
@@ -209,12 +192,10 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
209192
if (!vdso_enabled)
210193
return 0;
211194

195+
if (is_compat_task())
196+
return 0;
197+
212198
vdso_pages = vdso64_pages;
213-
#ifdef CONFIG_COMPAT_VDSO
214-
mm->context.compat_mm = is_compat_task();
215-
if (mm->context.compat_mm)
216-
vdso_pages = vdso32_pages;
217-
#endif
218199
/*
219200
* vDSO has a problem and was disabled, just don't "enable" it for
220201
* the process
@@ -267,23 +248,6 @@ static int __init vdso_init(void)
267248
int i;
268249

269250
vdso_init_data(vdso_data);
270-
#ifdef CONFIG_COMPAT_VDSO
271-
/* Calculate the size of the 32 bit vDSO */
272-
vdso32_pages = ((&vdso32_end - &vdso32_start
273-
+ PAGE_SIZE - 1) >> PAGE_SHIFT) + 1;
274-
275-
/* Make sure pages are in the correct state */
276-
vdso32_pagelist = kcalloc(vdso32_pages + 1, sizeof(struct page *),
277-
GFP_KERNEL);
278-
BUG_ON(vdso32_pagelist == NULL);
279-
for (i = 0; i < vdso32_pages - 1; i++) {
280-
struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE);
281-
get_page(pg);
282-
vdso32_pagelist[i] = pg;
283-
}
284-
vdso32_pagelist[vdso32_pages - 1] = virt_to_page(vdso_data);
285-
vdso32_pagelist[vdso32_pages] = NULL;
286-
#endif
287251

288252
/* Calculate the size of the 64 bit vDSO */
289253
vdso64_pages = ((&vdso64_end - &vdso64_start

arch/s390/kernel/vdso32/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/s390/kernel/vdso32/Makefile

Lines changed: 0 additions & 66 deletions
This file was deleted.

arch/s390/kernel/vdso32/clock_getres.S

Lines changed: 0 additions & 44 deletions
This file was deleted.

arch/s390/kernel/vdso32/clock_gettime.S

Lines changed: 0 additions & 179 deletions
This file was deleted.

0 commit comments

Comments
 (0)