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]
Date:	Thu, 27 Jul 2006 13:16:56 +0200
From:	Pavel Machek <pavel@....cz>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Andrew Morton <akpm@...l.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] Make suspend possible with a traced process at a breakpoint

Hi!

> It should be possible to suspend, either to RAM or to disk, if there's a
> traced process that has just reached a breakpoint.  However, this is a special
> case, because its parent process might have been frozen already and then
> we are unable to deliver the "freeze" signal to the traced process.  If this
> happens, it's better to cancel the freezing of the traced process.

Thanks for debugging this.

> @@ -85,6 +97,10 @@ int freeze_processes(void)
>  				continue;
>  			if (frozen(p))
>  				continue;
> +			if (p->state == TASK_TRACED && frozen(p->parent)) {
> +				cancel_freezing(p);
> +				continue;
> +			}

Could we just add line to freezeable, like this?

...no, this is probably racy, because freezeable() should not change
while we are thawing other processes... I was hoping for one-liner...

diff --git a/kernel/power/process.c b/kernel/power/process.c
index b2a5f67..13dceb8 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -26,6 +26,7 @@ static inline int freezeable(struct task
 	    (p->flags & PF_NOFREEZE) ||
 	    (p->exit_state == EXIT_ZOMBIE) ||
 	    (p->exit_state == EXIT_DEAD) ||
+	    ((p->exit_state == TASK_TRACED) && frozen(p->parent)) ||
 	    (p->state == TASK_STOPPED))
 		return 0;
 	return 1;

...okay, so ACK on your patch.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
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