Using a constant-time comparison is required when comparing things like
MACs, password digests, and etc to avoid exposing sensitive data via
trivial timing attacks.
These routines could also live under core:mem, but they are somewhat
specialized, and are likely only useful for cryptographic applications.
FreeBSD's systemcall handler clears out R8, R9, and R10 prior to
`sysretq`, and additionally returns positive errno (with CF) set on
error. This modifies the syscall intrinsic such that LLVM knows
about the additional clobbered registers.
Note that propagating CF back to the caller of the syscall intrinsic
is left for a future PR. As far as I can tell, Darwin does not use
the syscall intrinsic at all, and FreeBSD only uses it for SYS_GETTID,
so this should be "ok" for now.
See: sys/amd64/amd64/exception.S in the FreeBSD src for more details.
The old assembly generated for the syscall intrinsic did not specify
clobber constraints. This adds RCX and R11 (that are clobbered by
the instruction itself), and memory (that is clobbered by some
system calls) to the assembly constraints.
Note: This is still incorrect on FreeBSD, which clobbers more registers
and uses the carry flag instead of -errno in rax to indicate an error.
It looks like this was missing from the winsock bindings. Odin contains
WSASocketW which I assume would also work for obtaining a socket, but
socket() is distinct and is what I was using, so I assume others will
want it too.
getaddrinfo should take a double pointer to ADDRINFOA instead of a single pointer. If you call the binding in its current state you will not get back a valid ADDRINFOA struct.
I have also changed the `node` and `service` params to be cstring to avoid having to do `transmute(u8) value`.
The dependency set need to be generated before we check the testing
procedures. Otherwise `checker->info.testing_procedures` will be empty
and thus no filtering is taking place.