Re: [PATCH 2/3] pidhash: don't use zero pids

From: Eric W. Biederman
Date: Mon Jan 30 2006 - 15:35:33 EST


Oleg Nesterov <oleg@xxxxxxxxxx> writes:

> daemonize() calls set_special_pids(1,1), while init and
> kernel threads spawned from init/main.c:init() run with
> 0,0 special pids. This patch changes INIT_SIGNALS() so
> that that they run with ->pgrp == ->session == 1 also.
>
> This patch relies on fact that swapper's pid == 1.
>
> Now we never use pid == 0 in kernel/pid.c.

This changes what is visible to user space, for the case
where we are not a member of a session of a process group.

By hashing the values these non-groups become available to
user space. Which I find disturbing. Before I can comment
further I need to see if there are any well defined semantics
for processes that are not part of a session or a process
group. If there are well defined semantics we have just
broken user space.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/