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: <0ac107c9-ff97-46bf-fce0-712e5bb9d24f@huawei.com>
Date: Fri, 25 Oct 2024 11:55:13 +0800
From: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Simon Horman <horms@...nel.org>, Rasesh Mody <rmody@...vell.com>,
	Sudarsana Kalluru <skalluru@...vell.com>, <GR-Linux-NIC-Dev@...vell.com>,
	Andrew Lunn <andrew+netdev@...n.ch>, "David S . Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/2] bna: Fix return value check for debugfs create APIs



On 2024/10/24 22:04, Andrew Lunn wrote:
>> Do you want to ignore all the return values of debugfs_create_dir() and debugfs_create_file()?
> 
> All return values from all debugfs_foo() calls.

I searched. Currently, bna only involves functions debugfs_create_dir() and
debugfs_create_file(). debugfs_remove() has no return value.


git grep -n "\bdebugfs_" drivers/net/ethernet/brocade/bna/
drivers/net/ethernet/brocade/bna/bnad_debugfs.c:501:            bna_debugfs_root = debugfs_create_dir("bna", NULL);
drivers/net/ethernet/brocade/bna/bnad_debugfs.c:514:                    debugfs_create_dir(name, bna_debugfs_root);
drivers/net/ethernet/brocade/bna/bnad_debugfs.c:521:                                    debugfs_create_file(file->name,
drivers/net/ethernet/brocade/bna/bnad_debugfs.c:544:                    debugfs_remove(bnad->bnad_dentry_files[i]);
drivers/net/ethernet/brocade/bna/bnad_debugfs.c:551:            debugfs_remove(bnad->port_debugfs_root);
drivers/net/ethernet/brocade/bna/bnad_debugfs.c:558:            debugfs_remove(bna_debugfs_root);


> 
> debugfs has been designed so that it should be robust if any previous
> call to debugfs failed. It will not crash, it will just keep going.
> 
> It does not matter if the contents of debugfs are messed up as a
> result, it is not an ABI, you cannot trust it to contain anything
> useful, and it might be missing all together, since it is optional.

Okay, thank you for your detailed explanation.

> 
> 	Andrew
> .
> 

-- 
Regards,
  Zhen Lei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ