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:	Tue, 10 Dec 2013 06:00:57 -0500
From:	Peter Hurley <peter@...leysoftware.com>
To:	Karl Dahlke <eklhad@...cast.net>, mpatocka@...hat.com
CC:	gregkh@...uxfoundation.org, jslaby@...e.cz,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3.12] Broken terminal due to echo bufferring

On 12/10/2013 05:48 AM, Karl Dahlke wrote:
> | An involved discussion about race conditions and asynchronous events,
> | which is beyond me.
> | Please continue; I'm sure you will figure it out,
> | and perhaps educate me along the way.
> | But this thread began with the following program that revealed,
> | I believe, the same echo crlf bug that I pointed out.
>
>> #include <stdio.h>
>> #include <unistd.h>
>>
>> int main(void)
>> {
>> int c;
>> while ((c = getchar()) != EOF) {
>> if (c == '\n') write(1, "prompt>", 7);
>> }
>> return 0;
>> }
>
> Peter sent me a patch which fixed my bug, in its console switch form.
> And also seemed to fix the bug whenever I was in a cooked mode program.
> So I was happy.
> For grins I compiled this program, to see if it also
> ran properly.
> It does, while it is running.
> Prompt and newline come out in sequence, in order,
> and everything looks right.
> Hit control d, for EOF, as the program expects, and all is well.
> But hit ^c for interrupt, and as Tilly says,
> "All hell done broke loose now."
> The tty spills out a bunch of accumulated text that it has displayed in the past.
> Don't know where it comes from, or why.
> I ran the program several times, interrupt,
> and the same thing happened each time, even the same stored output,
> as though it were a 4k block that was retained from somewhere.
> Try it and see (with Peter's latest patches).

Hi Karl,

That's happening because you're also running the 'tty: Fix ^C echo' patch
series which pre-dates this fix and is _not_ compatible with it.

I've already asked Greg to drop that series for other reasons (which he
had planned on anyway).

Regards,
Peter Hurley

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