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]
Message-ID: <20111026165400.GB18076@redhat.com>
Date:	Wed, 26 Oct 2011 18:54:00 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Mandeep Singh Baines <msb@...omium.org>
Cc:	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>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] exec: log when wait_for_dump_helpers aborts due to a
	signal

On 10/25, Mandeep Singh Baines wrote:
>
> To allow coredump pipe readers to look at /proc/<pid> of the crashing
> process, the kernel waits for the reader to exit. However, the wait
> is silently aborted if the crashing process is signalled.

Well, yes... But note that this signal_pending() is only used because
with TIF_SIGPENDING we have the problems anyway.

Oh. I promise myself I'll make do_coredump() killable and cleanup this
all every time I look at this code...

> This patch, logs whenever wait_for_dump_helpers is aborted or in order
> to assist in debugging cases where /proc/<pid> is gone.

I don't really understand why this is useful. The reader process
can complain if it can't collect the data (say, /proc/pid goes away
or EOF doesn't come).



As for the patch itself,

> -	while ((pipe->readers > 1) && (!signal_pending(current))) {
> +	while (pipe->readers > 1) {
> +		if (signal_pending(current)) {
> +			pr_info("wait_for_dump_helpers[%d]: "
> +				"aborted due to signal\n",
> +				task_pid_nr(current));
> +			break;
> +		}
> +
>  		wake_up_interruptible_sync(&pipe->wait);

This can't help in general. If signal_pending() == T, it is quite
possible that pipe_write() already failed before.

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