Commit graph

18 commits

Author SHA1 Message Date
mischief eb1be5b4df devaoe: really fix unit numbering, to be 0-based 2018-08-06 09:41:28 -07:00
mischief 796c41092a devaoe: fix unit numbering for Qdevlinkdir
a side effect of 3c77cd3ae664 changed the unit ordering to start at one, so fix the condition accordingly.
2018-08-06 08:50:40 -07:00
cinap_lenrek 8c70c09bfd devaoe: fix dotdot walk in devlinkdir, make perms consistent 2018-06-03 23:30:57 +02:00
cinap_lenrek d6e0e9c402 kernel: move devether and wifi to port/
the only architecture dependence of devether was enabling interrupts,
which is now done at the end of the driver's reset() function now.

the wifi stack and dummy ethersink also go to port/.

do the IRQ2->IRQ9 hack for pc kernels in intrenabale(), so not
every caller of intrenable() has to be aware of it.
2018-02-11 18:08:03 +01:00
cinap_lenrek 772afbe98c format pointer subtraction results with %zd instead of %ld (for long -> intptr on amd64) 2016-01-07 04:44:13 +01:00
cinap_lenrek ff03b72ed5 devaoe: more nil vs. 0 2015-07-23 22:05:46 +02:00
cinap_lenrek 0b3fd7c052 devaoe: fix off by one in aoeerror(), consistent use of nil for pointers, error handling 2015-07-22 21:56:11 +02:00
cinap_lenrek d4d86df2ab kernel: new pagecache, remove Lock from page, use cmpswap for Ref instead of 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.
2014-06-22 15:12:45 +02:00
cinap_lenrek df6b68092c kernel: kproc error and exit
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-11-22 22:28:20 +01:00
cinap_lenrek 3cccb8fb12 devaoe: avoid panic on malloc() error by using smalloc() instead. 2013-05-12 19:04:07 +02:00
cinap_lenrek 0124d865a6 aoe: updating aoe driver from erik quanstros 9atom
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.
2013-05-01 18:50:07 +02:00
cinap_lenrek 16d61d3c97 kernel: try to catch some (rare) mistakes
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-11 17:29:16 +02:00
cinap_lenrek 9e7ecc41d5 devproc buffer overflow, strncpy
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-10-01 02:52:05 +02:00
cinap_lenrek 36adf27af8 add Echange[] error string 2012-08-07 07:15:41 +02:00
cinap_lenrek 8cb8043d0e kernel: fix more malloc/smalloc errors 2011-12-12 19:17:58 +01:00
cinap_lenrek c2fc2fad13 merge sd changes from 9atom 2011-07-10 14:14:23 +02:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00