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: <20211122113742.16705a54@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 22 Nov 2021 11:37:42 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Antoine Tenart <atenart@...nel.org>
Cc:     davem@...emloft.net, alexander.duyck@...il.com,
        netdev@...r.kernel.org, Michal Kubecek <mkubecek@...e.cz>
Subject: Re: [PATCH net v2] net: avoid registering new queue objects after
 device unregistration

On Mon, 22 Nov 2021 17:56:06 +0100 Antoine Tenart wrote:
> Quoting Jakub Kicinski (2021-11-22 17:31:44)
> > On Mon, 22 Nov 2021 17:20:07 +0100 Antoine Tenart wrote:  
> > >    veth_set_channels+0x1c3/0x550
> > >    ethnl_set_channels+0x524/0x610  
> > 
> > The patch looks fine, but ethtool calls should not happen after
> > unregister IMHO. Too many drivers would be surprised. 
> > 
> > Maybe we should catch unregistered devices in ethnl_ops_begin()?  
> 
> That might be good to have indeed, I'll have a look. I'm not sure about
> other paths that could do the same: if there are, we might want to keep
> the check in this patch as well. Or WARN to catch future misuses?

My knee jerk reaction was to add a WARN() just because I can't think
why changing queue count after unregister would be needed. But it's not
really illegal and we do support it before register, so why not after
unregister..

We can venture a warning with a comment saying that this is just for
catching bad uses and see if any driver hits it on a normal path?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ