plan9fox/sys
cinap_lenrek 4d211fdd48 kernel: fix integer overflow in syssegflush(), segment code cleanup
mcountseg(), mfreeseg():
use Pte.first/last pointers when possible and avoid constructs
like s->map[i]->pages[j].

freepte():
do not zero entries in freepte(), the segment is going away and
here is no point in zeroing page pointers. hoist common code at
the top avoiding duplication.

segpage(), fixfault():
avoid load after store for Pte** pointer.

fixfault():
return -1 in default case to avoid the "used but not set" warning
for mmuphys and get rid of the useless initialization.

syssegflush():
due to len being unsigned, the pe = PGROUND(pe) can make "chunk"
bigger than len causing a overflow. rewrite the function and deal
with page alignment and errors at the beginning.

syssegflush(), segpage(), fixfault(), putseg(), relocateseg(),
mcountseg(), mfreeseg():
keep naming consistent.
2015-03-10 18:16:08 +01:00
..
doc /sys/doc: permissions for cleanps, mkdirlist, mkfilelist 2012-10-20 19:09:54 +02:00
games/lib fortunes: My recent incompetence is humbling. I should quit the industry. 2015-02-25 19:22:47 -05:00
include libthread: get rid of chaninit() (thanks qrstuv) 2015-03-04 10:20:31 +01:00
lib set /mail/tmp permissions world writable in cdproto 2015-03-05 10:16:17 +01:00
man wpa(8): the -p flag will also prompt for user/password on wpa enterprise 2015-03-10 00:44:17 +01:00
src kernel: fix integer overflow in syssegflush(), segment code cleanup 2015-03-10 18:16:08 +01:00