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  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]
Date:   Fri, 12 Jan 2018 22:29:09 -0800
From:   Andy Lutomirski <luto@...nel.org>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Borislav Petkov <bp@...en8.de>,
        Kees Cook <keescook@...omium.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hugh Dickins <hughd@...gle.com>,
        stable <stable@...r.kernel.org>
Subject: Re: [PATCH] selftests/x86: Add test_vsyscall

On Fri, Jan 12, 2018 at 4:57 AM, Ingo Molnar <mingo@...nel.org> wrote:
>
> * Andy Lutomirski <luto@...nel.org> wrote:
>
>> tools/testing/selftests/x86/Makefile        |   2 +-
>>  tools/testing/selftests/x86/test_vsyscall.c | 500 ++++++++++++++++++++++++++++
>>  2 files changed, 501 insertions(+), 1 deletion(-)
>>  create mode 100644 tools/testing/selftests/x86/test_vsyscall.c
>
> Hm, it doesn't even build here, on Ubuntu latest (Artful):
>
> triton:~/tip/tools/testing/selftests/x86> make test_vsyscall
> gcc -O2 -g -std=gnu99 -pthread -Wall -no-pie    test_vsyscall.c   -o test_vsyscall
> /tmp/ccKyelfb.o: In function `init_vdso':
> /home/mingo/tip/tools/testing/selftests/x86/test_vsyscall.c:68: undefined reference to `dlopen'
> /home/mingo/tip/tools/testing/selftests/x86/test_vsyscall.c:76: undefined reference to `dlsym'
> /home/mingo/tip/tools/testing/selftests/x86/test_vsyscall.c:80: undefined reference to `dlsym'
> /home/mingo/tip/tools/testing/selftests/x86/test_vsyscall.c:84: undefined reference to `dlsym'
> /home/mingo/tip/tools/testing/selftests/x86/test_vsyscall.c:88: undefined reference to `dlsym'
> /home/mingo/tip/tools/testing/selftests/x86/test_vsyscall.c:70: undefined reference to `dlopen'
> collect2: error: ld returned 1 exit status
> <builtin>: recipe for target 'test_vsyscall' failed
> make: *** [test_vsyscall] Error 1
>

You're not supposed to do that :)  The targets are test_vsyscall_32
and test_vsyscall_64 or just plain make.  I think you're just ending
up with make's default rule to try to build it and it's not working.

We could try adding something like:

# The x86 selftests have files like foo.c that don't produce binaries
# called foo (they're foo_32 and foo_64 instead).  Prevent confusion
# if someone types 'make foo'.
% : %.c
% : %.o

to tools/testing/selftests/x86/Makefile, but that's a bit gross.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ