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: <efc9599-82db-5343-a377-ed53bdb928c6@linux-m68k.org>
Date:   Tue, 3 Aug 2021 12:14:07 +1000 (AEST)
From:   Finn Thain <fthain@...ux-m68k.org>
To:     Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
        kernel@...gutronix.de
Subject: Re: [PATCH v2 1/4] nubus: Simplify check in remove callback

On Mon, 2 Aug 2021, Uwe Kleine-König wrote:

> > 
> > BTW, aside from nubus, zorro and superhyway you can find the same 
> > pattern in many other busses. You may want to patch the following 
> > methods too.
> > 
> > acpi_device_remove
> > apr_device_remove
> > ccwgroup_remove
> > gio_device_remove
> > hid_device_remove 
> > ibmebus_bus_device_remove
> > macio_device_remove
> > memstick_device_remove
> > ntb_remove
> > pci_device_remove
> > pnp_device_remove
> > ps3_system_bus_remove
> > rio_device_remove
> > slim_device_remove
> > soundbus_device_remove
> > ssb_device_remove
> > tifm_device_remove
> > vdpa_dev_remove
> > vmbus_remove
> 
> Did you find these by hand? Or using a coccinelle match?
> 

I used grep and visual inspection.

> Anyhow, thanks for the list, I'll add it to my todo list but if you're 
> motivated don't consider these cleanups as my property. (Please Cc: me 
> though to prevent duplicated effort.)
> 

I went looking for the other examples of this pattern because I wanted to 
understand it better. Then I realized that I might as well make a list 
since I was searching anyway.

When skimming that code, I took the impression that the dev->driver == 
NULL test probably comes from old code written before the 'remove' 
functions became bus methods. See also commit 594c8281f905 ("[PATCH] Add 
bus_type probe, remove, shutdown methods.")

Back when I wrote drivers/nubus/bus.c, apparently I copied-and-pasted the 
old pattern from drivers/pci/pci-driver.c, even though that pattern was 
already obsolete.

So I do see the value in this cleanup but I'm afraid I'm too busy to help 
further. If you don't want to finish it perhaps you can get the janitors 
to do so.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ