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: <CABBYNZKxM5Z2CUah1EB2uUDs=gEgDbrK0B9gbxeoyvtL6g=4+w@mail.gmail.com>
Date:   Thu, 11 Aug 2022 13:20:52 -0700
From:   Luiz Augusto von Dentz <luiz.dentz@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@...il.com>,
        Luiz Augusto von Dentz <luiz.von.dentz@...el.com>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Marcel Holtmann <marcel@...tmann.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        "linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
        linux-next@...r.kernel.org,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        linux-mips@...r.kernel.org
Subject: Re: build failure of next-20220811 due to 332f1795ca20 ("Bluetooth:
 L2CAP: Fix l2cap_global_chan_by_psm regression")

Hi Jakub,

On Thu, Aug 11, 2022 at 12:59 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu, 11 Aug 2022 19:53:04 +0100 Sudip Mukherjee (Codethink) wrote:
> > Not sure if it has been reported, builds of csky and mips allmodconfig
> > failed to build next-20220811 with gcc-12.
>
> I can't repro with the cross compiler from kernel.org.
> Can you test something like this?
>
> diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
> index e72f3b247b5e..82bf8e01f7af 100644
> --- a/include/net/bluetooth/bluetooth.h
> +++ b/include/net/bluetooth/bluetooth.h
> @@ -341,6 +341,11 @@ static inline bool bdaddr_type_is_le(u8 type)
>  #define BDADDR_ANY  (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}})
>  #define BDADDR_NONE (&(bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}})
>
> +static inline int ba_is_any(const bdaddr_t *ba)
> +{
> +       return memchr_inv(ba, sizeof(*ba), 0);
> +}

So we can't use something like BDADDR_ANY to compare? Anyway afaik
these were already present before the patch so I do wonder what had
trigger it show now or perhaps it was being suppressed before and
since we change it now start showing again?

>  /* Copy, swap, convert BD Address */
>  static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2)
>  {
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 77c0aac14539..a08ec272be4a 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -2001,8 +2001,8 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm,
>                         }
>
>                         /* Closest match */
> -                       src_any = !bacmp(&c->src, BDADDR_ANY);
> -                       dst_any = !bacmp(&c->dst, BDADDR_ANY);
> +                       src_any = !ba_is_any(&c->src);
> +                       dst_any = !ba_is_any(&c->dst);
>                         if ((src_match && dst_any) || (src_any && dst_match) ||
>                             (src_any && dst_any))
>                                 c1 = c;



-- 
Luiz Augusto von Dentz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ