summaryrefslogtreecommitdiff
path: root/sys/src
AgeCommit message (Collapse)Author
2016-09-11libc: dont use floating point for portable umuldiv(), use 64 bit uvlongcinap_lenrek
2016-09-11kernel: rekey chacha state on each randomread() invocationcinap_lenrek
we can encrypt the 256 bit chacha key on each invocation making it hard to reconstruct previous outputs of the generator given the current state (backtracking resiatance).
2016-09-11devcons: remove /dev/reboot "halt" command...cinap_lenrek
the "halt" command written to /dev/reboot just causes the machine to crash... its also undocumented... removing it. -- cinap
2016-09-11kernel: better nonce partitioning for chacha random number generatorcinap_lenrek
leave the block counter to chacha_encrypt() and increment the 96 bit iv instead.
2016-09-11kernel: xoroshiro128+ generator for rand()/nrand()cinap_lenrek
the kernels custom rand() and nrand() functions where not working as specified in rand(2). now we just use libc's rand() and nrand() functions but provide a custom lrand() impelmenting the xoroshiro128+ algorithm as proposed by aiju.
2016-09-11kernel: make randomread() fault reentrantcinap_lenrek
we now access the user buffer in randomread() outside of the lock, only copying and advancing the chacha state under the lock. this means we can use randomread() within the fault handling path now without fearing deadlock. this also allows multiple readers to generate random numbers in parallel.
2016-09-11kernel: replace various custom random iv buffer filling functions with calls ↵cinap_lenrek
to prng()
2016-09-08kernel: fix type for utime/stime in pexit(), fix debug format stringscinap_lenrek
2016-09-08kernel: make sure procalarm() remaining time doesnt become negativecinap_lenrek
2016-09-08kernel: always do unsigned subtractions for m->ticks delta for updatecpu() ↵cinap_lenrek
and rebalance(), handle ticks wrap arround in hzsched()
2016-09-07kernel: use tk2ms() instead of TK2MS macro for process time conversioncinap_lenrek
this code isnt time critical and process TReal delta can become very long, so use tk2ms() which is less prone to overflow.
2016-09-07kernel: tsemacquire() use MACHP(0)->ticks for time deltacinap_lenrek
we might wake up on a different cpu after the sleep so delta from machX->ticks - machY->ticks can become negative giving spurious timeouts. to avoid this always use the same mach 0 tick counter for the delta.
2016-09-07devcap: timeout capabilities after a minute, fix memory leak, paranoiacinap_lenrek
the manpage states that capabilities time out after a minute, so we add ticks field into the Caphash struct and record the time when the capability was inserted. freeing old capabilities is handled in trimcaps(), which makes room for one extra cap and frees timed out ones. we also limit the capuse write size to less than 1024 bytes to prevent denial of service as we have to copy the user buffer. (memory exhaustion). we have to check the from user *before* attempting to remove the capability! the wrong user shouldnt be able to change any state. this fixes the memory leak of the caphash. do the hash comparsion with tsmemcmp(), avoiding timing side channels. allocate the capabilities in secret memory pool to prevent debugger access.
2016-09-06mergecinap_lenrek
2016-09-06devproc: do unsigned subtraction to get MACHP(0)->ticks - up->times[TReal] deltacinap_lenrek
2016-09-05pc(1): bugfix: allow setting output base to 0 (thanks, deuteron)aiju
2016-09-035c: do shift propagation for rotate right (ROR)cinap_lenrek
2016-09-035c: format assembly constant right shift encoding 0 as >>32cinap_lenrek
2016-09-035a: assemble constant >>0 right shifts as <<0 (no shift), allow >>32cinap_lenrek
previously, right shift >>0 resulted in >>32 being emited. this is especially problematic when the shift count comes from a macro expansion. we now handle constant shift >>0 as <<0 (no shift) and allow shift by 32 be specified. this applies to logical right shift (>>) arithmetic right shift (->) and right rotate (@>).
2016-09-035l: format assembly constant right shift encoding 0 as >>32cinap_lenrek
2016-09-03libmach: fix RORREG, right shift with shift count 0 means >>32cinap_lenrek
2016-09-01pc: add cat() functionaiju
2016-09-01mptrunc: don't write to r->p[r->top]aiju
2016-08-31pc: add rev functionaiju
2016-08-29pc: add gcd, rand and minv; set base of logical operation results to 0aiju
2016-08-29libmp: remove unused mpeuclid.ccinap_lenrek
2016-08-29libmp: allow passing nil to v,x,y results of mpextendedgcd(), simplify ↵cinap_lenrek
mpinvert()
2016-08-29libmp: mpnrand(), what was i *THINKING*cinap_lenrek
the prior implementation was unneccesarily complicated for no good reason due to me misunderstanding how libc's nrand() works. in contrast to libc, we already generate the *closest* power-of-2 random number with mprand() in the sampling loop.
2016-08-28python: remove automatic compiled module loading (.pyc files)cinap_lenrek
2016-08-28libmp: mpdiv(): fix divisor==quotient case (again)cinap_lenrek
2016-08-28libmp: timingsafe sign flip for small power-of-two negative divisor for mpdiv()cinap_lenrek
2016-08-28add pc(1)aiju
2016-08-28mpdiv: negative divisor has to flip sign of quotientaiju
2016-08-28mp: fix mptov and mptouvaiju
2016-08-28mp: fix mpnot and add mpasraiju
2016-08-28mercurial: use new d_stat from dirent structure in osutil.listdircinap_lenrek
2016-08-28ape: add d_stat struct in dirent struct allowing the avoidance of statscinap_lenrek
2016-08-28strtomp: update the returned char* even if there were no characters parsedaiju
2016-08-28strtomp: fix mpbits() call in octal codeaiju
2016-08-27kernel: switch to fast portable chacha based seed-once random number generatorcinap_lenrek
2016-08-27devsdp: keep cipher states in secret memorycinap_lenrek
2016-08-27ip/esp: allocate cipher states in secret memorycinap_lenrek
2016-08-27devtls: allocate cipher states in secret memorycinap_lenrek
2016-08-27devssl: allocate cipher states in secret memorycinap_lenrek
2016-08-27wifi: update wifi.h headercinap_lenrek
2016-08-27wifi: allocate cipher states in secret memory, do AESstate key setup oncecinap_lenrek
2016-08-27kernel: add secalloc() and secfree() functions for secret memory allocationcinap_lenrek
The kernel needs to keep cryptographic keys and cipher states confidential. secalloc() allocates memory from the secret pool which is protected from debuggers reading the memory thru devproc. secfree() releases the memory, overriding the data with garbage.
2016-08-27libc: add poolisoverlap() and definitions for Pool *secrmemcinap_lenrek
2016-08-20mergecinap_lenrek
2016-08-20vga/igfx: add pci did's for kenjis intel graphics cards.cinap_lenrek