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: <CAK8P3a2RO7-SHKfe7b_LcG82gkca10c4fCJmjD_ToSP1Xm-yDA@mail.gmail.com>
Date:   Wed, 30 Mar 2022 08:11:00 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Jon Maloy <jmaloy@...hat.com>,
        Ying Xue <ying.xue@...driver.com>,
        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 8:08 AM Arnd Bergmann <arnd@...db.de> wrote:
> 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.

nevermind, I just saw the thread continues and you arrived at a good solution
withusing the __cpu_to_be16() etc directly.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ