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: <20160127132359.GA13158@krava.brq.redhat.com>
Date:	Wed, 27 Jan 2016 14:23:59 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	acme@...hat.com, linux-kernel@...r.kernel.org,
	Jiri Olsa <jolsa@...nel.org>, Li Zefan <lizefan@...wei.com>
Subject: Re: [PATCH] tools build: Check basic headers for test-compile
 feature checker

On Wed, Jan 27, 2016 at 11:22:22AM +0000, Wang Nan wrote:
> An i386 binary can be linked correctly even without correct headers.
> Which causes problem. For exmaple:
> 
>  $ mv /tmp/oxygen_root/usr/include/gnu/stubs-32.h{,.bak}
>  $ make tools/perf
>  Auto-detecting system features:
>  ...                         dwarf: [ on  ]
>  [SNIP]
>    GEN      common-cmds.h
>    CC       perf-read-vdso32
>  In file included from /tmp/oxygen_root/usr/include/features.h:388:0,
>                   from /tmp/oxygen_root/usr/include/stdio.h:27,
>                   from perf-read-vdso.c:1:
>  /tmp/oxygen_root/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
>   # include <gnu/stubs-32.h>
>                            ^
>  compilation terminated.
>  ...
> 
> In this patch we checks not only compiler and linker, but also basic
> headers in test-compile test case, make it fail on a platform
> lacking correct headers.
> 
> Signed-off-by: Wang Nan <wangnan0@...wei.com>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Jiri Olsa <jolsa@...nel.org>
> Cc: Li Zefan <lizefan@...wei.com>

nice ;-)

Acked-by: Jiri Olsa <jolsa@...nel.org>

thanks,
jirka

> ---
>  tools/build/feature/test-compile.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/build/feature/test-compile.c b/tools/build/feature/test-compile.c
> index 31dbf45..c54e655 100644
> --- a/tools/build/feature/test-compile.c
> +++ b/tools/build/feature/test-compile.c
> @@ -1,4 +1,6 @@
> +#include <stdio.h>
>  int main(void)
>  {
> +	printf("Hello World!\n");
>  	return 0;
>  }
> -- 
> 1.8.3.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ