Commit graph

4222 commits

Author SHA1 Message Date
cinap_lenrek c1c644d13c etheriwl: add support for Centrino Advanced-N 6030, 6235 (thanks khm, openbsd)
from openbsd driver, it seems the Centrino Advanced-N 6030 and 6235
cards share the same device revision as the 6205 (Type6005). Also
changing the device revision field from 4 to 5 bits.
2017-02-16 20:03:41 +01:00
cinap_lenrek b61799df43 playlistfs: fix playc chan type (thanks mischief) 2017-02-15 08:53:31 +01:00
cinap_lenrek f2d2f9374b jukefs: fix realloc sizes (thanks mischief) 2017-02-15 08:50:03 +01:00
cinap_lenrek 60cbbb123b merge 2017-02-13 22:28:35 +01:00
cinap_lenrek 45d01d9c99 wifi: handle short preamble and short time slot capabilities
- drivers enable short preamble and sort timeslot depending
  on the ap beacon capinfo field (bss->cap)
- wifi sets short preamble bit in capinfo on association request
- wifi sets short timeslot bit when ap advertized it in beacon
2017-02-13 22:26:38 +01:00
aiju d9a964788b games/gb: fix bug that prevented timer data from being accessed (thanks qwx) 2017-02-12 12:28:02 +01:00
aiju fe1e95d6d8 games/gb: timer array should be unsigned (thanks qwx) 2017-02-12 00:38:17 +01:00
aiju 6176b55759 games/gb: fix typo in the routine to load timer data (thanks qwx) 2017-02-11 23:52:35 +01:00
cinap_lenrek 6840a9aafd libsec: zero name buffer in X509toECpub() 2017-02-10 21:42:11 +01:00
cinap_lenrek fb2abc2a04 libsec: make X509toECpub() return CN name like X509toRSApub() 2017-02-10 21:36:19 +01:00
cinap_lenrek 24007b9120 libsec: revert asn1mpint(), rewrite rsa signature validation, cleanups
reverting asn1mpint() as all users really just expect
unsigned integers here. also openssl seems to interpret
rsa modulus as unsigned no matter what... so keeping
it as it was before.

handle nil cipher bytes in factotum_rsa_decrypt() due
to pkcs1padbuf() failing.

apply some lessions from intels berzerk paper:

instead of parsing the decrypted digest info blob, we
generate the *expected* blob's for all digest algorithms
that match the digest size and compare the results.

provide pkcs1 pad and unpad functions that consistently
enforce minimum padding size and handles block types 1
and 2.
2017-02-10 00:08:38 +01:00
mischief e8045cbcbf factotum: support sha256 algorithm in rsa pkcs#1 signing
also removed md2 oid, it is unused.
2017-02-09 09:08:43 +00:00
cinap_lenrek 6386a0391a libsec: handle signed asn.1 bigint to mpint conversion for x509 2017-02-06 21:40:42 +01:00
cinap_lenrek 486523bbc5 ip/ipconfig: have to refresh /net/cs, /net/dns after ndbconfig even tho /net/ndb didnt got written 2017-02-06 11:19:45 +01:00
cinap_lenrek bbce9c0566 rsagen: prefer 65537 as the default exponent when elen == 0, otherwise pick randomly 2017-02-06 04:25:38 +01:00
cinap_lenrek 5256f4063e libsec: fix mkbigint(), asn.1 uses two's compement signed representation
quick fix is to bias the rounding so the msb will always
be zero. should write proper conversion code to actually
deal with signed mpints... also for asn1mpint()... -- cinap
2017-02-06 03:50:03 +01:00
cinap_lenrek 02b3c609ed libsec: check if modulus is too small for message in pkcs1padbuf() 2017-02-06 02:03:16 +01:00
cinap_lenrek 1df513a2a1 libsec: need PKCS#9 "Extension Request" attribute (rsareq()) 2017-02-06 01:01:34 +01:00
cinap_lenrek 03e6d3a0f0 aan: remove fcallfmt 2017-02-05 06:14:42 +01:00
cinap_lenrek b8811b7a2f merge 2017-02-05 05:16:39 +01:00
cinap_lenrek 00575e07bb libsec: have rsagen() always produce postive !dk to avoid confusion 2017-02-05 05:15:17 +01:00
cinap_lenrek 541528252e merge 2017-02-05 02:50:11 +01:00
cinap_lenrek 96769e0476 libmp: fix mpmod() aliasing bug when n == r and x < 0 (thanks aiju, mischief)
mischief found this in rsafill()'s call mpmod(c2, x, x), where
d parameter is negative (rsagen created a rsa key with negative dk).
2017-02-05 02:48:13 +01:00
spew 3b24eb4c1f games/mix: implement Knuth's specification for comments 2017-02-03 18:55:02 -06:00
cinap_lenrek 7f12431009 aan: use unsigned message counters, reject repeated acks, cleanup debug prints 2017-02-04 01:39:36 +01:00
spew 930be3d317 libregexp: improve the transition to next available thread, instruction, and generation 2017-02-03 15:33:15 -06:00
spew 9ae083d816 libregexp: simplify regular expression vm implementation
Make the logic around who has priority over the final
match simpler by merging the priority generation and
match fields in a smarter way. Move the creation of
new thread matches up to the top to avoid jumping all
over the place.
2017-02-02 21:21:34 -06:00
cinap_lenrek f94167ebee ip/ipconfig: don't write /net/ndb when getting config from ndb (-N) 2017-02-02 22:00:51 +01:00
cinap_lenrek 65337bec22 aan: check negative message size in header 2017-02-02 20:53:05 +01:00
cinap_lenrek 7516e85813 audio/flacdec: continue after decode error (thanks deuteron) 2017-02-01 10:38:19 +01:00
cinap_lenrek d643cf2fe6 cwfs: handle worm exhaustion more gracefully
don't deadlock when cwgrow() detects we'r out of worm space
by releasing the cache superblock buffer.

don't allocate space beyond the worm device when dumping by
having slit() check. after cwrecur(), we check if there are
enougth blocks remaining to write the dump date directories
and superblocks.
2017-01-30 23:17:18 +01:00
cinap_lenrek 5171a0ac52 cwfs: fix cwcmd startdump 2017-01-27 02:00:20 +01:00
cinap_lenrek c6b2ad583e auth/keyfs: use ulong for time 2017-01-26 22:09:44 +01:00
cinap_lenrek 8ea917d119 secstore/secuser: use ulong for time 2017-01-26 22:06:57 +01:00
spew acd4a952bd games/mix: fix STZ bug, print CMPA instruction 2017-01-23 13:41:21 -06:00
cinap_lenrek 9278b94623 pc/pc64: get rid of timerset(0) case, was used with "i8253set off" ctl 2017-01-22 21:12:38 +01:00
cinap_lenrek 885d41dd7b sgi: get rid of timerset(0) case 2017-01-22 21:08:28 +01:00
cinap_lenrek 6cb359cc00 sgi: cleanup timer code
- no need to splhi() in timerset, always called with
  interrupts off.

- make timerset always update the period (next == 0)

- remove period update in fastticks(), simplify
  delta calculation.
2017-01-22 20:39:14 +01:00
cinap_lenrek a2eafd2cb0 merge 2017-01-22 00:43:44 +01:00
cinap_lenrek d6bb01da76 factotum: fix memory leak in findkey() 2017-01-22 00:42:13 +01:00
spew 339fda9164 games/mix: remove tests directory 2017-01-17 20:52:49 -06:00
spew 4b68ddfb5a games/mix: document -g option, rename tests to examples as it is in the man page 2017-01-17 20:51:08 -06:00
cinap_lenrek e9bf14eceb libsec: avoid temp variables in chacha/salsa ENCRYPT() macro
given that we only pass uchar* with constant offsets
to the s and d arguments of ENCRYPT(), we do not need
the temporary variables sp/dp and the compiler is
smart enougth to combine the const offset with the ones
from GET4() and PUT4() and emit single load and store
instructions for the byte accesses.
2017-01-15 04:09:47 +01:00
cinap_lenrek 03c44c44b0 rx: remove ssh code 2017-01-13 19:54:42 +01:00
khm dc8c7bf2b7 ssh: R.I.P. 2017-01-12 16:36:38 -08:00
cinap_lenrek cb1555c7d7 sgi: change definition of tas() to take void* like the rest 2017-01-12 21:11:34 +01:00
cinap_lenrek bdc1b187c4 merge 2017-01-12 20:17:52 +01:00
cinap_lenrek 2e23780d2f libsec: implement extended 192-bit nonce xchacha variant and hchacha function 2017-01-12 20:16:38 +01:00
cinap_lenrek 47f07b2669 kernel: make the mntcache robust against fileserver like fossil that do not change the qid.vers on wstat
introducing new ctrunc() function that invalidates any caches
for the passed in chan, invoked when handling wstat with a
specified file length or on file creation/truncation.

test program to reproduce the problem:

#include <u.h>
#include <libc.h>
#include <libsec.h>

void
main(int argc, char *argv[])
{
	int fd;
	Dir *d, nd;

	fd = create("xxx", ORDWR, 0666);
	write(fd, "1234", 4);
	d = dirstat("xxx");
	assert(d->length == 4);
	nulldir(&nd);
	nd.length = 0;
	dirwstat("xxx", &nd);
	d = dirstat("xxx");
	assert(d->length == 0);
	fd = open("xxx", OREAD);
	assert(read(fd, (void*)&d, 4) == 0);
}
2017-01-12 20:13:20 +01:00
cinap_lenrek 4aeefba681 kernel: add "close" ctl message for tcp connection to gracefully hang up a connection without a tcp reset (used by go) 2017-01-12 20:04:41 +01:00