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: <20170104181717.GT18193@arm.com>
Date:   Wed, 4 Jan 2017 18:17:18 +0000
From:   Will Deacon <will.deacon@....com>
To:     Mark Rutland <mark.rutland@....com>
Cc:     Russell King - ARM Linux <linux@...linux.org.uk>,
        Alexander Stein <alexander.stein@...tec-electronic.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 2/2] arm: perf: Mark as non-removable

On Wed, Jan 04, 2017 at 11:46:13AM +0000, Mark Rutland wrote:
> On Wed, Jan 04, 2017 at 11:40:56AM +0000, Russell King - ARM Linux wrote:
> > On Wed, Jan 04, 2017 at 11:30:25AM +0000, Mark Rutland wrote:
> > > On Wed, Jan 04, 2017 at 10:19:46AM +0100, Alexander Stein wrote:
> > > > I'm not sure if the change above works with remove functions set in struct 
> > > > bus_type too.
> > > > But on the other hand this would hide errors in drivers which are actually 
> > > > removable but do not cleanup properly which DEBUG_TEST_DRIVER_REMOVE tries to 
> > > > detect.
> > > > By setting .suppress_bind_attrs = true explicitely you state "This 
> > > > driver cannot be removed!", so the remove callback is not missing by accident.
> > > 
> > > I'm not sure I follow. If the remove callback is accidentally missing,
> > > the driver is not "actually removable" today -- there's either no remove
> > > code, or it's not been wired up (the latter of which will likely result
> > > in a compiler warning about an unused function).
> > > 
> > > Aborting the remove early in those cases is much safer than forcefully
> > > removing a driver without a remove callback.
> > 
> > Drivers without a remove function may be removable - there's more layers
> > than just the driver - there's the bus layer as well, which may or may
> > not direct to a private-bus pointer.
> 
> Sure; which is why I initially suggested doing something at the bus
> layer. That way, each layer could do any necessary check, and/or
> delegate to a callback for the layer below.
> 
> > There's no real way for the core driver model code to know whether the
> > lack of the ->remove in the struct device_driver is something that
> > prevents a driver being removed, or whether it's handled via some other
> > method.  Eg, platform drivers.
> 
> While true today, my suggestion is to add the infrastrucutre such that
> it can. That seems nicer to me than each driver having to retain
> (redundant) state.
> 
> Regardless, this patch itself is fine.

Well, it's also largely incomplete as you point out, so I don't think
we gain an awful lot from merging it as-is.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ