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]
Date:   Thu, 19 Jan 2023 15:48:39 -0800
From:   Jacob Keller <jacob.e.keller@...el.com>
To:     <alejandro.lucero-palau@....com>, <netdev@...r.kernel.org>,
        <linux-net-drivers@....com>
CC:     <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
        <edumazet@...gle.com>, <habetsm@...il.com>,
        <ecree.xilinx@...il.com>
Subject: Re: [PATCH net-next 2/7] sfc: enumerate mports in ef100



On 1/19/2023 3:31 AM, alejandro.lucero-palau@....com wrote:
> +
> +int efx_mae_enumerate_mports(struct efx_nic *efx)
> +{
> +#define MCDI_MPORT_JOURNAL_LEN \
> +	sizeof(efx_dword_t[DIV_ROUND_UP(MC_CMD_MAE_MPORT_READ_JOURNAL_OUT_LENMAX_MCDI2, 4)])

Please keep #define like this outside the function block. This is really
hard to read. It's also not clear to me what exactly this define is
doing.. you're accessing an array and using a DIV_ROUND_UP...

> +	efx_dword_t *outbuf = kzalloc(MCDI_MPORT_JOURNAL_LEN, GFP_KERNEL);
> +	MCDI_DECLARE_BUF(inbuf, MC_CMD_MAE_MPORT_READ_JOURNAL_IN_LEN);
> +	MCDI_DECLARE_STRUCT_PTR(desc);
> +	size_t outlen, stride, count;
> +	int rc = 0, i;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ