1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-02 08:42:48 +00:00
freebsd/sys/amd64
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
..
amd64 Fix setdumpdev(): 1995-05-29 04:08:13 +00:00
conf Changed swap partition handling/allocation so that it doesn't 1995-05-14 03:00:10 +00:00
include Made "NMBCLUSTERS" calculation dynamic and fixed bogus use of "NMBCLUSTERS" 1995-05-25 07:41:28 +00:00
isa "1 easy fix in 10 excrutiating steps" 1995-05-13 00:09:38 +00:00
pci Correct pcibus_setup() to return as soon as one test succeeds. 1995-03-22 21:35:39 +00:00
Makefile Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some 1993-10-16 19:17:18 +00:00