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: <20250620105544.GI194429@horms.kernel.org>
Date: Fri, 20 Jun 2025 11:55:44 +0100
From: Simon Horman <horms@...nel.org>
To: Tanmay Jagdale <tanmay@...vell.com>
Cc: davem@...emloft.net, leon@...nel.org, sgoutham@...vell.com,
	bbhushan2@...vell.com, herbert@...dor.apana.org.au,
	linux-crypto@...r.kernel.org, netdev@...r.kernel.org,
	Rakesh Kudurumalla <rkudurumalla@...vell.com>
Subject: Re: [PATCH net-next v2 05/14] octeontx2-af: Add support for CPT
 second pass

On Wed, Jun 18, 2025 at 04:59:59PM +0530, Tanmay Jagdale wrote:
> From: Rakesh Kudurumalla <rkudurumalla@...vell.com>
> 
> Implemented mailbox to add mechanism to allocate a
> rq_mask and apply to nixlf to toggle RQ context fields
> for CPT second pass packets.
> 
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@...vell.com>
> Signed-off-by: Tanmay Jagdale <tanmay@...vell.com>

...

>  void rvu_apr_block_cn10k_init(struct rvu *rvu)
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c

...

> +int
> +rvu_mbox_handler_nix_lf_inline_rq_cfg(struct rvu *rvu,
> +				      struct nix_rq_cpt_field_mask_cfg_req *req,
> +				      struct msg_rsp *rsp)
> +{
> +	struct rvu_hwinfo *hw = rvu->hw;
> +	struct nix_hw *nix_hw;
> +	int blkaddr, nixlf;
> +	int rq_mask, err;
> +
> +	err = nix_get_nixlf(rvu, req->hdr.pcifunc, &nixlf, &blkaddr);
> +	if (err)
> +		return err;
> +
> +	nix_hw = get_nix_hw(rvu->hw, blkaddr);
> +	if (!nix_hw)
> +		return NIX_AF_ERR_INVALID_NIXBLK;
> +
> +	if (!hw->cap.second_cpt_pass)
> +		return NIX_AF_ERR_INVALID_NIXBLK;
> +
> +	if (req->ipsec_cfg1.rq_mask_enable) {

If this condition is not met...

> +		rq_mask = nix_inline_rq_mask_alloc(rvu, req, nix_hw, blkaddr);
> +		if (rq_mask < 0)
> +			return NIX_AF_ERR_RQ_CPT_MASK;
> +	}
> +

... then rq_mask is used uninitialised on the following line.

Flagged by clang 20.1.7 with -Wsometimes-uninitialized, and Smatch.

> +	configure_rq_mask(rvu, blkaddr, nixlf, rq_mask,
> +			  req->ipsec_cfg1.rq_mask_enable);
> +	configure_spb_cpt(rvu, blkaddr, nixlf, req,
> +			  req->ipsec_cfg1.spb_cpt_enable);
> +	return 0;
> +}

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ