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: <20101129214439.GA9830@kroah.com>
Date:	Mon, 29 Nov 2010 13:44:39 -0800
From:	Greg KH <greg@...ah.com>
To:	Michael Ellerman <michael@...erman.id.au>
Cc:	Greg KH <gregkh@...e.de>, Scott Wood <scottwood@...escale.com>,
	Timur Tabi <timur@...escale.com>,
	Arnd Bergmann <arnd@...db.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Stuart Yoder <stuart.yoder@...escale.com>,
	devicetree-discuss@...r.kernel.org
Subject: Re: How do I choose an arbitrary minor number for my tty device?

On Thu, Nov 25, 2010 at 09:44:07AM +1100, Michael Ellerman wrote:
> On Wed, 2010-11-24 at 10:23 -0800, Greg KH wrote:
> > On Wed, Nov 24, 2010 at 12:08:18PM -0600, Scott Wood wrote:
> > > On Wed, 24 Nov 2010 21:23:47 +1100
> > > Michael Ellerman <michael@...erman.id.au> wrote:
> > > 
> > > > On Thu, 2010-11-18 at 12:13 -0600, Scott Wood wrote:
> > > > > Unfortunately, it's not an exact match, and the fact that reg doesn't
> > > > > translate to a physical address means that AFAICT you'll currently get
> > > > > something like "byte-channel.nnn", where "nnn" is an arbitrary
> > > > > kernel-assigned number.
> > > > 
> > > > Can you not use device_rename() ?
> > > 
> > > Ah, didn't know about that.  Still, might be nice to add support for
> > > "handle" nodes at the infrastructure level rather than in each driver.
> > 
> > No, please never use that function, bad things will happen.
> 
> Why? The network & wireless code uses it, so presumably it can work?

Yes it can, but networking is the only code that should use this.

> If
> not please consider:
> 
> commit f470f680dfaad8731f079a033a50440082e20930
> Author: Michael Ellerman <michael@...erman.id.au>
> Date:   Thu Nov 25 09:41:28 2010 +1100
> 
>     driver core: Document that device_rename() is not to be used
>     
>     Signed-off-by: Michael Ellerman <michael@...erman.id.au>
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 6ed6454..f1fac19 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -1513,6 +1513,8 @@ EXPORT_SYMBOL_GPL(device_destroy);
>   * exclusion between two different calls of device_rename
>   * on the same device to ensure that new_name is valid and
>   * won't conflict with other devices.
> + *
> + * "Never use this function, bad things will happen" - gregkh

Nice, I like it :)

I'll go queue this up.

greg k-h
--
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