lkml.org 
[lkml]   [2019]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Problems with arm64 compat vdso
From
Date
Hi Will,

thank you for reporting this.

On 20/09/2019 15:27, Will Deacon wrote:
> Hi Vincenzo,
>
> I've been running into a few issues with the COMPAT vDSO. Please could
> you have a look?
>

I will be at Linux Recipes next week. I will look at this with priority when I
come back.

> If I do the following:
>
> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
> [...]
> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig
> [set CONFIG_CROSS_COMPILE_COMPAT_VDSO="arm-linux-gnueabihf-"]
> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
>
> Then I see the following warning:
>
> arch/arm64/Makefile:62: CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built
>
> even though the compat vDSO *has* been built:
>
> $ file arch/arm64/kernel/vdso32/vdso.so
> arch/arm64/kernel/vdso32/vdso.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=c67f6c786f2d2d6f86c71f708595594aa25247f6, stripped
>
> However, I also get some warnings because arm64 headers are being included
> in the compat vDSO build:
>
> In file included from ./arch/arm64/include/asm/thread_info.h:17:0,
> from ./include/linux/thread_info.h:38,
> from ./arch/arm64/include/asm/preempt.h:5,
> from ./include/linux/preempt.h:78,
> from ./include/linux/spinlock.h:51,
> from ./include/linux/seqlock.h:36,
> from ./include/linux/time.h:6,
> from /usr/local/google/home/willdeacon/work/linux/lib/vdso/gettimeofday.c:7,
> from <command-line>:0:
> ./arch/arm64/include/asm/memory.h: In function ‘__tag_set’:
> ./arch/arm64/include/asm/memory.h:233:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> u64 __addr = (u64)addr & ~__tag_shifted(0xff);
> ^
> In file included from ./arch/arm64/include/asm/pgtable-hwdef.h:8:0,
> from ./arch/arm64/include/asm/processor.h:34,
> from ./arch/arm64/include/asm/elf.h:118,
> from ./include/linux/elf.h:5,
> from ./include/linux/elfnote.h:62,
> from arch/arm64/kernel/vdso32/note.c:11:
> ./arch/arm64/include/asm/memory.h: In function ‘__tag_set’:
> ./arch/arm64/include/asm/memory.h:233:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> u64 __addr = (u64)addr & ~__tag_shifted(0xff);
> ^
> Worse, if your compat binutils isn't up-to-date, you'll actually run into
> a build failure:
>
> /tmp/ccFCrjUg.s:80: Error: invalid barrier type -- `dmb ishld'
> /tmp/ccFCrjUg.s:124: Error: invalid barrier type -- `dmb ishld'
>
> There also appears to be a problem getting the toolchain prefix from Kconfig.
> If, for example, I do:
>
> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
> [...]
> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig
> [set CONFIG_CROSS_COMPILE_COMPAT_VDSO="vincenzo"]
> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
> arch/arm64/Makefile:64: *** vincenzogcc not found, check CROSS_COMPILE_COMPAT. Stop.
> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig
> [set CONFIG_CROSS_COMPILE_COMPAT_VDSO="arm-linux-gnueabihf-"]
> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
> arch/arm64/Makefile:64: *** vincenzogcc not found, check CROSS_COMPILE_COMPAT. Stop.
> $ grep CONFIG_CROSS_COMPILE_COMPAT_VDSO .config
> CONFIG_CROSS_COMPILE_COMPAT_VDSO="arm-linux-gnueabihf-"
>
> which is irritating, because it seems to force a 'mrproper' if you don't
> get the prefix right first time.
>
> Cheers,
>
> Will
>

--
Regards,
Vincenzo
[unhandled content-type:application/pgp-keys]
\
 
 \ /
  Last update: 2019-09-20 18:33    [W:0.285 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site