- use strlcpy() instead of strncpy() to avoid the off-by-one error
and the three missing '\0' terminations.
- perform bounds checks to make sure we don't turn this into a random
memory writing tool using setenv HOME `perl -e 'print "a"x5000'`
Mach VM's now. Specific changes:
- Pages now need not have all of their mappings removed before being
put on the inactive list. They only need to have the "referenced"
attribute cleared. This makes putting pages onto the inactive list
much more efficient. In order to eliminate redundant clearings of
"refrenced", callers of uvm_pagedeactivate() must now do this
themselves.
- When checking the "modified" attribute for a page (for clearing
PG_CLEAN), make sure to only do it if PG_CLEAN is currently set on
the page (saves a potentially expensive pmap operation).
- When scanning the inactive list, if a page is referenced, reactivate
it (this part was actually added in uvm_pdaemon.c,v 1.27). This
now works properly now that pages on the inactive list are allowed to
have mappings.
- When scanning the inactive list and considering a page for freeing,
remove all mappings, and then check the "modified" attribute if the
page is marked PG_CLEAN.
- When scanning the active list, if the page was referenced since its
last sweep by the scanner, don't deactivate it. (This part was
actually added in uvm_pdaemon.c,v 1.28.)
These changes greatly improve interactive performance during
moderate to high memory and I/O load.
found records. This makes resulting db for small capability databases
much smaller - for vgrind(1), the resulting vgrindefs.db is about 24KB
instead of ~500KB.
The hint passed to dbopen() is number of records in input files
rounded up to nearest power-of-two value and multiplied by two.
Besides being a nice conservative value, termcap.db become about
70KB bigger if the hint matches the count of records (1023), probably
due to hash overflows.
changes include:
- do not chase header if ip/ip6 datagram is framgented, and it is not the
first fragment
- u_short -> u_int16_t
- buffer boundary checks, including sprintf -> snprintf
- cleanup truncated packet cases
- pull tcpdump.org enhancements/corrections for RIP, IPv6 options, ICMPv6,
OSPFv3, IPv4 options, BGP
there are a lot of local/conflicting changes. we'd gradually decrease
# of diffs by synchronizing both ends, and then move to src/dist/tcpdump
and reachover makefile.