summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-08-15devtls: TLS1.1 explicit iv supportcinap_lenrek
using nrand() to fill the explicit iv, which isnt great but better than no iv.
2015-08-14kernel: try freebroken() *before* killbig() (thanks aiju)cinap_lenrek
2015-08-13hjfs: fix deadlockscinap_lenrek
buffers which still have requests queued on them are not free! we cannot chanedev() a buffer while it has still requests queued on it and we canot just queue our request (having different address) on the buffer while there are other requests before it, otherwise we would create artificial block dependency that can cause deadlock.
2015-08-11hjfs: fix abort() in givebuf()cinap_lenrek
it is possible for another getbuf() on buffer b to come in before undelayreq() calls givebuf() on a buffer again. then givebuf() would find b already busy and abort(). instead, we now handle what getbuf() did in givebuf() and consider the Buf* argument to givebuf() as a hint only for the case when we have to actually flush/read a block from disk.
2015-08-10libc: fix wunlock() libthread deadlockcinap_lenrek
when wunlock() was used by threads running within the same proc, the wunlock() can deadlock as it keeps holding the RWLock.lock spinlock while indirectly calling _threadrendezvous(). when _threadrendezvous() switches to another thread in the same proc, then that thread can hang at rlock()/wlock()/runlock() again waiting for wunlock() to release the spinlock which will never happen as lock() does not schedule threads. wunlock() is changed to release the spinlock during rendezvous wakeup of readers. note that this is a bit dangerous as more readers might queue concurrently now which means that if we cannot keep up with the wakeups, we might keep on waking readers forever. that will be another patch for the future.
2015-08-09libc: fix spim endiannessmischief
2015-08-10mount, srv: add -N flag to skip authentication and attach anonymously as "none"cinap_lenrek
2015-08-09fortunes: If you want to do the work, I will review the results.stanley lieber
2015-08-10lib9p: make reqqueueflush() use new threadint(), which will also cover ↵cinap_lenrek
channel operations using "interrupt" ctl message directly doesnt work when the process is doing libthread channel operations (threadrendezvous) as it will just repeat a interrupted rendezvous(). threadint() handles this for us.
2015-08-10libthread: use "interrupt" proc ctl message instead of posting a note for ↵cinap_lenrek
threadint() threadint() is called to interrupt channel operation or a system call. the kernel provides a new "interrupt" procctl message to interrupt a process commited to or being in a blocking syscall, which is similar, but not the same. the main difference is that "interrupt" condition is not cleared before the process actually attempts to block. also can be cleared with "nointerrupt" ctl message. see proc(3)
2015-08-10libthread: fix mistake, make "all" the default target againcinap_lenrek
2015-08-09acid -k: fix intrcount() for amd64cinap_lenrek
2015-08-09acid -k: fix procenv() to new data structurecinap_lenrek
2015-08-09zunq: remove unused variables from devqspicinap_lenrek
2015-08-09kernel: move "setargs" field in Proc structure after "nargs" and "args"cinap_lenrek
2015-08-09kernel: mount flag is int not ulong, reduce size of Mount struct by putting ↵cinap_lenrek
mflag field in what would be wasted as padding
2015-08-09kernel: pgrpcpy(), simplify Mount structurecinap_lenrek
instead of ordering the source mount list, order the new destination list which has the advantage that we do not need to wlock the source namespace, so copying can be done in parallel and we do not need the copy forward pointer in the Mount structure. the Mhead back pointer in the Mount strcture was unused, removed.
2015-08-09kernel: fix Mheadachecinap_lenrek
there was a race between cunmount() and walk() on Mhead.from as Mhead.from was unconditionally freed when we cunmount(), but findmount might have already returned the Mhead in walk(). we have to ensure that Mhead.from is not freed before the Mhead itself (now done in putmhead() once the reference count of the Mhead drops to zero). the Mhead struct contained two unused locks, removing. no need to hold Pgrp.ns lock in closegrp() as nobody can get to it (refcount droped to zero). avoid cclose() and freemount() while holding Mhead.lock or Pgrp.ns locks as it might block on a hung up fileserver. remove the debug prints... cleanup: use nil for pointers, remove redundant nil checks before putmhead().
2015-08-08rootstub: add spimcinap_lenrek
2015-08-08cdproto: add spimcinap_lenrek
2015-08-08add /spimcinap_lenrek
2015-08-08python: fix build for objtype=$spimcinap_lenrek
2015-08-08gs: fix build for objtype=spimcinap_lenrek
2015-08-08libmp: fix build for objtype=spimcinap_lenrek
2015-08-08ape: fix build for objtype=spimcinap_lenrek
2015-08-08fix library mkfiles for objtype=spimcinap_lenrek
2015-08-05libmach: remove redundant check for big endianmischief
2015-08-05libmach: remove useless error check from previous commitmischief
2015-08-05libmach: set correct endianness with little endian ELF32 mips binariesmischief
2015-08-06kernel: remove unused MAXCRYPT constant from portdat.hcinap_lenrek
2015-08-06vgaigfx: remove #define MB, theres a MB enum in portdat.hcinap_lenrek
2015-08-06kernel: have to validate argv[] again when copying to the new stackcinap_lenrek
we have to validaddr() and vmemchr() all argv[] elements a second time when we copy to the new stack to deal with the fact that another process can come in and modify the memory of the process doing the exec. so the argv[] strings could have changed and increased in length. we just make sure the data being copied will fit into the new stack and error when we would overflow. also make sure to free the ESEG in case the copy pass errors.
2015-08-06kernel: limit argv[] strings to the USTKSIZE to avoid overflowcinap_lenrek
argv[] strings get copied to the new processes stack segment, which has a maximum size of USTKSIZE, so limit the size of the strings to that and check early for overflow.
2015-08-06kernel: validnamedup() the name argument for segattach()cinap_lenrek
this moves the name validation out of segattach() to syssegattach() to make sure the segment name cannot be changed by the user while segattach looks at it.
2015-08-06kernel: fix indention in validname0()cinap_lenrek
2015-08-06kernel: limit syscallfmt user strings to 64K (as in validname)cinap_lenrek
2015-08-06kernel: change vmemchr() length argument to ulong and simplifycinap_lenrek
2015-08-06kernel: use Etoolong[] constant instead of string literal in validname0()cinap_lenrek
2015-08-06kernel: make shargs() function static in sysproc.ccinap_lenrek
2015-08-06kernel: reject empty argv (argv[0] == nil) in sysexec()cinap_lenrek
when executing a script, we did advance argp0 unconditionally to replace argv[0] with the script name. this fails when argv[] is empty, then we'd advance argp0 past the nil terminator. the alternative would be to *not* advance if *argp0 == nil, but that would require another validaddr() check for a case that is unlikely to have been anticipated in most programs being invoked as libc's ARGBEGIN macro assumes argv[0] being non-nil as it also unconditionally advances the argv pointer. to keep us sane, we now reject an empty argv[]. on entry, we verify that argv[] is valid for at least two elements: - the program name argv[0], has to be non-nil - the first potential nil terminator in argv[1] when argv[0] == nil, we throw Ebadarg "bad arg in system call"
2015-08-05init: do not run $home/lib/profile when cd $home failedcinap_lenrek
avoiding follow up error messages, which is annoying and quite common when running a terminal as "none" for testing.
2015-08-05kfs: set permission of / to 0775 on reamcinap_lenrek
this allows members of the -1 group to create new directories in / without having to fiddle with the fileserver console. this also makes it consistent to hjfs and cwfs.
2015-08-05cwfs: set permission of / to 0775 on reamcinap_lenrek
this allows members of the -1 group to create new directories in / without having to fiddle with the fileserver console. this also makes it consistent to hjfs.
2015-08-05pc, pc64: remove unused psaux driver, cleanup devkbdcinap_lenrek
the psaux driver is not used in any kernel configuration and theres no userspace mouse daemon. i8042auxcmds() is wrong as access to the user buffer can fault and we are holding an ilocks. little cleanups in devkbd.
2015-08-05devkbd: disable mosue/keyboard on shutdown, disable ps2 mouse on init, ↵cinap_lenrek
remove kbdenable()/kbdinit() on vmware, loading a new kernel sometimes reboots when wiggling the mouse. disabling keyboard and mouse on shutdown fixes the issue. make sure ps2 mouse is disabled on init, will get re-enabled in i8042auxenable(). keyboard isnt special anymore, we can just use the devreset entry point in the device to do the keyboard initialization, so kbdinit()/kbdenable() are not needed anymore.
2015-08-04kernel: remove unused qstate() functioncinap_lenrek
2015-08-04devkbd: poll pc keyboard before blocking on kbd.qcinap_lenrek
the keyboard stops sending interrupts when its fifo gets full, which can happen on boot when keys get mashed while interrupts are still disabled. to work arround this, call the keyboard interrupt handler when kbd.q is starved before blocking.
2015-08-04python: use altzonecinap_lenrek
2015-08-04ape: implement altzone for tzset()cinap_lenrek
2015-08-04ape: fix mktime() againcinap_lenrek