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:   Thu, 04 May 2017 09:37:23 -0400 (EDT)
From:   David Miller <>
Subject: Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

From: Alexei Starovoitov <>
Date: Wed, 3 May 2017 20:30:22 -0700

> I would buy that debian folks indeed care about multi-arch, but
> what above does is making #include <linux/types.h> to be a nop
> for any cross-compiler on sparc that included it.

No, if you installed cross compiler for arch X it would add
another stanza doing that "ifdef __ARCH__, include blah, endif"

> You're right that we cannot assume much about /usr/include craziness.
> In that sense adding __native_arch__ macro is also wrong, since
> it assumes sane /usr/include without inline asm or other things
> that clang for bpf arch can consume.

You can assume that it's for the ARCH we are trying to run tests
for, which needs to be in the family of the kernel arch.

> In that sense the only way to be independent from arch dependent
> things in /usr/include is to put all arch specific headers
> into our own dir in tools/selftests/ (or may be tools/bpf/include)
> and point clang to that. I think the list of .h in there will be
> limited. Only things like linux/types.h and gnu/stubs.h,
> so it will be manageable.
> Thoughts?

No, this way lies madness.

If you want to get the kernel headers, set up the proper environment
instead of constantly trying to fight it.

Powered by blists - more mailing lists