]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoAdd simple TCP connect and TCP receive benchmark components, intended to
rwatson [Wed, 5 Oct 2005 12:10:35 +0000 (12:10 +0000)]
Add simple TCP connect and TCP receive benchmark components, intended to
measure the rate of TCP connection round trips supported by a host at
the socket layer.

18 years ago- Don't pollute opt_global.h with DEVICE_POLLING and introduce
glebius [Wed, 5 Oct 2005 10:09:17 +0000 (10:09 +0000)]
- Don't pollute opt_global.h with DEVICE_POLLING and introduce
  opt_device_polling.h
- Include opt_device_polling.h into appropriate files.
- Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that
  can be compiled as loadable modules.

Reviewed by: bde

18 years ago- Don't include opt_global.h, it is always included implicitly.
glebius [Wed, 5 Oct 2005 10:07:27 +0000 (10:07 +0000)]
- Don't include opt_global.h, it is always included implicitly.
- Include opt_device_polling.h

18 years agoDefine HAVE_KERNEL_OPTION_HEADERS when building kernel and when building
glebius [Wed, 5 Oct 2005 10:05:55 +0000 (10:05 +0000)]
Define HAVE_KERNEL_OPTION_HEADERS when building kernel and when building
modules along with kernel.

After this change it is possible to embrace opt_*.h includes with ifdef
HAVE_KERNEL_OPTION_HEADERS. And thus, avoid editing a lot of Makefiles
in modules directory each time we introduce a new opt_xxx.h.

Requested by: bde

18 years agostop RFC 4193 address on the outside interface.
ume [Wed, 5 Oct 2005 07:00:42 +0000 (07:00 +0000)]
stop RFC 4193 address on the outside interface.

MFC after: 1 day

18 years agoNote added support for Tamarack TC5229J, Axiom and Dlink parts. Bump date.
imp [Wed, 5 Oct 2005 05:41:02 +0000 (05:41 +0000)]
Note added support for Tamarack TC5229J, Axiom and Dlink parts.  Bump date.

18 years agoAdd if_ed_rtl80x9.c
imp [Wed, 5 Oct 2005 05:26:03 +0000 (05:26 +0000)]
Add if_ed_rtl80x9.c

18 years agoRemove debug that crept in..
imp [Wed, 5 Oct 2005 05:24:35 +0000 (05:24 +0000)]
Remove debug that crept in..

18 years agoMFp4:
imp [Wed, 5 Oct 2005 05:21:07 +0000 (05:21 +0000)]
MFp4:
o Add support for Tamarack TC5299J + MII found on SMC 8041TX V.2
  and corega PCCCCTXD
o Add support for ISA/PCI RTL80[12]9 chips
o Improve support for the ax88790 based
o minor code movement

Submitted by: (#2) David Madole

18 years agoAdd regression tests for trimdomain(3).
brooks [Wed, 5 Oct 2005 04:46:10 +0000 (04:46 +0000)]
Add regression tests for trimdomain(3).

18 years agoWhen removing the local domain, only do so when the result will be a
brooks [Wed, 5 Oct 2005 04:42:20 +0000 (04:42 +0000)]
When removing the local domain, only do so when the result will be a
host name.  This is matches the documented behaviro.  The previous
behavior would remove the domain name even if the result retained a dot.

This fixes rsh connections from a.example.com to example.com.

Reviewed by: ceri (at least the concept)

18 years agoDon't set segment registers via ptrace yet. Its not ready.
peter [Tue, 4 Oct 2005 23:26:00 +0000 (23:26 +0000)]
Don't set segment registers via ptrace yet.  Its not ready.

18 years agoWhen data passed into devctl_notify is NULL, don't print (null). Instead
imp [Tue, 4 Oct 2005 22:25:14 +0000 (22:25 +0000)]
When data passed into devctl_notify is NULL, don't print (null).  Instead
don't print anything at all.

# this fixes a problem that I noticed with devd.pipe not terminating lines
# with \n correctly sometimes.

18 years agomedia-type predicate is used in contexts where device-name is undefined.
imp [Tue, 4 Oct 2005 22:22:51 +0000 (22:22 +0000)]
media-type predicate is used in contexts where device-name is undefined.
In those contexted, use subsystem instead.

# This causes dhclient to run again when I plug in my ethernet cable to
# my fxp card in my laptop.

18 years agoRemove an unused variable.
stefanf [Tue, 4 Oct 2005 22:00:35 +0000 (22:00 +0000)]
Remove an unused variable.

Reviewed by: ken

18 years agoMerge makelist rev 1.10 and map.c rev 1.22 from NetBSD. They just patch the
stefanf [Tue, 4 Oct 2005 21:59:29 +0000 (21:59 +0000)]
Merge makelist rev 1.10 and map.c rev 1.22 from NetBSD.  They just patch the
bug fixed in the last commit to map.c in a different way.  Follow NetBSD to
facilitate future merges.

18 years agoMerge NetBSD's rev. 1.49:
stefanf [Tue, 4 Oct 2005 21:51:26 +0000 (21:51 +0000)]
Merge NetBSD's rev. 1.49:

Fix double if (from Alexey E. Suslikov via jmc@openbsd).
While here, re-word both H_[GS]ETUNIQUE descriptions so they make
more sense. Bump date.

18 years agoMerge NetBSD's rev. 1.41:
stefanf [Tue, 4 Oct 2005 21:45:42 +0000 (21:45 +0000)]
Merge NetBSD's rev. 1.41:

PR/31012: Barry Naujok: libedit el_get with EL_EDITOR op does not work
Fixed as suggested.

18 years agoRemove a never reached RET.
cognet [Tue, 4 Oct 2005 20:47:27 +0000 (20:47 +0000)]
Remove a never reached RET.

18 years agostrd needs the destination to be double-word aligned, but the pointer passed
cognet [Tue, 4 Oct 2005 20:42:42 +0000 (20:42 +0000)]
strd needs the destination to be double-word aligned, but the pointer passed
to savectx isn't always, so always use stmia, savectx isn't called enough
to need that kind of optimization.

18 years agoWhen bridging is enabled and an ARP request is recieved on a member interface,
thompsa [Tue, 4 Oct 2005 19:50:02 +0000 (19:50 +0000)]
When bridging is enabled and an ARP request is recieved on a member interface,
the arp code will search all local interfaces for a match. This triggers a
kernel log if the bridge has been assigned an address.

arp: ac:de:48:18:83:3d is using my IP address 192.168.0.142!

bridge0: flags=8041<UP,RUNNING,MULTICAST> mtu 1500
        inet 192.168.0.142 netmask 0xffffff00
        ether ac:de:48:18:83:3d

Silence this warning for 6.0 to stop unnecessary bug reports, the code will need
to be reworked.

Approved by: mlaier (mentor)
MFC after: 3 days

18 years agoCorrect brainfart in SO_BINTIME test.
andre [Tue, 4 Oct 2005 18:19:21 +0000 (18:19 +0000)]
Correct brainfart in SO_BINTIME test.

Pointed out by: nate
Pointy hat to: andre

18 years agoMake SO_BINTIME timestamps available on raw_ip sockets.
andre [Tue, 4 Oct 2005 18:07:11 +0000 (18:07 +0000)]
Make SO_BINTIME timestamps available on raw_ip sockets.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoRe-order MAC and DAC checks in shmget() in order to give precedence to
rwatson [Tue, 4 Oct 2005 16:40:20 +0000 (16:40 +0000)]
Re-order MAC and DAC checks in shmget() in order to give precedence to
the MAC result, as well as avoid losing the DAC check result when MAC
is enabled.

MFC after: 3 days
Reported by: Patrick LeBlanc <Patrick dot LeBlanc at sparta dot com>

18 years agodump_avail has nothing to do with ARM_USE_SMALL_ALLOC, so move its
cognet [Tue, 4 Oct 2005 16:29:31 +0000 (16:29 +0000)]
dump_avail has nothing to do with ARM_USE_SMALL_ALLOC, so move its
declaration out of the #ifdef.

18 years agoUse FILEDESC_UNLOCK(fdp) after FILE_UNLOCK(p), not before to avoid LOR.
rik [Tue, 4 Oct 2005 16:27:54 +0000 (16:27 +0000)]
Use FILEDESC_UNLOCK(fdp) after FILE_UNLOCK(p), not before to avoid LOR.
Slightly discussed on current@.

LOR #055

MFC after: 14 days

18 years agoProtect PID initializations for statistics by the bpf descriptor
csjp [Tue, 4 Oct 2005 15:06:10 +0000 (15:06 +0000)]
Protect PID initializations for statistics by the bpf descriptor
locks. Also while we are here, protect the bpf descriptor during
knlist_remove{add} operations.

Discussed with: rwatson

18 years agoCatch up with the import of bsnmp-1.11. Add a couple of new
harti [Tue, 4 Oct 2005 15:03:39 +0000 (15:03 +0000)]
Catch up with the import of bsnmp-1.11. Add a couple of new
configuration flags to CFLAGS.

18 years agoCatch up with the import of bsnmp-1.11. Add a couple of new
harti [Tue, 4 Oct 2005 15:02:07 +0000 (15:02 +0000)]
Catch up with the import of bsnmp-1.11. Add a couple of new
configuration flags to CFLAGS and set the WARNS level to 6.

18 years agoUpdate the vnode's access time after an mmap operation on it.
dds [Tue, 4 Oct 2005 14:58:58 +0000 (14:58 +0000)]
Update the vnode's access time after an mmap operation on it.
Before this change a copy operation with cp(1) would not update the
file access times.

According to the POSIX mmap(2) documentation: the st_atime field
of the mapped file may be marked for update at any time between the
mmap() call and the corresponding munmap() call. The initial read
or write reference to a mapped region shall cause the file's st_atime
field to be marked for update if it has not already been marked for
update.

18 years agoAdd snmp_ntp/Makefile.in to the exclude list.
harti [Tue, 4 Oct 2005 14:53:06 +0000 (14:53 +0000)]
Add snmp_ntp/Makefile.in to the exclude list.

18 years agoThese files are not needed and were imported by accident in the
harti [Tue, 4 Oct 2005 14:51:55 +0000 (14:51 +0000)]
These files are not needed and were imported by accident in the
previous import.

18 years agoUse the correct object's backing_object_offset while calculating offsets.
csjp [Tue, 4 Oct 2005 14:47:47 +0000 (14:47 +0000)]
Use the correct object's backing_object_offset while calculating offsets.
While we are here, add a note that we need to lock the object before walking
the backing object list.

Pointed out by: alc
Discussed with: rwatson

18 years agoThis commit was generated by cvs2svn to compensate for changes in r150920,
harti [Tue, 4 Oct 2005 14:41:06 +0000 (14:41 +0000)]
This commit was generated by cvs2svn to compensate for changes in r150920,
which included commits to RCS files with non-trunk default branches.

18 years agoVirgin import of bsnmpd 1.11
harti [Tue, 4 Oct 2005 14:41:06 +0000 (14:41 +0000)]
Virgin import of bsnmpd 1.11

18 years agoRemove duplicate entry for DDB.
cognet [Tue, 4 Oct 2005 14:39:33 +0000 (14:39 +0000)]
Remove duplicate entry for DDB.

18 years agoReally detect if DDB is enabled.
cognet [Tue, 4 Oct 2005 14:38:55 +0000 (14:38 +0000)]
Really detect if DDB is enabled.
Remove kernel.tramp if it exists on make clean.

18 years agoMake arm/disassem.c depends on DDB
cognet [Tue, 4 Oct 2005 14:37:53 +0000 (14:37 +0000)]
Make arm/disassem.c depends on DDB
make arm/in_cksum.c and arm/in_cksum_asm.S depend on INET.

18 years agoFix build when DDB isn't defined.
cognet [Tue, 4 Oct 2005 14:37:03 +0000 (14:37 +0000)]
Fix build when DDB isn't defined.

18 years agoStandard Giant push down operations for the Mandatory Access Control (MAC)
csjp [Tue, 4 Oct 2005 14:32:58 +0000 (14:32 +0000)]
Standard Giant push down operations for the Mandatory Access Control (MAC)
framework. This makes Giant protection around MAC operations which inter-
act with VFS conditional, based on the MPSAFE status of the file system.

Affected the following syscalls:

o __mac_get_fd
o __mac_get_file
o __mac_get_link
o __mac_set_fd
o __mac_set_file
o __mac_set_link

-Drop Giant all together in __mac_set_proc because the
 mac_cred_mmapped_drop_perms_recurse routine no longer requires it.
-Move conditional Giant aquisitions to after label allocation routines.
-Move the conditional release of Giant to before label de-allocation
 routines.

Discussed with: rwatson

18 years agoConditionally pickup Giant in mac_cred_mmapped_drop_perms_recurse so
csjp [Tue, 4 Oct 2005 14:32:15 +0000 (14:32 +0000)]
Conditionally pickup Giant in mac_cred_mmapped_drop_perms_recurse so
we can drop it all together in __mac_set_proc.

Reviewed by: alc
Discussed with: rwatson

18 years agoUse a callback to set up a vlan interface so that "vlan"
yar [Tue, 4 Oct 2005 11:48:03 +0000 (11:48 +0000)]
Use a callback to set up a vlan interface so that "vlan"
and "vlandev" commands can be specified in any order.
This makes the code more compact and clear as well.

Improve error check on vlan argument.

MFC after: 2 weeks

18 years agoSort function names.
davidxu [Tue, 4 Oct 2005 08:28:46 +0000 (08:28 +0000)]
Sort function names.

18 years agoRename net.isr.enable to net.isr.dispatch.
rwatson [Tue, 4 Oct 2005 07:59:28 +0000 (07:59 +0000)]
Rename net.isr.enable to net.isr.dispatch.

No compatibility code is provided, as this will be the production name
as of 6.0.

MFC after: 3 days
Requested by: scottl

18 years agoAdd pthread_timedjoin_np prototype.
davidxu [Tue, 4 Oct 2005 07:23:56 +0000 (07:23 +0000)]
Add pthread_timedjoin_np prototype.

18 years agoAdd function pthread_timedjoin_np, the function is similar with pthread_join
davidxu [Tue, 4 Oct 2005 06:15:25 +0000 (06:15 +0000)]
Add function pthread_timedjoin_np, the function is similar with pthread_join
except the function will return ETIMEDOUT if target thread does not exit
before specified absolute time passes.

18 years agoFor some utterly bizarre reason, sparc64 coerces PAGE_SIZE to be a long
scottl [Tue, 4 Oct 2005 04:49:21 +0000 (04:49 +0000)]
For some utterly bizarre reason, sparc64 coerces PAGE_SIZE to be a long
instead of an int.  No other FreeBSD architecture does this.  Patch over
this problem in the lmc driver.  While I'm here, correct a mistake with
DEVICE_POLLING.

18 years agoOops, left a compile option enabled that should not be enabled.
scottl [Tue, 4 Oct 2005 04:40:21 +0000 (04:40 +0000)]
Oops, left a compile option enabled that should not be enabled.

18 years agoAdd missing word to comment.
truckman [Tue, 4 Oct 2005 04:02:33 +0000 (04:02 +0000)]
Add missing word to comment.

18 years agoBring in the good version of this file.
cognet [Mon, 3 Oct 2005 22:44:54 +0000 (22:44 +0000)]
Bring in the good version of this file.

18 years agoInitialize the inode i_flag field in ffs_valloc() to clean up any
truckman [Mon, 3 Oct 2005 21:57:43 +0000 (21:57 +0000)]
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.

MFC after: 3 days

18 years agoUse the constants for the syscall names from syscall.h rather than
jhb [Mon, 3 Oct 2005 18:34:17 +0000 (18:34 +0000)]
Use the constants for the syscall names from syscall.h rather than
hardcoding the numbers for the SYSVIPC syscalls.

18 years agoUse more rc.subr bits to clean up pccard_ether and implement new
brooks [Mon, 3 Oct 2005 18:20:44 +0000 (18:20 +0000)]
Use more rc.subr bits to clean up pccard_ether and implement new
features.  Both the presence of a NOAUTO keyword and an interface being
up can be ignored is the forcestart option is used.  Additionally, a
restart option has been added.

Reviewed by: ume

18 years ago- s/cd0c/cd0
blackend [Mon, 3 Oct 2005 17:24:51 +0000 (17:24 +0000)]
- s/cd0c/cd0
- Bump revision date to match many content changes since last revision

18 years agoNew release notes:
hrs [Mon, 3 Oct 2005 17:24:20 +0000 (17:24 +0000)]
New release notes:
/boot.config -S option,
comconsole_speed loader tunable,
debug.mpsafevfs=1 on ia64 by default,
snd_via8233(4) supported on amd64,
IPv6 pMTU discovery for multicast packets disabled by default,
new sysctl: net.inet6.ip6.mcast_pmtu,
net.inet.icmp.reply_from_interface, and
net.inet.icmp.quotelen,
IP_MINTTL socket option,
ata(4) DMA workaround,
cmp(1) -h option,
new functions: pidfile(3), and
memmem(3),
netstat(1) -h option,
pkill(1) -F and -L option,
powerd(8) -P option,
removable_interfaces rc.conf variable removed,
ifconfig_<ifn>, and
sysinstall(8) default partition size calculation changed.

18 years ago- Use if_printf() and device_printf() and axe lge_unit from the softc.
jhb [Mon, 3 Oct 2005 15:52:34 +0000 (15:52 +0000)]
- Use if_printf() and device_printf() and axe lge_unit from the softc.
- Don't bzero the softc first thing in attach.
- Cleanup error handling in attach() to avoid lots of duplication.
- Don't initialize the callout handle twice.

MFC after: 3 days

18 years ago- Use PCIR_BAR().
jhb [Mon, 3 Oct 2005 15:47:15 +0000 (15:47 +0000)]
- Use PCIR_BAR().
- Remove unused TXP_PCI_INTLINE and TXP_DEVNAME macros.

18 years agoFix a long line in copyright notice.
cognet [Mon, 3 Oct 2005 14:43:27 +0000 (14:43 +0000)]
Fix a long line in copyright notice.

Pointed out by: Gavin Atkinson gavin.atkinson ury york ac uk

18 years agoCompile fdisk for arm as well.
cognet [Mon, 3 Oct 2005 14:22:15 +0000 (14:22 +0000)]
Compile fdisk for arm as well.

18 years agoAdd an asm version of strlen() for arm (how useful).
cognet [Mon, 3 Oct 2005 14:21:49 +0000 (14:21 +0000)]
Add an asm version of strlen() for arm (how useful).

18 years agolibkvm bits for arm.
cognet [Mon, 3 Oct 2005 14:21:14 +0000 (14:21 +0000)]
libkvm bits for arm.

18 years agoAdd dma and aau.
cognet [Mon, 3 Oct 2005 14:20:44 +0000 (14:20 +0000)]
Add dma and aau.

18 years agoImport dummy drivers for the i80321 DMA controller and AAU.
cognet [Mon, 3 Oct 2005 14:19:55 +0000 (14:19 +0000)]
Import dummy drivers for the i80321 DMA controller and AAU.
The DMA controller driver only knows how to do memory to memory copies, and
the AAU driver how to zero a chunk of memory.
Use them to process big (>=1KB) copying/zeroing.

18 years agoMake mem.c know about the pages allocated with ARM_USE_SMALL_ALLOC.
cognet [Mon, 3 Oct 2005 14:18:21 +0000 (14:18 +0000)]
Make mem.c know about the pages allocated with ARM_USE_SMALL_ALLOC.

18 years agoExport the variables needed for the copy/zero API.
cognet [Mon, 3 Oct 2005 14:17:45 +0000 (14:17 +0000)]
Export the variables needed for the copy/zero API.

18 years agoMake sure the interrupt is masked before processing it, or bad things
cognet [Mon, 3 Oct 2005 14:17:16 +0000 (14:17 +0000)]
Make sure the interrupt is masked before processing it, or bad things
can happen.

18 years agoIf a thread already tries to allocate a new memory range, wait for it
cognet [Mon, 3 Oct 2005 14:16:41 +0000 (14:16 +0000)]
If a thread already tries to allocate a new memory range, wait for it
instead of trying to do the same.

18 years agoProvide a dump_avail[] variable, which contains the page ranges to be
cognet [Mon, 3 Oct 2005 14:15:50 +0000 (14:15 +0000)]
Provide a dump_avail[] variable, which contains the page ranges to be
dumped.

For iq31244_machdep.c, attempt to recognize hints provided by the elf
trampoline.

18 years agoo Move a lot of parameter checking from netisr_poll() to
glebius [Mon, 3 Oct 2005 14:15:26 +0000 (14:15 +0000)]
o Move a lot of parameter checking from netisr_poll() to
  dedicated sysctl handlers. Protect manipulations with
  poll_mtx. The affected sysctls are:
  - kern.polling.burst_max
  - kern.polling.each_burst
  - kern.polling.user_frac
  - kern.polling.reg_frac
o Use CTLFLAG_RD on MIBs that supposed to be read-only.
o u_int32t -> uint32_t
o Remove unneeded locking from poll_switch().

18 years ago- Provide the kernel l1pt physical address, for userland.
cognet [Mon, 3 Oct 2005 14:13:50 +0000 (14:13 +0000)]
- Provide the kernel l1pt physical address, for userland.
- Use the new API for pmap_copy_page() and pmap_zero_page().
- Just write-back the pages in pmap_qenter(), and invalidate it in
pmap_qremove().
- Nuke the cache flushing in pmap_enter_quick(), it's not needed anymore.

18 years agoAdd a new API to let platform-specific ports provide functions for big
cognet [Mon, 3 Oct 2005 14:12:10 +0000 (14:12 +0000)]
Add a new API to let platform-specific ports provide functions for big
copy/zeroing.

18 years agoExport the virtual and physical address in which the kernel was loaded,
cognet [Mon, 3 Oct 2005 14:10:55 +0000 (14:10 +0000)]
Export the virtual and physical address in which the kernel was loaded,
needed for userland when reading kernel dumps.

18 years agoMakefile magic for the ELF trampoline.
cognet [Mon, 3 Oct 2005 14:09:58 +0000 (14:09 +0000)]
Makefile magic for the ELF trampoline.

18 years agoImport a small ELF trampoline, in which the kernel is embedded, and that
cognet [Mon, 3 Oct 2005 14:09:36 +0000 (14:09 +0000)]
Import a small ELF trampoline, in which the kernel is embedded, and that
is able to load the kernel into memory, symbol table included. This is
needed to be able to access the symbol table from DDB without a boot
loader.

18 years ago*blush*
cognet [Mon, 3 Oct 2005 14:07:57 +0000 (14:07 +0000)]
*blush*
Don't try to dereference map if it's NULL.
While I'm there, increase the minimum value to write-back/invalidate the
whole dcache in bus_dmamap_sync().

18 years agoOnly save the registers that are used.
cognet [Mon, 3 Oct 2005 14:07:09 +0000 (14:07 +0000)]
Only save the registers that are used.

18 years agoasm versions of in_cksum_hdr() and in_pseudo().
cognet [Mon, 3 Oct 2005 14:06:44 +0000 (14:06 +0000)]
asm versions of in_cksum_hdr() and in_pseudo().

18 years agoDefine KERNELDUMP_ARM_VERSION.
cognet [Mon, 3 Oct 2005 14:06:00 +0000 (14:06 +0000)]
Define KERNELDUMP_ARM_VERSION.

18 years agoImplement savectx().
cognet [Mon, 3 Oct 2005 14:05:38 +0000 (14:05 +0000)]
Implement savectx().

Obtained from: NetBSD

18 years agoKernel dump for arm, ripped from the ia64/amd64 version.
cognet [Mon, 3 Oct 2005 14:05:03 +0000 (14:05 +0000)]
Kernel dump for arm, ripped from the ia64/amd64 version.

18 years agoIf sufficiently bad things happen during a call to kern_execve(), it is
cperciva [Mon, 3 Oct 2005 12:49:54 +0000 (12:49 +0000)]
If sufficiently bad things happen during a call to kern_execve(), it is
possible for do_execve() to call exit1() rather than returning.  As a
result, the sequence "allocate memory; call kern_execve; free memory"
can end up leaking memory.

This commit documents this astonishing behaviour and adds a call to
exec_free_args() before the exit1() call in do_execve().  Since all
the users of kern_execve() in the tree use exec_free_args() to free
the command-line arguments after kern_execve() returns, this should
be safe, and it fixes the memory leak which can otherwise occur.

Submitted by: Peter Holm
MFC after: 3 days
Security: Local denial of service

18 years agoUnlock Giant symmetrically with respect to lock acquire order as that's
rwatson [Mon, 3 Oct 2005 11:34:29 +0000 (11:34 +0000)]
Unlock Giant symmetrically with respect to lock acquire order as that's
generally nicer.

Spotted by: johan
MFC after: 1 week

18 years agoAcquire Giant conditionally in in_addmulti() and in_delmulti() based on
rwatson [Mon, 3 Oct 2005 11:09:39 +0000 (11:09 +0000)]
Acquire Giant conditionally in in_addmulti() and in_delmulti() based on
whether the interface being accessed is IFF_NEEDSGIANT or not.  This
avoids lock order reversals when calling into the interface ioctl
handler, which could potentially lead to deadlock.

The long term solution is to eliminate non-MPSAFE network drivers.

Discussed with: jhb
MFC after: 1 week

18 years agoAdd the lmcconfig tool for controlling the lmc driver. Add man pages and
scottl [Mon, 3 Oct 2005 07:09:41 +0000 (07:09 +0000)]
Add the lmcconfig tool for controlling the lmc driver.  Add man pages and
glue.

Submitted by: David Boggs

18 years agoReintroduce the lmc T1/E1/T3 WAN driver. This version is locked, supports
scottl [Mon, 3 Oct 2005 07:05:34 +0000 (07:05 +0000)]
Reintroduce the lmc T1/E1/T3 WAN driver.  This version is locked, supports
interface polling, compiles on 64-bit platforms, and compiles on NetBSD,
OpenBSD, BSD/OS, and Linux.  Woo!  Thanks to David Boggs for providing this
driver.

Altq, sppp, netgraph, and bpf are required for this driver to operate.
Userland tools and man pages will be committed next.

Submitted by: David Boggs

18 years agomake saved cpu level stackable.
ume [Mon, 3 Oct 2005 06:57:29 +0000 (06:57 +0000)]
make saved cpu level stackable.

18 years agoImprove handling flags that must be propagated
yar [Mon, 3 Oct 2005 02:24:21 +0000 (02:24 +0000)]
Improve handling flags that must be propagated
to the parent interface, such as IFF_PROMISC and
IFF_ALLMULTI.  In addition, vlan(4) gains ability
to migrate from one parent to another w/o losing
its own flags.

PR: kern/81978
MFC after: 2 weeks

18 years agoClean up consistency checks in if_setflag():
yar [Mon, 3 Oct 2005 02:14:51 +0000 (02:14 +0000)]
Clean up consistency checks in if_setflag():
. use KASSERT for all checks so that the source of an error can be detected;
. use __func__ instead of spelling function name each time;
. fix a typo.

18 years agoLog a message about entering or leaving permanently promiscuous mode,
yar [Mon, 3 Oct 2005 01:47:43 +0000 (01:47 +0000)]
Log a message about entering or leaving permanently promiscuous mode,
as it is done for usual promiscuous mode already.  This info is important
because promiscuous mode in the hands of a malicious party can jeopardize
the whole network.

18 years agoAlways wire the sysctl output buffer in sysctl_kern_proc() before
truckman [Sun, 2 Oct 2005 23:27:56 +0000 (23:27 +0000)]
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
MFC after: 3 days

18 years ago- Call db_setup_paging() for traceall.
cognet [Sun, 2 Oct 2005 22:57:31 +0000 (22:57 +0000)]
- Call db_setup_paging() for traceall.
- Make it so one can't call db_setup_paging() if it has already been called
before. traceall needs this, or else the db_setup_paging() call from
db_trace_thread() will reset the printed line number, and override its
argument.
This is not perfect for traceall, because even if one presses 'q' while in
the middle of printing a backtrace it will finish printing the backtrace
before exiting, as db_trace_thread() won't be notified it should stop, but
it is hard to do better without reworking the pager interface a lot more.

18 years agoNew release notes:
hrs [Sun, 2 Oct 2005 21:02:37 +0000 (21:02 +0000)]
New release notes:
gre(4) IPv6 over GRE support,
ipfw IPv6 support,
new sysctl net.inet6.ip6.stealth added,
g_label now supports Ext2FS and ReiserFS,
bsdiff(1) and bspatch(1) added,
ping(8) "sweeping ping" support,
wcsdup() function added,
rc.d/gbde_swap renamed to rc.d/encswap,
rc.d/geli and rc.d/geli2 added, and
portsnap(8) imported.

18 years agoUse available rc.subr features.
yar [Sun, 2 Oct 2005 19:17:49 +0000 (19:17 +0000)]
Use available rc.subr features.
Reduce code duplication.
Follow the current style of rc.d scripting.

18 years agoDo not packet filter in the bridge_start() routine, locally generated packets
thompsa [Sun, 2 Oct 2005 19:15:56 +0000 (19:15 +0000)]
Do not packet filter in the bridge_start() routine, locally generated packets
are already filtered by the higher layers.

Approved by: mlaier (mentor)
MFC after: 3 days

18 years agoRecord dependency on the newly introduced pfsync.
yar [Sun, 2 Oct 2005 19:12:42 +0000 (19:12 +0000)]
Record dependency on the newly introduced pfsync.

Start before routing for better system protection.
(pf used to start late during system boot, after
many a network daemon have started already, which
sucked from security POV.)

Remark: For maximum security, pf should start before
netif, but it would create a dependency loop because
pfsync has to start after netif, yet before pf.

Discussed with: mlaier on -pf
MFC after: 5 days

18 years agoAdd an rc.d script to start pfsync at the right moment of the
yar [Sun, 2 Oct 2005 18:59:02 +0000 (18:59 +0000)]
Add an rc.d script to start pfsync at the right moment of the
system boot, and hook it up in the system.

The separate script is needed because in the presence of various
interface lists in rc.conf ($network_interfaces, $cloned_interfaces,
$sppp_interfaces, $gif_interfaces, more to come) it is hard to start
them orderly, so that pfsync is brought up after its syncdev, which
is required for the proper startup of pfsync.

Discussed with: mlaier on -pf
MFC after: 5 days

18 years agoNew release notes:
hrs [Sun, 2 Oct 2005 16:14:41 +0000 (16:14 +0000)]
New release notes:
acpi_thermal(4) passive cooling support,
ichsmb(4) unloading bug fixed,
smbios(4) support on amd64,
hw.apic.enable_extint added,
sound(4) improvements,
MPSAFE: the bottom half of NFS, snd_als4000(4),
snd_cmi(4), snd_via8233(4), snd_via82c686(4),
and natm(4),
GEOM_ZERO class added,
umass(4) PLAY_* commands support,
moused(8) -H flag,
shared library version bump, and
pkg_version(1) -o and -O flags.

18 years ago* Fixed rate operation for es1370 chip to solve conflicting
netchild [Sun, 2 Oct 2005 15:56:36 +0000 (15:56 +0000)]
* Fixed rate operation for es1370 chip to solve conflicting
  sampling rate between playback and recording. This can be
  disabled / enabled via kernel hints
  (hint.pcm.<unit>.fixed_rate=0/4000-48000) or sysctl
  hw.snd.pcm<unit>.fixed_rate=0/4000-48000). Default to 48khz
  fixed rate. [1]
* Basic cleanup. *_es1371x_* -> *_es137x_*.
* Some locking fixes. [2]

Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>
Discussed with: yongari [2]
See also: http://lists.freebsd.org/pipermail/freebsd-multimedia/2005-September/002758.html [1]
Reported by: Jos Backus <jos at catnook.com> [1]

18 years agoUse rc.subr(8) appropriately:
yar [Sun, 2 Oct 2005 15:54:26 +0000 (15:54 +0000)]
Use rc.subr(8) appropriately:
- utilize default methods instead of rolling local ones;
- avoid to specify BEFORE conditions we don't really need
  (pflog will be REQUIRE'd by pf);
- omit extra decoration from warning messages, warn() will
  decorate them sufficiently.

18 years agoEmulate pcm mixer controller for any uaudio device without it.
netchild [Sun, 2 Oct 2005 15:51:19 +0000 (15:51 +0000)]
Emulate pcm mixer controller for any uaudio device without it.

Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>