About this list Date view Thread view Subject view Author view Attachment view

From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Tue 02 Dec 2003 - 05:29:43 GMT


On Tue, Dec 02, 2003 at 02:24:15PM +1300, Richard Collins wrote:
> Hi,
>
> I have observed that the syscall sys_new_s_context() does not set
> initpid when a new context is created from context 0 when the desired
> new context number is specified.
>
> Lines 1471-4 in linux-2.4.22/kernel/signal.c are:
>
> if (!found)
> sys_alloc_s_info();
> if (current->s_info)
> current->s_info->flags |= flags;
>
> I would have expected something like:
>
> if (!found) {
> sys_alloc_s_info();
> set_initpid (flags);
> }
> if (current->s_info)
> current->s_info->flags |= flags;
>
>
> Is this by design? I don't think it makes sense to fakeinit when a
> context already exists with the specified id but it does if it is a new
> context. If it is by design shouldn't an error if fakeinit is specified
> but cannot be done, rather that just ignoring the flag; this would have
> saved me half a day's debugging :-) of scripts.

I don't know at which code you are looking, but
it is neither vs1.00 nor vs1.1.x ...

but a closer look at the userspace tools will
show you, that the syscall is done twice, once
to 'create' the new context and a second time
to reduce the capabilities (which calls the
set_initpid()) ...

some of this will be simplified in future
versions, but AFAIK it will work right now.

> What do you guys think?

upgrade to vs1.00 or even better vs1.1.6 and
report the version next time ;) ...

best,
Herbert

> Richard Collins
>
> _______________________________________________
> Vserver mailing list
> Vserver_at_list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 02 Dec 2003 - 05:30:54 GMT by hypermail 2.1.3