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: <20111029144315.GB7036@redhat.com>
Date:	Sat, 29 Oct 2011 16:43:15 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Mandeep Singh Baines <msb@...omium.org>,
	linux-kernel@...r.kernel.org,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Neil Horman <nhorman@...driver.com>,
	Earl Chew <earl_chew@...lent.com>,
	Andi Kleen <andi@...stfloor.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] exec: log when wait_for_dump_helpers aborts due to a
	signal

On 10/28, Andrew Morton wrote:
>
> Well.  Neil's changelog for 61be228a06dc6e8662 is quite nice and tells
> us everything we could possibly want to know, except for why it tests
> sgnal_pending() :(

In short, signal_pending() should not be here. It only reflects the
fact that do_coredump() needs the fixes (and can't resist, I sent the
patch several years ago, but it was ignored ;)

There are 2 reasons. if signal_pending() == T then:

	- pipe_wait() is pointless, it won't block. We do not want
	  a busywait loop.

	- And probably even wait_for_dump_helpers() is pointless,
	  it is quite possible that pipe_write() already failed
	  before and the reader doesn't know this.

What I think we should do:

	- Fix this code, it should not react to signals.

	- But! at the same time the explicit SIGKILL should stop
	  the coredump. It can take a lot of time/resources.

	  This also makes it oom-killable, and this is important.

	- If we dump to the pipe, then perhaps it makes sense to
	  send a signal to the pipe reader in the latter case, but
	  this is a bit offtopic.

I'll try to redo my old patches for 3.2 once I have the time. There
are some nasty problems which I forgot, _iirc_ this is not that
trivial.

Oleg.

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