You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far I have tested building nsjail on x86 and armv7 targets. Both fail do to type mismatch between uint64_t and uintptr_t (which is 32bit on 32 bit arches):
Changing the flag type to uint64_t or the knownFlagMask to an unsigned type that will match (unsigned long?).
I am a bit dubious about using uintptr_t in cases like this and in other places in nsjail's code, where unsigned long makes just as much sense. I real question seems to be what is actual size of the clone flags; my understanding is that they are a long, so arch dependent and knownFlagMask should match flags type.
I have tested changing the flag argument to uint64_t in one trial, and changing the knownFlagMask to unsigned long in another. Both cases built and ran fine in QEMU vm's (armv7 and x86). I have not submitted a pr at this point, but doing so is trivial, so I will if it is desired.
The text was updated successfully, but these errors were encountered:
I've changed the subproc code to use uint64_t`` and mnt to use unsigned long```
I guess we try to work around the Linux kernel API here (fro clone). The clone flags as of introduction of clone3 are practically u64, but some interfaces (clone clone2) still expect int.
So far I have tested building nsjail on x86 and armv7 targets. Both fail do to type mismatch between uint64_t and uintptr_t (which is 32bit on 32 bit arches):
nsjail/subproc.cc
Line 115 in 2e62649
nsjail/mnt.cc
Line 107 in 2e62649
Changing the flag type to uint64_t or the knownFlagMask to an unsigned type that will match (unsigned long?).
I am a bit dubious about using uintptr_t in cases like this and in other places in nsjail's code, where unsigned long makes just as much sense. I real question seems to be what is actual size of the clone flags; my understanding is that they are a long, so arch dependent and knownFlagMask should match flags type.
I have tested changing the flag argument to uint64_t in one trial, and changing the knownFlagMask to unsigned long in another. Both cases built and ran fine in QEMU vm's (armv7 and x86). I have not submitted a pr at this point, but doing so is trivial, so I will if it is desired.
The text was updated successfully, but these errors were encountered: