[PATCH 03/12] s390: Enable VDSO for static linking

Heiko Carstens heiko.carstens@de.ibm.com
Wed Aug 7 06:57:00 GMT 2019


On Tue, Aug 06, 2019 at 04:08:02PM +0200, Stefan Liebler wrote:
> int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
> {
> 	struct mm_struct *mm = current->mm;
> 	struct vm_area_struct *vma;
> 	unsigned long vdso_pages;
> 	unsigned long vdso_base;
> 	int rc;
> 
> 217:	if (!vdso_enabled)
> 		return 0;
> 	/*
> 	 * Only map the vdso for dynamically linked elf binaries.
> 	 */
> 222:	if (!uses_interp)
> 		return 0;
> 
> 
> As far as I know, vdso was disabled for statically linked binaries as glibc
> had not supported it and thus nothing "useless" was mapped (especially on
> 31bit).
> I've also cc'ed Heiko. Perhaps he can also enable it on s390 for statically
> linked binaries.

That was introduced in the kernel with

commit fc5243d98ac2575ad14a974b3c097e9ba874c03d
Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
Date:   Thu Dec 25 13:38:35 2008 +0100

    [S390] arch_setup_additional_pages arguments

    arch_setup_additional_pages currently gets two arguments, the binary
    format descripton and an indication if the process uses an executable
    stack or not. The second argument is not used by anybody, it could
    be removed without replacement.

    What actually does make sense is to pass an indication if the process
    uses the elf interpreter or not. The glibc code will not use anything
    from the vdso if the process does not use the dynamic linker, so for
    statically linked binaries the architecture backend can choose not
    to map the vdso.

    Acked-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

And as it looks like only s390 ever made use of this optimization,
which now isn't an optimization anymore. So this can simply be
removed.



More information about the Libc-alpha mailing list