]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoUse uma_set_align().
Olivier Houchard [Sun, 11 Feb 2007 22:24:54 +0000 (22:24 +0000)]
Use uma_set_align().

17 years agoAdd uma_set_align() interface, which will be called at most once during
Robert Watson [Sun, 11 Feb 2007 20:13:52 +0000 (20:13 +0000)]
Add uma_set_align() interface, which will be called at most once during
boot by MD code to indicated detected alignment preference.  Rather than
cache alignment being encoded in UMA consumers by defining a global
alignment value of (16 - 1) in UMA_ALIGN_CACHE, UMA_ALIGN_CACHE is now
a special value (-1) that causes UMA to look at registered alignment.  If
no preferred alignment has been selected by MD code, a default alignment
of (16 - 1) will be used.

Currently, no hardware platforms specify alignment; architecture
maintainers will need to modify MD startup code to specify an alignment
if desired.  This must occur before initialization of UMA so that all UMA
zones pick up the requested alignment.

Reviewed by: jeff, alc
Submitted by: attilio

17 years agoo s/cgetseq/cgetset/
Maxim Konovalov [Sun, 11 Feb 2007 18:14:49 +0000 (18:14 +0000)]
o s/cgetseq/cgetset/

Obtained from: DragonFly

17 years agoFix some spelling / markup / grammar.
Mike Pritchard [Sun, 11 Feb 2007 18:13:00 +0000 (18:13 +0000)]
Fix some spelling / markup / grammar.

Pointed out by: ru

17 years agoAdd two new options to quota:
Mike Pritchard [Sun, 11 Feb 2007 16:25:25 +0000 (16:25 +0000)]
Add two new options to quota:

-f path
    Only print quota information for the file system that path resides on.
-r
    Display the quota information in a raw format.

Reviewed by: freebsd-hackers

17 years agoMakefile changes to reflect moving sys/isofs/cd9660 to sys/fs/cd9660.
Craig Rodrigues [Sun, 11 Feb 2007 14:01:32 +0000 (14:01 +0000)]
Makefile changes to reflect moving sys/isofs/cd9660 to sys/fs/cd9660.
Continue to install userland include files in /usr/include/isofs/cd9660
so as not to break userland applications such as libstand.

17 years agoForced commit and #include changes for repo copy from
Craig Rodrigues [Sun, 11 Feb 2007 13:54:25 +0000 (13:54 +0000)]
Forced commit and #include changes for repo copy from
sys/isofs/cd9660 to sys/fs/cd9660.

Discussed on freebsd-current.

17 years agoFix PowerPC-targeted cross-builds performed on 64-bit platforms.
Marcel Moolenaar [Sun, 11 Feb 2007 07:15:06 +0000 (07:15 +0000)]
Fix PowerPC-targeted cross-builds performed on 64-bit platforms.
Only PowerPC supports both 32-bit and 64-bit targets and the
BFD_DEFAULT_TARGET_SIZE is used by the binutils code to reflect
the preferred ABI. We define BFD_DEFAULT_TARGET_SIZE for all
platforms, but based on the build machine. As such 64-bit build
machines defined BFD_DEFAULT_TARGET_SIZE incorrectly for 32-bit
targets, but since this only affects PowerPC it went unnoticed
for a long time.
The fix is to define BFD_DEFAULT_TARGET_SIZE based on the target
architecture.

PR: amd64/102996
MFC after: 1 month

17 years agoUse the free page queue mutex instead of the page queue mutex to
Alan Cox [Sun, 11 Feb 2007 05:18:40 +0000 (05:18 +0000)]
Use the free page queue mutex instead of the page queue mutex to
synchronize sleeping and waking of the zero idle thread.

17 years agoAdd missing MNT_ILOCK around some mnt_kern_flag accesses.
Mohan Srinivasan [Sun, 11 Feb 2007 04:01:10 +0000 (04:01 +0000)]
Add missing MNT_ILOCK around some mnt_kern_flag accesses.

17 years agoNow that the free page queue mutex is a sleep mutex, we cannot call
Marcel Moolenaar [Sun, 11 Feb 2007 02:52:54 +0000 (02:52 +0000)]
Now that the free page queue mutex is a sleep mutex, we cannot call
vm_page_alloc() from within a critical section in pmap_growkernel().
Since the need for a critical section may never have existed in the
first place, simply get rid of it.

Discussed with: alc@

17 years agoUse MAXTTL.
Bruce M Simpson [Sat, 10 Feb 2007 23:15:28 +0000 (23:15 +0000)]
Use MAXTTL.

Obtained from: NetBSD

17 years agoNew release notes: SA-07:02.bind (+MFC), auto-sizing TCP socket buffers,
Bruce A. Mah [Sat, 10 Feb 2007 19:55:18 +0000 (19:55 +0000)]
New release notes:  SA-07:02.bind (+MFC), auto-sizing TCP socket buffers,
gzip from NetBSD.

Updated release notes: BIND 9.3.4 (+MFC), GNU Readline 5.1, ncurses
5.6-20061217.

17 years agoForgot to hook up gjournal manual page to the build.
Pawel Jakub Dawidek [Sat, 10 Feb 2007 17:59:46 +0000 (17:59 +0000)]
Forgot to hook up gjournal manual page to the build.

Reminded by: simon, piso

17 years agoFix small altq related copy and paste error.
Max Laier [Sat, 10 Feb 2007 15:43:58 +0000 (15:43 +0000)]
Fix small altq related copy and paste error.

17 years agoIf the rendezvous point for a group is not specified, do not send
Bruce M Simpson [Sat, 10 Feb 2007 14:48:42 +0000 (14:48 +0000)]
If the rendezvous point for a group is not specified, do not send
IGMPMSG_WHOLEPKT notifications to the userland PIM routing daemon,
as an optimization to mitigate the effects of high multicast
forwarding load.

This is an experimental change, therefore it must be explicitly enabled by
setting the sysctl/tunable net.inet.pim.squelch_wholepkt to a non-zero value.
The tunable may be set from the loader or from within the kernel environment
when loading ip_mroute.ko as a module.

Submitted by: edrt <edrt at citiz.net>
See also: http://mailman.icsi.berkeley.edu/pipermail/xorp-users/2005-June/000639.html

17 years agoBuild PIM by default as part of the IPv4 multicast forwarding path.
Bruce M Simpson [Sat, 10 Feb 2007 13:59:13 +0000 (13:59 +0000)]
Build PIM by default as part of the IPv4 multicast forwarding path.
Make PIM dynamically loadable by using encap_attach_func().
PIM may now be loaded into a GENERIC kernel.

Tested with: ports/net/pimdd && tcpreplay && wireshark
Reviewed by: Pavlin Radoslavov

17 years agoDo not install zgrep, or links to zgrep, since zgrep is provided by
Simon L. B. Nielsen [Sat, 10 Feb 2007 13:49:39 +0000 (13:49 +0000)]
Do not install zgrep, or links to zgrep, since zgrep is provided by
src/gnu/usr.bin/grep.

Reviewed by: delphij

17 years agoHandle the case when the admin forgot to set $hostname,
Yaroslav Tykhiy [Sat, 10 Feb 2007 13:13:32 +0000 (13:13 +0000)]
Handle the case when the admin forgot to set $hostname,
which can happen in new installations: advise to set the
variable and refer to rc.conf(5).

17 years agoIn the ICMP6 path to handle FQDN 'who-are-you' queries, check that the
Bruce M Simpson [Sat, 10 Feb 2007 12:25:19 +0000 (12:25 +0000)]
In the ICMP6 path to handle FQDN 'who-are-you' queries, check that the
packet header mbuf is non-NULL before trying to create a duplicate of it.

PR: 95957
Reviewed by: ume
MFC after: 3 days

17 years agoIn mac_biba_check_system_swapoff(), don't extract the object label since
Robert Watson [Sat, 10 Feb 2007 08:59:39 +0000 (08:59 +0000)]
In mac_biba_check_system_swapoff(), don't extract the object label since
it isn't used in the access control decision.  This became visible to
Coverity with the change to a function call retrieving label values.

Coverity CID: 1723

17 years agoDon't reference lkm(4), it doesn't exist.
Christian Brueffer [Sat, 10 Feb 2007 08:44:41 +0000 (08:44 +0000)]
Don't reference lkm(4), it doesn't exist.

PR: 108980
Submitted by: Yonatan

17 years agoadd a missing piece for 2432
Matt Jacob [Sat, 10 Feb 2007 04:00:57 +0000 (04:00 +0000)]
add a missing piece for 2432

17 years agoPutative untested 2432 (PCI-E) support.
Matt Jacob [Sat, 10 Feb 2007 03:33:09 +0000 (03:33 +0000)]
Putative untested 2432 (PCI-E) support.

17 years agoNuke pcnfsd(8) reference.
Christian Brueffer [Fri, 9 Feb 2007 22:18:56 +0000 (22:18 +0000)]
Nuke pcnfsd(8) reference.

PR: 108980
Submitted by: Yonatan

17 years agoThere is no isa(4) manpage, convert to normal text an join lines.
Christian Brueffer [Fri, 9 Feb 2007 21:12:21 +0000 (21:12 +0000)]
There is no isa(4) manpage, convert to normal text an join lines.

PR: 108980
Submitted by: Yonatan

17 years agoRemove references to pccardd(8), pccardc(8) and OLDCARD.
Christian Brueffer [Fri, 9 Feb 2007 21:05:47 +0000 (21:05 +0000)]
Remove references to pccardd(8), pccardc(8) and OLDCARD.

PR: 108980
Submitted by: Yonatan

17 years agoRemove Xref to non-existant uhub(4).
Christian Brueffer [Fri, 9 Feb 2007 20:53:19 +0000 (20:53 +0000)]
Remove Xref to non-existant uhub(4).

PR: 108980
Submitted by: Yonatan

17 years agoCorrect references to tcpdump(1).
Christian Brueffer [Fri, 9 Feb 2007 20:39:14 +0000 (20:39 +0000)]
Correct references to tcpdump(1).

PR: 108980
Submitted by: Yonatan

17 years agoRemove Xref to owi(4), it's dead and gone.
Christian Brueffer [Fri, 9 Feb 2007 20:32:58 +0000 (20:32 +0000)]
Remove Xref to owi(4), it's dead and gone.

PR: 108980
Submitted by: Yonatan

17 years agoDocument a little more the firmware subsystem.
Luigi Rizzo [Fri, 9 Feb 2007 19:08:07 +0000 (19:08 +0000)]
Document a little more the firmware subsystem.
Apart from minor cleanup of the text, it should document
in reasonable detail what the status of the code is.
RELENG_6 has some minor differences there in the way automatic
loading/unloading is handled, but hopefully this should be
fixed by MFC time.

The examples come from Max Laier and Sam Leffler.

MFC after: 1 week

17 years agoInclude GEOM_LABEL in GENERIC. It's very useful and not well publicized
Brooks Davis [Fri, 9 Feb 2007 19:03:18 +0000 (19:03 +0000)]
Include GEOM_LABEL in GENERIC.  It's very useful and not well publicized
enough.

Approved by: pjd

17 years agoRemove an obsolete error message.
Christian Brueffer [Fri, 9 Feb 2007 18:26:13 +0000 (18:26 +0000)]
Remove an obsolete error message.

17 years agoImplement RFC3442, the Classless Static Route option.
Ed Maste [Fri, 9 Feb 2007 17:50:26 +0000 (17:50 +0000)]
Implement RFC3442, the Classless Static Route option.

The original DHCP specification includes a route option but it supports
only class-based routes.  RFC3442 adds support for specifying the netmask
width for each static route.  A variable length encoding is used to minimize
the size of this option.

PR:             bin/99534
Submitted by:   Andrey V. Elsukov <bu7cher@yandex.ru>
Reviewed by:    brooks

17 years agoGive which signal caller has attempted to deliver when panicking.
Xin LI [Fri, 9 Feb 2007 17:48:28 +0000 (17:48 +0000)]
Give which signal caller has attempted to deliver when panicking.

17 years agoBacking out the wrong fix which could possibly trash the memory if devfs
Tai-hwa Liang [Fri, 9 Feb 2007 17:22:10 +0000 (17:22 +0000)]
Backing out the wrong fix which could possibly trash the memory if devfs
tries to drop the reference count after our close routine returns.

A more correct fix is to defer the destroy_dev() to a taskqueue(either
in devfs or locally).

Reminded by: jhb

17 years ago- Use the standard section 4 SYNOPSIS
Christian Brueffer [Fri, 9 Feb 2007 17:21:23 +0000 (17:21 +0000)]
- Use the standard section 4 SYNOPSIS
- Utilize .Nm

MFC after: 3 days

17 years agoLet automatic TCP send buffer sizing do its job for ftpd(8): stop
Yaroslav Tykhiy [Fri, 9 Feb 2007 17:18:39 +0000 (17:18 +0000)]
Let automatic TCP send buffer sizing do its job for ftpd(8): stop
setting the SO_SNDBUF socket option.  Using a hard-coded value for
it was a poor idea anyway in the face of diverse network conditions.

17 years agoAdd a $FreeBSD$ tag missing after the original import. Note that this
Ed Maste [Fri, 9 Feb 2007 16:28:25 +0000 (16:28 +0000)]
Add a $FreeBSD$ tag missing after the original import.  Note that this
file isn't actually installed; the one in src/etc is.

17 years agoAdd support for Huawei Technologies Mobile card (3G).
Lukas Ertl [Fri, 9 Feb 2007 15:59:28 +0000 (15:59 +0000)]
Add support for Huawei Technologies Mobile card (3G).

Submitted by:  Thorsten Schroeder <ths_AT_dev.io>
MFC in:        3 days

17 years agoIn the output path, mask off M_BCAST|M_MCAST so as to prevent incorrect
Bruce M Simpson [Fri, 9 Feb 2007 12:35:29 +0000 (12:35 +0000)]
In the output path, mask off M_BCAST|M_MCAST so as to prevent incorrect
addressing if a packet is later re-encapsulated and sent to a
non-broadcast, non-multicast destination after being received on the
ng_ksocket input hook.

PR: 106999
Submitted by: Kevin Lahey
MFC after: 4 weeks

17 years agoAdd lists of ICMP types and codes for user and developer reference.
Bruce M Simpson [Fri, 9 Feb 2007 12:30:17 +0000 (12:30 +0000)]
Add lists of ICMP types and codes for user and developer reference.
Cross-reference pf.conf(5) which is able to use these definitions.

PR: 85243
Submitted by: Daniel Gerzo
Obtained from: OpenBSD
MFC after: 1 day

17 years agoAdd support for EtherChannel configuration to rc startup scripts.
Florent Thoumie [Fri, 9 Feb 2007 12:11:27 +0000 (12:11 +0000)]
Add support for EtherChannel configuration to rc startup scripts.

Note: This also deprecates "NO" as a way to specify an empty list of
interfaces for gif_interfaces.

PR: conf/104884
Submitted by: nork
Harassed by: brd
Discussed with: brooks, dougb

17 years agoEliminate duplicate header files.
Kevin Lo [Fri, 9 Feb 2007 09:23:10 +0000 (09:23 +0000)]
Eliminate duplicate header files.

17 years agoIt turns out that devfs_close() does a dev_refthread() before invoking
Tai-hwa Liang [Fri, 9 Feb 2007 02:54:13 +0000 (02:54 +0000)]
It turns out that devfs_close() does a dev_refthread() before invoking
device specific d_close(), which makes subsequent destroy_dev() being
blocked in the "devdrn" loop.

This bandaid should fix the smbfs hang/crashing observed on -CURRENT since
the introduction of sys/kern/kern_conf.c:1.199:

  # mount_smbfs -I server //server/share /mnt
  Password:
  [hang]

Reviewed by: bp
See also: http://lists.freebsd.org/pipermail/cvs-src/2006-November/071379.html

17 years agoRemove an unneeded define.
Bruce M Simpson [Fri, 9 Feb 2007 01:42:43 +0000 (01:42 +0000)]
Remove an unneeded define.

17 years agoUse __NO_STRICT_ALIGNMENT, instead of special casing ia64 and sparc64.
Olivier Houchard [Fri, 9 Feb 2007 00:09:35 +0000 (00:09 +0000)]
Use __NO_STRICT_ALIGNMENT, instead of special casing ia64 and sparc64.
This fixes panics I got on arm, with struct ip aligned on 4 bytes.

MFC After: 1 week

17 years agoStore the cached route in vifp in the normal send_packet() case.
Bruce M Simpson [Thu, 8 Feb 2007 23:05:08 +0000 (23:05 +0000)]
Store the cached route in vifp in the normal send_packet() case.
The VIFF_TUNNEL case no longer exists, therefore this field is free to
use, and its use eliminates a static data member.

17 years agoNuke the token bucket filter code. Attempting to request rate limiting
Bruce M Simpson [Thu, 8 Feb 2007 22:58:01 +0000 (22:58 +0000)]
Nuke the token bucket filter code. Attempting to request rate limiting
by the token bucket filter will result in EINVAL being returned.

If you want to rate-limit traffic in future, use ALTQ or dummynet; this
isn't a general purpose QoS engine.

Preserve the now unused fields in struct vif so as to avoid having to
recompile netstat(1) and other tools.

Reviewed by: Pavlin Radslavov, Bill Fenner

17 years agoAdd sanity check to make sure that the MAC address isn't all 0's. Bad
Warner Losh [Thu, 8 Feb 2007 21:42:10 +0000 (21:42 +0000)]
Add sanity check to make sure that the MAC address isn't all 0's.  Bad
boot loaders can do this, and this leads to all kinds of ill effects
downstream.  Also, minor formatting nits.

17 years agoFix problem with RTL8201L PHY. From submitter:
Warner Losh [Thu, 8 Feb 2007 19:16:15 +0000 (19:16 +0000)]
Fix problem with RTL8201L PHY.  From submitter:

    Bugfix for the Realtek PHY driver... an RTL8201L standalone PHY
    needs different handling than the integrated ones in terms of
    speed detection.  There was a bogus test based on the parent
    device driver name string controlling which speed register to
    query.  That test began failing when the rl driver was split into
    separate rl and re drivers some time ago.  Apparently nobody ever
    noticed because the buggy code only executes if NWAY negotiation
    failed.  Since we happen to be testing with an ancient dumb hub
    rather than a modern switch, we found it.

    To fix it all, have the attach() routine notice whether we're
    dealing with an integrated PHY or an RTL8201L and store that info
    in a struct accessible to the status() routine that needs to know
    which register to query.

I touched up the fixes because they were relative to RELENG_6 and to
bring a few nits into line with style(9).

MFC After: 2 weeks
Submitted by: Ian Lepore

17 years agoDon't send interrupts to CPUs disabled via lapic hints.
John Baldwin [Thu, 8 Feb 2007 16:49:59 +0000 (16:49 +0000)]
Don't send interrupts to CPUs disabled via lapic hints.

Reported by: Ludger Bolmerg <lbolmerg ! web.de>
MFC after: 3 days
Pointy hat to: jhb

17 years agoAdd 's' after printing the send interval to make it clear it's a send
Robert Watson [Thu, 8 Feb 2007 15:37:13 +0000 (15:37 +0000)]
Add 's' after printing the send interval to make it clear it's a send
interval.

17 years agoAs VPD support still causes hard hangs on boot with some hardware, add a
Robert Watson [Thu, 8 Feb 2007 14:33:07 +0000 (14:33 +0000)]
As VPD support still causes hard hangs on boot with some hardware, add a
tunable allowing automatic parsing of VPD data to be disabled.  The
default is left as-is; if you are having problems with hard hangs at boot
due to VPD, try setting hw.pci.enable_vpd=0.  A proper architectural
solution has been under discussion for some time, but this allows me to
boot my test machines in the mean time.

Submitted by: bz
Head nod: jmg

17 years agoRemove not needed acquision of the mount interlock aroung reading of
Konstantin Belousov [Thu, 8 Feb 2007 09:47:19 +0000 (09:47 +0000)]
Remove not needed acquision of the mount interlock aroung reading of
mnt_kern_flags in ufs_itimes().

Suggested by: ssouhlal
Confirmed by: tegge
MFC after: 2 weeks

17 years agoUpdate -r handling:
Tim Kientzle [Thu, 8 Feb 2007 07:25:53 +0000 (07:25 +0000)]
Update -r handling:
  * Create file if it doesn't exist.
  * If archive is "empty", then append to it with pax restricted
  * If user specified a format, use that if it's compatible with
    the existing format.

17 years agoReplace "mount -t msdos" with "mount -t msdosfs".
Craig Rodrigues [Thu, 8 Feb 2007 05:04:18 +0000 (05:04 +0000)]
Replace "mount -t msdos" with "mount -t msdosfs".

PR: 79296
Reviewed by: remko

17 years ago#include <sys/systm.h> before <sys/geom.h> to get KASSERT(), and fix LINT build.
Craig Rodrigues [Thu, 8 Feb 2007 04:02:56 +0000 (04:02 +0000)]
#include <sys/systm.h> before <sys/geom.h> to get KASSERT(), and fix LINT build.

17 years agoAdd noatime to the list of mount options that msdosfs accepts.
Craig Rodrigues [Thu, 8 Feb 2007 02:30:55 +0000 (02:30 +0000)]
Add noatime to the list of mount options that msdosfs accepts.

PR: 108896
Submitted by: Eugene Grosbein <eugen grosbein pp ru>

17 years agoStyle fixes: use ANSI C function declarations.
Craig Rodrigues [Thu, 8 Feb 2007 02:25:35 +0000 (02:25 +0000)]
Style fixes: use ANSI C function declarations.

17 years ago - Change types for necent runq additions to u_char rather than int.
Jeff Roberson [Thu, 8 Feb 2007 01:52:25 +0000 (01:52 +0000)]
 - Change types for necent runq additions to u_char rather than int.
 - Fix these types in ULE as well.  This fixes bugs in priority index
   calculations in certain edge cases. (int)-1 % 64 != (uint)-1 % 64.

Reported by: kkenn using pho's stress2.

17 years agoDon't recurse into geom_apple and geom_gpt. They have been moved
Marcel Moolenaar [Wed, 7 Feb 2007 21:37:02 +0000 (21:37 +0000)]
Don't recurse into geom_apple and geom_gpt. They have been moved
into the g_part framework.

17 years agoeliminate redundant macro MC_SEND()
Bruce M Simpson [Wed, 7 Feb 2007 20:36:33 +0000 (20:36 +0000)]
eliminate redundant macro MC_SEND()

17 years agoFix a bug in 1.40 - it missed three occurences in pkg_info which leads to
Pav Lucistnik [Wed, 7 Feb 2007 19:44:44 +0000 (19:44 +0000)]
Fix a bug in 1.40 - it missed three occurences in pkg_info which leads to
(null)/file output.

MFC after: 1 week

17 years agoEvolve the ctlreq interface added to geom_gpt into a generic
Marcel Moolenaar [Wed, 7 Feb 2007 18:55:31 +0000 (18:55 +0000)]
Evolve the ctlreq interface added to geom_gpt into a generic
partitioning class that supports multiple schemes. Current
schemes supported are APM (Apple Partition Map) and GPT.
Change all GEOM_APPLE anf GEOM_GPT options into GEOM_PART_APM
and GEOM_PART_GPT (resp).

The ctlreq interface supports verbs to create and destroy
partitioning schemes on a disk; to add, delete and modify
partitions; and to commit or undo changes made.

17 years ago- Move 'struct swdevt' back into swap_pager.h and expose it to userland.
John Baldwin [Wed, 7 Feb 2007 17:43:11 +0000 (17:43 +0000)]
- Move 'struct swdevt' back into swap_pager.h and expose it to userland.
- Restore support for fetching swap information from crash dumps via
  kvm_get_swapinfo(3) to fix pstat -T/-s on crash dumps.

Reviewed by: arch@, phk
MFC after: 1 week

17 years agoRemove support for IPIP tunnels in IPv4 multicast forwarding. XORP has
Bruce M Simpson [Wed, 7 Feb 2007 16:04:13 +0000 (16:04 +0000)]
Remove support for IPIP tunnels in IPv4 multicast forwarding. XORP has
never used them; with mrouted, their functionality may be replaced by
explicitly configuring gif(4) instances and specifying them with the
'phyint' keyword.

Bump __FreeBSD_version to 700030, and update UPDATING.
A doc update is forthcoming.

Discussed on: net
Reviewed by: fenner
MFC after: 3 months

17 years agoFix the race of dereferencing /proc/<pid>/file with execve(2) by caching
Konstantin Belousov [Wed, 7 Feb 2007 10:30:49 +0000 (10:30 +0000)]
Fix the race of dereferencing /proc/<pid>/file with execve(2) by caching
the value of p_textvp. This way, we always unlock the locked vnode.
While there, vhold() the vnode around the vn_lock().

Reported and tested by: Guy Helmer (ghelmer palisadesys com)
Approved by: des (procfs maintainer)
MFC after: 1 week

17 years agoChange the pagedaemon, vm_wait(), and vm_waitpfault() to sleep on the
Alan Cox [Wed, 7 Feb 2007 06:37:30 +0000 (06:37 +0000)]
Change the pagedaemon, vm_wait(), and vm_waitpfault() to sleep on the
vm page queue free mutex instead of the vm page queue mutex.

17 years agoRemove the vm page queue free mutex from the CDEV order.
Alan Cox [Wed, 7 Feb 2007 05:43:31 +0000 (05:43 +0000)]
Remove the vm page queue free mutex from the CDEV order.

17 years agoMake iostat(8) fully work on crash dumps again (broken since 5.0):
John Baldwin [Tue, 6 Feb 2007 20:29:40 +0000 (20:29 +0000)]
Make iostat(8) fully work on crash dumps again (broken since 5.0):
- Pass the address of the variable we are reading to kvm_read() rather
  than the index into the nlist array.
- Properly report errors from kvm_read() which returns -1 on error, not
  0.

MFC after: 3 days

17 years agoFixed some style bugs. Routine except:
Bruce Evans [Tue, 6 Feb 2007 18:04:02 +0000 (18:04 +0000)]
Fixed some style bugs.  Routine except:
- don't use __GNUCLIKE___OFFSETOF, since __offsetof() is a standard
  FreeBSD implementaion detail which has nothing to do with GNUC.

17 years agoAllow to use umastat on coredumps.
Pawel Jakub Dawidek [Tue, 6 Feb 2007 17:57:20 +0000 (17:57 +0000)]
Allow to use umastat on coredumps.

Reviewed by: rwatson

17 years agoPrint intptr_t values by first casting to intmax_t and then printing with
Robert Watson [Tue, 6 Feb 2007 17:22:36 +0000 (17:22 +0000)]
Print intptr_t values by first casting to intmax_t and then printing with
%jd, as intptr_t may not be int-sized.

Assistance from: jhb
Spotted by: Mr Tinderbox

17 years agoUpdate comments in mac.h.
Robert Watson [Tue, 6 Feb 2007 16:24:57 +0000 (16:24 +0000)]
Update comments in mac.h.

Obtained from: TrustedBSD Project

17 years agoSimplified PCPU_GET() and PCPU_SET(). We must copy through a temporary
Bruce Evans [Tue, 6 Feb 2007 16:21:09 +0000 (16:21 +0000)]
Simplified PCPU_GET() and PCPU_SET().  We must copy through a temporary
variable to avoid invalid constraints in dead code.  Use an array of
u_char's (inside a struct) instead of a char/short/int/long variable so
that the variable and its accesses can be spelled in the same way in all
cases and code doesn't need to be cloned just to hold the spelling
differences.

Fixed strict-aliasing errors in PCPU_SET() and in the amd64 PCPU_GET().
Cast to (void *) as in rev.1.37 of the i386 version where the errors
were fixed for the i386 PCPU_GET() only.  It would be more correct to
copy to and from the temp. variable using memcpy(), but then an
ifdef tangle would be required to ensure using the builtin memcpy().
We depend on fairly aggressive optimization to put the temp. variable
only in a register despite it being copied using
*(type *)(void *)&anothertype and could depend on this when using
memcpy() too.  This seems to work right even for -O0, but the -O0 case
has not been completely tested.

This change gives identical object code for all object files in LINT
on amd64 (except for one file with a __TIME__ stamp).  For LINT on
i386 it gives unimportant differences in instruction order and padding
in a few object files.  This was only tested for -O.

This change (actually a previous version of it) gives the following
reductions in the number of object files in LINT that fail to compile
with -O2 but without the -fno-strict-aliasing kludge:
- amd64: 29 (down from 211)
- i386: 36 (down from 47)

gcc-3.4.6 actually allows the invalid constraints that result from not
using the temp. variable, at least with -O[1-2], but gcc-3.3.3 crashes
on them and I don't want to depend on compiler bugs.

17 years agoPush UNIX domain socket locking further into uipc_ctloutput() in order to
Robert Watson [Tue, 6 Feb 2007 14:31:37 +0000 (14:31 +0000)]
Push UNIX domain socket locking further into uipc_ctloutput() in order to
avoid holding the UNIX domain socket subsystem lock over soooptcopyin()
and sooptcopyout().  This problem was introduced when LOCAL_CREDS, and
LOCAL_CONNWAIT support were added.

Reviewed by: mdodd

17 years agoIntroduce accessor functions mac_label_get() and mac_label_set() to replace
Robert Watson [Tue, 6 Feb 2007 14:19:25 +0000 (14:19 +0000)]
Introduce accessor functions mac_label_get() and mac_label_set() to replace
LABEL_TO_SLOT() macro used by policy modules to query and set label data
in struct label.  Instead of using a union, store an intptr_t, simplifying
the API.

Update policies: in most cases this required only small tweaks to current
wrapper macros.  In two cases, a single wrapper macros had to be split into
separate get and set macros.

Move struct label definition from _label.h to mac_internal.h and remove
_label.h.  With this change, policies may now treat struct label * as
opaque, allowing us to change the layout of struct label without breaking
the policy module ABI.  For example, we could make the maximum number of
policies with labels modifiable at boot-time rather than just at
compile-time.

Obtained from: TrustedBSD Project

17 years agoat91_twi depends on the iicbus module to satisfy its symbols when
Warner Losh [Tue, 6 Feb 2007 12:07:14 +0000 (12:07 +0000)]
at91_twi depends on the iicbus module to satisfy its symbols when
loaded, so make that explicit.  Works for the monolithic kernel case,
won't work for the kldload case.

17 years agoContinue 7-CURRENT MAC Framework rearrangement and cleanup:
Robert Watson [Tue, 6 Feb 2007 10:59:23 +0000 (10:59 +0000)]
Continue 7-CURRENT MAC Framework rearrangement and cleanup:

Don't perform a nested include of _label.h in mac.h, as mac.h now
describes only  the user API to MAC, and _label.h defines the in-kernel
representation of MAC labels.

Remove mac.h includes from policies and MAC framework components that do
not use userspace MAC API definitions.

Add _KERNEL inclusion checks to mac_internal.h and mac_policy.h, as these
are kernel-only include files

Obtained from: TrustedBSD Project

17 years agoDocument NetCell NC3000 and NC5000 support.
Christian Brueffer [Tue, 6 Feb 2007 09:50:17 +0000 (09:50 +0000)]
Document NetCell NC3000 and NC5000 support.

17 years agogetopt(3) returns -1, not EOF.
Kevin Lo [Tue, 6 Feb 2007 08:48:28 +0000 (08:48 +0000)]
getopt(3) returns -1, not EOF.

17 years ago- Bump document date.
Ruslan Ermilov [Tue, 6 Feb 2007 08:46:20 +0000 (08:46 +0000)]
- Bump document date.
- Kill whitespace at EOL.
- Add missing markup bit.

17 years agoPrint warning that "-t msdos" is deprecated and being converted to
Craig Rodrigues [Tue, 6 Feb 2007 05:57:40 +0000 (05:57 +0000)]
Print warning that "-t msdos" is deprecated and being converted to
"-t msdosfs".  The conversion has been happening since 1.43, but
no equivalent conversion happens in "umount -t", which led to some
confusion with some users.

PR: 79296
Submitted by: Nobuhiro Yasutomi <nobuhiro yasutomi nifty ne jp>

17 years agoThe change to the vm_page_queue_freelist lock from a spin lock to a
Mike Pritchard [Tue, 6 Feb 2007 05:51:55 +0000 (05:51 +0000)]
The change to the vm_page_queue_freelist lock from a spin lock to a
sleep lock missed the witness code, and the system will panic
immediately on boot if WITNESS is enabled.

Changed the witness definition to the new type.

17 years agoEliminate some dead code which was introduced in 1.23, yet was always
Craig Rodrigues [Tue, 6 Feb 2007 03:30:58 +0000 (03:30 +0000)]
Eliminate some dead code which was introduced in 1.23, yet was always
commented out.

17 years agos/Feb/February/
Doug Ambrisko [Mon, 5 Feb 2007 22:45:58 +0000 (22:45 +0000)]
s/Feb/February/

Reminded by: ru

17 years agoChange GDB_BUFSZ to be large enough to hold a register dump where each
John Baldwin [Mon, 5 Feb 2007 21:48:32 +0000 (21:48 +0000)]
Change GDB_BUFSZ to be large enough to hold a register dump where each
register takes 16 characters (64-bit register in hex).  In practice this
is a slight bit of overkill as 7 of the 56 registers are only 32-bit, but
having the buffer too small results in remote kgdb trashing kernel memory
when it connects.

PR: amd64/108673
Submitted by: Ravi Murty, Nikhil Rao @ Intel
MFC after: 3 days

17 years agoUse egrep instead of grep so that reporting of login failures (broken
John Polstra [Mon, 5 Feb 2007 16:36:25 +0000 (16:36 +0000)]
Use egrep instead of grep so that reporting of login failures (broken
by revision 1.6) works again.  This fix is already in RELENG_6, but was
never committed to HEAD.

17 years agoIf (a == NULL), don't dereference (a) to record an error message. [1]
Colin Percival [Mon, 5 Feb 2007 16:30:40 +0000 (16:30 +0000)]
If (a == NULL), don't dereference (a) to record an error message. [1]

Fallout from changing the skip API to use off_t instead of size_t: Print
the skip length using %jd and cast to (intmax_t) instead of %d / (int),
and if ARCHIVE_API_VERSION >= 2, allow the client skipper to be called
for requests longer than SSIZE_MAX. [2]

Approved by: kientzle
Pointy hats to: kientzle [1], cperciva [2]
MFC after: 3 days

17 years agoFix devfs cloning for non-superusers when net.link.tap.user_open is non-zero.
Bruce M Simpson [Mon, 5 Feb 2007 11:29:08 +0000 (11:29 +0000)]
Fix devfs cloning for non-superusers when net.link.tap.user_open is non-zero.
Note: 'ifconfig tapX create' still requires PRIV_NET_IFCREATE privilege.

Reviewed by: rwatson

17 years agoForced commit; Vim ate my homework^Wkeystroke.
Bruce M Simpson [Mon, 5 Feb 2007 11:18:47 +0000 (11:18 +0000)]
Forced commit; Vim ate my homework^Wkeystroke.

Fix an incorrect TCP-MD5 key length check for the !FAST_IPSEC case.

PR: 104422, 107520
MFC after: 3 days

17 years agoClean up after tun(4) properly; remove routes whose ifp is set to
Bruce M Simpson [Mon, 5 Feb 2007 11:15:52 +0000 (11:15 +0000)]
Clean up after tun(4) properly; remove routes whose ifp is set to
that of the tun instance even for the !AF_INET case, and properly
remove configured addresses by calling if_purgeaddrs().

Maintain the TUN_DSTADDR behaviour for compatibility with the OS/390
emulator.

MFC after: 3 weeks
PR: 100080
Reviewed by: bz

17 years agoMFC after: 3 days
Bruce M Simpson [Mon, 5 Feb 2007 11:05:41 +0000 (11:05 +0000)]
MFC after: 3 days

17 years ago<sys/sx.h> is unneeded.
Kevin Lo [Mon, 5 Feb 2007 10:33:39 +0000 (10:33 +0000)]
<sys/sx.h> is unneeded.

17 years agogetopt(3) returns -1, not EOF when out of args.
Kevin Lo [Mon, 5 Feb 2007 07:35:23 +0000 (07:35 +0000)]
getopt(3) returns -1, not EOF when out of args.

17 years agoChange the free page queue lock from a spin mutex to a default (blocking)
Alan Cox [Mon, 5 Feb 2007 06:02:55 +0000 (06:02 +0000)]
Change the free page queue lock from a spin mutex to a default (blocking)
mutex.  With the demise of Alpha support, there is no longer a reason for
it to be a spin mutex.

17 years agoWhen fast-forwarding is enabled, do not forward directed IPv4 broadcasts
Bruce M Simpson [Mon, 5 Feb 2007 00:15:40 +0000 (00:15 +0000)]
When fast-forwarding is enabled, do not forward directed IPv4 broadcasts
to locally attached broadcast networks.

Note well: This relies on the layer 2 route cloning behaviour in BSD.

PR: 98799
Tested by: Dmitry Sergienko
MFC after: 1 week

17 years agoCall pbgetvp() and pbrelvp() instead of setting b_vp directly.
Tor Egge [Sun, 4 Feb 2007 23:42:02 +0000 (23:42 +0000)]
Call pbgetvp() and pbrelvp() instead of setting b_vp directly.

PR: kern/108151

17 years agoAdd support for another 3G card and update man page accordingly.
Lukas Ertl [Sun, 4 Feb 2007 22:14:18 +0000 (22:14 +0000)]
Add support for another 3G card and update man page accordingly.
The patch from the PR was a little outdated w/regards to the
Vodafone vendor string.

PR:            kern/106033
Submitted by:  Volker Werth <volker_AT_vwsoft.com>
MFC in:        3 days