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: <cc723f590702260358u7b9da770v42964d534182ee4d@mail.gmail.com>
Date:	Mon, 26 Feb 2007 17:28:16 +0530
From:	"Aneesh Kumar" <aneesh.kumar@...il.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	"Andrew Morton" <akpm@...l.org>, "Oleg Nesterov" <oleg@...sign.ru>,
	"Pavel Machek" <pavel@....cz>,
	"Srivatsa Vaddagiri" <vatsa@...ibm.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	"Gautham R Shenoy" <ego@...ibm.com>
Subject: Re: [RFC][PATCH 3/3] Freezer: Prevent ___call_usermodehelper from missing freezing requests

On 2/26/07, Rafael J. Wysocki <rjw@...k.pl> wrote:
> NOTE: Alternatively, we can just drop flush_signals() from there, but I'm not
> sure that's the right thing to do.
>
> ---
> From: Rafael J. Wysocki <rjw@...k.pl>
>
> Since ____call_usermodehelper() calls flush_signals(current), the task that
> enters it may miss a freezing request.  However, if ____call_usermodehelper()
> clears TIF_FREEZE for the current task after flush_signals(current) returns, the
> freezer will generate one more freezing request for this task.
>
> Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
> ---
>  kernel/kmod.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> Index: linux-2.6.20-mm2/kernel/kmod.c
> ===================================================================
> --- linux-2.6.20-mm2.orig/kernel/kmod.c 2007-02-25 12:07:15.000000000 +0100
> +++ linux-2.6.20-mm2/kernel/kmod.c      2007-02-25 12:49:16.000000000 +0100
> @@ -34,6 +34,7 @@
>  #include <linux/kernel.h>
>  #include <linux/init.h>
>  #include <linux/resource.h>
> +#include <linux/freezer.h>
>  #include <asm/uaccess.h>
>
>  extern int delete_module(const char *name, unsigned int flags);
> @@ -258,6 +259,7 @@ static int ____call_usermodehelper(void
>         new_session = key_get(sub_info->ring);
>         flush_signals(current);
>         spin_lock_irq(&current->sighand->siglock);
> +       do_not_freeze(current);
>         old_session = __install_session_keyring(current, new_session);
>         flush_signal_handlers(current, 1);
>         sigemptyset(&current->blocked);
>


this need a comment . Otherwise one reading will read it as we don't
want it to freeze.

How about
/*
clears TIF_FREEZE for the current task after flush_signals(current)
returns, so that the
freezer will generate one more freezing request for this task.

*/

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