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  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]
Date:   Sun, 6 Dec 2020 00:18:44 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Ayush Sawal <ayush.sawal@...lsio.com>,
        Vinay Kumar Yadav <vinay.yadav@...lsio.com>,
        Rohit Maheshwari <rohitm@...lsio.com>,
        "David S. Miller" <davem@...emloft.net>,
        Arnd Bergmann <arnd@...db.de>,
        Nathan Chancellor <natechancellor@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        YueHaibing <yuehaibing@...wei.com>,
        Networking <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] ch_ktls: fix build warning for ipv4-only config

On Sat, Dec 5, 2020 at 2:57 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu,  3 Dec 2020 23:26:16 +0100 Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> >
> > When CONFIG_IPV6 is disabled, clang complains that a variable
> > is uninitialized for non-IPv4 data:
> >
> > drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:1046:6: error: variable 'cntrl1' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
> >         if (tx_info->ip_family == AF_INET) {
> >             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:1059:2: note: uninitialized use occurs here
> >         cntrl1 |= T6_TXPKT_ETHHDR_LEN_V(maclen - ETH_HLEN) |
> >         ^~~~~~
> >
> > Replace the preprocessor conditional with the corresponding C version,
> > and make the ipv4 case unconditional in this configuration to improve
> > readability and avoid the warning.
> >
> > Fixes: 86716b51d14f ("ch_ktls: Update cheksum information")
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
>
> This is for evrey clang build or just W=1+? Would be annoying if clang
> produced this on every build with 5.10 (we need to decide fix vs -next).

The -Wsometimes-uninitialized is enabled unconditionally for clang,
but this only happens for IPv4-only configurations with IPv6 disabled,
so most real configurations should not observe it, but the fix should still
go into v5.10.

      Arnd

Powered by blists - more mailing lists