From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: C vdso
Date: Tue, 3 Nov 2020 19:11:02 +0100 [thread overview]
Message-ID: <a27bde01-5498-4527-042a-44d2146b92d3@csgroup.eu> (raw)
In-Reply-To: <874kmkx7gi.fsf@mpe.ellerman.id.au>
Le 24/10/2020 à 12:07, Michael Ellerman a écrit :
> Michael Ellerman <mpe@ellerman.id.au> writes:
>> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>>> Le 24/09/2020 à 15:17, Christophe Leroy a écrit :
>>>> Le 17/09/2020 à 14:33, Michael Ellerman a écrit :
>>>>> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>>>>>>
>>>>>> What is the status with the generic C vdso merge ?
>>>>>> In some mail, you mentionned having difficulties getting it working on
>>>>>> ppc64, any progress ? What's the problem ? Can I help ?
>>>>>
>>>>> Yeah sorry I was hoping to get time to work on it but haven't been able
>>>>> to.
>>>>>
>>>>> It's causing crashes on ppc64 ie. big endian.
>> ...
>>>>
>>>> Can you tell what defconfig you are using ? I have been able to setup a full glibc PPC64 cross
>>>> compilation chain and been able to test it under QEMU with success, using Nathan's vdsotest tool.
>>>
>>> What config are you using ?
>>
>> ppc64_defconfig + guest.config
>>
>> Or pseries_defconfig.
>>
>> I'm using Ubuntu GCC 9.3.0 mostly, but it happens with other toolchains too.
>
> I'm also seeing warnings because of the feature fixups:
>
[...]
>
> That's happening because the 32-bit VDSO is built with CONFIG_PPC32=y,
> due to config-fake32.h, and that causes the feature fixup entries to be
> the wrong size.
>
> See the logic in feature-fixup.h:
>
> #if defined(CONFIG_PPC64) && !defined(__powerpc64__)
> /* 64 bits kernel, 32 bits code (ie. vdso32) */
> #define FTR_ENTRY_LONG .8byte
> #define FTR_ENTRY_OFFSET .long 0xffffffff; .long
> #elif defined(CONFIG_PPC64)
> #define FTR_ENTRY_LONG .8byte
> #define FTR_ENTRY_OFFSET .8byte
> #else
> #define FTR_ENTRY_LONG .long
> #define FTR_ENTRY_OFFSET .long
> #endif
>
>
> We expect the fixup entries to still use 64-bit values, even for the
> 32-bit VDSO in a 64-bit kernel.
>
> TBH I'm not sure how config-fake32.h can work long term, it's so fragile
> to be defining/redefining a handful of CONFIG symbols like that.
>
> The generic VDSO code is fairly careful to only include uapi and vdso
> headers, not linux ones. So I think we need to better split our headers
> so that we can build the VDSO code with few or no linux headers, and so
> avoid the need to define any (or most) CONFIG symbols.
>
Finally, it was easy to do, just had to change a couple of __powerpc64__ into CONFIG_PPC64 in
asm/cputable.h, and move asm/time.h functions playing with timebase into asm/timebase.h
Christophe
next prev parent reply other threads:[~2020-11-03 18:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200916165516.Horde.uocmo3irPb7BMg__NUSqRA9@messagerie.si.c-s.fr>
[not found] ` <87r1r0oa4o.fsf@mpe.ellerman.id.au>
2020-09-24 13:17 ` C vdso Christophe Leroy
2020-10-23 6:28 ` Christophe Leroy
2020-10-23 13:24 ` Michael Ellerman
2020-10-24 10:07 ` Michael Ellerman
2020-10-24 11:16 ` Christophe Leroy
2020-11-03 18:11 ` Christophe Leroy [this message]
2020-11-03 18:13 ` Christophe Leroy
2020-11-24 10:11 ` Christophe Leroy
2020-11-25 2:04 ` Michael Ellerman
2020-11-25 9:21 ` Christophe Leroy
2020-11-25 12:22 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a27bde01-5498-4527-042a-44d2146b92d3@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).