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:	Wed, 9 Nov 2011 21:59:01 +0000
From:	Alan Cox <alan@...ux.intel.com>
To:	Jiri Slaby <jslaby@...e.cz>
Cc:	gregkh@...e.de, linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org, jirislaby@...il.com
Subject: Re: [PATCH 01/10] TTY: serial, cleanup include file

> ...instead of taking and dropping a reference in both uart_insert_char
> and uart_push_chars there. But it may be as well an overkill, as this
> stuff is not time critical. So any opinions? (If not I will proceed
> without ticketing having tty_port_tty_get/put in every call. Like I
> have it now.)

The cure for this is different (and a spot more invasive)

We need to move the tty_buffer objects into the tty_port. At that point
the lifetime becomes

	create device (and tty_port struct)
	request_irq

	lifetime of physical port (ttys come and go)

	free_irq
	free tty_port
	done

and the locking goes away. On the flush_to_ldisc side we know the port
physically exists because the work queue for the ldisc is killed and we
wait for it when we kill off the port (we may need a spot more checking
there)

This needs every tty of all kinds to have a tty_port even if isn't used
for anything else. That also cleans a ton of stuff up because then we
can always put the tty_port in tty->private_data which means we can
clean up some of the glue further.

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