On Tue, Jul 20, 2010 at 6:13 PM, Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx> wrote: > Albert Cahalan [acahalan@xxxxxxxxx] wrote: > | On Mon, Jul 12, 2010 at 5:54 PM, Sukadev Bhattiprolu > | <sukadev@xxxxxxxxxxxxxxxxxx> wrote: > | > Albert Cahalan [acahalan@xxxxxxxxx] wrote: > | > | I'm suggesting that you not copy the struct as one blob, or at > | > | least not expect to do so for future extensions to eclone. You > | > | can read the flags, use that to determine struct size, and then > | > | read the rest of the struct. Alternately you can pass 32 more flags > | > | as a 5th syscall argument. > | > | > | > | I'm not so sure we need 96 flag bits, but OK. They can all go > | > | in the struct if you like, or they can all go in the arguments. > | > | FWIW, I happen to think that both kernel and user code will > | > | be less ugly if all of the flags fit in 64 bits. C doesn't provide > | > | a 96-bit integer type. > | > > | > We wanted to leave the original 32-bits of clone-flags as the first > | > parameter to avoid confusing the application writers. > | > > | > http://lkml.org/lkml/2009/10/14/13 > | > | IMHO, having multiple flags fields is far more confusing. > > It is confusing but like I said, it was discussed (see > http://lkml.org/lkml/2009/10/14/6) and the conclusion was that silent > data corruption is worse. So, I am leaving the interface as defined in > this version of the patchset. The current interface encourages silent data corruption of a different type. It's far more likely to happen I think; putting flags in the wrong field is what people will do. Either way, this is a trivial problem for freshly-written code. I'd rather the problem affect an obsolete interface, keeping the new interface nice and clean with a single 64-bit value. > Maybe we can define other API to set/clear clone flags like the sigset() > interface when we need more than 32 bit flags. ... > Maybe the sigset() like interface will help. That works, but it sure is a pain to use. BTW, the flags used to give clone extra arguments are no longer needed and are thus available for reuse. This wouldn't be confusing if there were ECLONE_* defines. _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers