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: <20201015200622.GY17637@brightrain.aerifal.cx>
Date:   Thu, 15 Oct 2020 16:06:23 -0400
From:   Rich Felker <dalias@...ifal.cx>
To:     Petr Vorel <petr.vorel@...il.com>
Cc:     linux-kernel@...r.kernel.org, musl@...ts.openwall.com,
        Peter Korsgaard <peter@...sgaard.com>,
        Baruch Siach <baruch@...s.co.il>,
        Florian Weimer <fweimer@...hat.com>, linux-api@...r.kernel.org,
        libc-alpha@...rceware.org
Subject: Re: [musl] [PATCH v3 1/1] uapi: Move constants from <linux/kernel.h>
 to <linux/const.h>

On Thu, Oct 15, 2020 at 09:00:13PM +0200, Petr Vorel wrote:
> and include <linux/const.h> in UAPI headers instead of <linux/kernel.h>.
> 
> The reason is to avoid indirect <linux/sysinfo.h> include when using
> some network headers: <linux/netlink.h> or others -> <linux/kernel.h>
> -> <linux/sysinfo.h>.
> 
> This indirect include causes on MUSL redefinition of struct sysinfo when
> included both <sys/sysinfo.h> and some of UAPI headers:
> 
> In file included from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/kernel.h:5,
>                  from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/netlink.h:5,
>                  from ../include/tst_netlink.h:14,
>                  from tst_crypto.c:13:
> x86_64-buildroot-linux-musl/sysroot/usr/include/linux/sysinfo.h:8:8: error: redefinition of ‘struct sysinfo’
>  struct sysinfo {
>         ^~~~~~~
> In file included from ../include/tst_safe_macros.h:15,
>                  from ../include/tst_test.h:93,
>                  from tst_crypto.c:11:
> x86_64-buildroot-linux-musl/sysroot/usr/include/sys/sysinfo.h:10:8: note: originally defined here
> 
> Suggested-by: Rich Felker <dalias@...ifal.cx>
> Signed-off-by: Petr Vorel <petr.vorel@...il.com>
> ---
> Changes v2->v3:
> * Move things to <linux/const.h> instead of creating new header
> <linux/align.h>.
> 
> Kind regards,
> Petr
> 
>  include/uapi/linux/const.h              | 5 +++++
>  include/uapi/linux/ethtool.h            | 2 +-
>  include/uapi/linux/kernel.h             | 9 +--------
>  include/uapi/linux/lightnvm.h           | 2 +-
>  include/uapi/linux/mroute6.h            | 2 +-
>  include/uapi/linux/netfilter/x_tables.h | 2 +-
>  include/uapi/linux/netlink.h            | 2 +-
>  include/uapi/linux/sysctl.h             | 2 +-
>  8 files changed, 12 insertions(+), 14 deletions(-)

Acked-by: Rich Felker <dalias@...c.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ