Ian Campbell writes ("[PATCH XEN v6 29/32] tools/libs/call: Use O_CLOEXEC when 
opening /dev/xen/privcmd on Linux"):
> We stick with using FD_CLOEXEC on the legacy /proc/xen/privcmd
> fallback device since it was present in older kernel where O_CLOEXEC
> may not be assured.

This is a lot of effort and may not be needed.  I don't object, but
some of the statements are (I think) rather too fierce:

> +    /*
> +     * This file descriptor is opaque to the caller, thus we must take
> +     * responsibility to ensure it doesn't propagate (ie leak) outside
> +     * the process, by using CLOEXEC.
> +     */

For example, I don't think this is a `must' at all, although not
propagating irrelevant fds is (nowadays) seen as polite.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to