Commit graph

5007 commits

Author SHA1 Message Date
Matthew Veety 04a8392f8c Added change to /rc/lib/rcmain to allow execution of /rc/lib/rcmain.local if it exists. /rc/lib/rcmain.local is similar to $home/lib/profile in that it will only be executed with -l, but is site-wide. 2015-12-07 16:01:09 -05:00
cinap_lenrek 9e09742e9b yacc: attempt to keep line numbers right for yyparse()
as the generated parser intermixes lines from .y source
and the parser text, the line source/lineno for yyparse()
shows up wrong in the debugger. to make stack traces a
bit less crazy, put a #line 1 "/sys/lib/yaccpar" before
copying in the parser text.
2015-12-07 17:00:41 +01:00
cinap_lenrek d928a6f239 merge 2015-12-06 20:55:27 +01:00
cinap_lenrek 01afe9328b libmp: fix assert() for mpexp() with nil modulus 2015-12-06 20:53:54 +01:00
cinap_lenrek 1a5c8430d2 libmp: fix wrong move instruction for arm vector operations 2015-12-06 20:52:15 +01:00
aiju eccb144a71 winwatch: l allows label changes 2015-12-06 20:37:18 +01:00
cinap_lenrek 8d16e980c2 libmp: mpmod() fix typo 2015-12-01 11:25:08 +01:00
cinap_lenrek ffdfc17cee libmp: with mpmod() m = 2^a - c ensure that digits(c) < digits(m) 2015-12-01 11:13:52 +01:00
cinap_lenrek fbd825890e merge 2015-12-01 09:41:49 +01:00
cinap_lenrek 3a40210df8 libsec: fix genprime() to produce normalized result
this fixed bug "assert_failed_m-flags__mpnorm_since_283cc2200e34".
2015-12-01 09:40:24 +01:00
aiju 4770f60b18 mkone: yacc wants the D 2015-11-30 23:36:39 +01:00
cinap_lenrek bdaa002255 webcookies: strdup() file argument to avoid crash (thanks mischief)
mischief reports:

 acid: lstk()
 abort()+0x0 /sys/src/libc/9sys/abort.c:6
 ppanic(p=0x1bff4,fmt=0x1d749)+0x146 /sys/src/libc/port/malloc.c:166
         pv=0x1dad8
         msg=0x1e4a8
         v=0x3ffffe7c
         n=0x2f
 D2B(p=0x1bff4,v=0x3fffffae)+0x57 /sys/src/libc/port/pool.c:926
         a=0x3fffffa4
 poolfreel(v=0x3fffffae,p=0x1bff4)+0x20 /sys/src/libc/port/pool.c:1152
         ab=0x1dad8
 poolfree(p=0x1bff4,v=0x3fffffae)+0x3b /sys/src/libc/port/pool.c:1287
 free(v=0x3fffffb6)+0x23 /sys/src/libc/port/malloc.c:250
 readjar(file=0x3fffffb6)+0xce /sys/src/cmd/webcookies.c:473
         jar=0x1ea28
         lock=0x1ea68
         p=0x1ea6d
 main(argv=0x3fffffa0,argc=0x0)+0x10f /sys/src/cmd/webcookies.c:1295
         file=0x3fffffb6
         srv=0x0
         mtpt=0x1cfd0
         _argc=0x66
         _args=0x1cfe0
         home=0x0
 _main+0x31 /sys/src/libc/386/main9.s:16
 acid:
2015-11-30 20:08:22 +01:00
cinap_lenrek 1d8f2ac050 merge 2015-11-30 14:57:16 +01:00
cinap_lenrek 7f3659e78f kernel: cleanup exit()/shutdown()/reboot() code
introduce cpushutdown() function that does the common
operation of initiating shutdown, returning once all
cpu's got the message and are about to shutdown. this
avoids duplicated code which isnt really machine specific.

automatic reboot on panic only when *debug= is not set
and the machine is a cpu server or has no display,
otherwise just hang.
2015-11-30 14:56:00 +01:00
BurnZeZ 4badf9974f fplot(1): fix typo 2015-11-29 18:06:55 -05:00
stanley lieber a1a3af5586 fortunes: If you get this, delete it. - Sorry! -- Tim Berners-Lee, www-talk, Mon, 28 Oct 91 14:34:12 GMT+0100 2015-11-27 17:04:02 -05:00
stanley lieber 8043614f79 fplot(1): add BUGS section 2015-11-27 16:49:19 -05:00
cinap_lenrek 254031cf70 libsec: add chacha20 poly1305 aead, allow 64 bit iv's for chacha, add tsmemcmp()
chacha20 comes in two variants: ietf rfc7539, using 96 bit iv and 32 bit counter
and draft-agl-tls-chacha20poly1305 using 64 bit iv and a 64 bit counter. so
setupChachastate() now takes a ivlen argument which sets the mode.

add ccpoly_encrypt()/ccpoly_decrypt() routines.

to implement timing safe ccpoly_decrypt(), a constant time memcmp was needed, so
adding tsmemcmp() to libsec.
2015-11-26 15:25:10 +01:00
BurnZeZ 90695e2eb2 mpc: mpc.c is generated by yacc, so remove it on mk clean 2015-11-25 11:39:01 -05:00
cinap_lenrek d7303af06d rio: allow reading the image of a hidden window thru the window file 2015-11-25 04:31:30 +01:00
cinap_lenrek 9ef4ba83f6 rio: fix handling "resize" wctl for hidden windows
when the "resize" wctl was used on a hidden window, the window
was put back on the screen, however, it was not removed from
the hidden[] array so trying to hide the window again failed
because whide() assumed it was already hidden.

the fix is to not unhide the window, but preserve the hidden
state, so windows can programmatically be reshaped and moved,
but will remain hidden unless explicitely unhidden.
2015-11-25 04:30:44 +01:00
cinap_lenrek e82b10ffb4 disksim: don't assume 4-byte pointers 2015-11-24 11:02:04 +01:00
cinap_lenrek 518fd3ec83 rio: stop serving kbdin file (thanks eekee)
kbdfs already provides a /dev/kbdin file for the system, rio does
not need to provide one for the onscreen keyboard anymore.
2015-11-23 00:50:44 +01:00
cinap_lenrek 569bdd00c2 add mpc(1), extended precision code generator 2015-11-22 23:47:58 +01:00
cinap_lenrek ccfb9118a3 bootrc: remove usbwait hack, usbd/nusbrc are now synchronous by previous commit 2015-11-22 03:19:27 +01:00
cinap_lenrek 7e3b2cdb55 usbd: intoruce /env/usbbusy
to solve the usb device enumeration race on boot, usbd creates /env/usbbusy
on startup and once all devices have been enumerated and readers have consumed
all the events, we remove the file so nusbrc/bootrc can continue. this makes
sure all the usb devices that where plugged in on boot are made available.
2015-11-22 03:17:15 +01:00
cinap_lenrek 98363cb272 devenv: fix ORCLOSE handling
when opening a /env file ORCLOSE, and the process exits, envgrp() would
return nil can crash in envremove() because procexit will have set up->egrp
to nil before calling closefgrp().

the solution is to capture the environment on open, keeping a reference in
Chan.aux, so it doesnt matter on what process the close happens and a
env chan will always refer to its original environment group.
2015-11-22 02:39:57 +01:00
cinap_lenrek 38e1e5272f libmp: initial attempt at constant time code, faster reductions for special primes (for ecc)
introduce MPtimesafe flag to request time invariant computation
disables normalization so significant digits are not leaked.
2015-11-21 09:39:59 +01:00
aiju b677ab0c59 remove dunning-krugerrand code 2015-11-20 22:26:20 +01:00
cinap_lenrek 51bedde447 libmp: fix test program 2015-11-20 06:28:17 +01:00
cinap_lenrek 9fccf1629e libmp: add mpvecadd()/mpvecsub() assembly versions for arm 2015-11-20 06:25:56 +01:00
cinap_lenrek 2559e19e19 libmp: 386/amd64 mpvec*(): replace conditional branches with ADC/SBB instructions 2015-11-20 06:25:01 +01:00
stanley lieber 55d3e11f0f 9fs: add case 9front 2015-11-06 20:00:03 -05:00
cinap_lenrek b21482828b merge 2015-11-06 17:28:29 +01:00
cinap_lenrek 00572496ce kernel: use nicer check in okaddr(), wet floor signs in fixfault()
instead of checking addr+len >= addr, check len >= -addr so
that addr == 0 is never valid for len > 0 even if we decide
to have memory at the zero page so theres never any chance
user can pass in "nil" pointers.

put up some signs where we fall thru the switch cases in
fixfault()
2015-11-06 17:27:15 +01:00
cinap_lenrek 3133a2a4e7 merge 2015-11-06 02:55:11 +01:00
cinap_lenrek b32300deb0 kernel: fix okaddr() check 2015-11-06 02:53:30 +01:00
stanley lieber b26ec24f9d 9fs: add 9pio case for unauthenticated connections to 9p.io. 2015-11-02 19:12:15 -05:00
cinap_lenrek 2ba46903fa merge 2015-11-01 12:14:00 +01:00
cinap_lenrek a4e32b43ea libmp: optimize case x/0xffffffff in mpdigdiv() (helps arm) 2015-11-01 12:12:41 +01:00
cinap_lenrek d901fbe4f1 libmp: add mpvecdigmuladd()/mpvecdigmulsub() assembly routines for arm 2015-11-01 12:10:10 +01:00
cinap_lenrek c184d2602d 5c: handle (rare) MULU instruction in peephole optimizer 2015-11-01 12:09:03 +01:00
stanley lieber 258c4fc0f8 fortunes: [9fans] FUSE on Plan9 2015-10-31 16:09:15 -04:00
stanley lieber 15bd0c52cc delkey(1): update man page to reflect recent changes. 2015-10-31 16:07:22 -04:00
aiju 5c5c074f12 delkey: don't be stupid 2015-10-30 22:18:09 +01:00
cinap_lenrek cd3053a3cc devtls: reject SHA2_256 mac for SSL, but TLS is fine
sha256 is only defined for TLS1.2, however, technically, theres
no reason not to use it in TLS1.0/TLS1.1. the choice is up to
tlshand and pushtls, not the kernel.
2015-10-28 17:09:22 +01:00
cinap_lenrek 93d63dc1f3 mp(2): fix typo mnprand() -> mpnrand() 2015-10-28 13:39:17 +01:00
BurnZeZ 4587326e76 ascii: replace mnemonic np (new page) with ff (form feed) for consistency 2015-10-25 14:46:10 -04:00
BurnZeZ 8f27b8d04d rio: fix scrolling when cursor is above window 2015-10-24 22:57:07 -04:00
cinap_lenrek 847f3a0cf5 libsec: add chacha cipher (from charles forsyth) 2015-10-22 07:48:26 +02:00