117521 Commits

Author SHA1 Message Date
rwatson
7d516f2454 Merge vfs_subr.c:1.646 from HEAD to RELENG_6:
In vfs_kqfilter(), return EINVAL instead of 1 (EPERM) when an unsupported
  kqueue filter type is requested on a vnode.

Approved by:	re (kensmith)
2005-09-15 20:52:53 +00:00
rwatson
6a6cd36b7c Merge fifo_vnops.c:1.120 from HEAD to RELENG_6:
When a request is made to register a filter on a fifo that doesn't
  apply to the fifo (i.e., not EVFILT_READ or EVFILT_WRITE), reject
  it as EINVAL, not by returning 1 (EPERM).

Approved by:	re (kensmith)
2005-09-15 20:50:31 +00:00
rwatson
6185980a8f Merge fifo_vnops.c:1.119 from HEAD to RELENG_6:
Remove DFLAG_SEEKABLE from fifo file descriptors: fifos are not seekable
  according to POSIX, not to mention the fact that it doesn't make sense
  (and hence isn't really implemented).  This causes the fifo_misc
  regression test to succeed.

Approved by:	re (scottl)
2005-09-15 20:50:04 +00:00
rwatson
dcebacb956 Merge fifo_vnops.c:1.118 from HEAD to RELENG_6:
Only poll the fifo for read events if the fifo is attached to a readable
  file descriptor.  Otherwise, the read end of a fifo might return that it
  is writable (which it isn't).

  Only poll the fifo for write events if the fifo attached to a writable
  file descriptor.  Otherwise, the write end of a fifo might return that
  it is readable (which it isn't).

  In the event that a file is FREAD|FWRITE (which is allowed by POSIX, but
  has undefined behavior), we poll for both.

Approved by:	re (kensmith)
2005-09-15 20:28:56 +00:00
rwatson
8c6b46594b Merge fifo_vnops.c:1.117 from HEAD to RELENG_6:
After going to some trouble to identify only the write-related events
  to poll the write socket for, the fifo polling code proceeded to poll
  for the complete set of events.  Use 'levents' instead of 'events' as
  the argument to poll, and only poll the write socket if there is
  interest in write events.

Approved by:	re (kensmith)
2005-09-15 20:28:27 +00:00
rwatson
5e1c31f370 Merge fifo_vnops.c:1.116 from HEAD to RELENG_6:
When a writer opens a fifo, wake up the read socket for read, not the
  write socket.

Approved by:	re (kensmith)
2005-09-15 20:27:56 +00:00
rwatson
7881b52021 Merge fifo_vnops.c:1.115 from HEAD to RELENG_6:
Add an assertion that fifo_open() doesn't race against other threads
  while sleeping to allocate fifo state: due to using the vnode lock to
  serialize access to a fifo during open, it shouldn't happen (tm).

Approved by:	re (kensmith)
2005-09-15 20:27:25 +00:00
rwatson
2c116f6385 Merge fifo_vnops.c:1.114 from HEAD to RELENG_6:
Rather than reaching into the internals of the UNIX domain socket code
  by calling uipc_connect2() to connect two socket endpoints to create a
  fifo, call soconnect2().

Approved by:    re (kensmith)
2005-09-15 20:26:19 +00:00
jhb
b84a032305 MFC: Fixup locking and mark MPSAFE.
Approved by:	re (kensmith)
2005-09-15 19:16:29 +00:00
jkoshy
c252d46167 MFC r1.12:
``Process one NMI interrupt per handler invocation as the processor
  buffers pending NMIs from multiple interrupting PMCs and delivers
  them serially.''

Approved by:	re (kensmith)
2005-09-15 15:48:16 +00:00
pjd
bf411a0ae5 MFC: sys/geom/eli/g_eli.c 1.12,1.13
- Don't forget to initialize crp_etype field.

  Reported by:	Nick Evans <nevans@syphen.net>

- Fix copy&paste typo.

Approved by:	re (scottl)
2005-09-15 14:17:31 +00:00
pjd
1bd06e2421 MFC: sbin/geom/class/eli/geom_eli.c 1.4
Even if there are no valid keys in metadata, but provider is attached
we can still use setkey subcommand.

Found by:	regression tests
Approved by:	re (scottl)
2005-09-15 14:12:54 +00:00
pjd
21628eb54c MFC: sys/dev/bge/if_bge.c 1.94
When bge_stop() is called from bge_detach(), mii is already NULL, so check
before trying to use it.
This fix allows to 'kldunload if_bge' without panicing.

Reviewed by:	bz
Approved by:	re (scottl)
2005-09-15 14:10:41 +00:00
marcel
b5bca4807d Mega-MFC:
o  Manpage type fix:
	kgdb/kgdb.1: 1.8

o  Unwind across trapframes:
	kgdb/kgdb.h: 1.3
	kgdb/kthr.c: 1.3
	kgdb/main.c: 1.9
	kgdb/trgt.c: 1.4
	kgdb/trgt_alpha.c: 1.3, 1.4
	kgdb/trgt_amd64.c: 1.3, 1.4, 1.5
	kgdb/trgt_i386.c: 1.3, 1.4, 1.5
	kgdb/trgt_ia64.c: 1.3, 1.4
	kgdb/trgt_sparc64.c: 1.4, 1.5, 1.6
	libgdb/Makefile: 1.10
	libgdb/frame-unwind.diff: 1.1

Approved by: re (scottl)
2005-09-15 05:32:11 +00:00
marius
59728c6ce0 MFC: 1.26
Add gem(4) to the list of devices supporting VLAN-sized frames natively
(since sys/dev/gem/if_gem.c rev. 1.34, MFC'ed in rev. 1.29.2.4).

Approved by:	re (scottl)
2005-09-14 21:26:09 +00:00
marius
6b28541ecc MFC: 1.34
- Allow for VLAN-sized frames and set IFCAP_VLAN_MTU.
- On resume all registers have to be initialized again like after
  power-on so reset sc_inited in gem_suspend() in order get all of
  the registers set next time gem_init_regs() is called.
- On at least some ERI and GEM revisions GEM_MAC_RX_OVERFLOW happen
  often due to a silicon bug and re-initializing is all we can do
  about these errors so make handling them non-verbose.
- Remove a superfluous memset(3) call in gem_meminit(), all elements
  are initialized to 0 anyway.

Approved by:	re (scottl)
2005-09-14 21:23:50 +00:00
marius
965ad6c04f MFC: 1.10
As with NO_CRYPT, don't try to compile geli(8) when NO_OPENSSL is defined
either.

Approved by:	re (scottl)
2005-09-14 21:21:45 +00:00
delphij
4f84dc1091 MFC 1.118:
When padding with zero, do pad after prefixes rather than padding
before prefixes.

Use cases:
	printf("%05d", -42);   -->   "00-42"   (should be "-0042")
	printf("%#05x", 12);   -->   "000xc"   (should be "0x00c")

Submitted by:	Oliver Fromme
PR:		kern/85520
Approved by:	re (kensmith)
2005-09-14 02:45:50 +00:00
marcel
48c62c6836 Mega-MFC: Add SMP support and enable it by default. This includes:
conf/GENERIC: 1.73, 1.53
	ia64/exception.S: 1.57
	ia64/interrupt.c: 1.50, 1.51
	ia64/machdep.c: 1.201, 1.202
	ia64/mp_machdep.c: 1.56, 1.57, 1.58
	ia64/pmap.c: 1.161, 1.162, 1.164, 1.165, 1.166
	ia64/sal.c: 1.15
	ia64/trap.c: 1.114, 1.115
	ia64/vm_machdep.c: 1.91, 1.92
	include/ia64_cpu.h: 1.20
	include/param.h: 1.21
	include/pmap.h: 1.25
	include/proc.h: 1.15
	include/smp.h: 1.10

Approved by: re (kensmith, scottl -- thanks!)
2005-09-13 21:07:14 +00:00
marcel
fcaf44b211 MFC 1.20: Remove the execute permission for stacks.
Approved by: re (blanket)
2005-09-13 20:54:00 +00:00
thompsa
12b6d396b7 MFC: if_bridge.c, r1.21; if_ethersubr.c, r1.198; in6_ifattach.c, r1.28;
nd6.c, r1.55; nd6_nbr.c, r1.33

> Add support for multicast to the bridge and allow inet6 addresses to be
> assigned to the interface.
>
> IPv6 auto-configuration is disabled. An IPv6 link-local address has a
> link-local scope within one link, the spec is unclear for the bridge case and
> it may cause scope violation.
>
> An address can be assigned in the usual way;
>   ifconfig bridge0 inet6 xxxx:...
>
> Tested by:      bmah
> Reviewed by:    ume (netinet6)
> Approved by:    mlaier (mentor)

Approved by:	re (kensmith), mlaier (mentor)
2005-09-13 18:02:39 +00:00
jkoshy
ca6608f391 MFC r1.9: Improve an error message.
Approved by:	re (kensmith)
2005-09-13 15:23:26 +00:00
glebius
173514a44a MFC 1.141:
- Do not hold route entry lock, when calling arprequest(). One such
    call was introduced by me in 1.139, the other one was present before.
  - Do all manipulations with rtentry and la before dropping the lock.
  - Copy interface address from route into local variable before dropping
    the lock. Supply this copy as argument to arprequest().

  (LOR Ids in original commit message.)

Approved by:	re (scottl)
2005-09-13 14:37:58 +00:00
maxim
caa0680e7f MFC rev. 1.10: postpone a temporary file creation until we realize
if ipfw(4) ever used.

Approved by:	re (scottl)
2005-09-13 14:34:11 +00:00
andre
af0f88b3d2 MFC rev. 1.233: Fix ICMP_UNREACH_NEEDFRAG case where no MTU was proposed
in the ICMP reply.

PR:             kern/81813
Submitted by:   Vitezslav Novy <vita at fio.cz>
Approved by:	re (kensmith)
2005-09-13 13:56:22 +00:00
glebius
f3983d158a MFC 1.7:
Plug item leak in case when not all hooks are connected.

  Found by:	David Vos <david.vos gmail.com>

Approved by:	re (kensmith)
2005-09-13 12:44:19 +00:00
glebius
3a2f67e4e3 MFC 1.68 by obrien:
Fix missing '=' in structure initialization.

Approved by:	re (kensmith)
2005-09-13 12:43:15 +00:00
glebius
7b7ee804e9 MFC 1.26 by ru:
Fixed parsing of unsigned integers.

Approved by:	re (kensmith)
2005-09-13 12:41:05 +00:00
grehan
f3c7dd1f4a MFC 1.3
Comment out ofw_console 'screen' entry and zs tty entries.
   The OpenFirmware console isn't used on real systems anymore and
   I never get to multi-user mode in psim. There are problems with
   zs that need to be resolved before these lines can be enabled.

   This eliminates disconcerting warnings on boot.

Approved by:	re (Ken Smith)
2005-09-13 05:59:07 +00:00
grehan
504bb97e61 MFC r1.101
Fix boot-time hang/panic on G3 systems when modifying IBAT0 in
  pmap_bootstrap by using the sync;isync big hammer to make sure
  all prior operations have completed.

  Reported by:    Nathan Whitehorn <nathan at uchicago edu>

Approved by:	re (Ken Smith)
2005-09-13 05:11:37 +00:00
emax
6778832488 MFC to RELENG_6
Fix typo in usage

Submitted by:	Jonatan B <onatan at gmail dot com>
Approved by:	re (scottl)
2005-09-12 16:09:23 +00:00
tegge
1323e854ee MFC: Giant is no longer needed here.
Approved by:	re (scottl)
2005-09-12 15:56:07 +00:00
tegge
dcec467d81 MFC: Don't retry when vget() returns ENOENT in the nonblocking case due to
the vnode being doomed.  It causes a livelock.

Approved by:	re (scottl)
2005-09-12 15:53:58 +00:00
glebius
a9f4fdf4f8 MFC 1.112:
Fix an item leak, that happens when some node calls ng_callout() two
  times consequently, without checking whether callout has been serviced
  or not. (ng_pptpgre and ng_ppp were catched in this behavior).

    - In ng_callout() save old item before calling callout_reset(). If the
      latter has returned 1, then free this item.
    - In ng_uncallout() clear c->c_arg.

  Problem reported by:    Alexandre Kardanev

Approved by:	re (kensmith)
2005-09-12 14:46:19 +00:00
glebius
c2a779c946 MFC:
Make callout_reset() return a non-zero value if a pending callout
  was rescheduled. If there was no pending callout, then return 0.

  Reviewed by:    iedowse, cperciva

Approved by:	re (kensmith)
2005-09-12 13:43:34 +00:00
glebius
3ec73de24d MFC 1.33:
Change default KTR_COMPILE from KTR_GEN to KTR_ALL, to match with
  manual page.

  Reviewed by:    jhb, pjd

Approved by:	re (kensmith)
2005-09-12 13:39:47 +00:00
glebius
b8c3ee740a MFC 1.31:
When a carp(4) interface is being destroyed and is in a promiscous mode,
  first interface is detached from parent and then bpfdetach() is called.
  If the interface was the last carp(4) interface attached to parent, then
  the mutex on parent is destroyed. When bpfdetach() calls if_setflags()
  we panic on destroyed mutex.

  To prevent the above scenario, clear pointer to parent, when we detach
  ourselves from parent.

Approved by:	re (kensmith)
2005-09-12 13:37:56 +00:00
mlaier
48d8794b82 Commit imported changes to RELENG_6:
pf_ioctl.c Revision 1.153 Sun Aug 7 11:37:33 2005 UTC by dhartmei
 | verify ticket in DIOCADDADDR, from Boris Polevoy, ok deraadt@

 pf_ioctl.c Revision 1.158 Mon Sep 5 14:51:08 2005 UTC by dhartmei
 | in DIOCCHANGERULE, properly initialize table, if used in NAT rule.
 | from Boris Polevoy <vapcom at mail dot ru>, ok mcbride@

 pf.c Revision 1.502 Mon Aug 22 11:54:25 2005 UTC by dhartmei
 | when nat'ing icmp 'connections', replace icmp id with proxy values
 | (similar to proxy ports for tcp/udp). not all clients use
 | per-invokation random ids, this allows multiple concurrent
 | connections from such clients.
 | thanks for testing to Rod Whitworth, "looks ok" markus@

 pf.c Revision 1.501 Mon Aug 22 09:48:05 2005 UTC by dhartmei
 | fix rdr to bitmask replacement address pool. patch from Max Laier,
 | reported by Boris Polevoy, tested by Jean Debogue, ok henning@

Approved by:	re (scottl)
2005-09-12 11:25:17 +00:00
scottl
8e9278f664 MFC rev 1.13 of c-decl.c. A nice side effect is that it's once again
possible to compile a HEAD kernel in a RELENG_6 world via the normal
shortcuts.

Approved by: re
2005-09-12 10:22:53 +00:00
rwatson
19d0d47dcf Merge umask.2:1.13 from HEAD to RELENG_6:
Add mkfifo(2) to the man page SEE ALSO list for umask(2) -- it's
  mentioned in the description.

Approved by:	re (hrs)
2005-09-12 09:19:25 +00:00
mjacob
4b2341d343 MFC: Restore the 929X support that got nuked in merge
Approved by: re
2005-09-12 05:25:29 +00:00
imp
8043929e15 Change the default of pci_do_powerstate to 0, per request from re@.
The number of raid controllers that violate the WHQL seems to be
growing in number and not isolated to old versions as previously
thought.  Though the numbers of these seen in the wild is still
relatively small, they hang the system when parts of their devices are
powered down.  The one area that these parts appear often are in the
higher end servers.  As such, be conservative about powering down
devices that have no driver attached by default.  Until a better
approach is proven in current, this is the prudent choice.

Laptop users wishing the benefits of powering down devices with no
drivers will now need to set hw.pci.do_powerstate=1 in their
/boot/loader.conf file.  Some users will have devices that will
prevent this setting (hence the need to make it default 0).

Approved by: re@ (scottl)
2005-09-11 19:28:30 +00:00
truckman
b95c7d3514 MFC src/sys/gnu/fs/ext2fs/fs.h 1.18
src/sys/kern/kern_shutdown.c	1.175
	src/sys/sys/buf.h 		1.189

  Modified files:
    sys/gnu/fs/ext2fs    fs.h
    sys/kern             kern_shutdown.c
    sys/sys              buf.h
  Log:
  Add a new struct buf flag bit, B_PERSISTENT, and use it to tag
  struct bufs that are persistently held by ext2fs.  Ignore any buffers
  with this flag in the code in boot() that counts "busy" and dirty
  buffers and attempts to sync the dirty buffers, which is done before
  attempting to unmount all the file systems during shutdown.

  This fixes the problem caused by any ext2fs file systems that are
  mounted at system shutdown time, which caused boot() to give up on
  a non-zero number of buffers and skip the call to vfs_unmountall().
  This left all the mounted file systems in a dirty state and caused
  them to all require cleanup by fsck on reboot.

  Move the two separate copies of the "busy" buffer test in boot()
  to a separate function.

  Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro.

  Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with
  this and previous flag changes.

  PR:             kern/56675, kern/85163
  Tested by:      "Matthias Andree" matthias.andree at gmx.de
  Reviewed by:    bde
  MFC after:      3 days

PR:		kern/56675, kern/85163
Tested by:	"Hanspeter Roth" hampi at rootshell.be
Tested by:	"Matthias Andree" matthias.andree at gmx.de
Reviewed by:	bde
Approved by:	re (scottl)
2005-09-11 19:06:50 +00:00
obrien
5d4fbf3a14 MFC the license files.
Approved by:	re(scottl)
2005-09-11 18:46:33 +00:00
cvs2svn
44440d8f55 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-09-11 17:50:21 +00:00
yar
25095198b5 MFC rev. 1.263:
Reflect a recent change in /etc/rc.subr that made ``-M''
  appear in tmpmfs and varmfs default flags explicitly.
  Explain why -M is good for these file systems (it maximizes
  performance and makes the system more stable at low memory
  conditions by reducing the chance of thrashing.)

  Bump .Dd accordingly.

Approved by:	re (hrs)
2005-09-11 17:24:49 +00:00
des
5be4e53fa0 Upgrade to 4.2p1.
Approved by:	re (kensmith)
2005-09-11 16:50:37 +00:00
brooks
82ed9e72d5 Sync network interface startup code with HEAD.
etc/network.subr: 1.165-1.167
 - kill removable_interfaces
 - add NOAUTO keyword
 - fix quoted entries in ifconfig_<ifn> variables
 - always up the interface
 - if ifconfig_<ifn> is defined, but empty, don't set it to
   ifconfig_DEFAULT
 - always configure lo0 first if it exists
etc/pccard_ether: 1.46
 - kill removable_interfaces
 - add NOAUTO keyword
etc/rc.d/netif: 1.15-1.17
 - block Ctrl-C in dhclient
 - minor cleanup of the interface list generation code

Approved by:	re (scottl)
Requested by:	many (death to removable_interfaces!)
2005-09-10 17:05:04 +00:00
brooks
81090ac359 MFC 1.43 and 1.44:
- Add new template sources to keep /conf more organized.

Approved by:	re (scottl)
2005-09-10 17:02:45 +00:00
brooks
95d5cce419 Sync dhclient with HEAD with exception of bpf.c:1.5.
sbin/dhclient/*.c:
 - add __FBSDID
sbin/dhclient/conflex.c: 1.3-1.4
 - fix a minor buffer overflow in config parsing
 - actually support backslash escaping in config files
bin/dhclient/dhclient-script: 1.6-1.10
 - don't create or remove routes to our address through 127.0.0.1
 - improved detection of the interface of the default route
 - support quotes in the medium string
 - clear interface state more effectively on failure
 - don't update resolv.conf when unchanged
bin/dhclient/dhclient.c: 1.10-1.11
 - validate domain-name (used as resolv.conf search string)
 - handle superseded subnet-mask correctly

Approved by:	re (scottl)
2005-09-10 17:01:16 +00:00