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: <Pine.LNX.4.44L0.1201191548380.1447-100000@iolanthe.rowland.org>
Date:	Thu, 19 Jan 2012 15:52:16 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Ingo Molnar <mingo@...e.hu>
cc:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
	Kay Sievers <kay.sievers@...y.org>,
	"Luck, Tony" <tony.luck@...el.com>, Greg KH <gregkh@...e.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Sergei Trofimovich <slyich@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux PM mailing list <linux-pm@...r.kernel.org>,
	Borislav Petkov <bp@...64.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"prasad@...ux.vnet.ibm.com" <prasad@...ux.vnet.ibm.com>,
	Ming Lei <tom.leiming@...il.com>,
	Djalal Harouni <tixxdz@...ndz.org>,
	Borislav Petkov <borislav.petkov@....com>,
	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>,
	Andi Kleen <ak@...ux.intel.com>,
	"gouders@...bocholt.fh-gelsenkirchen.de" 
	<gouders@...bocholt.fh-gelsenkirchen.de>,
	Marcos Souza <marcos.mage@...il.com>,
	"justinmattock@...il.com" <justinmattock@...il.com>,
	Jeff Chua <jeff.chua.linux@...il.com>
Subject: Re: [PATCH] mce: fix warning messages about static struct mce_device

On Thu, 19 Jan 2012, Ingo Molnar wrote:

> 
> * Alan Stern <stern@...land.harvard.edu> wrote:
> 
> > Or to put it another way, even though no code takes references 
> > to these device structures (can you really guarantee that even 
> > now?), [...]
> 
> That's a good question. Do these devices get exposed to 
> user-space access via sysfs somehow, where such an extra 
> reference could materialize?

_Every_ struct device that gets registered is exposed to userspace via
sysfs.  Of course, that doesn't mean the exposure can create extra
references.

> > [...] how do you prevent references being taken in future 
> > versions of the kernel?  Calling memset while there still are 
> > outstanding references very definitely _is_ a bug.
> 
> Unless there's a reference i missed the 'refcounting' here is 
> very simple and does not exist at all.
> 
> IMHO you should not impose complexity and abstraction on code 
> just because. Now i don't care much about the extra pointer, but 
> the [NR_CPUS] array was doubly ugly (and Greg promised to fix 
> that, so no problems from me).
> 
> So the conclusion is that the reasons stated here don't really 
> apply. The one i mentioned *does* apply: the original bug was 
> due to sloppy life time rules of this driver buffer, and that 
> came back to bite us. Making it dynamic solves that kind of 
> problem. In that sense the warning is fine too.

Then it looks like we are in agreement.  :-)

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ