Le 24/10/2020 à 12:07, Michael Ellerman a écrit :
Michael Ellerman <m...@ellerman.id.au> writes:
Christophe Leroy <christophe.le...@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.le...@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

Reply via email to