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: <CAMuHMdXtz_W7LCJeOG9--ZmmH4js40-urueCTbS98t8oBgnYCw@mail.gmail.com>
Date:	Wed, 9 Apr 2014 22:59:27 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Dave Hansen <dave@...1.net>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Dave Hansen <dave.hansen@...el.com>,
	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	Geert Uytterhoeven <geert+renesas@...ux-m68k.org>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-serial@...r.kernel.org, Jiri Slaby <jslaby@...e.cz>
Subject: Re: post 3.14 serial regression

Hi Dave,

On Wed, Apr 9, 2014 at 10:04 PM, Dave Hansen <dave@...1.net> wrote:
> On 04/09/2014 12:41 PM, Geert Uytterhoeven wrote:
>> Dave: If I understand it correctly, you use console=ttyS2, while the kernel
>> suddenly changed the order of the serial devices, so your port is no
>> longer ttyS2, but ttyS4. Hence the serial port is not found, and
>> uart_remove_one_port() is called on it, taking away your /dev/console for
>> userspace?
>
> Right.

Does it work with console=ttyS4?

>>>>From the backtrace, it's the call below to uart_remove_one_port()
>> that removes the port?
>>
>> /**
>>  *      serial8250_register_8250_port - register a serial port
>>  *      @up: serial port template
>>  *
>>  *      Configure the serial port specified by the request. If the
>>  *      port exists and is in use, it is hung up and unregistered
>>  *      first.
>>  *
>>  *      The port is then probed and if necessary the IRQ is autodetected
>>  *      If this fails an error is returned.
>>  *
>>  *      On success the port is ready to use and the line number is returned.
>>  */
>> int serial8250_register_8250_port(struct uart_8250_port *up)
>> {
>>         ...
>>
>>         if (uart && uart->port.type != PORT_8250_CIR) {
>>                 if (uart->port.dev)
>>                         uart_remove_one_port(&serial8250_reg, &uart->port);
>>
>> where was it added before?
>
> Remember, serial8250_find_match_or_unused() will also reuse *EXISTING*
> uart_ports if the port is of 'unknown' type.
>
> I believe that port got added during the addition of the
> serial8250_isa_devs, and now we're trying to reuse it since it is an
> unknown port type.

So it gets added, removed, and added again.

I also noticed that unbinding and rebinding the driver doesn't re-attach it
as a serial console.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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