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-next>] [day] [month] [year] [list]
Message-ID: <20121206124201.GA30705@redhat.com>
Date:	Thu, 6 Dec 2012 13:42:01 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Ben Hutchings <ben@...adent.org.uk>
Cc:	Joseph Salisbury <joseph.salisbury@...onical.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Herton Krzesinski <herton.krzesinski@...onical.com>,
	linux-kernel@...r.kernel.org
Subject: Re: freezer: exec should clear PF_NOFREEZE along with PF_KTHREAD

Hi,

(add lkml)

On 12/06, Ben Hutchings wrote:
>
> On Wed, 2012-12-05 at 14:13 -0500, Joseph Salisbury wrote:
>
> > Hi Oleg,
> >
> > A bug was opened against the Ubuntu kernel[0].  It was found that
> > reverting commit b40a79591ca918e7b91b0d9b6abd5d00f2e88c19 resolved this
> > bug, and allowed suspend/resume to work properly.
> >
> > I see that you are the author of this patch, so I wanted to run it by
> > you.  I was thinking of requesting a revert for 3.2 stable, but I wanted
> > to get your feedback first.
> >
> > Thanks,
> >
> > Joe
> >
> >
> > [0] https://bugs.launchpad.net/ubuntu/+source/v86d/+bug/1080530
>
> If I understand this rightly:
> 1. Suspend is aborted because the v86d usermodehelper cannot be frozen.
> 2. Before this fix, usermodehelpers could inherit PF_NOFREEZE (what
> could possibly go wrong with that?!), which is why this didn't
> previously happen.

Yes, try_to_freeze_tasks() ignores PF_NOFREEZE tasks

> 3. However, usermodehelpers are supposed to be disabled while the
> freezer is running.  Why is this one still running?

__usermodehelper_disable() doesn't try to kill/stop/whatever the already
spawned tasks...

The question is, why v86d refuses to freeze? It sleeps in TASK_INTERRUPTIBLE.


Oh... I seem to understand. This is 3.2 kernel, it also has PF_FREEZER_NOSIG.
which should be cleared along with PF_NOFREEZE.

This flag was removed upstream, but the older kernel need the fix. Could
you test the patch below?

Oleg.

--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1084,7 +1084,7 @@ int flush_old_exec(struct linux_binprm *
 
 	set_fs(USER_DS);
 	current->flags &=
-		~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE);
+		~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE | PF_FREEZER_NOSIG);
 	flush_thread();
 	current->personality &= ~bprm->per_clear;
 

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