zCore
zCore copied to clipboard
Whether to validate flags/options?
from_bits_truncate()
is used in some syscalls in linux-syscall
and zircon-syscall
, so it is possible that the input flag has an invalid bit set. Should this return Err
? I'm not sure of the behavior of linux and zircon when this situation happens.
This should return Err(LxError::EINVAL)
or Err(ZxError::INVALID_ARGS)
.
And make sure that the bitflags contains all valid bits.
This should return Err(LxError::EINVAL) or Err(ZxError::INVALID_ARGS).
OK, I can fix this.
bitflags contains all valid bits
What do you mean by this? Isn't that already ensured?
I'm not sure. Maybe need to check again...