Commit graph

117827 commits

Author SHA1 Message Date
Søren Schmidt fb235b243c Use the bio field instead of the driver field as intended. 2005-08-17 14:50:18 +00:00
John Baldwin f68d1644f8 Use device_printf() and if_printf() and remove ste_unit from the softc. 2005-08-17 14:37:39 +00:00
Pawel Jakub Dawidek d1dca8a818 Even if crypto_dispatch() return an error, request is not canceled and
our callback will still be called, just to tell us that requested
failed...

Reported by:	Mike Tancsa <mike@sentex.net>
MFC after:	3 days
2005-08-17 14:34:52 +00:00
John Baldwin 45f3f78ced Catch up to ic_curchan changes by making the same change here that was made
in ipw(4) in the earlier ic_curchan mega commit.

Submitted by:	Øyvind Kolbu oyvind at kolbu dot ws
Tested by:	Stefan Ehmann shoesoft at gmx dot net
2005-08-17 14:08:52 +00:00
Pawel Jakub Dawidek 2be2b2eab5 We don't need to clear allocated memory. This will speed-up things a bit.
MFC after:	3 days
2005-08-17 14:08:50 +00:00
Murray Stokely 103d2a4254 Correct birthdate for Meriwether Lewis. He was born before the
declaration of independence, not after the first world war.
2005-08-17 13:32:18 +00:00
Giorgos Keramidas f87fc6e31c Add a small paragraph that describes how the current environment
settings can be displayed, near the end of the DESCRIPTION section,
immediately after the paragraph that describes how they can be set.

Add a reference to printenv(1) too (and the ``printenv'' csh builtin).

Submitted by:   Gary W. Swearingen <garys@opusnet.com>
PR:             docs/85008
2005-08-17 13:02:47 +00:00
Tim J. Robbins 1ee0dbee57 Fix a boundary condition error in slow() and fast() in multibyte locales:
we must allow the character beginning at "p" to be converted to a wide
character for the purposes of EOL processing and word-boundary matching.
2005-08-17 11:37:38 +00:00
Tim J. Robbins 0eac054729 Document the fact that word-boundary matching does not work
properly in multibyte locales.
2005-08-17 11:21:15 +00:00
Ian Dowse 65ed954554 In the ufsdirhash_build() failure case for corrupted directories
or unreadable blocks, make sure to destroy the mutex we created.
Also fix an unrelated typo in a comment.

Found by:	Peter Holm's stress tests
Reviewed by:	dwmalone
MFC after:	3 days
2005-08-17 08:48:42 +00:00
Poul-Henning Kamp 516ad423b1 Handle device drivers with D_NEEDGIANT in a way which does not
penalize the 'good' drivers:  Allocate a shadow cdevsw and populate
it with wrapper functions which grab Giant
2005-08-17 08:19:52 +00:00
Pawel Jakub Dawidek 12e755355b Assert proper key size also in userland by defining KASSERT in !_KERNEL case. 2005-08-17 07:59:07 +00:00
Poul-Henning Kamp a07b0febaa In vop_stdpathconf(ap) also default for _PC_NAME_MAX and _PC_PATH_MAX. 2005-08-17 06:59:23 +00:00
Gregory Neil Shapiro 7d0ac6f3a2 Make links for hoststat(8) and purgestat(8) man pages.
PR:		docs/85009
MFC after:	3 days
2005-08-17 02:36:31 +00:00
Colin Percival 78e3c65953 Add -frandom-seed=RepeatabilityConsideredGood to CFLAGS. This makes
this library build repeatably.  (This change was made to libstdc++
several months ago; I just realized today that it would help here as
well.)

Approved by:	kan
2005-08-17 01:59:10 +00:00
Christian S.J. Peron 8677689134 Ensure that file flags such as schg, sappnd (and others) are honored
by md(4). Before this change, it was possible to by-pass these flags
by creating memory disks which used a file as a backing store and
writing to the device.

This was discussed by the security team, and although this is problematic,
it was decided that it was not critical as we never guarantee that root will
be restricted.

This change implements the following behavior changes:

-If the user specifies the readonly flag, unset write operations before
 opening the file. If the FWRITE mask is unset, the device will be
 created with the MD_READONLY mask set. (readonly)
-Add a check in g_md_access which checks to see if the MD_READONLY mask
 is set, if so return EROFS
-Do not gracefully downgrade access modes without telling the user. Instead
 make the user specify their intentions for the device (assuming the file is
 read only). This seems like the more correct way to handle things.

This is a RELENG_6 candidate.

PR:		kern/84635
Reviewed by:	phk
2005-08-17 01:24:55 +00:00
Brooks Davis 13b302a79f Add two new template sources, /conf/bcast/${ipbca} and /conf/ip/${ip}.
These allow large installations to keep their /conf directory down to a
managable number of entries.

Clean up the handling of dhcp_cookie.
2005-08-17 00:28:38 +00:00
Colin Percival 751a4770f7 Unbreak the world build (in sbin/gbde). This file is used by both
kernel and world, so KASSERT() needs to be wrapped within an #ifdef
_KERNEL / #endif pair.

Reported by:	krion, tinderbox
2005-08-17 00:24:20 +00:00
Christian Brueffer 8d8b579597 Clarify how the 'channel' argument should look like and add an
example on how to obtain information on devices on an ata channel.

PR:		84676
Submitted by:	Kevin Oberman <oberman@es.net>
		Jeremie Le Hen <jeremie@le-hen.org>
MFC after:	3 days
2005-08-16 21:14:25 +00:00
John Baldwin ca5fc32d02 Fixup locking in if_my(4) and mark it MPSAFE:
- Add locked variants of my_start() and my_init().
- Assert that the lock is held in several places rather than recursing.
- Overhaul failure case handling in my_attach() so that it will actually
  clean up completely in each of the failure cases.
- Setup the interrupt after ether_ifattach() in my_attach().
- Remove unused callout handle from softc.
- Free the metadata for the descriptors my_in detach() (we leaked it
  before).
- Fix locking in my_ioctl().
- Remove spls.

Tested by:	brueffer
MFC after:	3 days
2005-08-16 20:39:30 +00:00
Poul-Henning Kamp 52d71e1a85 remove stale comments 2005-08-16 20:03:29 +00:00
Hajimu UMEMOTO 961f7f911f Save cpu level only when priority is greater than PRIO_USER
to make CPUFREQ_SET(NULL, prio) work.
TODO: implement saved_level as stack.

Reviewed by:	njl
2005-08-16 20:03:08 +00:00
Hajimu UMEMOTO 1c44678637 avoid exclusive sleep mutex. 2005-08-16 19:49:10 +00:00
Poul-Henning Kamp b3740d656f Remove stale comment. 2005-08-16 19:47:42 +00:00
Poul-Henning Kamp 31cc57cdbd Collect the devfs related sysctls in one place 2005-08-16 19:25:02 +00:00
Poul-Henning Kamp 9c0af1310c Create a new internal .h file to communicate very private stuff
from kern_conf.c to devfs.

For now just two prototypes, more to come.
2005-08-16 19:08:01 +00:00
Pawel Jakub Dawidek 36c51ae068 Check key size for rijndael, as invalid key size can lead to kernel panic.
It checked other algorithms against this bug and it seems they aren't
affected.

Reported by:	Mike Tancsa <mike@sentex.net>
PR:		i386/84860
Reviewed by:	phk, cperciva(x2)
2005-08-16 18:59:00 +00:00
John Baldwin 207377b25e Clarify a comment. 2005-08-16 18:15:17 +00:00
Brooks Davis 7cf30146f0 - Move IF_ADDR_LOCK_DESTROY(ifp) from if_free to if_free_type.
- Add a note that additions should be made to if_free_type and not
  if_free to help avoid this in the future.

This apparently fixes a use after free in if_bridge and may fix bugs
in other direct if_free_type consumers.

Reported by:	thompsa
2005-08-16 17:02:35 +00:00
Lukas Ertl 664a97517f Make it possible to remove stale, left-over subdisks. 2005-08-16 15:12:44 +00:00
Joel Dahl c6fd52cbe7 * Be more specific about supported ALI-chipsets.
* Add two missing dots.

Approved by:	brueffer (mentor)
2005-08-16 14:28:03 +00:00
Joel Dahl 229be6cef1 snd_via8233(4) works on amd64.
Approved by:	brueffer (mentor)
2005-08-16 14:25:12 +00:00
Colin Percival 398b037d7d Change the default partition sizing code in order to
1. Provide larger /, /var, and /tmp partitions (the last increase was
in 2001, and we now have both larger hard drives and more space-hungry
software.)
2. If there is enough space available, allocate extra space to /var
sufficient to store a crash dump.

On systems where harddrivesize > 3 * RAMsize + 10GB, the default sizes
will now be as follows:
swap	RAMsize * 2
/ 	512 MB
/tmp	512 MB
/var	1024 MB + RAMsize
/usr	the rest (8GB or more)

On systems where harddrivesize > RAMsize / 8 + 2 GB, the default sizes
will be in the following ranges, with space allocated proportionally:
swap	RAMsize / 8 -- RAMsize * 2
/	256 MB	    -- 512 MB
/tmp	128 MB      -- 512 MB
/var	128 MB      -- 1024 MB
/usr	1536 MB     -- 8192 MB

On systems with even less disk space, the existing behaviour is not
changed.

Approved by:	re (kensmith)
MFC after:	1 day
		(or once people stop arguing about colours of paint)
2005-08-16 13:19:17 +00:00
Poul-Henning Kamp f763f86b1d Increase flexibility in disk-layout 2005-08-16 05:49:17 +00:00
Marcel Moolenaar 3b347f6ccc Fix backtraces. Supply registers from the register window.
MFC after: 3 days
2005-08-16 05:13:57 +00:00
Peter Grehan 1f0baa8e5f Remove unnecessary and alarming printf.
MFC after:  1 day
2005-08-16 02:38:02 +00:00
Warner Losh 95c1629a4d More files from my server that I've been upgrading since I think 2.2
or 2.0.2.  These date back to 1996.  Likely not needed for most
people, but good to have on the list for completeness.

# This is part 1 of 2, as I only had time to go through the first few
# directories.
2005-08-15 21:38:13 +00:00
Marius Strobl 4571e2104f Now that at least some screen savers work on sparc64 sync with other
archs and enable splash(4) by default (the non-working screen savers
either don't compile or just have no effect when loaded, i.e. don't
cause harm).

MFC after:	1 week
2005-08-15 21:15:07 +00:00
Marius Strobl 1b279bfb52 - Change the code that determines whether to use a serial console and
which serial device to use in that case respectively to not rely on
  the OFW names of the input/output and stdin/stdout devices. Instead
  check whether input and output refers to the same device and is of
  type serial (uart(4) was already doing this) and for the fallback
  to a serial console in case a keyboard is the selected input device
  but unplugged do the same for stdin and stdout in case the input
  device is nonexistent (PS/2 and USB keyboards) or has a 'keyboard'
  property (RS232 keyboards). Additionally also check whether the OFW
  did a fallback to a serial console in the same way in case the
  output device is nonexistent. While at it save on some variables
  and for sys/boot/sparc64/loader/metadata.c move the code in question
  to a new function md_bootserial() so it can be kept in sync with
  uart_cpu_getdev_console() more easily.
  This fixes selecting a serial console and the appropriate device
  when using a device path for the 'input-device' and 'output-device'
  OFW environment variables instead of an alias for the serial device
  to use or when using a screen alias that additionally denotes a
  video mode (like e.g. 'screen:r1024x768x60') but no keyboard is
  plugged in (amongst others). It also makes the code select a serial
  console in case the OFW did the same due to a misconfiguration like
  both 'input-device' and 'output-device' set to 'keyboard' or to a
  nonexisting device (whether the OFW does a fallback to a serial
  console in case of a misconfiguration or one ends up with just no
  console at all highly depends on the OBP version however).
- Reduce the size of buffers that only ever need to hold the string
  'serial' accordingly. Double the size of buffers that may need to
  hold a device path as e.g. '/pci@8,700000/ebus@5/serial@1,400000:a'
  exceeds 32 chars.
- Remove the package handle of the '/options' node from the argument
  list of uart_cpu_getdev_dbgport() as it's unused there and future
  use is also unlikely.

MFC after:	1 week
2005-08-15 20:58:36 +00:00
Brooks Davis f3447eb493 Vlan interfaces change their type after ether_ifattach() so we needs to
use if_free_type(ifp, IFT_ETHER) to delete them and stop leaking struct
arpcoms.

Reported by:	thompsa
MFC After:	3 days
2005-08-15 20:27:34 +00:00
Poul-Henning Kamp d785dfefa4 Eliminate effectively unused dm_basedir field from devfs_mount. 2005-08-15 19:40:53 +00:00
Warner Losh ef3af583d2 Add almost all the files I needed to clean out from my laptop disk
that's been updated via buildworld for about 5 years now...

Note: some of the bin/foo that were duplicated as sbin/foo were likely errors
in the first place.

Note2: This contains some, but not all, of the perl and uucp files as I'd
removed some of them before I started keeping track...
2005-08-15 18:48:23 +00:00
Poul-Henning Kamp 034d67974c Put more stuff in logfiles instead of stdout 2005-08-15 18:40:28 +00:00
Warner Losh 1dd467ac95 Some preliminary support for Megahertz XJEM and CCEM (same cards really)
combo cards.
2005-08-15 18:28:49 +00:00
Wilko Bulte 2ab7d9960b wisdom about 'beachhead' 2005-08-15 18:15:19 +00:00
Joel Dahl 331fe3c4a1 Auto generate device listings for snd_t4dwave(4).
Approved by:	brueffer (mentor)
2005-08-15 18:10:27 +00:00
Joel Dahl b2ce12e030 Xref snd_t4dwave(4).
Approved by:	brueffer (mentor)
2005-08-15 17:56:04 +00:00
Stefan Farfeleder 811beb4b88 Remove a hack for an ancient gdb. 2005-08-15 17:49:38 +00:00
Warner Losh dfad9073ad Diff reduction to my tree: commit the trivial part of efforts to add
support for the really old Megahertz ethernet/modem combo cards.
2005-08-15 17:20:34 +00:00
Lukas Ertl 8cc5eb98ad Fix a stupid logic bug introduced in geom_vinum_drive.c rev 1.18:
When a drive is newly created, it's state is initially set to 'down',
so it won't allow saving the config to it (thus it will never know of
itself being created).  Work around this by adding a new flag, that's
also checked when saving the config to a drive.
2005-08-15 17:07:47 +00:00