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]
Date:	Thu, 19 Oct 2006 11:02:39 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	"Kilau, Scott" <Scott_Kilau@...i.com>
CC:	Greg KH <greg@...ah.com>, Greg.Chandler@...lsfargo.com,
	linux-kernel@...r.kernel.org, Alan Cox <alan@...rguk.ukuu.org.uk>,
	Andrew Morton <akpm@...l.org>
Subject: Re: kernel oops with extended serial stuff turned on...

Cc: Alan Cox (who may be involved)
Cc: Andrew Morton (who forwarded me this message, thanks)

Kilau, Scott wrote:
> Hi Greg,
>  
>> What other driver is using the ttyM0 name?

drivers/char/mxser.c:   mxvar_sdriver->name = "ttyM";
drivers/char/isicom.c:  isicom_normal->name = "ttyM";

drivers/char/amiserial.c:       serial_driver->name = "ttyS";
drivers/char/serial167.c:    cy_serial_driver->name = "ttyS";
drivers/char/vme_scc.c: scc_driver->name = "ttyS";

drivers/char/istallion.c:static char    *stli_serialname = "ttyE";
drivers/char/stallion.c:        stl_serial->name = "ttyE";

drivers/char/vt.c:      console_driver->name = "tty";
drivers/char/viocons.c: viotty_driver->name = "tty";

Should we do something with these?

>> Any pointer to your driver's code so I can see if you are doing
>> something odd here?  Any reason it's just not in the main kernel tree so
>> I would have fixed it up at the time I did the other fixes?
> 
> Sorry,
> I probably shouldn't have brought my driver up,
> its just confusing things. =)
>  
> Greg C is not running any of my out-of-tree drivers,
> or even using one of our (Digi) boards.
>  
> I just saw his warning/error, and noticed it was the same as what I saw
> back when 2.6.18 was released, so I figured I would hop in and
> explain what I did to fix the problem in my driver...
>  
> (BTW, the error turns up a few times in a google of...
> "don't try to register things with the same name in the same directory."
> I wonder if all the "tty" ones are all related...)
>  
> In Greg C's case, he turned on *all* the serial options in "make config",
> because he wasn't sure which serial card he had...
>  
> Turns out that the driver/char/isicom.c driver claimed his board, and then
> tried to register the ttyM0 name, which apparently someone else
> in the kernel did already...
>  
> You have a good point tho, we probably should actually look at /dev/ttyM0
> on his system, and see who is actually claiming it already...

 From the other mail:
 > You need to change this line:
 >
 > isicom_normal->flags                    = TTY_DRIVER_REAL_RAW;
 >
 > To:
 >
 > isicom_normal->flags                    = TTY_DRIVER_REAL_RAW |
 > TTY_DRIVER_DYNAMIC_DEV;
 >
 > In the "drivers/char/isicom.c" file.

This is not a good idea, because the driver doesn't call tty_register_device at 
all. It fixes it, because it doesn't "reserve" the names and you can silently 
register the other driver, that might use it. This is wrong.

We have a few options:
- rewrite them to use TTY_DRIVER_DYNAMIC_DEV (I'm going to do this in isicom anyway)
- rename tty->names (will this something break? udev should cope with this, 
doesn't it?)
- any other solution?

regards,
-- 
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E
-
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