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: <CABqD9hb5G_FmhmhDU2HEi9+_XXAvYtYfO+zY62mG_YkQtjX6RA@mail.gmail.com>
Date:	Mon, 28 Jan 2013 08:26:48 -0600
From:	Will Drewry <wad@...omium.org>
To:	Kees Cook <keescook@...omium.org>
Cc:	Arnd Bergmann <arnd@...db.de>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	LKML <linux-kernel@...r.kernel.org>, arm@...nel.org,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	James Morris <james.l.morris@...cle.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 14/15] samples/seccomp: be less stupid about cross compiling

On Tue, Jan 22, 2013 at 3:20 PM, Kees Cook <keescook@...omium.org> wrote:
> On Mon, Jan 21, 2013 at 9:16 AM, Arnd Bergmann <arnd@...db.de> wrote:
>> The seccomp filters are currently built for the build
>> host, not for the machine that they are going to run
>> on, but they are also built for with the -m32 flag
>> if the kernel is built for a 32 bit machine, both
>> of which seems rather odd.
>>
>> It broke allyesconfig on my machine, which is x86-64, but
>> building for 32 bit ARM, with this error message:
>>
>> In file included from /usr/include/stdio.h:28:0,
>>                  from samples/seccomp/bpf-fancy.c:15:
>> /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
>>
>> because there are no 32 bit libc headers installed on
>> this machine. We should really be building all the
>> samples for the target machine rather than the build
>> host, but since the infrastructure for that appears
>> to be missing right now, let's be a little bit smarter
>> and not pass the '-m32' flag to the HOSTCC when cross-
>> compiling.
>>
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>> Cc: Heiko Carstens <heiko.carstens@...ibm.com>
>> Cc: Kees Cook <keescook@...omium.org>
>> Cc: James Morris <james.l.morris@...cle.com>
>
> I'm fine with this. Thanks!
>
> Acked-by: Kees Cook <keescook@...omium.org>

Thanks! This makes a lot of sense and maybe buys a bit more time to
figure out the best way to build these (all?) samples for the target.

Acked-by: Will Drewry <wad@...omium.org>

>
>> ---
>>  samples/seccomp/Makefile |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile
>> index bbbd276..7203e66 100644
>> --- a/samples/seccomp/Makefile
>> +++ b/samples/seccomp/Makefile
>> @@ -19,6 +19,7 @@ bpf-direct-objs := bpf-direct.o
>>
>>  # Try to match the kernel target.
>>  ifndef CONFIG_64BIT
>> +ifndef CROSS_COMPILE
>>
>>  # s390 has -m31 flag to build 31 bit binaries
>>  ifndef CONFIG_S390
>> @@ -35,6 +36,7 @@ HOSTLOADLIBES_bpf-direct += $(MFLAG)
>>  HOSTLOADLIBES_bpf-fancy += $(MFLAG)
>>  HOSTLOADLIBES_dropper += $(MFLAG)
>>  endif
>> +endif
>>
>>  # Tell kbuild to always build the programs
>>  always := $(hostprogs-y)
>> --
>> 1.7.10.4
>>
>
>
>
> --
> Kees Cook
> Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ