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]
Date:	Wed, 24 Dec 2008 22:32:43 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	Dhaval Giani <dhaval@...ux.vnet.ibm.com>,
	Patrick McHardy <kaber@...sh.net>, Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Bharata B Rao <bharata@...ux.vnet.ibm.com>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
	Balbir Singh <balbir@...ibm.com>
Subject: Re: asterisk hangs with RT priority

On Thu, 2008-12-25 at 07:37 +1100, Herbert Xu wrote:
> On Wed, Dec 24, 2008 at 07:12:25PM +0530, Dhaval Giani wrote:
> > 
> > Hmm. Do you have CONFIG_FAIR_USER_SCHED set on?
> 
> I can't find such a config option, but
> 
> $ grep SCHED .config
> CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
> CONFIG_GROUP_SCHED=y
> CONFIG_FAIR_GROUP_SCHED=y
> CONFIG_RT_GROUP_SCHED=y
> CONFIG_USER_SCHED=y
> # CONFIG_CGROUP_SCHED is not set

> CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
> CONFIG_SCHED_HRTICK=y

So you have uid-group scheduling and RT-group scheduling enabled (a
feature that's experimental for real and has never been enabled by
default), looking at the sys_setuid() code, the real uid change is done
by switch_uid() and that doesn't have a failable scheduler hook.

The thing is, I suspect the uid you switch to doesn't have a RT runtime
quota configured, therefore the RT task that gets placed in it by
switch_uid() doesn't get to run.

[ Please read Documentation/scheduler/sched-rt-group.txt
  when you enable RT group scheduling ]

The correct thing would be for switch_uid() (or set_user) to fail with
-EINVAL, much like cpu_cgroup_can_attach() currently does for cgroup
grouping.

After that it demonstrates a bug in your test program, which fails to
check errors ;-)


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