the arm compiler can lift long->vlong casts on multiplcation
and convert 64x64->64 multiplication into a 32x32->64 one
with optional 64 bit accumulate.
introduce rolor() function to subsitute (a << c) | (a >> (bits(a) - c))
with (a <<< c) where <<< is cyclic rotation and c is constant.
this almost doubles the speed of chacha encryption of 386 and amd64.
the peephole optimizer used to stop when it hit a shift or rol
instruction when attempting to eleminate moves by register
substitution. but we do not have to as long as the shift count
operand is not CX (which cannot be substituted) and CX is not
a subject for substitution.
neither symdel nor symstat were used anywhere. syminit was used but
had no effect. both syminit and symdel dereference pointers after
freeing them. symstat can be tricked into writing beyond the bounds of
its array
syminit() attemts to reset the symbol table by freeing
all the hash table entries, tho the code is buggy having
a obviously use after free bug.
as syminit() is only called once in main when it does not
contain any symbols, the bug never occured.
removing the unneccesary code alltogether.
add glob information to the word structure so we wont accidently
deglob quoted strings containing the GLOB. we store Globsize(word)
in in word->glob which avoids recalculating that values and the
check if a word should be globbed quick.
globlist() now substitutes the word inplace avoiding the copying
when all words are literals and avoids recursion.
minor cleanups: use list2str() in execeval(), move octal() to
unix.c, remove the (char*) casts to efree().
when using rio auto-complete to resolve file names for the "attach:" and
"include:" headers, the auto-completer might leave whitespaces at
the end of the line which leads upas/marshal to not find the file.
it is now possible to configure additional interfaces (like wifi)
and store the network information while preserving old entries
in /net/ndb. this allows to easily switch from ethernet to wifi
and have dhcp configure dns without having to clear /net/ndb.
netmkaddr() can return a the pointer to the host string if
it is already a full dial string. but we assumed to get
a copy and freed it before returning.
when _syserrno() fails to map a plan9 error string to
a unix error number, we copy the plan9 error string
to the per process error buffer "plan9err" and set
errno = EPLAN9.
when strerror() is called with EPLAN9, it returns
a pointer to the plan9err buffer.
I introduced a regression in sed that currently has screwed up
/sys/lib/man/secindex.
The issue is that sed 's/$/ foo/g' will actually replace the newline
character with foo instead of just appending at the end of the line.
This only makes a difference when sed is operating on a multiple line
record. The effect is a record like:
foo
bar
baz
becomes:
foo foobar foo baz foo
instead of
foo foo
bar foo
baz foo
problem is NaN() produces a SNaN, not a QNaN... and on the 387,
storing 80 bit SNaN in register to a 64-bit memory destination
traps.
SNaN/QNaN encoding is machine specific. mips has the qiet/signaling
bit inverted.
disabling fp exception in main() now, but that sucks.
i think the best solution would be to not even call strtod() in
is_number() but just write a regex or a little state machine that
will only accept numbers without nan and ±inf.
that might even make it faster and is more robust than relying on
the os's strtod() details.
if the input string contains invalid utf-8, runetochar() produces
unicode replacement characters that can overflow the literal buffer.
as the overflow check is done after runetochar(), add UTFmax bytes
of slack space avoiding the issue.
silly clients (web*) reconnect when the handshake failed with a lower
protocol version, which allows downgrade attacks (POODLE). but instead
of stopping this madness, they invented a new magic TLSID to indicate
to the server that this connection attempt is a retry, and rely on the
server to notice and stop them from sabotaging themselfs.
implement ECDHE key exchange with secp256r1 on the server side, providing
perfect forward secrecy (tho slowly).
it is easier to just keep the ECDH/DH state in the TlsSec structure,
which fits better with the grouping of the functions. we do the cleanup
in tlsConnectionFree() now, so a lot of error handling logic could go
away.
reinvestigated some error paths and removed the ones that cannot error.
move functions to fit the logical grouping.
combine the code for signing handshake hashes (for client certs) and
DH parameters. provide digestDHparams() function to be shared between
server and client code.