Re: [Vserver] SYS_NICE bcap not working?

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Thu 22 Feb 2007 - 06:01:02 GMT
Message-ID: <20070222060102.GB18028@MAIL.13thfloor.at>

On Wed, Feb 21, 2007 at 04:04:41PM -0800, SADANAND Hegde (shegde) wrote:
> Hi,
>
> I am running Redhat Linux (2.6.14.3 Kernel) with
> util-vserver-0.30.210.

quite an old kernel, so an update to 2.6.19
would probably be advised ...

> After starting 2 Guest OS, from one Guest OS, I
> am able to lower the priority of a process running
> in the 2nd Guest OS using 'renice' command.

> This should not be possible, right?

hmm, why not? lowering the priority is nothing
which would hurt anybody but yourself, raising
the priority above the default OTOH is

> As I understand, raising priority and setting
> priority is controlled by the bcap SYS_NICE,
> and by default this should be off.

> But apparently this is not the case. I also
> tried adding ~SYS_NICE to bcap list in
> /etc/<guest-os-name>/bcapabilities file.
> But it does not make any difference.

# chcontext --xid 42 --secure -- sleep 100 &
# cat /proc/virtual/42/status
  UseCnt: 3
  Tasks: 1
  Flags: 0000000602000000
  BCaps: 00000000344c05ff
                        ~~~~~~~~
  CCaps: 0000000000000101
  Spaces: 0c000000

http://linux-vserver.org/Capabilities_and_Flags

  23 0x00800000 SYS_NICE

as you can see, SYS_NICE is not set, but similar
to normal Linux, lowering the priority (raising
the nice value) is permitted without SYS_NICE

> Should I do anything else to not allow raising
> priority ? or is this a bug in vserver?

so now it is raising priority? if that is indeed
the case (check the flags) please let me know

# renice -10 $$
renice: 2035: setpriority: Permission denied

> Any help in this regard is very much appreciated.

HTH,
Herbert

> Thanks,
> --Sadanand Hegde--

> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Thu Feb 22 06:18:10 2007

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 22 Feb 2007 - 06:18:17 GMT by hypermail 2.1.8