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: <200802011250.18699.rjw@sisk.pl>
Date:	Fri, 1 Feb 2008 12:50:17 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [Regression] 2.6.24-git9: RT sched mishandles artswrapper (bisected)

On Friday, 1 of February 2008, Peter Zijlstra wrote:
> 
> On Fri, 2008-02-01 at 08:44 +0100, Peter Zijlstra wrote:
> > On Fri, 2008-02-01 at 03:04 +0100, Rafael J. Wysocki wrote:
> > > On Friday, 1 of February 2008, Rafael J. Wysocki wrote:
> > > > Hi,
> > > > 
> > > > This is related to the problem I reported earlier this week:
> > > > http://lkml.org/lkml/2008/1/30/554
> > > > 
> > > > Apparently artswrapper, run by KDE in openSUSE 10.3 with a real time priority,
> > > > is mishandled by the scheduler.  The problem is that after the user logs out,
> > > > artswrapper stays in TASK_RUNNING forever and prevents other tasks from being
> > > > scheduled on the CPU occupied by it.  In this state it also breaks suspend and
> > > > hibernation (it cannot be frozen).
> > > > 
> > > > Since the problem is 100% reproducible on my test boxes, I carried out a
> > > > bisection which turned out the following commit:
> > > > 
> > > > commit 6f505b16425a51270058e4a93441fe64de3dd435
> > > > Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > > > Date:   Fri Jan 25 21:08:30 2008 +0100
> > > > 
> > > >     sched: rt group scheduling
> > > > 
> > > > I'm now checking if the problem disappears after reverting this patch (along a
> > > > couple of dependent ones).
> > > 
> > > Yes, it does.
> > > 
> > > Please let me know what I can do to debug it further.
> > 
> > It arts run as root, or does it use RLIMIT_RTPRIO to allow users to
> > execute realtime tasks?

artswrapper is setuid root and RLIMIT_RTPRIO is apparently not used.
Still, artswrapper is running as a regular user, so it most probably drops
privileges early.

BTW, it fails while running the artsmessage utility used for displaying arts
error messages, so I guess there's an error in arts that this thing tries to
display and deadlocks (or something like that).

Should I test the patch nevertheless?

> If the latter, does this help:
> 
> diff --git a/kernel/sched.c b/kernel/sched.c
> index ba4c880..bb76cbc 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -4563,6 +4563,15 @@ recheck:
>  			return -EPERM;
>  	}
>  
> +#ifdef CONFIG_FAIR_GROUP_SCHED
> +	/*
> +	 * Do not allow realtime tasks into groups that have no runtime
> +	 * assigned.
> +	 */
> +	if (rt_policy(policy) && task_group(p)->rt_ratio == 0)
> +		return -EPERM;
> +#endif
> +
>  	retval = security_task_setscheduler(p, policy, param);
>  	if (retval)
>  		return retval;
> 
--
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