Commit graph

4427 commits

Author SHA1 Message Date
cinap_lenrek
36876b9522 8c: dont abort() when running out of registers. 2015-10-04 22:09:36 +02:00
cinap_lenrek
a23d7cdb84 vc: fix mistake. 2015-10-04 21:22:17 +02:00
cinap_lenrek
1dd7f0893b ape: add missing _subv() function to 386/vlop.s 2015-10-04 20:16:41 +02:00
cinap_lenrek
b556e87e08 vc: handle 64 bit mixedmode asop 2015-10-04 20:08:10 +02:00
cinap_lenrek
8e41723741 5c: handle 64 bit mixedmode asop 2015-10-04 20:07:34 +02:00
cinap_lenrek
e6d64bab9d 8c: handle 64 bit mixedmode asop and type vlong <-> float/double type conversions 2015-10-04 20:06:59 +02:00
cinap_lenrek
107ca1b42d cc: handle 64 bit mixedmode asop and type vlong <-> float/double type conversions 2015-10-04 20:06:30 +02:00
cinap_lenrek
bfd0cb0db4 cc/6c: fix return type of mixed asop expressions, preserve type for moves so fixed<->float conversions work correctly 2015-10-04 20:02:58 +02:00
cinap_lenrek
9e3ef5c777 ape: add machine specific code for spim 2015-10-04 19:50:24 +02:00
cinap_lenrek
d2af6b40af libc: add _uv2d()/uv2f() and _vas*d() functions to vlrt.c
on 32 bit archs, implement 64 bit vasop with floatingpoint right hand side.
also added is uvlong->double conversion function.
2015-10-04 19:49:02 +02:00
cinap_lenrek
9124e491e5 merge 2015-10-03 12:19:31 +02:00
cinap_lenrek
74a557a167 8c: make cgen64() compile target first when it contains functoin call so final assignment wont trash the registers 2015-10-03 12:18:20 +02:00
mischief
20dc40d19b pc, pc64: add did for intel wildcat point audio controller 2015-09-29 18:44:30 -07:00
aiju
fe06f8e571 add timepic(1) and qr(1) manpages 2015-09-29 20:49:52 +02:00
aiju
a7b06e0fdd timepic: string support 2015-09-29 20:49:28 +02:00
cinap_lenrek
cde69a7822 ape: set MB_CUR_MAX to 4 in stdlib.h for 21-bit runes (thanks erik quanstro)
> fix silly bug with ape/stdlib.h which caused ape/lib/regexp/regcomp.c
> to miscompile regular expressions with runes > 0xffff.
2015-09-29 15:17:21 +02:00
BurnZeZ
695f0e0694 aux/gpsfs: fix usage 2015-09-29 04:08:42 -04:00
BurnZeZ
ed196fcb7e file: detect DICOM and XM audio headers 2015-09-28 03:42:26 -04:00
cinap_lenrek
8a784a3b9b devip: declare cleanarpent() static 2015-09-27 22:41:38 +02:00
cinap_lenrek
4449a34756 devip: various bugfixes and cleanups for arp code
- fix missing runlock(ifc) when ifcid != a->ifcid in rxmitsols() (thanks erik quanstro)
- don't leak packets when transfering blocks from arp entry hold list to droplist
- free rest of droplist when bwrite() errors in arpenter(), remove useless checks (ifc != nil)
- free arp entry hold list from cleanarpent()
- consistent use of nil for pointers
2015-09-27 22:17:02 +02:00
aiju
920783505c add timepic(1) 2015-09-27 13:50:18 +02:00
stanley lieber
4c841d0b46 fortunes: Please be respectful in this forum. 2015-09-26 19:10:40 -04:00
stanley lieber
f9244d433a qer(8): correct man page example (thanks, kenji) 2015-09-26 19:07:05 -04:00
cinap_lenrek
c124b9f8b2 merge 2015-09-26 11:46:31 +02:00
cinap_lenrek
ffe4844da8 cwfs: various cleanups
- consistently refer to Dentry.name length with NAMELEN
- make sure whoname is null terminated
- remove useless nil check for whoname
2015-09-26 11:44:29 +02:00
cinap_lenrek
76e0968e35 cwfs: don't use sprint() to fill directory name
sprint() will replace invalid utf8 sequences with U+FFFD
which caused directory reads and stats to return the wrong
filename. just strcpy the name bytes.
2015-09-26 11:41:31 +02:00
mischief
8737864294 ape: add badrect object into ape libdraw 2015-09-25 16:44:25 -07:00
cinap_lenrek
fc06f637cf libsec: cleanup newbytes()/newints()/newbits() and get rid of OFFSETOF() macro 2015-09-24 12:57:05 +02:00
cinap_lenrek
917da0089d cpp: handle 4 byte utf sequences (21-bit runes) 2015-09-24 12:23:17 +02:00
cinap_lenrek
8003c8b1e2 utf(6), rune(2): document 21-bit runes 2015-09-24 12:14:08 +02:00
cinap_lenrek
bba6d26ca2 cpp: fix memory corruption due to input buffer relocation
the dynamic input buffer resize code (fillbuf()) is broken as
the calling code assumes that memory wont relocate. instead
of trying to work out all the cases where this happens, i'm
getting rid of fillbuf() and just read the whole file into
memory in setsource().

the bug could be reproduced with something as simple as:

@{for(i in `{seq 1 10000}){echo $i ', \'; }} | cpp
2015-09-24 05:13:03 +02:00
glenda
2b5ab91775 resize: add -n for nearest neighbour 2015-09-23 17:52:35 +02:00
cinap_lenrek
fa95531388 merge 2015-09-23 17:35:16 +02:00
cinap_lenrek
6641548938 libsec: fix memory leaks in X509req() and X509gen() and return malloced pointer
X509req() and X509gen() used to leak memory, and had no way for
the caller to free the allocated certificate/certificate request
buffer returned. this is not critical as these functions are only
used in short lived rsa(2) helper programs. but i prefer to have
library routines not leak memory as one does not know in advance
where the code is going to be used.
2015-09-23 17:33:52 +02:00
cinap_lenrek
5639f9504b rsa2x509, rsa2csr: add newline in usage print 2015-09-23 17:05:48 +02:00
cinap_lenrek
9f50ee06f3 libsec: implement client certificate authentication for tls1.2
we used to negotiate tls1.1 for client cert authentication because the
signature generation was not implemented for tls1.2. this is now fixed
and tls1.2 can be negotiated with client certs.
2015-09-23 16:57:25 +02:00
glenda
d6c35b3de8 add qr.c 2015-09-23 16:36:55 +02:00
cinap_lenrek
ada54defbc libsec: handle missing signature case; can happen because some ciphers make it optional 2015-09-22 19:11:54 +02:00
cinap_lenrek
2c4d3dd510 libsec: make sure Elem is zero initialized so freevalfields() wont cause accidents 2015-09-22 18:39:48 +02:00
cinap_lenrek
c3e1c158f6 libsec: implement dh parameter signature verification, stop lying about non-rsa ciphers, fix memory leaks in X509 code
actually verify the diffie hellman parameter signature, this
comes in two flavours. TLS1.2 uses X509 signature with a
single hash specified by the signature algorithm field in
the signature itself and pre TLS1.2 where md5+sha1 hashes
of the signed blob are pkcs1 padded and encrypted with the
rsa private key.

stop advertizing non-rsa cipher suits (DSS and ECDSA), as
we have not implmenented them.

fix some memory leaks in X509 code while we'r at it.
2015-09-22 18:10:52 +02:00
cinap_lenrek
8baa859319 libsec: fix memory leak in ecmul() 2015-09-22 18:04:06 +02:00
cinap_lenrek
c878be04f9 scuzz: uncomment synccache command 2015-09-22 12:23:49 +02:00
cinap_lenrek
83d45ee502 mothra: <hr> drawing
<hr> is handled by drawing replicated bitmap across the with of
the page.
2015-09-22 11:49:07 +02:00
cinap_lenrek
95cfc30788 libdraw: remove unneeded check (thanks BurnZeZ) 2015-09-20 21:52:47 +02:00
cinap_lenrek
12f7fc7a08 devsd: handle SYNCHRONIZE CACHE scsi commands as nops in sdfakescsi() 2015-09-20 14:54:49 +02:00
cinap_lenrek
fa769a8f9d sdmmc: handle fakescsi emulation 2015-09-20 14:53:44 +02:00
cinap_lenrek
c7c58ef8bb devsd: remove unused timeout field from SDreq 2015-09-20 14:27:41 +02:00
cinap_lenrek
d1315ade41 libdraw, screenrc: bind devdraw and devmouse in screenrc instead of handling it in libdraw
libdraw was attempting to bind '#i' and '#m' to /dev when it could not find
/dev/mouse or /dev/draw. a library shouldnt be that clever and do namespace
manipulations on behalf of the caller. so instead, we setup the graphics
environment in screenrc on boot time.
2015-09-20 12:25:01 +02:00
mischief
30a9d59070 pc, pc64: fix sdvirtio descriptor count when sending flush 2015-09-20 01:56:56 -07:00
stanley lieber
f5174e6fdf ircrc: add -P option for server password (thanks, nick) 2015-09-19 14:03:22 -04:00
stanley lieber
a90662c2e6 /sys/lib/dist/ndb/common: correct authdom=inri 2015-09-16 13:29:04 -04:00
cinap_lenrek
cb083221d2 igfx: fix typos (thanks qwx) 2015-09-14 15:15:14 +02:00
cinap_lenrek
029c271825 libsec: save some space making weakCipher bitamp of type char[] instead of int[] 2015-09-14 09:46:40 +02:00
cinap_lenrek
9733434e6e libsec: add TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 and TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 cipher suits 2015-09-14 09:27:06 +02:00
cinap_lenrek
be3ba38c45 libfis: fix wrong shift for lba40 (thanks geoff and charles)
---------- Forwarded message ----------
From: Charles Forsyth <charles.forsyth@gmail.com>
Date: 13 September 2015 at 12:38
Subject: fis bug
To: erik quanstrom <quanstro@quanstro.net>


geoff spotted something similar in sdiahci.c, but it's in libfis as well:

c[Flba24] = lba >> 24;
c[Flba32] = lba >> 32;
c[Flba40] = lba >> 48;

>> 48??  should be >> 40, especially with drive sizes getting up there.
2015-09-13 13:51:00 +02:00
cinap_lenrek
33a4a56c1c libsec: send sigature_algoritms extension for TLS1.2, order ciphers
TLS1.2 requires the client to send the list of supported
signature and hash algorithm pairs. some servers will simply
reject the client hello otherwise. note that we do not implement
any dh/ecdh param signature verification.

order the cipher list to strogest first. aes128 is actually more
secure than aes256.
2015-09-13 13:39:51 +02:00
cinap_lenrek
455b42743d libsec: handle TLS 1.2 changes in CertificateRequest message 2015-09-12 13:04:47 +02:00
cinap_lenrek
c06e464ec4 cwfs: initialize /env/timezone on boot so dumps are in localtime
when /env/timezone file is missing (boot case), copy /adm/timezone/local
to /env/timezone so localtime() can correct timezone offset.
2015-09-12 03:58:46 +02:00
mischief
c823f136df mkfile.proto: LIB should not be inherited during recursive mk 2015-09-09 18:59:40 -07:00
cinap_lenrek
20ea629b8a html2ms: bold table headings, remove wrong tag space handling 2015-09-08 19:55:55 +02:00
cinap_lenrek
d79754b4c8 mothra: make text inside <td> bold 2015-09-08 19:23:23 +02:00
cinap_lenrek
b143c1f411 tar: remove unneccesary { } 2015-09-08 18:30:38 +02:00
cinap_lenrek
c7eae3fb72 tar: make z flag work, even when no file name was provided (thanks aiju)
tar used to infer compression type from the filenames extension, but when
no file name is given (stdin/stdout), the -z flag was ignored and no
compression filter applied. this changes tar to assume the default
gzip compression method when z is given and no file name is specified.
2015-09-08 18:27:48 +02:00
cinap_lenrek
4d4b825dea mothra: add missing initializations for plaintext html state 2015-09-07 00:13:40 +02:00
cinap_lenrek
b55315c3fd libthread: get rid of tprivalloc()/tprivfree()/tprivdata() and _workerdata() (thanks qrstuv)
these functions where undocumented and unused. especially
tprivfree() was buggy missing a unlock() call. theres not
much point in supporting these functions as theres
threaddata() and procdata().
2015-09-06 23:25:14 +02:00
cinap_lenrek
7562da90e5 libc: remove privfree(), simplify privalloc() 2015-09-06 20:43:05 +02:00
cinap_lenrek
431cbe35f6 devqspi: fix qunlock error on stat() -> close() 2015-09-05 13:18:28 +02:00
cinap_lenrek
fdfd856d1d zynq: clean cache unconditionally *before* dma, invalidate cache *after* dma for read case
processor might bring data speculatively into the cache,
before the dma completes.
2015-09-05 10:36:53 +02:00
cinap_lenrek
6fb9ae8f43 usbehci: clean cache unconditionally before handing a buffer to the hardware
even in the read case, we need to clean the cache
so the cpu will not flush out old changes while
the hardware updates the buffer.
2015-09-05 10:14:19 +02:00
cinap_lenrek
50850cf4b9 dist/mkfile: add target for the aijuboard *.zynq.img
this generates a disk image (to be written to usb or
sdmmc card) containing 9fat partition with kernel and
a hjfs filesystem partition with the 9front distribution.

this could be easily extended to generate raspberry pi
images as well, but i have no hardware to test.
2015-09-05 03:29:17 +02:00
cinap_lenrek
ce38e57e97 merge 2015-09-05 00:37:32 +02:00
cinap_lenrek
faf3f0df06 zynq: fix cache flush bug for emmc driver (have to invalidate cache *before* read) 2015-09-05 00:33:57 +02:00
stanley lieber
891ca82987 fortunes: Please be respectful in this forum. 2015-09-03 17:01:49 -04:00
cinap_lenrek
b9eb7258bd html2ms: handle subscripts and superscripts 2015-09-03 21:24:00 +02:00
cinap_lenrek
72a5fbd8ea mothra: subscript and superscript support 2015-09-03 19:07:48 +02:00
cinap_lenrek
c8dd01d5f6 auth/passwd: fix structure zeroing order 2015-09-02 11:41:41 +02:00
cinap_lenrek
7ed22aaeec libsec: add rfc5869 hmac-based key derivation function hkdf_x() 2015-09-02 11:30:17 +02:00
cinap_lenrek
b749f36baa libsec: generalize pbkdf2_hmac_sha1() to pbkdf2_x() passing the hmac as an argument 2015-09-02 11:28:11 +02:00
cinap_lenrek
4c52aedfe9 libsec: declare aes_setupEnc static 2015-09-02 06:15:02 +02:00
cinap_lenrek
46926aa502 tcp: fix mtu on server sockets again (thans mycroftix)
for incoming connection, we used s->laddr to lookup the interface
for the incoming call, but this does not work when the announce
address is tcp!*!123, then s->laddr is all zeros "::". instead,
use the incoming destination address for interface mtu lookup.

thanks mycroftix for troubleshooting!
2015-09-02 01:50:55 +02:00
cinap_lenrek
b5737e8726 libsec: add curve25519 diffie hellman 2015-09-01 21:38:20 +02:00
cinap_lenrek
e3a64494e7 libsec: remove flawed aes() digest and hmac_aes() implementations (thanks aiju) 2015-09-01 21:35:43 +02:00
cinap_lenrek
2095bdbf45 libsec: work arround 8c running out of registers compiling curve25519.c 2015-08-28 16:31:44 +02:00
cinap_lenrek
0e51046942 libsec: add curve25519() from http://code.google.com/p/curve25519-donna/
this is a portable version of curve25519() by google.
2015-08-28 12:08:54 +02:00
cinap_lenrek
d8a57c0ae3 merge 2015-08-28 08:42:35 +02:00
cinap_lenrek
d52e35055d libauthsrv: fix _asgetresp() for passwd 2015-08-28 08:41:16 +02:00
glenda
2bc15fbabd mp.h: third time's a charm 2015-08-27 13:40:34 +00:00
glenda
82a922d9ed mp.h: oops 2015-08-27 13:35:13 +00:00
glenda
d8a1f1a647 mp.h: define mpnrand 2015-08-27 13:34:02 +00:00
mischief
07b245943a libsec: add TLS_RSA_WITH_AES_128_CBC_SHA256 and TLS_RSA_WITH_AES_256_CBC_SHA256 ciphers 2015-08-27 01:53:48 -07:00
mischief
163a772124 devtls: add sha256 mac 2015-08-27 01:46:28 -07:00
cinap_lenrek
3bb0b9f4ea libsec: add q parameter to dh_new() for subgroup support, sanitize dh parameters 2015-08-26 05:59:42 +02:00
cinap_lenrek
844bbecadb libmp: simplify mpnrand(), as mpnew() cannot return nil 2015-08-26 05:44:26 +02:00
cinap_lenrek
8f2e408448 libmp: add mpnrand() function to generate uniform random number 0 ≤ x < n 2015-08-25 20:20:25 +02:00
mischief
2dec35524e tput: check sbrk return value 2015-08-25 03:06:36 -07:00
glenda
c4fdc6bfdb fix fuckup 2015-08-25 09:35:10 +00:00
mischief
6b402b83cf import E script from bell labs 2015-08-25 02:07:46 -07:00
mischief
dbe0a995f0 libc: import more endianness fixes (thanks cherry9)
from https://bitbucket.org/cherry9/plan9-loongson/
2015-08-25 01:58:41 -07:00
cinap_lenrek
59d16c3900 libsec: fix probably_prime() endless loop for n == 3 2015-08-23 23:49:31 +02:00
cinap_lenrek
54a91861df remove convkeys2 2015-08-22 00:21:11 +02:00