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: <2c8d90d0-2926-45ed-a838-d51d270372cd@oracle.com>
Date: Wed, 24 Sep 2025 01:30:51 +0530
From: ALOK TIWARI <alok.a.tiwari@...cle.com>
To: Pavan Chebbi <pavan.chebbi@...adcom.com>, jgg@...pe.ca,
        michael.chan@...adcom.com
Cc: dave.jiang@...el.com, saeedm@...dia.com, Jonathan.Cameron@...wei.com,
        davem@...emloft.net, corbet@....net, edumazet@...gle.com,
        gospo@...adcom.com, kuba@...nel.org, netdev@...r.kernel.org,
        pabeni@...hat.com, andrew+netdev@...n.ch, selvin.xavier@...adcom.com,
        leon@...nel.org, kalesh-anakkur.purayil@...adcom.com
Subject: Re: [External] : [PATCH net-next v2 5/6] bnxt_fwctl: Add bnxt fwctl
 device



On 9/23/2025 3:28 PM, Pavan Chebbi wrote:
> +static int bnxt_fw_setup_input_dma(struct bnxtctl_dev *bnxt_dev,
> +				   struct device *dev,
> +				   int num_dma,
> +				   struct fwctl_dma_info_bnxt *msg,
> +				   struct bnxt_fw_msg *fw_msg)
> +{
> +	u8 i, num_allocated = 0;
> +	void *dma_ptr;
> +	int rc = 0;
> +
> +	for (i = 0; i < num_dma; i++) {

The driver caps num_dma at 10 and rejects values greater than that.
It would be clearer and more consistent to use u8 num_dma here instead 
of int.

> +		if (msg->len == 0 || msg->len > MAX_DMA_MEM_SIZE) {
> +			rc = -EINVAL;
> +			goto err;
> +		}
> +		bnxt_dev->dma_virt_addr[i] = dma_alloc_coherent(dev->parent,
> +								msg->len,
> +								&bnxt_dev->dma_addr[i],
> +								GFP_KERNEL);
> +		if (!bnxt_dev->dma_virt_addr[i]) {
> +			rc = -ENOMEM;
> +			goto err;
> +		}
> +		num

Thanks,
Alok

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ