freebsd-skq/sys/i386
David Greenman ac8d676972 Fix setdumpdev():
- 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
1995-05-29 04:08:13 +00:00
..
apm This is the latest version of the APM stuff from HOSOKAWA, I have looked 1995-02-17 02:22:57 +00:00
bios This is the latest version of the APM stuff from HOSOKAWA, I have looked 1995-02-17 02:22:57 +00:00
boot Reduce the amount of bss the kzip stuff uses by moving big buffers into 1995-05-29 01:38:07 +00:00
conf Submitted by: dufault 1995-05-28 13:24:16 +00:00
eisa Fix -Wformat warnings from LINT kernel. 1995-05-11 19:26:53 +00:00
i386 Fix setdumpdev(): 1995-05-29 04:08:13 +00:00
ibcs2 Fix CHOWN_RESTRICTED and NO_TRUNC to return correct values per POSIX 1995-05-02 17:14:38 +00:00
include Made "NMBCLUSTERS" calculation dynamic and fixed bogus use of "NMBCLUSTERS" 1995-05-25 07:41:28 +00:00
isa Increased delay after reset to 10ms. Suggested by several people, the last 1995-05-27 04:40:57 +00:00
pci Correct pcibus_setup() to return as soon as one test succeeds. 1995-03-22 21:35:39 +00:00
scsi Fixes to the aic7xxx sequencer code and device driver from Justin Gibbs: 1995-05-17 07:06:02 +00:00
Makefile Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some 1993-10-16 19:17:18 +00:00