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  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:   Mon, 7 Sep 2020 09:34:01 -0700
From:   Jakub Kicinski <>
To:     Jiri Pirko <>
Cc:     Leon Romanovsky <>,,,,,,
Subject: Re: [PATCH net-next] mlx4: make sure to always set the port type

On Mon, 7 Sep 2020 09:19:39 +0200 Jiri Pirko wrote:
> >The port type is being set to IB or ETH without relation to net_device,
> >fixing it will require very major code rewrite for the stable driver
> >that in maintenance mode.  
> Because the eth driver is not loaded, I see. The purpose of the
> WARN in devlink_port_type_eth_set is to prevent drivers from registering
> particular port without netdev/ibdev. That is what was repeatedly
> happening in the past as the driver developers didn't know they need to
> do it or were just lazy to do so.
> I wonder if there is any possibility to do both...

I think we have two options in this case:
 - set type to eth without the netdev
 - selectively mute the warning

I think the former is better, because we still want to see what the
port type is. Perhaps we should add a:

  dev_warn("devlink port type set without software interface
            reference, device type not supported by the kernel?");

That way people won't just pass NULL out of laziness, hopefully.


Powered by blists - more mailing lists