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

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Aug 6 15:19:00 GMT 2019



On 06/08/2019 11:08, Stefan Liebler wrote:
> On 8/2/19 2:34 PM, Adhemerval Zanella wrote:
>> Ping.
>>
>> On 14/06/2019 12:28, Adhemerval Zanella wrote:
>>> Although s390 explicit does not enable vDSO for binaries without
>>> (arch/s390/kernel/vdso.c:217), there is no indication in the code
>>> the rationale for disabling it.  In fact, I rebuilt a kernel with the
>>> check removed and the vDSO does work for static build for supplied
>>> symbols.
> 
> Hi Adhemerval,
> 
> Sorry, I haven't recognized this patch as it was hidden behind the email-thread starting with "[PATCH 01/12] m68k: Remove vDSO support". Please cc me if I'm not responding for s390 patches.
> 
> I've just had a look into the kernel arch/s390/kernel/vdso.c file
> and I'm a little bit confused regarding the line number 217 (see my excerpt below).
> Just to be sure, have you removed the "if (!uses_interp)" or the "if (!vdso_enabled)"?
> 
> /*
>  * 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;
> 
> 217:    if (!vdso_enabled)
>         return 0;
>     /*
>      * Only map the vdso for dynamically linked elf binaries.
>      */
> 222:    if (!uses_interp)
>         return 0;

In fact it was the !uses_interp that I commented out to enable the vDSO page on
the system emulated environment I used.

> 
> 
> 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.

Yeah, I noted that s390 is an outlier here where all the other architectures do
map the vDSO even for statically linked binaries. Thanks for checking on it.

> 
> Nevertheless this patch breaks s390. I've just committed the attached fix which adds the removed VDSO_SETUP macro definition.

Sigh, this line was removed with a cherry-pick, sorry about that.



More information about the Libc-alpha mailing list