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] [day] [month] [year] [list]
Message-ID: <48A45B0B.3000708@skyrush.com>
Date:	Thu, 14 Aug 2008 10:19:23 -0600
From:	Joe Peterson <joe@...rush.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	linux-kernel@...r.kernel.org
Subject: [PATCH] Re: tty: ctrl-c not always echoed, especially under load

Attached is a patch that addresses the issue of lost character echos
during program output and in a stopped tty.  The patch adds an "echo
buffer" to N_TTY that handles all ldisc-generated output (including
echoed characters).  The main thing this solves is the loss of
characters when they cannot be immediately written to the tty driver.
Highlights are:

* ^C (and other chars) are no longer lost when write buffer is full
  - (often happens with continuous program output)
* Character echoes are not lost when tty is in stopped state (e.g. ^S)
  - (e.g.: ^Q will cause held characters to be output)
* When echoing control char pairs (e.g. "^C"),
  ensure pair stays together

The echo buffer stores characters as well as operations that need to be
done in sync with character output (like management of the column
position).  This allows it to play well with the interleaved program output.

I am currently testing the patch on a couple of systems, but it looks
good so far.  Note that this patch currently applies cleanly to 2.6.26
and with offsets to 2.6.27 (but I have not tested yet on the latter -
should work, though).

						-Joe

View attachment "tty_buffer_echo_chars.patch" of type "text/x-patch" (25802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ