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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 7 Jun 2018 13:07:33 +0200
From:   Anders Roxell <anders.roxell@...aro.org>
To:     Daniel Borkmann <daniel@...earbox.net>
Cc:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        Shuah Khan <shuah@...nel.org>,
        Bamvor Zhang <bamv2005@...il.com>, brgl@...ev.pl,
        Paolo Bonzini <pbonzini@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mike Rapoport <rppt@...ux.vnet.ibm.com>, aarcange@...hat.com,
        linux-kbuild@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-kselftest@...r.kernel.org,
        Networking <netdev@...r.kernel.org>, alexei.starovoitov@...il.com
Subject: Re: [PATCH v3] selftests: add headers_install to lib.mk

On 14 May 2018 at 21:20, Daniel Borkmann <daniel@...earbox.net> wrote:
> On 05/14/2018 01:58 PM, Anders Roxell wrote:
>> If the kernel headers aren't installed we can't build all the tests.
>> Add a new make target rule 'khdr' in the file lib.mk to generate the
>> kernel headers and that gets include for every test-dir Makefile that
>> includes lib.mk If the testdir in turn have its own sub-dirs the
>> top_srcdir needs to be set to the linux-rootdir to be able to generate
>> the kernel headers.
>>
>> Signed-off-by: Anders Roxell <anders.roxell@...aro.org>
>> Reviewed-by: Fathi Boudra <fathi.boudra@...aro.org>
>> ---
>>  Makefile                                          | 14 +-------------
>>  scripts/subarch.include                           | 13 +++++++++++++
>>  tools/testing/selftests/android/Makefile          |  2 +-
>>  tools/testing/selftests/android/ion/Makefile      |  1 +
>>  tools/testing/selftests/bpf/Makefile              |  5 ++---
>>  tools/testing/selftests/futex/functional/Makefile |  1 +
>>  tools/testing/selftests/gpio/Makefile             |  7 ++-----
>>  tools/testing/selftests/kvm/Makefile              |  7 ++-----
>>  tools/testing/selftests/lib.mk                    | 10 ++++++++++
>>  tools/testing/selftests/vm/Makefile               |  4 ----
>>  10 files changed, 33 insertions(+), 31 deletions(-)
>>  create mode 100644 scripts/subarch.include
> [...]
>> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
>> index 438d4f93875b..9741609a0eb1 100644
>> --- a/tools/testing/selftests/bpf/Makefile
>> +++ b/tools/testing/selftests/bpf/Makefile
>> @@ -16,9 +16,8 @@ LDLIBS += -lcap -lelf -lrt -lpthread
>>  TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read
>>  all: $(TEST_CUSTOM_PROGS)
>>
>> -$(TEST_CUSTOM_PROGS): urandom_read
>> -
>> -urandom_read: urandom_read.c
>> +$(TEST_CUSTOM_PROGS):| khdr
>> +$(TEST_CUSTOM_PROGS): urandom_read.c
>>       $(CC) -o $(TEST_CUSTOM_PROGS) -static $<
>>
>>  # Order correspond to 'make run_tests' order
>
> Can you elaborate on the error in BPF you're seeing that would force a
> headers_install for it?

BPF shouldn't be affected, a new revision of the patch does not touch
the bpf/Makefile.
I will send out a patch soon.

Cheers,
Anders

> Some people are running the tools/ infrastructure
> (incl. BPF kselftests) outside of kernel tree where this dependency would
> break their setup. Why BPF bits cannot be fixed otherwise?
>
> Thanks,
> Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ