linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Borislav Petkov <bp@alien8.de>, Kees Cook <keescook@chromium.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hugh Dickins <hughd@google.com>, stable <stable@vger.kernel.org>
Subject: Re: [PATCH] selftests/x86: Add test_vsyscall
Date: Sat, 13 Jan 2018 11:20:08 +0100	[thread overview]
Message-ID: <20180113102008.prnjjbzr27rjryxw@gmail.com> (raw)
In-Reply-To: <CALCETrVE3NvGwe+bRs80vwmMBx0CjjXjZBJ6bLvQGtSV8Fiytg@mail.gmail.com>


* Andy Lutomirski <luto@kernel.org> wrote:

> On Fri, Jan 12, 2018 at 4:57 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Andy Lutomirski <luto@kernel.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.

D'oh, of course! :-)

> 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.

Well, we could make it to produce the proper targets, which wouldn't be gross.

But it's probably overkill - I've applied your patch.

Thanks,

	Ingo

  reply	other threads:[~2018-01-13 10:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12  1:16 [PATCH] selftests/x86: Add test_vsyscall Andy Lutomirski
2018-01-12  4:12 ` Kees Cook
2018-01-12  7:32 ` Greg Kroah-Hartman
2018-01-12 12:45 ` Ingo Molnar
2018-01-12 12:57 ` Ingo Molnar
2018-01-13  6:29   ` Andy Lutomirski
2018-01-13 10:20     ` Ingo Molnar [this message]
2018-01-13  6:22 ` Andy Lutomirski
2018-01-13 10:28 ` [tip:x86/pti] " tip-bot for Andy Lutomirski

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=20180113102008.prnjjbzr27rjryxw@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hughd@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=x86@kernel.org \
    /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).