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] [day] [month] [year] [list]
Date:   Thu, 14 Feb 2019 12:58:36 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Andrii Nakryiko <andrii.nakryiko@...il.com>,
        Jin Yao <yao.jin@...ux.intel.com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        Alexei Starovoitov <ast@...com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>, bpf@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tools build: Add test-reallocarray.c to test-all.c to
 fix the build Was: Re: reallocarray failure on centos:7 superseded by raw
 data API

Em Thu, Feb 14, 2019 at 04:50:42PM +0100, Jiri Olsa escreveu:
> On Thu, Feb 14, 2019 at 12:30:18PM -0300, Arnaldo Carvalho de Melo wrote:
> 
> SNIP
> 
> > diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
> > index 74329957553a..e903b86b742f 100644
> > --- a/tools/build/feature/test-all.c
> > +++ b/tools/build/feature/test-all.c
> > @@ -174,6 +174,10 @@
> >  # include "test-libaio.c"
> >  #undef main
> >  
> > +#define main main_test_reallocarray
> > +# include "test-reallocarray.c"
> > +#undef main
> > +
> >  int main(int argc, char *argv[])
> >  {
> >  	main_test_libpython();
> > @@ -214,6 +218,7 @@ int main(int argc, char *argv[])
> >  	main_test_sdt();
> >  	main_test_setns();
> >  	main_test_libaio();
> > +	main_test_reallocarray();
> >  
> >  	return 0;
> >  }
> > diff --git a/tools/build/feature/test-reallocarray.c b/tools/build/feature/test-reallocarray.c
> > index 8170de35150d..8f6743e31da7 100644
> > --- a/tools/build/feature/test-reallocarray.c
> > +++ b/tools/build/feature/test-reallocarray.c
> > @@ -6,3 +6,5 @@ int main(void)
> >  {
> >  	return !!reallocarray(NULL, 1, 1);
> >  }
> > +
> > +#undef _GNU_SOURCE
> 
> nice, also test-sched_getcpu.c does not do #undef _GNU_SOURCE


Thanks, I'll fix that, since those tests are included one after the
other in test-all.c, they shouldn't lead those defines in place,
otherwise they will fail, as I fixed in other cases, but somehow missed
this one.

[acme@...co perf]$ grep _GNU_SOURCE tools/build/feature/test-*.c
tools/build/feature/test-get_current_dir_name.c:#define _GNU_SOURCE
tools/build/feature/test-get_current_dir_name.c:#undef _GNU_SOURCE
tools/build/feature/test-libpython.c:#undef _GNU_SOURCE
tools/build/feature/test-reallocarray.c:#define _GNU_SOURCE
tools/build/feature/test-reallocarray.c:#undef _GNU_SOURCE
tools/build/feature/test-sched_getcpu.c:#ifndef _GNU_SOURCE
tools/build/feature/test-sched_getcpu.c:#define _GNU_SOURCE
tools/build/feature/test-setns.c:#define _GNU_SOURCE
tools/build/feature/test-setns.c:#undef _GNU_SOURCE
[acme@...co perf]$

Its just because all the preceding ones undef it and the ones following
it doesn't define it:

$ cat tools/build/feature/test-all.c
<SNIP>
#define main main_test_libaio
# include "test-libaio.c"
#undef main

#define main main_test_reallocarray
# include "test-reallocarray.c"
#undef main

int main(int argc, char *argv[])
{
        main_test_libpython();
        main_test_libpython_version();
<SNIP>
        main_test_bpf();
        main_test_libcrypto();
        main_test_sched_getcpu();
        main_test_sdt();
        main_test_setns();
        main_test_libaio();
        main_test_reallocarray();

        return 0;
}
<SNIP>

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ