Commit graph

3988 commits

Author SHA1 Message Date
cinap_lenrek
69b0980a42 libc: native _addv() and _subv() routines for arm 2016-06-26 15:16:23 +02:00
cinap_lenrek
a99cf56c7d kernel: more (arm) compiler friendly mul64fract()
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.
2016-06-26 15:13:10 +02:00
cinap_lenrek
5bf09937da 5c: support for bit ROL, native 64 bit arithmetic 2016-06-26 15:09:27 +02:00
cinap_lenrek
57ff297cc0 cc: add OROL op to side effect free op list 2016-06-26 15:00:40 +02:00
cinap_lenrek
c7565b51b8 merge 2016-06-20 23:11:27 +02:00
cinap_lenrek
94ba3db591 audio/flacdec: exit on decode error, print error message 2016-06-20 23:09:40 +02:00
aiju
e73a9eb9e8 togif: -E flag to read animation from stdin 2016-06-10 12:14:02 +02:00
cinap_lenrek
a00b6bdbfa 8c, 6c: native ROL (cyclic shift) instruction support, improve peephole optimizers
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.
2016-06-09 23:12:46 +02:00
cinap_lenrek
5cdabc5eb1 ?c: track ../cc/cc.h dependency and rebuild cc.a$O as neccesary 2016-06-09 23:03:30 +02:00
cinap_lenrek
bc2a5d9b1e aml: define amlintmask and set it according to DSDT revision (64bit / 32bit) 2016-06-05 14:57:38 +02:00
cinap_lenrek
3ccc8224be aml: implement ToInteger() and Match() instructions 2016-06-04 21:11:17 +02:00
cinap_lenrek
a4a1a88a70 webfs: less aggressive url normalization; never unescape reserved characters in path/query/fragment 2016-06-04 19:10:07 +02:00
stanley lieber
7c5ca77a6e etheriwl: add pcid 0x0082 for Intel Centrino Advanced-N 6205 variant 2016-06-01 21:45:46 -04:00
cinap_lenrek
de19776b2f mk: remove buggy and useless symtab functions (thanks qrstuv)
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
2016-06-02 00:12:36 +02:00
cinap_lenrek
b878450725 mk: remove buggy and unneeded syminit() function (thanks qurstuv)
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.
2016-06-01 18:31:21 +02:00
cinap_lenrek
68571320fa libmemdraw: remove unused static variable from memimagedraw() 2016-05-29 18:23:42 +02:00
cinap_lenrek
e8eed628ae awk: restore old buffering behaviour for printf 2016-05-27 18:56:31 +02:00
cinap_lenrek
7a28f9bd8c vgaigfx: check gtt to determine graphics memory size, add hw cursor support for g35 (thanks kenji) 2016-05-26 21:28:29 +02:00
cinap_lenrek
fa82522b69 etheriwl: add pci id for PRO/Wireless 5350 AGN (thanks Ori_B) 2016-05-26 10:02:03 +02:00
cinap_lenrek
4e5b596bba efi: ensure 8 byte alignment of buffer, as ReadBlocks() method will fail otherwise 2016-05-22 21:52:04 +02:00
cinap_lenrek
66b1a83b74 efi: allow access to iso filesystem on non-cdrom media (iso/hybrid) 2016-05-22 15:22:46 +02:00
cinap_lenrek
225b573624 9boot: add iso hybrid loader 9boothyb 2016-05-19 18:48:06 +02:00
cinap_lenrek
c911310a8b libauthsrv: dont pass netroot to netmkaddr()'s defnet parameter in authdial() (thanks kenji arisawa) 2016-05-18 15:25:43 +02:00
cinap_lenrek
613578b69f kernel: add srvtls and tlsclient to bootfs.proto for encrypting connection to the file server 2016-05-16 22:55:30 +02:00
cinap_lenrek
83f8d59168 cc: prevent symbol buffer overflow 2016-05-16 22:24:39 +02:00
cinap_lenrek
32e23bdb59 cc: use UTFmax not 4 (djc) 2016-05-16 22:02:17 +02:00
cinap_lenrek
7468752ea2 ndb/cs: fix memory leak (charles forsyth) 2016-05-16 21:58:12 +02:00
cinap_lenrek
8c837c7bf6 exportfs: disallow ORCLOSE in readonly mode (charles forsyth) 2016-05-16 21:49:02 +02:00
cinap_lenrek
b6005f3a45 avoid updating offset in pread; avoid diagnostic about vlong mask (charles forsyth) 2016-05-16 21:11:54 +02:00
cinap_lenrek
29c7ca80c9 correct check for segment overlap (rmiller) 2016-05-16 21:10:08 +02:00
cinap_lenrek
b15430979d rc: simplify execfinit() / Xrdfn() using the globber to lookup /env/fn'#'* 2016-05-16 19:57:53 +02:00
cinap_lenrek
ce7f7d3ab9 rc: fix double close() in addenv() 2016-05-16 18:03:57 +02:00
cinap_lenrek
b6b5fd6da7 jpg: output partial image data when available (truncated files) 2016-05-16 05:35:22 +02:00
cinap_lenrek
31a6f6c83d rc: remove duplicate Xrdfn entry from fname[] array 2016-05-16 00:46:46 +02:00
cinap_lenrek
4ad3f4f2fd rc: remove historical unix and win32 ports 2016-05-16 00:37:49 +02:00
cinap_lenrek
45d6bca5f0 rc: fix shift regresison, sorry 2016-05-15 23:09:23 +02:00
cinap_lenrek
d0e510b29a rc: remove pointless Memcpy(),Malloc(),Realloc() and efree() wrappers 2016-05-15 19:58:24 +02:00
cinap_lenrek
7717051e3c rc: fix inband globbing bugs, cleanup
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().
2016-05-15 19:10:37 +02:00
cinap_lenrek
81f867f4fb rio: only the current window may change the cursor, fix typo screen->r vs w->screenr in drag() 2016-05-14 18:14:08 +02:00
cinap_lenrek
06a0dc5319 rio: second attempt... 2016-05-14 00:58:11 +02:00
cinap_lenrek
20fe277f38 revert previous commit, not ready yet 2016-05-14 00:17:07 +02:00
cinap_lenrek
24e7384007 rio: get rid of all mouse moves, fix cursor handling 2016-05-13 23:46:45 +02:00
cinap_lenrek
63a14bfe8a upas/marshal: strip trailing whitespace from header values
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.
2016-05-13 11:13:26 +02:00
cinap_lenrek
675ee1db15 auth/rsa2x509: generate x509v3 cert as extension field might not otherwise not be expected 2016-05-12 12:41:32 +02:00
cinap_lenrek
67158d5b05 auth/rsa2x509, auth/rsa2csr: allow appending SubjectAlternativeNames (SAN) to multi-domain certificate generation 2016-05-12 03:17:15 +02:00
cinap_lenrek
cb4b187f10 devssl, devtls: fix permission checks 2016-05-11 02:10:05 +02:00
cinap_lenrek
a630e17bd7 ip/ipconfig, ip/ppp: preserve preexisting entries when writing /net/ndb
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.
2016-05-08 06:05:25 +02:00
cinap_lenrek
0e516cbf48 vgaigfx: fix device id for Ivy Bridge (thanks Kenji) 2016-05-08 05:19:44 +02:00
cinap_lenrek
45e2b4dfe9 games/mahjongg: off by one in bmatch(), fix hint() redraw (thanks Kenji) 2016-05-07 15:19:41 +02:00
cinap_lenrek
66719fb3ea kernel: fix cb->f[0] nil dereferences due to short control request 2016-05-05 18:54:58 +02:00
cinap_lenrek
7d45ee4f6a remove unmaintained omap4 (pandaboard) kernel 2016-05-05 16:35:25 +02:00
cinap_lenrek
76e4f7caf9 remove unmaintained bitsy (ipaq) kernel 2016-05-05 16:32:15 +02:00
cinap_lenrek
8d9a94a66e pc64: add etheryuk driver 2016-05-05 16:18:57 +02:00
cinap_lenrek
36d70eb5a7 etheryuk: add Yukon 88R8055 id from erik quanstros driver (thanks Kanji) 2016-05-05 16:17:58 +02:00
cinap_lenrek
5a2ad90bec vncv: fix netmkvncaddr()
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.
2016-05-05 02:11:00 +02:00
cinap_lenrek
66892eb133 webfs: fix "fd out of range" error message 2016-05-04 18:53:31 +02:00
cinap_lenrek
fb790a51f4 libmach: more alpha 2016-05-04 17:10:26 +02:00
cinap_lenrek
53c73dedec libmach: remove alpha stuff 2016-05-04 17:00:45 +02:00
cinap_lenrek
a158c4bdb9 remove support for import command in namespace files 2016-05-04 16:35:25 +02:00
cinap_lenrek
986886f2b8 retire the dec alpha port 2016-05-04 16:11:48 +02:00
cinap_lenrek
f7703d6971 merge 2016-05-04 00:25:03 +02:00
cinap_lenrek
14685d6595 ape: return plan9 error strings from strerror()
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.
2016-05-04 00:23:48 +02:00
spew
479ccd0aa1 add "snake" tracing effect to mole 2016-05-03 09:29:39 -05:00
spew
7657312dcf fix e2 production to match regexp(6) and do it right this time 2016-05-02 15:11:48 -05:00
cinap_lenrek
de5cabceaf libregexp: reverting this shit. this is clearly broken. 2016-05-02 21:16:04 +02:00
stanley lieber
9c01b9a958 libregexp/regcomp.c: fix parser for e2 production (thanks, spew) 2016-05-02 14:48:11 -04:00
spew
9ccbf1dcb1 just use wait in "system" call for awk, get rid of unix dependent status code divisor 2016-05-01 20:54:46 -05:00
spew
ee68dedf53 null terminate await buffer for proper tokenize call 2016-05-01 20:34:07 -05:00
ben
a141f4c53a use rc in awk, remove awk from APEDIRS in cmd mkfile 2016-05-01 20:22:35 -05:00
cinap_lenrek
49cbee690f awk: dont require sed to build awk 2016-05-02 00:35:52 +02:00
cinap_lenrek
42a7fcabb0 awk: bring back ENVIRON[] support 2016-05-02 00:34:23 +02:00
cinap_lenrek
79fbfbff48 acid: don't get fooled by spaces in convflt() 2016-05-01 21:52:34 +02:00
cinap_lenrek
5aa224c153 pc: use fpsave() instead of fpenv() to capture fp exception context 2016-05-01 21:51:15 +02:00
cinap_lenrek
e880549da6 libregex: fix sed regression (thans spew)
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
2016-05-01 03:03:12 +02:00
stanley lieber
77d23bae0f upas/bayes/dump.c: regcomp.h is now located in this directory. 2016-04-30 18:39:05 -04:00
cinap_lenrek
974c4fc768 awk: temporarily fix for NaN() exceptions on 386
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.
2016-04-30 05:12:20 +02:00
cinap_lenrek
ce1edc3436 ape/libsec: fix nuke target to remove /$objtype/lib/ape/libsec.a instead of /$objtype/lib/libsec.a 2016-04-29 20:18:28 +02:00
aiju
46008ac6b7 handle NaN in awk (thanks spew) 2016-04-29 18:11:29 +02:00
stanley lieber
415b5dfe9b awk: fix mkfile for cross-compiles (thanks, spew) 2016-04-28 23:59:59 -04:00
cinap_lenrek
cb3049652d remove ape/regexp.h, remove leftover #pragma lib oldlibregexp.$O from upas/bayes/regexp.h 2016-04-28 21:22:26 +02:00
ben
4d5fb6c357 fix printing a char from an empty string 2016-04-28 12:07:24 -05:00
ben
6886164e34 fix printing a char from a string that starts with a rune 2016-04-28 11:20:38 -05:00
ben
7420dc6ada fix unsigned printing for awk 2016-04-28 11:07:43 -05:00
ben
006fa02a5e get rid of size printing 2016-04-28 08:05:42 -05:00
ben
0da525ae9a check program size 2016-04-27 19:56:39 -05:00
ben
3bf6ef0196 better memory management of threads (thanks knuth) 2016-04-27 17:36:43 -05:00
ben
86e0099835 merge in master 2016-04-27 08:20:54 -05:00
ben
b8986a889d use Beof for awk port 2016-04-27 08:09:16 -05:00
ben
85824350b5 remove ape regexp library, add utility for awk native port 2016-04-27 07:52:41 -05:00
cinap_lenrek
d8d47f14b5 libjson: add slack space to literal string buffer to handle bad runes (thanks mischief)
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.
2016-04-27 12:59:06 +02:00
ben
0f8168038a remove old libregexp files; add headers for upas/bayes 2016-04-26 22:26:03 -05:00
ben
0a460e1722 New libregexp and APE ported to native 2016-04-26 22:23:44 -05:00
Matthew Veety
6d2635d5ba made abaco's gui respect $font and made readweb respect most installations 2016-04-25 17:49:31 -04:00
cinap_lenrek
1cf3c46669 rsa: rename getkey() to getrsakey(), document rsa2csr in rsa(8) 2016-04-22 03:41:06 +02:00
cinap_lenrek
17a67eeb65 libsec: implement server side SCSV preventing silly client fallbacks
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.
2016-04-22 02:33:29 +02:00
cinap_lenrek
7b3334775e libsec: order tlshand cipher suits by: keyexchange>=cipher>=hash, ignore client preference
client preference is usualy crazy, so just ignore it.
we always want the diffie hellman suits before static
rsa and prefer chacha over aes-gcm.
2016-04-21 23:29:59 +02:00
cinap_lenrek
0d6a188dde rsagen: increase default key size to 2048 bits 2016-04-21 21:25:33 +02:00
cinap_lenrek
42c4cc75a6 libsec: remove affine coordinate point operations from ecc
we now just do point addtion in jacobian coordinate system, and
convert the result to affine when s->z == nil.
2016-04-21 20:41:19 +02:00
cinap_lenrek
2fa4c8ef66 libsec: implement elliptic curve group operations in jacobian coordinate system 2016-04-20 20:09:59 +02:00
cinap_lenrek
ff47cbd464 libsec: implement server side ECDHE key exchange with secp256r1, move DH state in TlsSec structure, simplify
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.
2016-04-18 19:24:57 +02:00