I much prefer the model of saying that the bits that make sense for
the syscall type (all 64 for 64-bit SYSCALL and the low 32 for
everything else) are all valid. This way there are no weird reserved
bits, no weird ptrace() interactions, etc. I'm a tiny bit concerned
that this would result in a backwards compatibility issue, but not
very. This would involve changing syscall_get_nr(), but that doesn't
seem so bad. The biggest problem is that seccomp hardcoded syscall
nrs to 32 bit.
An alternative would be to declare that we always truncate to 32 bits,
except that 64-bit SYSCALL with high bits set is an error and results
in ENOSYS. The ptrace interaction there is potentially nasty.
Basically, all choices here kind of suck, and I haven't done a real
analysis of all the issues...