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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bd54a7d5-c0bb-4116-93eb-ea2cff8cfe32@gmail.com>
Date: Wed, 23 Jul 2025 08:13:08 +0300
From: Tariq Toukan <ttoukan.linux@...il.com>
To: Zhu Yanjun <yanjun.zhu@...ux.dev>, saeedm@...dia.com, leon@...nel.org,
 tariqt@...dia.com, andrew+netdev@...n.ch, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
 netdev@...r.kernel.org, linux-rdma@...r.kernel.org
Cc: Junxian Huang <huangjunxian6@...ilicon.com>
Subject: Re: [PATCHv4 net-next 1/1] net/mlx5: Fix build -Wframe-larger-than
 warnings



On 23/07/2025 0:20, Zhu Yanjun wrote:
> When building, the following warnings will appear.
> "
> pci_irq.c: In function ‘mlx5_ctrl_irq_request’:
> pci_irq.c:494:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> 
> pci_irq.c: In function ‘mlx5_irq_request_vector’:
> pci_irq.c:561:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> 
> eq.c: In function ‘comp_irq_request_sf’:
> eq.c:897:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> 
> irq_affinity.c: In function ‘irq_pool_request_irq’:
> irq_affinity.c:74:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> "
> 
> These warnings indicate that the stack frame size exceeds 1024 bytes in
> these functions.
> 
> To resolve this, instead of allocating large memory buffers on the stack,
> it is better to use kvzalloc to allocate memory dynamically on the heap.
> This approach reduces stack usage and eliminates these frame size warnings.
> 
> Acked-by: Junxian Huang <huangjunxian6@...ilicon.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@...ux.dev>
> ---
> v3 -> v4: Relocate the kvzalloc call to a more appropriate place following Tariq's advice.
> v2 -> v3: No changes, just send out target net-next;
> v1 -> v2: Add kvfree to error handler;
> 
> 1. This commit only build tests;
> 2. All the changes are on configuration path, will not make difference
> on the performance;
> 3. This commit is just to fix build warnings, not error or bug fixes. So
> not Fixes tag.
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/eq.c  | 22 ++++++----
>   .../mellanox/mlx5/core/irq_affinity.c         | 19 +++++++--
>   .../net/ethernet/mellanox/mlx5/core/pci_irq.c | 40 +++++++++++++------
>   3 files changed, 58 insertions(+), 23 deletions(-)
> 

Reviewed-by: Tariq Toukan <tariqt@...dia.com>

Thanks for your patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ