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: <4CE5657D.8060105@freescale.com>
Date:	Thu, 18 Nov 2010 11:42:21 -0600
From:	Timur Tabi <timur@...escale.com>
To:	Scott Wood <scottwood@...escale.com>
CC:	Greg KH <gregkh@...e.de>, Arnd Bergmann <arnd@...db.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Stuart Yoder <stuart.yoder@...escale.com>
Subject: Re: How do I choose an arbitrary minor number for my tty device?

Scott Wood wrote:

> The tty driver doesn't register the bus, but rather a driver for
> some type of device on that bus.  The code to create the bus goes
> elsewhere, and would not be specific to byte channels.

Which code to create the bus?  Are you saying that the driver should call
bus_register()?

>> Also, this is an Open Firmware driver.  I already have a mechanism whereby I get
>> probed for each instance of a byte channel.  Isn't that my "bus"?
> 
> It would be if you actually had it -- but it looks like you just loop
> over the nodes.

Well, ok, but I can change that.  If I drop the normal character driver
registration and register the byte channels only as tty devices, then I can make
it probe-able.  The reason I don't do it now is because, for a normal character
device, I need to call cdev_init() and cdev_add() after all devices have been
registered, which can't be done in an OF driver since I don't get told when
there are no more probes.

> We should add a proper bus for the "handles" node.  Then sysfs should
> show the link between the tty device and a device tree node -- which is
> really what we're after, the handle is just a means to that end.

How exactly do I do that?

> And getting rid of the redundant chardev driver would be a
> simplification...

I agree there, but so far people have been telling me, "just do this!" without
actually telling me how to do "this".


-- 
Timur Tabi
Linux kernel developer at Freescale

--
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