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: <4c0a86e7-fca0-4aec-bc56-6f6e407aaae5@davidwei.uk>
Date: Tue, 29 Apr 2025 11:44:31 -0700
From: David Wei <dw@...idwei.uk>
To: Joe Damato <jdamato@...tly.com>, netdev@...r.kernel.org,
 Michael Chan <michael.chan@...adcom.com>,
 Pavan Chebbi <pavan.chebbi@...adcom.com>,
 Somnath Kotur <somnath.kotur@...adcom.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>
Subject: Re: [PATCH net-next v1] bnxt_en: add debugfs file for restarting rx
 queues

On 4/29/25 08:28, Joe Damato wrote:
> On Mon, Apr 28, 2025 at 05:06:27PM -0700, David Wei wrote:
>> Add a debugfs file that resets an Rx queue using
>> netdev_rx_queue_restart(). Useful for testing and debugging.
>>
>> Signed-off-by: David Wei <dw@...idwei.uk>
>> ---
>>   .../net/ethernet/broadcom/bnxt/bnxt_debugfs.c | 45 +++++++++++++++++++
>>   1 file changed, 45 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c
>> index 127b7015f676..e62a3ff2ffdd 100644
>> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c
>> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c
> 
> [...]
> 
>> +	sscanf(buf, "%u", &ring_nr);
> 
> Does sscanf's return value need to be checked to ensure that a match
> occurred?
> 
>    ret = sscanf(...)
>    if (ret != 1)
>      return -EINVAL;
> 
> or something similar like that?

Yes, that's a good idea, didn't know sscanf() returned a value. I will
add it in v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ