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: <alpine.LFD.1.10.0807131204280.2959@woody.linux-foundation.org>
Date:	Sun, 13 Jul 2008 12:08:40 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Andi Kleen <andi@...stfloor.org>
cc:	Ingo Molnar <mingo@...e.hu>, Roland McGrath <roland@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Elias Oltmanns <eo@...ensachen.de>,
	Török Edwin <edwintorok@...il.com>,
	Arjan van de Ven <arjan@...radead.org>
Subject: Re: [PATCH] x86_64: fix delayed signals



On Sun, 13 Jul 2008, Andi Kleen wrote:
> 
> While the bit about color ls (which I use here) catching signals was
> also interesting I wouldn't expect the color ls to take longer to
> process Ctrl-C even if it hits user space because it shouldn't
> do anything block here (unless the terminal is in flow control,
> but is unlikely)

I didn't take a look at the source, but I literally think that the 'ls' 
SIGINT handler is something like

	static void sigint(int signr)
	{
		exit_with_sigint = 1;
	}

and then in the output routine it does a

	if (exit_with_sigint) {
		signal(SIGINT, SIG_DFL);
		kill(-1, SIGINT);
	}

at the end because that's the only thing that explains that it always 
exits after printing the _first_ line of output (ignoring the header - it 
obviously doesn't have that "if (exit_with_sigint)" test in that 
code-path).

Sad. Horrible crap. It means that it totally disables the kernels ability 
to make fatal signals break out of disk wait etc. It's also totally 
_unnecessary_, because 'ls' shouldn't even bother to block signals until 
just before it starts doing the printout.

Oh well. You can't expect too much of user level programmers.

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