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] [day] [month] [year] [list]
Message-ID: <0ca42355-d226-3136-c147-99ef46dc824a@gmail.com>
Date:   Sun, 25 Mar 2018 23:29:11 +0200
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     David Miller <davem@...emloft.net>
Cc:     nic_swsd@...ltek.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 5/6] r8169: change type of driver_data

Am 25.03.2018 um 22:43 schrieb David Miller:
> From: Heiner Kallweit <hkallweit1@...il.com>
> Date: Sat, 24 Mar 2018 23:18:25 +0100
> 
>> Several functions accessing the device driver_data field don't need the
>> net_device. All needed parameters can be accessed via struct
>> rtl8169_private, therefore change type of driver_data accordingly.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> 
> This doesn't work.
> 
> The pci_set_drvdata() call happens after register_netdevice().
> 
> At the exact moment register_netdevice() is called, any part of the
> driver can be invoked before it returns.
> 
> Therefore this change will result in crashes because the drvdata won't
> be initialized early enough.
> 
Thanks for catching this. The patch however just changes the parameter
of pci_set_drvdata, not the position of this call.
This means the potential crash scenario we have already w/o the patch
and it's a long-standing bug.

Having said that I'd submit a fix for this bug first and then a
rebased version of the cleanup patch set (if fine with you).

> I really think you're taking things too far with the cleanups of this
> driver.  It is a reasonably old driver used by a lot of people, and I
> think avoiding regressions is 1000 times more important than
> "streamlining" control plane functions that have not effect whatsoever
> on real driver performance.
> 
> Thank you.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ