lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f05a25a-36c7-929c-484d-bc964587917c@arm.com>
Date:   Fri, 20 Sep 2019 17:33:18 +0100
From:   Vincenzo Frascino <vincenzo.frascino@....com>
To:     Will Deacon <will@...nel.org>
Cc:     linux-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        tglx@...utronix.de, linux@...linux.org.uk,
        ard.biesheuvel@...aro.org, catalin.marinas@....com
Subject: Re: Problems with arm64 compat vdso

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

Download attachment "pEpkey.asc" of type "application/pgp-keys" (14072 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ