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: <C2D7FE5348E1B147BCA15975FBA2307501A2506D04@us01wembx1.internal.synopsys.com>
Date:   Thu, 2 May 2019 16:09:43 +0000
From:   Vineet Gupta <Vineet.Gupta1@...opsys.com>
To:     Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
CC:     Arnd Bergmann <arnd@...db.de>, Rich Felker <dalias@...c.org>,
        "Arnaldo Carvalho de Melo" <acme@...hat.com>,
        lkml <linux-kernel@...r.kernel.org>,
        "linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
        "Jiri Olsa" <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
        arcml <linux-snps-arc@...ts.infradead.org>
Subject: Re: perf tools build broken after v5.1-rc1

On 5/2/19 7:36 AM, Arnaldo Carvalho de Melo wrote:
> Em Wed, May 01, 2019 at 09:17:52PM +0000, Vineet Gupta escreveu:
>> On 5/1/19 1:41 PM, Arnaldo Carvalho de Melo wrote:
>>>> The 1a787fc5ba18ac7 commit copied over the changes for arm64, but
>>>> missed all the other architectures changed in c8ce48f06503 and the
>>>> related commits.
>>> Right, I have a patch copying the missing headers, and that fixed the
>>> build with the glibc-based toolchain, but then broke the uCLibc one :-\
>  
>> tools/perf/util/cloexec.c  #includes <sys/syscall.h> which for glibc includes
>> asm/unistd.h
>  
>> uClibc <sys/syscall.h> OTOH #include <bits/sysnum.h> containign#define __NR_*
>> (generated by parsing kernel's unistd). This header does the right thing by
>> chekcing for redefs, but in the end we still collide with newly added
>> tools/arc/arc/*/**/unistd.h which doesn't have conditional definitions. I'm sure
>> this is not an ARC problem, any uClibc build would be affected. Do you have a arm
>> uclibc toolchain to test ?
> This solves it for fedora:29,
> arc_gnu_2017.09-rc2_prebuilt_uclibc_le_arc700_linux_install,
> arc_gnu_2019.03-rc1_prebuilt_uclibc_le_archs_linux_install and
> arc_gnu_2019.03-rc1_prebuilt_glibc_le_archs_linux_install.
>
> Also ok with:
>
>   make -C tools/perf build-test
>
> Now build testing with the full set of containers.
>
> - Arnaldo
>
> commit 1931594a680dba28e98b526192dd065430c850c0
> Author: Arnaldo Carvalho de Melo <acme@...hat.com>
> Date:   Thu May 2 09:26:23 2019 -0400
>
>     perf tools: Remove needless asm/unistd.h include fixing build in some places
>     
>     We were including sys/syscall.h and asm/unistd.h, since sys/syscall.h
>     includes asm/unistd.h, sometimes this leads to the redefinition of
>     defines, breaking the build.
>     
>     Noticed on ARC with uCLibc.

Thx for this Arnaldo.

While this takes care of immediate issues, for the long term, are you open to idea
of removing the header duplicity.
We could use a "less evil" idiom of copying only the minimal bits (since the sync
onus remains one way or the other)
e.g. I spotted below in bpf code and also seen in other ah-hoc multi arch projects

#ifdef __NR_xx
# if defined (__arch_y__)

# elif defined (__arch_z__)

# endif
#endif


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ