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: <MW3PR11MB4522C544BF3EC8CDBBB9F12D8F6E0@MW3PR11MB4522.namprd11.prod.outlook.com>
Date:   Mon, 29 Jun 2020 18:53:34 +0000
From:   "Brady, Alan" <alan.brady@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "Michael, Alice" <alice.michael@...el.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "nhorman@...hat.com" <nhorman@...hat.com>,
        "sassmann@...hat.com" <sassmann@...hat.com>,
        "Burra, Phani R" <phani.r.burra@...el.com>,
        "Hay, Joshua A" <joshua.a.hay@...el.com>,
        "Chittim, Madhu" <madhu.chittim@...el.com>,
        "Linga, Pavan Kumar" <pavan.kumar.linga@...el.com>,
        "Skidmore, Donald C" <donald.c.skidmore@...el.com>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "Samudrala, Sridhar" <sridhar.samudrala@...el.com>
Subject: RE: [net-next v3 13/15] iecm: Add ethtool

> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Friday, June 26, 2020 12:15 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@...el.com>
> Cc: davem@...emloft.net; Michael, Alice <alice.michael@...el.com>;
> netdev@...r.kernel.org; nhorman@...hat.com; sassmann@...hat.com;
> Brady, Alan <alan.brady@...el.com>; Burra, Phani R <phani.r.burra@...el.com>;
> Hay, Joshua A <joshua.a.hay@...el.com>; Chittim, Madhu
> <madhu.chittim@...el.com>; Linga, Pavan Kumar
> <pavan.kumar.linga@...el.com>; Skidmore, Donald C
> <donald.c.skidmore@...el.com>; Brandeburg, Jesse
> <jesse.brandeburg@...el.com>; Samudrala, Sridhar
> <sridhar.samudrala@...el.com>
> Subject: Re: [net-next v3 13/15] iecm: Add ethtool
> 
> On Thu, 25 Jun 2020 19:07:35 -0700 Jeff Kirsher wrote:
> > diff --git a/drivers/net/ethernet/intel/iecm/iecm_lib.c
> > b/drivers/net/ethernet/intel/iecm/iecm_lib.c
> > index d34834422049..a55151495e18 100644
> > --- a/drivers/net/ethernet/intel/iecm/iecm_lib.c
> > +++ b/drivers/net/ethernet/intel/iecm/iecm_lib.c
> > @@ -765,7 +765,37 @@ static void iecm_deinit_task(struct iecm_adapter
> > *adapter)  static enum iecm_status  iecm_init_hard_reset(struct
> > iecm_adapter *adapter)  {
> > -	/* stub */
> > +	enum iecm_status err;
> > +
> > +	/* Prepare for reset */
> > +	if (test_bit(__IECM_HR_FUNC_RESET, adapter->flags)) {
> > +		iecm_deinit_task(adapter);
> > +		adapter->dev_ops.reg_ops.trigger_reset(adapter,
> > +
> __IECM_HR_FUNC_RESET);
> > +		set_bit(__IECM_UP_REQUESTED, adapter->flags);
> > +		clear_bit(__IECM_HR_FUNC_RESET, adapter->flags);
> > +	} else if (test_bit(__IECM_HR_CORE_RESET, adapter->flags)) {
> > +		if (adapter->state == __IECM_UP)
> > +			set_bit(__IECM_UP_REQUESTED, adapter->flags);
> > +		iecm_deinit_task(adapter);
> > +		clear_bit(__IECM_HR_CORE_RESET, adapter->flags);
> > +	} else if (test_and_clear_bit(__IECM_HR_DRV_LOAD, adapter->flags)) {
> > +	/* Trigger reset */
> > +	} else {
> > +		dev_err(&adapter->pdev->dev, "Unhandled hard reset
> cause\n");
> > +		err = IECM_ERR_PARAM;
> > +		goto handle_err;
> > +	}
> > +
> > +	/* Reset is complete and so start building the driver resources again */
> > +	err = iecm_init_dflt_mbx(adapter);
> > +	if (err) {
> > +		dev_err(&adapter->pdev->dev, "Failed to initialize default
> mailbox: %d\n",
> > +			err);
> > +	}
> > +handle_err:
> > +	mutex_unlock(&adapter->reset_lock);
> > +	return err;
> >  }
> 
> Please limit the use of iecm_status to the absolute necessary minimum.
> 
> If FW reports those back, they should be converted to normal Linux errors in the
> handler of FW communication and not leak all over the driver like that.
> 
> Having had to modify i40e recently - I find it very frustrating to not be able to
> propagate normal errors throughout the driver. The driver- -specific codes are a
> real PITA for people doing re-factoring work.

We understand how those can makes things difficult.  We will do our best to rework and limit the use of the iecm_status enum.  I think we do need a chunk of them in conrolq related things, but we can definitely do better to limit pollution.

Alan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ