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: <ZDUmI00WofNY2a1G@corigine.com>
Date:   Tue, 11 Apr 2023 11:19:31 +0200
From:   Simon Horman <simon.horman@...igine.com>
To:     Pavan Kumar Linga <pavan.kumar.linga@...el.com>
Cc:     intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
        emil.s.tantilov@...el.com, joshua.a.hay@...el.com,
        sridhar.samudrala@...el.com, jesse.brandeburg@...el.com,
        anthony.l.nguyen@...el.com, willemb@...gle.com, decot@...gle.com,
        pabeni@...hat.com, kuba@...nel.org, edumazet@...gle.com,
        davem@...emloft.net, Alan Brady <alan.brady@...el.com>,
        Madhu Chittim <madhu.chittim@...el.com>,
        Phani Burra <phani.r.burra@...el.com>,
        Shailendra Bhatnagar <shailendra.bhatnagar@...el.com>
Subject: Re: [PATCH net-next v2 03/15] idpf: add controlq init and reset
 checks

On Mon, Apr 10, 2023 at 06:13:42PM -0700, Pavan Kumar Linga wrote:
> From: Joshua Hay <joshua.a.hay@...el.com>
> 
> At the end of the probe, initialize and schedule the event workqueue.
> It calls the hard reset function where reset checks are done to find
> if the device is out of the reset. Control queue initialization and
> the necessary control queue support is added.
> 
> Introduce function pointers for the register operations which are
> different between PF and VF devices.

...

> +int idpf_ctlq_add(struct idpf_hw *hw,
> +		  struct idpf_ctlq_create_info *qinfo,
> +		  struct idpf_ctlq_info **cq_out)
> +{
> +	struct idpf_ctlq_info *cq;
> +	bool is_rxq = false;
> +	int status = 0;
> +
> +	if (!qinfo->len || !qinfo->buf_size ||
> +	    qinfo->len > IDPF_CTLQ_MAX_RING_SIZE ||
> +	    qinfo->buf_size > IDPF_CTLQ_MAX_BUF_LEN)
> +		return -EINVAL;
> +
> +	cq = kcalloc(1, sizeof(struct idpf_ctlq_info), GFP_KERNEL);
> +	if (!cq)
> +		return -ENOMEM;

Hi Pavan, Hi Joshua,

nit: I notice a number of instances in this patchset where either
     the first argument passed to kcalloc() is 1, or the second
     argument is sizeof(u8).

     I think it would be slightly better to use kmalloc() in such cases.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ