summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-10-22mergecinap_lenrek
2012-10-22rio: fix deadlockcinap_lenrek
we can't really change the Window *input from outside the winctl() thread. the problem is that the window might end up reading the mouse (scroll, select) which makes the w->cctl channel block once you try to talk to the window again (from the mousethread). this also means we have to coordinate window switchin from the winctl proc waiting for the current window to release the input and then take over. thers a new Winctl message Topped that basically does that now using Wakeup and a chan to synchronize.
2012-10-21pkg/list: handle werc directory listingsstanley lieber
2012-10-21rio: fix cursor for sizing nocurrent windowcinap_lenrek
wrepaint() used to also set the cursor for the window if it was current. this reset the corner cursors on bandresize when one tried to attempt to size a window that was not current. make repaint just repaint the window and border. set cursor explicitely for hold toggle.
2012-10-21rio: various fixescinap_lenrek
use notefd in killprocs() insead of postnote() as the process might'v exited. the notefd stays valid even if the particular process it was originaly opend on exited. remove the Window.pid field as its not needed. dup() the notefd for interruptproc as the window might'v gone away and closed the notefd file descriptor, resulting in us writing to the wrong thing. use snprint() instead of sprint() for safety. fix bogus debug fprint(). add missing "visible" flushimage() after Reshaped winctl message got handled. i assumed wsetname()/nameimage() would be enough, it but does a invisible flush so softscreen doesnt get updated immidiately. do not make allocimage() failure in scrtemps() fatal. it wont draw the window properly, but it gives the user a chance to delete some windows to recover.
2012-10-20/sys/doc: permissions for cleanps, mkdirlist, mkfilelistcinap_lenrek
2012-10-20rio: colors, flicker reduction, refresh after mouse closecinap_lenrek
allocate all the colors in iconinit(), remove unused ones like grey. rename darkgrey to paletextcol because thats what it is used for. new approach to window image allocation. we allocate the window with DNofill and let the window fill itself. this reduces flickering especially with (-b) option and makes rio resize feel a lot faster. wrefresh() didnt work. now fixed.
2012-10-20rio: wtop() after resize fixcinap_lenrek
wtop() checked w->topped == topped as a fast exit. if you had the top most window not being current (== input) which can happen when you delete the current window, then wtop would after resize would not make the window current because it is already top topmost one. wtopme() and wcurrent() both are non-ops when window is already the topmost or window is already current, so remove the check as its not needed. also topping the window feels less sluggish.
2012-10-20rio: preserve window z-order on resize, fix race conditionscinap_lenrek
sort the window array by w->topped before reshaping all windows. this preserves the window z-order. remove implicit focus change on reshape/move. it called wcurrent() in wtcl thread which might send a wctl message to itself, bad... also we might not want to change focus on reshape, like for the rio resize. so we set the input window explicitely in all call sites. window deletion was racy. wclosewin() destroys w->i, but it is called outside the wctl thread so it might just free the image under libframe doing some text selection. this is fixed the following: add wclunk() function, which basically just marks the window as deleted and removes the reference from the window[] and hidden[] arrays. (called on wclose() when refcount drops to zero). wclosewin() now just frees the image and is only called from the wctl thread on exit or when handing the Deleted message. get a reference to the window when doing sweeping or moving as the filesystem might just clunk it under us and we might end up sending wctl messages to a Exited window. wctl resize message has to fail if the window is not current as it might be hidden... would also be annoying.
2012-10-18more generic way to deal with image chan conversion for resize/resample/rotatecinap_lenrek
this is to catch crazy color channels like k8a8 and the 15/16 bit ones and CMAP. basically, just convert to RGBA32 or RGB24 depending on if it has an alpha channel.
2012-10-18rio: copy window labels for menu3cinap_lenrek
as the menu is displayed, the window might go away or change its label causing menuhit() to dereference bad memory. just strdup() the labels before passing to menu3str to prevent accidents.
2012-10-18document urlencode in hget(1)cinap_lenrek
2012-10-18hpost: better handling of optional -u flagcinap_lenrek
2012-10-18hpost: add -l flag to get location url after POSTcinap_lenrek
2012-10-18/sys/src/cmd/auth/mkfile: fix lib.$O.a racecinap_lenrek
2012-10-17kernel: mnt cache reworkcinap_lenrek
avoid double entries in the cache for copen() and properly handle locking so we wont just give up if we cant lock the Mntcache entry, but drop the cache lock, qlock the Mntcache entry, and then recheck the cache. general cleanup (cdev -> ccache, use eqchantdqid())
2012-10-16fortunes, rob, rsc, troll: the war is overstanley lieber
2012-10-16kernel: duppage cleanupcinap_lenrek
remove the sched() call and retry loop from duppage() and just drop the page lock, then reacquire it after lock(&palloc).
2012-10-16kernel: cachedel() lock order, lookpage, cleanupcinap_lenrek
the lock order of page.Lock -> palloc.hashlock was violated in cachedel() which is called from the pager. change the code to do it in the right oder to prevent deadlock. change lookpage to retry on false hit. i assume that a false hit means: a) we'r low on memory -> cached page got uncached/reused b) duppage() got called on the page, meaning theres another cached copy in the image now. paging in is expensive compared to the hashtable lookup, so i think retrying is better. cleanup fixfault, adding comments.
2012-10-15swap: track swap pages with > 255 references, setswapchan() swapimage.ccinap_lenrek
swaped pages use a 8bit refcount where as the Page uses a 16bit one. this might be exploited with having a process having a single page swaped out and then forking 255 times to make the swap map refcount overflow and panic the kernel. this condition is probably very rare. so instead of doubling the size of the swap map, we add a single 32bit refcount swapalloc.xref which will keep the combined refcount of all swap map entries who exceeded 255 references. zero swapimage.c in setswapchan() after closing it as the stat() call below might error leaving a dangeling pointer.
2012-10-14kernel: attachimage / exec error handlingcinap_lenrek
attachimage()'s approach to handling newseg() error is flawed: a) the the image is on the hash table, but ref is still 0, and there is no segment/pages attached to it so nobody is going to reclaim / putimage() it -> leak b) calling pexit() would deadlock us because exec has acquired up->seglock when calling attachimage(), so this would just deadlock. the fix does the following: attachimage() will putimage() and nexterror() if newseg() fails instead of pexit(). this is less surprising. exec now keeps the condition variable commit which is set once we are commited / reached the point of no return and check this variable in the highest waserror() handler and pexit() us there. this way we have released up all the locks and pexit() will cleanup. note: this bug shouldnt us hit in with the current newseg() implementation as it uses smalloc() which would wait to satisfy the allocation instead of erroring.
2012-10-14update fshalt(8) manpagecinap_lenrek
2012-10-14formpost becomes hpostcinap_lenrek
2012-10-13urlencode: fix /fd/0 usecinap_lenrek
2012-10-12ircrc: fix spurious autojoincinap_lenrek
2012-10-12ircrc(1): man page fixes, thanks papstanley lieber
2012-10-11hget(1): fix man page errors, add another examplestanley lieber
2012-10-12ircrc: various improvements (thanks again pap!)cinap_lenrek
the -t option was ineffective. this fixes is. fix incompatibility with 9vx as its tcp/status file returns slightly different format than Plan 9. strip annoying  character from nickserv.
2012-10-11add /rc/bin/formpost; add formpost to hget(1) man pagestanley lieber
2012-10-11cifsd: fix 64bit fileoffset bugcinap_lenrek
the low 32bit word got *sign-extended* on vlong conversion. m(
2012-10-11ircrc(1): fix errorstanley lieber
2012-10-11add /sys/man/1/ircrc, thanks papstanley lieber
2012-10-11kernel: try to catch some (rare) mistakescinap_lenrek
kstrcpy() did not null terminate for < 4 byte buffers. fixed, but i dont think there is any case where this can happen in practice. always set malloctag in kstrdup(), cleanup. always use ERRMAX bounded kstrcpy() to set up->errstr, q->err and note[]->msg. paranoia. instead of silently truncating interface name in netifinit(), panic the kernel if interface name is too long as this case is clearly a mistake. panic kernel when filename is too long for addbootfile() in devroot. this might happen if your kernel configuration is messed up.
2012-10-116in4: fix exit status, less strict src filtering, logging (import from sources)cinap_lenrek
2012-10-10kenrel: simplify image cache by use of ccloseq()cinap_lenrek
2012-10-09vncv: cleanupcinap_lenrek
2012-10-09vncv: fork tcs with RFNOWAIT as we dont collect wait messagecinap_lenrek
2012-10-09vncv: snarfvers race, silly walks, add -l option for clipboard charsetcinap_lenrek
2012-10-09/sys/lib/acid/kernel: fix imagecache() and procenv()cinap_lenrek
2012-10-09mergecinap_lenrek
2012-10-09/sys/lib/acid/kernel: needacid("chan")cinap_lenrek
2012-10-08fortunesaiju
2012-10-07netaudit(8): englishstanley lieber
2012-10-08content-driven bullshitcinap_lenrek
2012-10-08netaudit changes and manual pagecinap_lenrek
2012-10-07hjfs(8): fix wordingstanley lieber
2012-10-07fortunes, rsc, rob: morestanley lieber
2012-10-07add /sys/man/8/hjfsstanley lieber
2012-10-07just-in-time-scale bullshitcinap_lenrek
2012-10-07fixed the bullshit in bullshitaiju