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: <CAKwvOdkSt5VymxtJ4jmOe9LM1rdy+CV7yYXhjCgOFAgbKGEPfQ@mail.gmail.com>
Date:   Mon, 20 Sep 2021 15:22:31 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     trix@...hat.com
Cc:     sgoutham@...vell.com, lcherian@...vell.com, gakula@...vell.com,
        jerinj@...vell.com, hkelam@...vell.com, sbhatta@...vell.com,
        davem@...emloft.net, kuba@...nel.org, nathan@...nel.org,
        schalla@...vell.com, vvelumuri@...vell.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        Colin Ian King <colin.king@...onical.com>
Subject: Re: [PATCH] octeontx2-af: fix uninitialized variable

On Mon, Sep 20, 2021 at 9:54 AM <trix@...hat.com> wrote:
>
> From: Tom Rix <trix@...hat.com>
>
> Building with clang 13 reports this error
> rvu_nix.c:4600:7: error: variable 'val' is used uninitialized whenever
>   'if' condition is false
>                 if (!is_rvu_otx2(rvu))
>                     ^~~~~~~~~~~~~~~~~
>
> So initialize val.
>
> Fixes: 4b5a3ab17c6c ("octeontx2-af: Hardware configuration for inline IPsec")
> Signed-off-by: Tom Rix <trix@...hat.com>

Thanks for the patch, but it looks like Colin beat you to the punch.
In linux-next, I see:
commit d853f1d3c900 ("octeontx2-af: Fix uninitialized variable val")

> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> index ea3e03fa55d45c..70431db866b328 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> @@ -4592,7 +4592,7 @@ static void nix_inline_ipsec_cfg(struct rvu *rvu, struct nix_inline_ipsec_cfg *r
>                                  int blkaddr)
>  {
>         u8 cpt_idx, cpt_blkaddr;
> -       u64 val;
> +       u64 val = 0;
>
>         cpt_idx = (blkaddr == BLKADDR_NIX0) ? 0 : 1;
>         if (req->enable) {
> --
> 2.26.3
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ