summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devaoe.c
AgeCommit message (Collapse)Author
2016-01-07format pointer subtraction results with %zd instead of %ld (for long -> ↵cinap_lenrek
intptr on amd64)
2015-07-23devaoe: more nil vs. 0cinap_lenrek
2015-07-22devaoe: fix off by one in aoeerror(), consistent use of nil for pointers, ↵cinap_lenrek
error handling
2014-06-22kernel: new pagecache, remove Lock from page, use cmpswap for Ref instead of ↵cinap_lenrek
Lock make the Page stucture less than half its original size by getting rid of the Lock and the lru. The Lock was required to coordinate the unchaining of pages that where both cached and on the lru freelist. now pages have a single next pointer that is used for palloc.head freelist xor for page cache hash chains in Image.pghash[]. cached pages are not on the freelist anymore, but will be reclaimed from images by the pager when the freelist runs out of pages. each Image has its own 512 hash chains for cached page lookup. That is 2MB worth of pages and there should be no collisions for most text images. page reclaiming can be done without holding palloc.lock as the Image is the owner of the page hash chains protected by the Image's lock. reclaiming Image structures can be done quickly by only reclaiming pages from inactive images, that is images which are not currently in use by segments. the Ref structure has no Lock anymore. Only a single long that is atomically incremented or decremnted using cmpswap(). there are various other changes as a consequence code. and lots of pikeshedding, sorry.
2013-11-22kernel: kproc error and exitcinap_lenrek
catch the error() that can be thrown by sleep() and tsleep() in kprocs. add missing pexit() calls. always set the freemem argument to pexit() from kproc otherwise the process gets added to the broken list.
2013-05-12devaoe: avoid panic on malloc() error by using smalloc() instead.cinap_lenrek
2013-05-01aoe: updating aoe driver from erik quanstros 9atomcinap_lenrek
1 the config string was grabbed Aoehsz too far into the packet due to using the wrong pointer to start. 2 never accept a response with tag Tmgmt or Tfree. 3 defend against "malicious" responses; ones with a response Aoehdr.type != request Aoehdr.type. this previously could cause the initiator to crash. 4 vendor commands were improperly filtered out.
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-01devproc buffer overflow, strncpycinap_lenrek
in devproc status read handler the p->status, p->text and p->user could overflow the local statbuf buffer as they where copied into it with code like: memmove(statbuf+someoff, p->text, strlen(p->text)). now using readstr() which will truncate if the string is too long. make strncpy() usage consistent, make sure results are always null terminated.
2012-08-07add Echange[] error stringcinap_lenrek
2011-12-12kernel: fix more malloc/smalloc errorscinap_lenrek
2011-07-10merge sd changes from 9atomcinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen