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: <20250905184957.76eb37e4@kernel.org>
Date: Fri, 5 Sep 2025 18:49:57 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Shenwei Wang <shenwei.wang@....com>
Cc: Wei Fang <wei.fang@....com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
 S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
 Abeni <pabeni@...hat.com>, Alexei Starovoitov <ast@...nel.org>, Daniel
 Borkmann <daniel@...earbox.net>, Jesper Dangaard Brouer <hawk@...nel.org>,
 John Fastabend <john.fastabend@...il.com>, Clark Wang
 <xiaoning.wang@....com>, Stanislav Fomichev <sdf@...ichev.me>,
 imx@...ts.linux.dev, netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-imx@....com, Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH v5 net-next 1/5] net: fec: use a member variable for
 maximum buffer size

On Thu,  4 Sep 2025 15:34:58 -0500 Shenwei Wang wrote:
> -#define	OPT_FRAME_SIZE	(PKT_MAXBUF_SIZE << 16)
> +#define	OPT_FRAME_SIZE	(fep->max_buf_size << 16)

Please don't implicitly depend on local variables with a certain name.
It's quite bad code hygiene. Looks like this define is only used once
so perhaps you should instead create a define like

#define OPT_ARCH_NEEDS_BUFSZ

And then use that in fec_restart() to either add

 (fep->max_buf_size << 16)

to rcntl or not?
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ