117565 Commits

Author SHA1 Message Date
pjd
2602cc468e MFC: sbin/geom/class/mirror/gmirror.8 1.17
Add a note in example as well, that last sector is used for metadata,
so it don't provoke confusions.

Noticed by:	Victor Sudakov <sudakov@sibptus.tomsk.ru>
Approved by:	re (scottl)
2005-10-06 18:19:13 +00:00
pjd
252b0c2081 MFC: sys/geom/eli/g_eli.h 1.4
Add a __packed keyword to g_eli_metadata struct definition, so
sizeof(struct g_eli_metadata) will return the exact number of bytes needed
for storing it on the disk.
Without this change GELI was unusable on amd64 (and probably other 64-bit
archs), because sizeof(struct g_eli_metadata) was greater than 512 bytes
and geli(8) was failing on assertion.

Reported by:	Michael Reifenberger <mike@Reifenberger.com>
Reminded by:	delphij
Approved by:	re (scottl)
2005-10-06 18:17:29 +00:00
jhb
ea58985c03 MFC: Add the simple refcount API.
Approved by:	re (scottl)
2005-10-06 18:13:19 +00:00
jhb
603cac3a99 MFC: Add atomic_fetchadd(9) operation for types int and 32.
Other small updates to atomic(9) include:
- Note that arm and ppc don't provide 64-bit atomic ops.
- Update sample code.

Approved by:	re (scottl)
2005-10-06 18:12:06 +00:00
ups
94034fc30c MFC: 1.176
Don't pretend to be thread0 when calling sync().
It confuses the lock manager since in some places thread0 is
then used for vnode locking while curthread is used for vnode unlocking.

Approved by:    re (scottl@)
2005-10-06 17:53:46 +00:00
imp
2edbd2e41a MFC: OLDCARD removal: don't build pccardd.
Approved by: re@ (scottl)
2005-10-06 16:56:45 +00:00
imp
3eeac112ca MFC: Remove references to OLDCARD
Approved by: re@ (scottl)
2005-10-06 16:36:31 +00:00
imp
9fc8aec782 MFC: Remove OLDCARD. It only panics on my pc98 laptop. I'll fix cbb to attach to isa.
Approved by: re (scottl)
2005-10-06 16:34:27 +00:00
phk
91cfbaebd1 MFC:
Make sure clonelists are correctly sorted.

Approved by:	re@ (scottl)
2005-10-06 15:17:41 +00:00
yar
70ec80eace MFC:
ifconfig.c 1.116

	For the sake of consistency and easier typing,
	introduce "-tunnel" as an alias for "deletetunnel".
	The latter is overly long and prone to typos,  but
	keep it for POLA since it costs nothing.

    ifvlan.c 1.8

	Deprecate the useless argument to -vlandev.

    ifconfig.8 1.102-1.105

	Document the above changes.
	Logically group vlan- and tunnel-related parameters.

Approved by:	re (scottl)
2005-10-06 15:01:56 +00:00
rwatson
9b0bec60c7 Merge db_command.c:1.62 from HEAD to RELENG_6:
Add a DDB "traceall" function, which stack traces all known process
  threads.  This is quite useful if generating a debug log for post-mortem
  by another developer, in which case the person at the console may not
  know which threads are of interest.  The output of this can be quite
  long.

  Discussed with: kris

Approved by:	re (scottl)
2005-10-06 13:15:21 +00:00
joel
79d0dbdda0 MFC:
pcm.4           1.41-1.42
snd_cmi.4       1.5
snd_csa.4       1.14
snd_emu10k1.4   1.6
snd_es137x.4    1.6
snd_sbc.4       1.15

Approved by:    re (scottl)
2005-10-06 10:58:16 +00:00
marius
dd23c6a3d3 MFC: if_gem.c 1.31 + 1.35, if_gem_pci.c 1.20, if_gemvar.h 1.11
- In gem_ioctl() move the call to ether_ioctl() to the default case of
  the switch statement in order to make this driver more like other
  Ethernet NIC drivers.
- In gem_attach() call gem_stop() in addition to gem_reset() to make
  sure the chip actually is stopped and not just reset.
- In gem_stop() also stop the gem_rint_timeout() callout in case the
  driver is compiled with GEM_RINT_TIMEOUT defined.
- Remove NOP spl*() calls and add locking (making gem(4) MPSAFE).

This MFC actually brings the RELENG_6 gem(4) in line with HEAD which
means that it additionally includes a comment update regarding the
IFF_OACTIVE -> IFF_DRV_OACTIVE rename which was part of if_gem.c 1.33
but missed in the respective MFC in 1.29.2.2.

Requested by:	thompsa
Approved by:	re (scottl)
2005-10-05 22:08:17 +00:00
marius
41d82ccbf1 MFC: 1.21
Fix an endianness issue in pnp_eisaformat().

Approved by:	re (scottl)
2005-10-05 21:53:17 +00:00
marius
8218f98610 MFC: creator.c 1.9, fbreg.h 1.19, gfb.c 1.8, machfb.c 1.4,
ofw_syscons.c 1.9, s3_pci.c 1.10, scgfbrndr.c 1.23, scmouse.c 1.40,
	scvgarndr.c 1.20, scvidctl.c 1.37, syscons.c 1.439, syscons.h 1.85,
	tga.c 1.8, vesa.c 1.52, vga.c 1.35

Add a font width argument to vi_load_font_t, vi_save_font_t and vi_putm_t
and do some preparations for handling 12x22 fonts (currently lots of code
implies and/or hardcodes a font width of 8 pixels). This will be required
on sparc64 which uses a default font size of 12x22 in order to add font
loading and saving support as well as to use a syscons(4)-supplied mouse
pointer image.

Approved by:	re (scottl)
2005-10-05 21:48:03 +00:00
avatar
0146d33484 MFC: (1.193) fixing WEP bustage in hostap mode.
Approved by:	re (scottl)
2005-10-05 13:16:29 +00:00
avatar
8c198e614a MFC: (1.27) fixing WEP bustage in hostap mode.
Approved by:	re (scottl)
2005-10-05 13:13:46 +00:00
rwatson
9e61878b2e Merge netisr.c:1.16 from HEAD to RELENG_6:
Rename net.isr.enable to net.isr.direct.

  No compatibility code is provided, as this will be the production name
  as of 6.0.  Previously this has been an experimental and unsupported
  feature.

  Requested by:	scottl

Approved by:	re (kensmith)
2005-10-05 12:32:23 +00:00
rwatson
830970b177 Merge init_main.c:1.258, mac_vfs.c:1.110, mac_biba.c:1.89,
mac_lomac.c:1.37, mac_mls.c:1.74, mac_stub.c:1.55, mac_test.c:1.62,
mac.h:1.69, mac_policy.h:1.70 from HEAD to RELENG_6:

  Remove mac_create_root_mount() and mpo_create_root_mount(), which
  provided access to the root file system before the start of the
  init process.  This was used briefly by SEBSD before it knew about
  preloading data in the loader, and using that method to gain
  access to data earlier results in fewer inconsistencies in the
  approach.  Policy modules still have access to the root file system
  creation event through the mac_create_mount() entry point.

  Removed now, and will be removed from RELENG_6, in order to gain
  third party policy dependencies on the entry point for the lifetime
  of the 6.x branch.

  Obtained from: TrustedBSD Project
  Submitted by:  Chris Vance <Christopher dot Vance at SPARTA dot com>

Approved by:	re (scottl)
2005-10-05 10:31:05 +00:00
avatar
7962ea5458 MFC: (1.192) honouring ic->ic_dtim_period.
Approved by:	re (scottl)
2005-10-05 06:54:12 +00:00
truckman
e2399e0b9d MFC kern_proc.c - fix locking in sysctl_kern_proc()
Original commit message:

  FreeBSD src repository

  Modified files:
    sys/kern             kern_proc.c
  Log:
  Always wire the sysctl output buffer in sysctl_kern_proc() before
  calling sysctl_out_proc().  -- fix from jhb

  Move the code in fill_kinfo_thread() that gathers data from struct proc
  into the new function fill_kinfo_proc_only().

  Change all callers of fill_kinfo_thread() to call both
  fill_kinfo_proc_only() and fill_kinfo() thread.  When gathering
  data from a multi-threaded process, fill_kinfo_proc_only() only needs
  to be called once.

  Grab sched_lock before accessing the process thread list or calling
  fill_kinfo_thread().

PR:		kern/84684
Approved by:	re (scottl)
2005-10-05 05:30:24 +00:00
truckman
7267aabbe1 MFC ffs_alloc.c 1.135 - clear i_flag field in recycled inodes
Original commit message:

  FreeBSD src repository

  Modified files:
    sys/ufs/ffs          ffs_alloc.c
  Log:
  Initialize the inode i_flag field in ffs_valloc() to clean up any
  stale flag bits left over from before the inode was recycled.

  Without this change, a leftover IN_SPACECOUNTED flag could prevent
  softdep_freefile() and softdep_releasefile() from incrementing
  fs_pendinginodes.  Because handle_workitem_freefile() unconditionally
  decrements fs_pendinginodes, a negative value could be reported at
  file system unmount time with a message like:
          unmount pending error: blocks 0 files -3
  The pending block count in fs_pendingblocks could also be negative
  for similar reasons.  These errors can cause the data returned by
  statfs() to be slightly incorrect.  Some other cleanup code in
  softdep_releasefile() could also be incorrectly bypassed.

Reviewed by:	tegge
Approved by:	re (scottl)
2005-10-05 05:24:53 +00:00
cvs2svn
abab8b0378 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-10-05 05:21:08 +00:00
rodrigc
e4cf6785ef MFC 1.53
Fix so that color changes are not lost when the video mode changes.

PR:             bin/83553
Submitted by:   Dan Lukes <dan at obluda dot cz>
Approved by:	re (scottl)
Reminded by:	delphij
2005-10-05 04:29:59 +00:00
rodrigc
7d90e26485 MFC 1.81
Call gctl_free() to free resource allocated with gctl_get_handle().

PR:		bin/84664
Submitted by:	Daan Vreeken <Danovitsch at Vitsch dot net>
Approved by:	re (scottl)
2005-10-05 01:16:39 +00:00
davidxu
d6ef43f59f MFC kern/kern_thread.c revision 1.217
kern/kern_kse.c     revision 1.218

Fix scheduler and sleep queue LOR.

Approved by: re (scottl)
2005-10-04 22:53:56 +00:00
rse
6635211f80 MFC to RELENG_6:
| Fix system shutdown timeout handling by again supporting longer running
| shutdown procedures (which have a duration of more than 120 seconds).
|
| We have two user-space affecting shutdown timeouts: a "soft" one in
| /etc/rc.shutdown and a "hard" one in init(8). The first one can be
| configured via /etc/rc.conf variable "rcshutdown_timeout" and defaults
| to 30 seconds. The second one was originally (in 1998) intended to be
| configured via sysctl(8) variable "kern.shutdown_timeout" and defaults
| to 120 seconds.
|
| Unfortunately, the "kern.shutdown_timeout" was declared "unused" in 1999
| (as it obviously is actually not used within the kernel itself) and
| hence was intentionally but misleadingly removed in revision 1.107 from
| init_main.c. Kernel sysctl(8) variables are certainly a wrong way to
| control user-space processes in general, but in this particular case the
| sysctl(8) variable should have remained as it supports init(8), which
| isn't passed command line flags (which in turn could have been set via
| /etc/rc.conf), etc.
|
| As there is already a similar "kern.init_path" sysctl(8) variable which
| directly affects init(8), resurrect the init(8) shutdown timeout under
| sysctl(8) variable "kern.init_shutdown_timeout". But this time document
| it as being intentionally unused within the kernel and used by init(8).
| Also document it in the manpages init(8) and rc.conf(5).
|
| Reviewed by: phk
| MFC after: 2 weeks
|
| Revision  Changes    Path
| 1.48      +7 -1      src/sbin/init/init.8
| 1.61      +1 -1      src/sbin/init/init.c
| 1.264     +16 -1     src/share/man/man5/rc.conf.5
| 1.257     +11 -0     src/sys/kern/init_main.c

Approved by: re (scottl)
2005-10-04 17:29:00 +00:00
rwatson
70be888bba Merge fifo_vnops.c:1.132 from HEAD to RELENG_6:
Second attempt at a work-around for fifo-related socket panics during
  make -j with high levels of parallelism: acquire Giant in fifo I/O
  routines.

  Discussed with: ups

Approved by:	re (scottl)
2005-10-04 15:33:06 +00:00
dds
a05f20d858 MFC 1.28
Bug fix: a numeric flag specification in the substitute command would
cause the next substitute flag to be ignored.
While working at it, detect and report overflows.

Reported by:	Jingsong Liu
Bugged by:	Xin Li
Approved by:	re (kensmith)
2005-10-04 15:26:10 +00:00
jhb
0950005259 MFC: Add interrupt counters for IPIs.
Approved by:	re (scottl)
2005-10-04 15:15:22 +00:00
jhb
fdc83af1f5 MFC: Rename the lapic timer interrupt counter to cpuX: timer.
Approved by:	re (scottl)
2005-10-04 15:13:06 +00:00
ache
7e1a58e7bc MFC: 1.26-1.28
Approved by: re
2005-10-04 14:33:09 +00:00
ache
9894c5fb7c MFC: 1.23
Approved by: re
2005-10-04 14:31:10 +00:00
glebius
37d9f48fcd MFC 1.73:
In em_process_receive_interrupts() store and clear adapter->fmt. This
  make function reenterable. In the runtime the race is masked by
  serializing
  of em_process_receive_interrupts() either by interrupt thread, or by
  polling. The race can be triggered when polling is switched on or off.

Approved by:	re (scottl)
2005-10-04 14:07:44 +00:00
phk
39f2622e6f MFC:
Add the flash device sizing subroutine.

Approved by:	re@ (scottle)
Reminded by:	simon@
2005-10-04 13:56:35 +00:00
peadar
5f354c9a11 MFC BOOTSIG[23] removal:
msdosfs_vfsops.c v1.146
    bootsect.h v1.13

    Remove checks for BOOTSIG[23] from FAT32 bootblocks.
    There seems to be very little documentary evidence outside this
    implementation to suggest a these checks are neccessary, and more
    than one camera-formatted flash disk fails the check, but mounts
    successfully on most other systems.

Approved by: re (scottl@)
2005-10-04 13:13:57 +00:00
cognet
053034ba29 MFC rev 1.146 (and 1.147)
revision 1.146
date: 2005/09/28 16:05:13;  author: cognet;  state: Exp;  lines: +7 -1
Use SO_REUSEADDR on the socket, to make the use of syslogd in jails easier.

Submitted by:   Jeremie Le Hen <jeremie le-hen org>
Approved by:	re
2005-10-04 12:50:11 +00:00
truckman
4df51e5f85 MFC snaplk deadlock fix
src/sys/kern/vfs_bio.c          1.495, 1.496
        src/sys/kern/vfs_subr.c         1.648
        src/sys/sys/buf.h               1.190, 1.191
        src/sys/sys/proc.h              1.436
        src/sys/ufs/ffs/ffs_snapshot.c  1.104, 1.105, 1.106

Original commit messages:

    Log:
    Un-staticize runningbufwakeup() and staticize updateproc.

    Add a new private thread flag to indicate that the thread should
    not sleep if runningbufspace is too large.

    Set this flag on the bufdaemon and syncer threads so that they skip
    the waitrunningbufspace() call in bufwrite() rather than than
    checking the proc pointer vs. the known proc pointers for these two
    threads.  A way of preventing these threads from being starved for
    I/O but still placing limits on their outstanding I/O would be
    desirable.

    Set this flag in ffs_copyonwrite() to prevent bufwrite() calls from
    blocking on the runningbufspace check while holding snaplk.  This
    prevents snaplk from being held for an arbitrarily long period of
    time if runningbufspace is high and greatly reduces the contention
    for snaplk.  The disadvantage is that ffs_copyonwrite() can start
    a large amount of I/O if there are a large number of snapshots,
    which could cause a deadlock in other parts of the code.

    Call runningbufwakeup() in ffs_copyonwrite() to decrement runningbufspace
    before attempting to grab snaplk so that I/O requests waiting on
    snaplk are not counted in runningbufspace as being in-progress.
    Increment runningbufspace again before actually launching the
    original I/O request.

    Prior to the above two changes, the system could deadlock if enough
    I/O requests were blocked by snaplk to prevent runningbufspace from
    falling below lorunningspace and one of the bawrite() calls in
    ffs_copyonwrite() blocked in waitrunningbufspace() while holding
    snaplk.

    See <http://www.holm.cc/stress/log/cons143.html>

    Revision  Changes    Path
    1.495     +3 -3      src/sys/kern/vfs_bio.c
    1.648     +2 -1      src/sys/kern/vfs_subr.c
    1.190     +1 -0      src/sys/sys/buf.h
    1.436     +1 -1      src/sys/sys/proc.h
    1.104     +16 -4     src/sys/ufs/ffs/ffs_snapshot.c

    Log:
    Un-staticize waitrunningbufspace() and call it before returning from
    ffs_copyonwrite() if any async writes were launched.

    Restore the threads previous TDP_NORUNNINGBUF state before returning
    from ffs_copyonwrite().

    Revision  Changes    Path
    1.496     +1 -1      src/sys/kern/vfs_bio.c
    1.191     +1 -0      src/sys/sys/buf.h
    1.105     +13 -1     src/sys/ufs/ffs/ffs_snapshot.c

    Log:
    Correct previous commit to fix the sense of the TDP_NORUNNINGBUF
    check in ffs_copyonwrite() that is a precondition for calling
    waitrunningbufspace().

    Pointed out by: tegge
    Pointy hat to:  truckman
    MFC after:      3 days

    Revision  Changes    Path
    1.106     +1 -1      src/sys/ufs/ffs/ffs_snapshot.c

Approved by:	re (scottl)
2005-10-04 04:41:27 +00:00
truckman
9f7e4b429e MFC kern_exec.c 1.276 (and 1.278)
Original commit messages:

  truckman    2005-10-01 08:33:57 UTC

    FreeBSD src repository

    Modified files:
      sys/kern             kern_exec.c
    Log:
    Copy new process argument list in do_execve() before grabbing PROC_LOCK
    to avoid touching pageable memory while holding a mutex.

    Simplify argument list replacement logic.

    PR:            kern/84935
    Submitted by:  "Antoine Pelisse" apelisse AT gmail.com (in a different form)
    MFC after:     3 days

    Revision  Changes    Path
    1.276     +10 -10    src/sys/kern/kern_exec.c

  truckman    2005-10-04 04:02:33 UTC

    FreeBSD src repository

    Modified files:
      sys/kern             kern_exec.c
    Log:
    Add missing word to comment.

    Revision  Changes    Path
    1.278     +1 -1      src/sys/kern/kern_exec.c

PR:		kern/84935
Submitted by:	"Antoine Pelisse" apelisse AT gmail.com (in a different form)
Approved by:	re (scottl)
2005-10-04 04:29:08 +00:00
grog
b4701f3c9a MFC:
Initialize uninitialized variables.
  Remove one possible way of shooting yourself in the foot.

Requested by:   Dan Lukes <dan@obluda.cz>
Approved by:	RE (kensmith@)

And now for the scripts which refuse the line above:

Approved by: re
2005-10-03 23:45:01 +00:00
cperciva
571f9d1571 MFC revision 1.11: Fix a bug introduced in revision 1.9 which causes
chkgrp to coredump on certain corrupt files.

Approved by:	re (scottl)
2005-10-03 21:39:21 +00:00
ups
22426a09ff MFC revision 1.9:
Fix the "fpudna: fpcurthread == curthread XXX times" problem.

Approved by: re (scottl@)
2005-10-03 20:08:00 +00:00
peadar
9da5a3fa01 MFC revision 1.494:
Close a race in biodone(), whereby the bio_done field of the passed
    bio may have been freed and reassigned by the wakeup before being
    tested after releasing the bdonelock.

Approved by: re (scottl@)
2005-10-03 09:30:12 +00:00
hrs
2b9de61ca4 Add KPnS (known problems and solutions) entries:
- /dev/ttyv* not found on FreeBSD/sparc64 when
   there is no framebuffer[1].

 - KLDs do not work on FreeBSD/sparc64 with >4GB RAM[2].

 - kgdb is broken for debugging panics on FreeBSD/sparc64[2].

Thanks to:	marius[1], kris[2]
Approved by:	re (implicitly)
2005-10-02 20:11:34 +00:00
cperciva
bf4a52992c MFC revision 1.639: Don't let the upper bits of %dr6/%dr7 get set.
Submitted by:	Nate Eldredge
Approved by:	re@ (scottl)
Security:	Local denial of service
2005-10-02 16:38:12 +00:00
andre
882a000881 MFC IP_DONTFRAG IP socket option.
Approved by:	re (scottl)
2005-10-02 15:45:47 +00:00
joel
b737a883c5 MFC rev 1.55-1.58:
*  Document existing support for:
  -  ALI M5229
  -  ALI M5281
  -  ALI M5287
  -  ALI M5289
  -  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
  -  Promise PDC40718
  -  Promise PDC40719
  -  SIS 180
  -  SIS 181
  -  SIS 182
  -  SIS 965
  -  VIA VT6410
  -  VIA VT6420
  -  VIA VT6421

*  Add two missing dots.

*  Remove HPT366 duplicate.

Approved by:	re (hrs)
2005-10-02 14:32:06 +00:00
ru
6efd618657 MFC: 1.46: Document that -q also affects "route change".
Approved by:	re (hrs)
2005-10-02 13:44:05 +00:00
fjoe
9319fa7172 MFC g_uzip.c rev. 1.5:
- Fix "end_blk out of range" panic when INVARIANTS.
- Do not allow rw access.

Approved by:	re (scott)
2005-10-02 11:22:28 +00:00
rwatson
5adaceafef Merge kern_lock.c:1.95 from HEAD to RELENG_6:
Include kdb.h so that kdb_active is declared regardless of KDB being
  included in the kernel.

Approved by:	re (kensmith)
2005-10-02 10:08:29 +00:00