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: <20250915081640.6d86ff6f@kernel.org>
Date: Mon, 15 Sep 2025 08:16:40 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Simon Horman <horms@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, andrew+netdev@...n.ch, alexanderduyck@...com,
 jacob.e.keller@...el.com
Subject: Re: [PATCH net-next 2/9] eth: fbnic: use fw uptime to detect fw
 crashes

On Mon, 15 Sep 2025 10:58:46 +0100 Simon Horman wrote:
> On Fri, Sep 12, 2025 at 01:14:21PM -0700, Jakub Kicinski wrote:
> > Currently we only detect FW crashes when it stops responding
> > to heartbeat messages. FW has a watchdog which will reset it
> > in case of crashes. Use FW uptime sent in the heartbeat messages
> > to detect that the watchdog has fired.  
> 
> I see that the time sent in heartbeat messages is critical to this check.
> But the time sent in ownership messages is also used, right?

Fair, will add. I wasn't sure how to concisely include this.
Ownership is kinda like the 0-th heartbeat in my mind..

> > diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
> > index 6e580654493c..72f750eea055 100644
> > --- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
> > +++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
> > @@ -495,6 +495,11 @@ int fbnic_fw_xmit_ownership_msg(struct fbnic_dev *fbd, bool take_ownership)
> >  
> >  	fbd->last_heartbeat_request = req_time;
> >  
> > +	/* Set prev_firmware_time to 0 to avoid triggering firmware crash
> > +	 * detection now that we received a response from firmware.
> > +	 */  
> 
> I'm having a bit of trouble understanding this comment.
> Here we are sending an ownership message.
> Have we (also) received a response from firmware?

Yes, sorry..

> > +	fbd->prev_firmware_time = 0;
> > +
> >  	/* Set heartbeat detection based on if we are taking ownership */
> >  	fbd->fw_heartbeat_enabled = take_ownership;
> >  
> > @@ -671,6 +676,9 @@ static int fbnic_fw_parse_ownership_resp(void *opaque,
> >  	/* Count the ownership response as a heartbeat reply */
> >  	fbd->last_heartbeat_response = jiffies;
> >  
> > +	/* Capture firmware time for logging and firmware crash check */
> > +	fbd->firmware_time = fta_get_uint(results, FBNIC_FW_HEARTBEAT_UPTIME);  
> 
> Maybe FBNIC_FW_OWNERSHIP_UPTIME?

ack!

Thanks for reviews!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ