ac8d676972
- the major number wasn't checked, so accesses beyond the end of bdevsw[] were possible. Bogus major numbers are easy to get because `sysctl -w' doesn't handle dev_t's reasonably - it doesn't convert names to dev_t's and it converts the number 1025 to the dev_t 0x35323031. - Driver d_psize() functions return -1 to indicate error ENXIO or ENODEV (the interface is too braindamaged to say which). -1 was interpreted as a size and resulted in the bogus error ENOSPC. - it was possible to set the dumpdev for devices without a d_psize() function. This is equivalent to setting the dumpdev to NODEV except it confuses sysctl. - change a 512 to DEV_BSIZE. There is an official macro dtoc() for converting "pages" to disk blocks but it is never used in /usr/src/sys. There is much confusion between PAGE_SIZE sized pages and NBPG sized pages. Maxmem consists of both. Not fixed: - there is nothing to invalidate the dumpdev if the media goes away. This reduces the benefits of the early calculation of dumplo. Bounds checking in the dump routines is relied on to reduce the risk of damage and little would be lost by relying on the dump routines to calculate dumplo. - no attempt is made to stay away from the start of the device to avoid clobbering labels. Fix wrong && anachronistic comment about the type of bootdev. Reviewed by: davidg Submitted by: Bruce Evans |
||
---|---|---|
.. | ||
amd64 | ||
conf | ||
include | ||
isa | ||
pci | ||
Makefile |