Re: [PATCH] unshare: Cleanup up the sys_unshare interface beforewe are committed.

From: Janak Desai
Date: Thu Mar 16 2006 - 16:34:39 EST


Andrew Morton wrote:

ebiederm@xxxxxxxxxxxx (Eric W. Biederman) wrote:


Since we have not crossed the magic 2.6.16 line can we please
include this patch. My apologies for catching this so late in the
cycle.

- Error if we are passed any flags we don't expect.

This preserves forward compatibility so programs that use new flags that
run on old kernels will fail instead of silently doing the wrong thing.



Makes sense.



- Use separate defines from sys_clone.

sys_unshare can't implement half of the clone flags under any circumstances
and those that it does implement have subtlely different semantics than
the clone flags. Using a different set of flags sets the
expectation that things will be different.



iirc there was some discussion about this and it was explicitly decided to
keep the CLONE flags.

Maybe Janak or Linus can comment?



In the two prior discussions on this, the disagreement was on how much confusion
(if any) the use of CLONE_* flags would generate. I personally did not think that
it was confusing enough to add new flags, with the same values as CLONE_*
flags, in the kernel. Linus's last email (3/1/06) on the subject seemed to lean in that
direction as well. That's why I didn't take any action on it.

-Janak

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