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]
Date:   Thu, 16 Jun 2022 18:00:40 +0200
From:   Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     bpf@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
        netdev@...r.kernel.org, magnus.karlsson@...el.com,
        bjorn@...nel.org, Alexandr Lobakin <alexandr.lobakin@...el.com>
Subject: Re: [PATCH v2 bpf-next 01/10] ice: allow toggling loopback mode via
 ndo_set_features callback

On Wed, Jun 15, 2022 at 04:47:40PM -0700, Jakub Kicinski wrote:
> On Tue, 14 Jun 2022 19:47:40 +0200 Maciej Fijalkowski wrote:
> > +	if (if_running)
> > +		ice_stop(netdev);
> > +	if (ice_aq_set_mac_loopback(&pf->hw, ena, NULL))
> > +		dev_err(ice_pf_to_dev(pf), "Failed to toggle loopback state\n");
> > +	if (if_running)
> > +		ice_open(netdev);
> 
> Loopback or not, I don't think we should be accepting the shutdown ->
> set config -> pray approach in modern drivers. ice_open() seems to be
> allocating all the Rx memory, and can fail.

They say that those who sing pray twice, so why don't we sing? :)

But seriously, I'll degrade this to ice_down/up and check retvals. I think
I just mimicked flow from ice_self_test(), which should be fixed as
well...

I'll send v4.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ