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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a37gvycJ4zbeVvD_=6Npuep52VEP7CrgS-_8y6OXK_U3Q@mail.gmail.com>
Date:   Wed, 30 Mar 2022 08:08:25 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Jon Maloy <jmaloy@...hat.com>, Ying Xue <ying.xue@...driver.com>,
        Arnd Bergmann <arnd@...db.de>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Networking <netdev@...r.kernel.org>,
        tipc-discussion@...ts.sourceforge.net,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        llvm@...ts.linux.dev, David Howells <dhowells@...hat.com>
Subject: Re: [PATCH] net, uapi: remove inclusion of arpa/inet.h

On Wed, Mar 30, 2022 at 12:26 AM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
> On Tue, Mar 29, 2022 at 3:09 PM Nick Desaulniers <ndesaulniers@...gle.com> wrote:
> ```
> diff --git a/include/uapi/linux/byteorder/little_endian.h
> b/include/uapi/linux/byteorder/little_endian.h
> index cd98982e7523..c14f2c3728e2 100644
> --- a/include/uapi/linux/byteorder/little_endian.h
> +++ b/include/uapi/linux/byteorder/little_endian.h
> @@ -103,5 +103,8 @@ static __always_inline __u16 __be16_to_cpup(const __be16 *p)
>  #define __cpu_to_be16s(x) __swab16s((x))
>  #define __be16_to_cpus(x) __swab16s((x))
>
> +#define htonl(x) __cpu_to_be32(x)
> +#define htons(x) __cpu_to_be16(x)
> +#define ntohs(x) __be16_to_cpu(x)
>

This is unfortunately a namespace violation, you can't define things in uapi
headers that conflict with standard library interfaces.

         Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ