This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Enable VDSO for static linking on s390
- From: Rafael Avila de Espindola <rafael at espindo dot la>
- To: Stefan Liebler <stli at linux dot ibm dot com>, libc-alpha at sourceware dot org
- Date: Thu, 31 Jan 2019 18:11:53 +0000
- Subject: Re: [PATCH] Enable VDSO for static linking on s390
- References: <bVueHRKMvp0lVGWp2IbM5k9JMfOoMAM0RrQDL2yUU6UEcY8tTOL401vXwT3FCpNGbtSrGH45MJ-2ctZuxp7m8PMa9Ba-A-Axbhs3gWJsqoc=@espindo.la> <22ce22d9-645c-c69e-acad-1d1c32708044@linux.ibm.com> <bI5WHq6csmX5qtJPPESVn7q31oJOrrFCmYySJRp3aknou1qBlJYwQjU5bjfFXrockhLtnWE8exL4eEvoauM-SoSP1PzNkqreoNjoMGjeAi8=@espindo.la> <Z8folZJckq1RLA6GW4780BmiGYg0NAtnY8XCUxt0Aw0jkzC8tyTpVBDG58Q-otUSq1f9dI7lxQuOr5PCKlBGsIQYhWpG-uJZha1aNjOxWm0=@espindo.la> <6a3cc9e0-aebe-3a25-2881-22e3950e4d26@linux.ibm.com>
- Reply-to: Rafael Avila de Espindola <rafael at espindo dot la>
"Stefan Liebler" <stli@linux.ibm.com> writes:
> Hi Rafael,
>
> sorry for the delay. I'm just returned from vacation.
>
> Starting with your previous message, I saw the patch.
> But if I look at "Re: [PATCH] Enable VDSO for static linking on s390"
> (https://www.sourceware.org/ml/libc-alpha/2018-12/msg00757.html) I can't
> see it.
>
> Anyway on s390 the vdso is currently only mapped for dynamically linked
> elf binaries! See <kernel-src>/arch/s390/kernel/vdso.c:
> /*
> * This is called from binfmt_elf, we create the special vma for the
> * vDSO and insert it into the mm struct tree
> */
> 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;
>
> if (!vdso_enabled)
> return 0;
> /*
> * Only map the vdso for dynamically linked elf binaries.
> */
> if (!uses_interp)
> return 0;
> ...
>
> What is your motivation to enable vdso for static binaries?
> Do you have a special workload in mind?
Static linking can be convenient, but if a program uses clock_gettime a
lot it is also a performance regression.
I don't have an immediate use case in mind. I am just going one
architecture at a time in the hope of simplifying the #ifdefs once all
of them support VDSO on statically linked binaries (in glibc at least).
Cheers,
Rafael