Commit Graph

117614 Commits

Author SHA1 Message Date
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
Joel Dahl
f7098e14b4 Add manual page for snd_t4dwave(4).
Approved by:	brueffer (mentor)
2005-08-15 17:07:37 +00:00
Joel Dahl
c94b6c4244 Update hardware section:
*  Document existing support for:
  -  CMD 646U2
  -  Highpoint HPT372N
  -  Intel 6300ESB
  -  Intel ICH7
  -  Nvidia nForce2 MCP
  -  Nvidia nForce3 MCP
  -  Nvidia nForce3 Pro
  -  Nvidia nForce4
  -  Promise PDC20571
  -  Promise PDC20575
  -  Promise PDC20579
  -  Promise PDC20580
  -  Promise PDC20621
  -  Promise PDC20622
  -  Promise PDC40518
  -  Promise PDC40519
  -  SIS 180
  -  SIS 181
  -  SIS 182
  -  SIS 965
  -  VIA VT6410
  -  VIA VT6420
  -  VIA VT6421

*  Remove HPT366 duplicate

Approved by:	brueffer (mentor)
2005-08-15 15:07:47 +00:00
Gleb Smirnoff
9ff95228e8 Implement a new feature for ping(8) - sweeping pings. In a sweeping
ping ICMP payload of packets being sent is increased with given step.
Sweeping pings are useful for testing problematic channels, MTU
issues or traffic policing functions in networks.

PR:		bin/82625
Submitted by:	Chris Hellberg <chellberg juniper.net> (with some cleanups)
2005-08-15 14:15:37 +00:00
Poul-Henning Kamp
a0f08bdf0c Cleanup and polishing. 2005-08-15 12:48:42 +00:00
Pawel Jakub Dawidek
8bd435d9cf Not sure why, but SYSCTL_OUT() can sometimes keep returning ENOMEM
in sysctl_jail_list(). Because of this, jls(8) could enter into
an endless loop. The strange thing is, that we can call jls(8) while
the other one is in loop and it will succeed - SYSCTL_OUT() will
not return ENOMEM there.

Maybe SYSCTL_OUT() returns first ENOMEM, because there is no memory,
but is marking some memory range as wired even on failure and another
SYSCTL_OUT() calls are not going to succeed, because process exceeds
limit of wired memory? ENOVMCLUE.

Anyway. Fix jls(8) to ignore ENOMEM and retry only 4 times.

Submitted by:	Niklas Saers
PR:		kern/79245
MFC after:	3 days
2005-08-15 12:15:21 +00:00
Robert Watson
33f23dc2fb The "Mbuf" zone was renamed "mbuf" to improve consistency, but the code
example in libmemstat.3 was not updated to take this rename into account.
Update the example.

PR:		84946
Submitted by:	Wojciech A. Koszek <dunstan at freebsd dot czest dot pl>
MFC after:	1 day
2005-08-15 10:24:20 +00:00
Poul-Henning Kamp
27fa5ded62 After much experimentation, settle for the simplest model for customize
scripts.
2005-08-15 08:13:01 +00:00
Andrew Thompson
691cdb5351 Ensure that we are holding the lock when initialising the bridge interface. We
could initialise while unlocked if the bridge is not up when setting the inet
address, ether_ioctl() would call bridge_init.

Change it so bridge_init is always called unlocked and then locks before
calling bstp_initialization().

Reported by:    Michal Mertl
Approved by:    mlaier (mentor)
MFC after:      3 days
2005-08-15 02:54:29 +00:00
Andrew Thompson
a1c0fd4dee Ensure that we are holding the lock when initialising the bridge interface. We
could initialise while unlocked if the bridge is not up when setting the inet
address, ether_ioctl() would call bridge_init.

Change it so bridge_init is always called unlocked and then locks before
calling bstp_initialization().

Reported by:	Michal Mertl
Approved by:	mlaier (mentor)
MFC after:	3 days
2005-08-15 02:50:13 +00:00
Marcel Moolenaar
d41a7ed490 Remove the execute permission for stacks. 2005-08-14 23:17:59 +00:00
Ian Dowse
3b89beb171 Attempt to improve the logic for automatically sizing partitions
to take into account the new default of starting the first partition
after the boot blocks instead of at sector 0. If you used automatic
sizing when the first partition did not start at 0, you would get
an error that the automatically sized partition extended beyond the
end of the disk.

Note that there are probably still many more complex cases where
automatic sizing and placement will not work (e.g. non-contiguous
or out of order partitions).
2005-08-14 22:46:50 +00:00
Pawel Jakub Dawidek
adf98e7afa Fix (/usr could not be mounted yet, so there is no grep(1) available) and
simplify checking for g_eli module.

MFC after:	3 days
2005-08-14 22:16:34 +00:00