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: <20250912083928.GS30363@horms.kernel.org>
Date: Fri, 12 Sep 2025 09:39:28 +0100
From: Simon Horman <horms@...nel.org>
To: Siva Reddy Kallam <siva.kallam@...adcom.com>
Cc: leonro@...dia.com, jgg@...dia.com, linux-rdma@...r.kernel.org,
	netdev@...r.kernel.org, vikas.gupta@...adcom.com,
	selvin.xavier@...adcom.com, anand.subramanian@...adcom.com,
	Usman Ansari <usman.ansari@...adcom.com>
Subject: Re: [PATCH 5/8] RDMA/bng_re: Add infrastructure for enabling
 Firmware channel

On Fri, Aug 29, 2025 at 12:30:39PM +0000, Siva Reddy Kallam wrote:
> Add infrastructure for enabling Firmware channel.
> 
> Signed-off-by: Siva Reddy Kallam <siva.kallam@...adcom.com>
> Reviewed-by: Usman Ansari <usman.ansari@...adcom.com>

...

> diff --git a/drivers/infiniband/hw/bng_re/bng_fw.c b/drivers/infiniband/hw/bng_re/bng_fw.c

...

> +/* function events */
> +static int bng_re_process_func_event(struct bng_re_rcfw *rcfw,
> +				     struct creq_func_event *func_event)
> +{
> +	int rc;
> +
> +	switch (func_event->event) {
> +	case CREQ_FUNC_EVENT_EVENT_TX_WQE_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_TX_DATA_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_RX_WQE_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_RX_DATA_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_CQ_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_TQM_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_CFCQ_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_CFCS_ERROR:
> +		/* SRQ ctx error, call srq_handler??
> +		 * But there's no SRQ handle!
> +		 */
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_CFCC_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_CFCM_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_TIM_ERROR:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_VF_COMM_REQUEST:
> +		break;
> +	case CREQ_FUNC_EVENT_EVENT_RESOURCE_EXHAUSTED:
> +		break;
> +	default:
> +		return -EINVAL;
> +	}
> +
> +	return rc;

rc does not appear to be initialised in this function.

Flagged by Clang 20.1.8 with -Wuninitialized

> +}

...

> +int bng_re_enable_fw_channel(struct bng_re_rcfw *rcfw,
> +			     int msix_vector,
> +			     int cp_bar_reg_off)
> +{
> +	struct bng_re_cmdq_ctx *cmdq;
> +	struct bng_re_creq_ctx *creq;
> +	int rc;
> +
> +	cmdq = &rcfw->cmdq;
> +	creq = &rcfw->creq;

Conversely, creq is initialised here but otherwise unused in this function.

Flagged by GCC 15.1.0 and Clang 20.1.8 with -Wunused-but-set-variable

> +
> +	/* Assign defaults */
> +	cmdq->seq_num = 0;
> +	set_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags);
> +	init_waitqueue_head(&cmdq->waitq);
> +
> +	rc = bng_re_map_cmdq_mbox(rcfw);
> +	if (rc)
> +		return rc;
> +
> +	rc = bng_re_map_creq_db(rcfw, cp_bar_reg_off);
> +	if (rc)
> +		return rc;
> +
> +	rc = bng_re_rcfw_start_irq(rcfw, msix_vector, true);
> +	if (rc) {
> +		dev_err(&rcfw->pdev->dev,
> +			"Failed to request IRQ for CREQ rc = 0x%x\n", rc);
> +		bng_re_disable_rcfw_channel(rcfw);
> +		return rc;
> +	}
> +
> +	return 0;
> +}

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ