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
> [email protected]
> http://list.linux-vserver.org/mailman/listinfo/vserver

_______________________________________________
Vserver mailing list
[email protected]
http://list.linux-vserver.org/mailman/listinfo/vserver

Reply via email to