]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoMFV of tzdata2007j
edwin [Tue, 4 Dec 2007 00:30:07 +0000 (00:30 +0000)]
MFV of tzdata2007j

Timezone data changes in this import:
- Add America/St_Barthelemy (BL) and America/Marigot (MF)
- Venezuela will move to -4:30 on 9 December 2007 instead of 31 December 2007

MFCs will be done after the code freezes have stopped.

16 years agoUpdate with data from Newsletter VI-1 2007-09-21:
edwin [Tue, 4 Dec 2007 00:20:57 +0000 (00:20 +0000)]
Update with data from Newsletter VI-1 2007-09-21:

    Added SAINT BARTHELEMY (BL) and SAINT MARTIN (MF).

This allows an MFV of src/share/zoneinfo which uses these two new codes.

16 years agoImplement functions required by some ndis drivers.
thompsa [Mon, 3 Dec 2007 23:43:58 +0000 (23:43 +0000)]
Implement functions required by some ndis drivers.

 NdisIMCopySendPerPacketInfo [1]
 KeQuerySystemTime [1]
 KeTickCount [1]
 strncat [1]
 KeBugCheckEx

Submitted by: Marcin Simonides [1]

16 years agoRemove compatibilty defines to simplify reading the code, this is around 10% of
thompsa [Mon, 3 Dec 2007 21:51:28 +0000 (21:51 +0000)]
Remove compatibilty defines to simplify reading the code, this is around 10% of
the total LOC. These are mostly for the 6.x branch and it will be easier to
cherrypick any changes (if at all).

16 years agoDisplay per-thread command line in TDNAME field for -k and -t; if
rwatson [Mon, 3 Dec 2007 21:21:15 +0000 (21:21 +0000)]
Display per-thread command line in TDNAME field for -k and -t; if
no per-thread name is available or the name is identical to the
process name, display "-" instead.  Very slightly shrink the COMM
entry to make a bit more room, although this doesn't help with
stack traces much.

Suggested by: thompsa

16 years agoMake sure we set the locale to "C" when testing thousands' separator
das [Mon, 3 Dec 2007 17:48:55 +0000 (17:48 +0000)]
Make sure we set the locale to "C" when testing thousands' separator
support, rather than just "", which refers to the system default based
on the environment.

16 years agoMerge BIND 9.4.2 into main chunk.
ume [Mon, 3 Dec 2007 15:13:44 +0000 (15:13 +0000)]
Merge BIND 9.4.2 into main chunk.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r174223,
ume [Mon, 3 Dec 2007 15:07:58 +0000 (15:07 +0000)]
This commit was generated by cvs2svn to compensate for changes in r174223,
which included commits to RCS files with non-trunk default branches.

16 years agoVendor import of BIND 9.4.2
ume [Mon, 3 Dec 2007 15:07:58 +0000 (15:07 +0000)]
Vendor import of BIND 9.4.2

16 years agoWhen a symbol name can't be resolved, return "??" as the name, rather
rwatson [Mon, 3 Dec 2007 14:44:35 +0000 (14:44 +0000)]
When a symbol name can't be resolved, return "??" as the name, rather
than "Unknown func", in order to avoid putting spaces in what ideally
is a string separated by white space.

16 years agoSince jb@ fixed the type of dd_lock in <dirent.h>, these casts are no
des [Mon, 3 Dec 2007 14:33:51 +0000 (14:33 +0000)]
Since jb@ fixed the type of dd_lock in <dirent.h>, these casts are no
longer required.

16 years agoFix audio playback aborted with SNDCTL_DSP_SETTRIGGER, affecting
ariff [Mon, 3 Dec 2007 14:26:56 +0000 (14:26 +0000)]
Fix audio playback aborted with SNDCTL_DSP_SETTRIGGER, affecting
PortAudio version 19.

PR: kern/118395
Submitted by: Henrik Gulbrandsen <henrik at gulbra dot net>
MFC after: 3 days

16 years agoDo not allow the SNPSTTY ioctl for the snoop device that has a tty
kib [Mon, 3 Dec 2007 14:02:27 +0000 (14:02 +0000)]
Do not allow the SNPSTTY ioctl for the snoop device that has a tty
attached. Otherwise, the snp->snp_tty would be overwritten, while the
tty line discipline still set to the snpdisc. Then snplwrite() causes
panic because ttytosnp() cannot find the snp.

MFC after: 1 week

16 years agoRestore the branding of the ELF executables. The structure was optimized out.
kib [Mon, 3 Dec 2007 13:21:21 +0000 (13:21 +0000)]
Restore the branding of the ELF executables. The structure was optimized out.

MFC after: 3 days

16 years agoCatch up pc98 for i386 stack(9) changes:
rwatson [Mon, 3 Dec 2007 11:38:28 +0000 (11:38 +0000)]
Catch up pc98 for i386 stack(9) changes:

  Add stub stack.h for pc98 that includes i386 pc98.

  Add i386 stack_machdep.c to files.pc98.

Spotted by: tinderbox

16 years agoAdd callchain parsing to -lpmc.
jkoshy [Mon, 3 Dec 2007 11:15:46 +0000 (11:15 +0000)]
Add callchain parsing to -lpmc.

Sponsored by: FreeBSD Foundation and Google Inc.

16 years agoAdd userland definitions for parsing callchain records.
jkoshy [Mon, 3 Dec 2007 11:11:08 +0000 (11:11 +0000)]
Add userland definitions for parsing callchain records.

Sponsored by: FreeBSD Foundation and Google Inc.

16 years agoReplace a spurious cross-reference to hwpmc(4) with correct text.
jkoshy [Mon, 3 Dec 2007 10:59:23 +0000 (10:59 +0000)]
Replace a spurious cross-reference to hwpmc(4) with correct text.

16 years agozic(8) should exit the loop when the end of the string is reached due
kevlo [Mon, 3 Dec 2007 10:45:44 +0000 (10:45 +0000)]
zic(8) should exit the loop when the end of the string is reached due
to the call to error(). The problem found by doing fuzz testing.

MFC after: 3 days

16 years agoWhen printing the contents of a HWPMC log in human readable form:
jkoshy [Mon, 3 Dec 2007 10:29:49 +0000 (10:29 +0000)]
When printing the contents of a HWPMC log in human readable form:
- Print a warning if the version number recorded in the log is not what the
  tool expects.
- Print a tidier error message when an unrecognized event is encountered
  in the log.
- Don't print a spurious 'Unknown error: 0' when exiting after a parse
  error.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r174206,
dougb [Mon, 3 Dec 2007 08:26:34 +0000 (08:26 +0000)]
This commit was generated by cvs2svn to compensate for changes in r174206,
which included commits to RCS files with non-trunk default branches.

16 years agoUpdate this file so that BIND on ARM can actually work. I quote:
dougb [Mon, 3 Dec 2007 08:26:34 +0000 (08:26 +0000)]
Update this file so that BIND on ARM can actually work. I quote:

The problem was, isc_atomic_cmpxchg() is almost like our
atomic_cmpset_32(), except it expects the old value to be
returned, whereas our atomic_cmpset_32 returns 1 on success,
or 0 on failure. So I re-implemented something suitable.

Submitted by: cognet
Reviewed by: bsdimp

16 years agoTests for rounding, and for the leading 0's bug.
das [Mon, 3 Dec 2007 07:18:47 +0000 (07:18 +0000)]
Tests for rounding, and for the leading 0's bug.

16 years agoIn scanf, round according to the current rounding mode.
das [Mon, 3 Dec 2007 07:17:33 +0000 (07:17 +0000)]
In scanf, round according to the current rounding mode.

16 years agoAlways honor promiscuous flag prior to programming Rx multicast
yongari [Mon, 3 Dec 2007 01:28:08 +0000 (01:28 +0000)]
Always honor promiscuous flag prior to programming Rx multicast
filter. This fixes a regression introduced in rev 1.89.

PR: 114632
MFC after: 3 days

16 years agoConnect procstat(1) to the build.
rwatson [Sun, 2 Dec 2007 23:32:03 +0000 (23:32 +0000)]
Connect procstat(1) to the build.

16 years agoAdd procstat(1), a process inspection utility. This provides both some
rwatson [Sun, 2 Dec 2007 23:31:45 +0000 (23:31 +0000)]
Add procstat(1), a process inspection utility.  This provides both some
of the missing functionality from procfs(4) and new functionality for
monitoring and debugging specific processes.  procstat(1) operates in
the following modes:

  -b  Display binary information for the process.
  -c  Display command line arguments for the process.
  -f  Display file descriptor information for the process.
  -k  Display the stacks of kernel threads in the process.
  -s  Display security credential information for the process.
  -t  Display thread information for the process.
  -v  Display virtual memory mappings for the process.

Further revision and modes are expected.

Testing, ideas, etc: cognet, sam, Skip Ford <skip at menantico dot com>
Wesley Shields <wxs at atarininja dot org>

16 years agoOne more glue update for BIND 9.4.2
dougb [Sun, 2 Dec 2007 22:21:30 +0000 (22:21 +0000)]
One more glue update for BIND 9.4.2

16 years agoAdd another new sysctl in support of the forthcoming procstat(1) to
rwatson [Sun, 2 Dec 2007 21:52:18 +0000 (21:52 +0000)]
Add another new sysctl in support of the forthcoming procstat(1) to
support its -k argument:

kern.proc.kstack - dump the kernel stack of a process, if debugging
  is permitted.

This sysctl is present if either "options DDB" or "options STACK" is
compiled into the kernel.  Having support for tracing the kernel
stacks of processes from user space makes it much easier to debug
(or understand) specific wmesg's while avoiding the need to enter
DDB in order to determine the path by which a process came to be
blocked on a particular wait channel or lock.

16 years agoRemove duplicate $FreeBSD$ tag.
rwatson [Sun, 2 Dec 2007 21:07:49 +0000 (21:07 +0000)]
Remove duplicate $FreeBSD$ tag.

16 years agoBreak out stack(9) from ddb(4):
rwatson [Sun, 2 Dec 2007 20:40:35 +0000 (20:40 +0000)]
Break out stack(9) from ddb(4):

- Introduce per-architecture stack_machdep.c to hold stack_save(9).
- Introduce per-architecture machine/stack.h to capture any common
  definitions required between db_trace.c and stack_machdep.c.
- Add new kernel option "options STACK"; we will build in stack(9) if it is
  defined, or also if "options DDB" is defined to provide compatibility
  with existing users of stack(9).

Add new stack_save_td(9) function, which allows the capture of a stacktrace
of another thread rather than the current thread, which the existing
stack_save(9) was limited to.  It requires that the thread be neither
swapped out nor running, which is the responsibility of the consumer to
enforce.

Update stack(9) man page.

Build tested: amd64, arm, i386, ia64, powerpc, sparc64, sun4v
Runtime tested: amd64 (rwatson), arm (cognet), i386 (rwatson)

16 years agoProvide unqiue malloc types instead of using M_DEVBUF.
scottl [Sun, 2 Dec 2007 19:54:45 +0000 (19:54 +0000)]
Provide unqiue malloc types instead of using M_DEVBUF.

16 years agoRefactor completion handlers so that they can be combined into a single
scottl [Sun, 2 Dec 2007 19:50:01 +0000 (19:50 +0000)]
Refactor completion handlers so that they can be combined into a single
function.  Add missing locking.

16 years agoThese files are not part of the distribution.
dougb [Sun, 2 Dec 2007 19:21:31 +0000 (19:21 +0000)]
These files are not part of the distribution.

Brought to you by: PEBCAK

16 years agoThis commit was generated by cvs2svn to compensate for changes in r174190,
dougb [Sun, 2 Dec 2007 19:17:26 +0000 (19:17 +0000)]
This commit was generated by cvs2svn to compensate for changes in r174190,
which included commits to RCS files with non-trunk default branches.

16 years agoThis file is no longer in BIND 9.4.2
dougb [Sun, 2 Dec 2007 19:17:26 +0000 (19:17 +0000)]
This file is no longer in BIND 9.4.2

16 years agoUpdate glue for BIND 9.4.2
dougb [Sun, 2 Dec 2007 19:13:58 +0000 (19:13 +0000)]
Update glue for BIND 9.4.2

16 years agoVendor import of BIND 9.4.2
dougb [Sun, 2 Dec 2007 19:10:41 +0000 (19:10 +0000)]
Vendor import of BIND 9.4.2

16 years agoThis commit was generated by cvs2svn to compensate for changes in r174187,
dougb [Sun, 2 Dec 2007 19:10:41 +0000 (19:10 +0000)]
This commit was generated by cvs2svn to compensate for changes in r174187,
which included commits to RCS files with non-trunk default branches.

16 years agoMake a pass at style.9 compliance
scottl [Sun, 2 Dec 2007 18:48:17 +0000 (18:48 +0000)]
Make a pass at style.9 compliance

16 years agoFix a typo that was hidden by AMR_DEBUG.
scottl [Sun, 2 Dec 2007 18:47:31 +0000 (18:47 +0000)]
Fix a typo that was hidden by AMR_DEBUG.

16 years agoFix printf format bugs that where hidden by AMR_DEBUG.
scottl [Sun, 2 Dec 2007 18:45:37 +0000 (18:45 +0000)]
Fix printf format bugs that where hidden by AMR_DEBUG.

16 years agoThe AR_SCSI_PASSTHROUGH conditional no longer exists, remove it from the
scottl [Sun, 2 Dec 2007 18:39:38 +0000 (18:39 +0000)]
The AR_SCSI_PASSTHROUGH conditional no longer exists, remove it from the
makefile.

16 years agoHeadphone / speakers automute fixup for Acer Aspire 4710 @ ALC268 laptop.
ariff [Sun, 2 Dec 2007 16:38:28 +0000 (16:38 +0000)]
Headphone / speakers automute fixup for Acer Aspire 4710 @ ALC268 laptop.

Tested by: Liyu, She

16 years agoFix a potential bug in pmap :
cognet [Sun, 2 Dec 2007 15:26:30 +0000 (15:26 +0000)]
Fix a potential bug in pmap :
We used to allocate the domains 0-14 for userland, and leave the domain 15
for the kernel. Now supersections requires the use of domain 0, so we
switched the kernel domain to 0, and use 1-15 for userland.
How it's done currently, the kernel domain could be allocated for a
userland process.
So switch back to the previous way we did things, set the first available
domain to 0, and just add 1 to get the real domain number in the struct pmap.

Reported by: Mark Tinguely <tinguely AT casselton DOT net>
MFC After: 3 days

16 years agoMove the strongarm-specific files from conf/files.arm to sa11x0/files.sa11xO.
cognet [Sun, 2 Dec 2007 13:12:21 +0000 (13:12 +0000)]
Move the strongarm-specific files from conf/files.arm to sa11x0/files.sa11xO.

Submitted by: Rafal Jaworowski <raj AT semihalf DOT com>

16 years agoCleanup : make nexus standard, as it is mandatory anyway.
cognet [Sun, 2 Dec 2007 13:10:42 +0000 (13:10 +0000)]
Cleanup : make nexus standard, as it is mandatory anyway.
Garbage-collect unused nexus_io.c and nexus_io_asm.S

Submitted by: Rafal Jaworowski <raj AT semihalf DOT com>

16 years agoConsider the following situation:
guido [Sun, 2 Dec 2007 13:00:47 +0000 (13:00 +0000)]
Consider the following situation:
1. A packet comes in that is to be forwarded
2. The destination of the packet is rewritten by some firewall code
3. The next link's MTU is too small
4. The packet has the DF bit set

Then the current code is such that instead of setting the next
link's MTU in the ICMP error, ip_next_mtu() is called and a guess
is sent as to which MTU is supposed to be tried next. This is because
in this case ip_forward() is called with srcrt set to 1. In that
case the ia pointer remains NULL but it is needed to get the MTU
of the interface the packet is to be sent out from.
Thus, we always set ia to the outgoing interface.

MFC after: 2 weeks

16 years agoClose a race.
cognet [Sun, 2 Dec 2007 12:49:28 +0000 (12:49 +0000)]
Close a race.

The RAS implementation would set the end address, then the start
address.  These were used by the kernel to restart a RAS sequence if
it was interrupted.  When the thread switching code ran, it would
check these values and adjust the PC and clear them if it did.

However, there's a small flaw in this scheme.  Thread T1, sets the end
address and gets preempted.  Thread T2 runs and also does a RAS
operation.  This resets end to zero.  Thread T1 now runs again and
sets start and then begins the RAS sequence, but is preempted before
the RAS sequence executes its last instruction.  The kernel code that
would ordinarily restart the RAS sequence doesn't because the PC isn't
between start and 0, so the PC isn't set to the start of the sequence.
So when T1 is resumed again, it is at the wrong location for RAS to
produce the correct results.  This causes the wrong results for the
atomic sequence.

The window for the first race is 3 instructions.  The window for the
second race is 5-10 instructions depending on the atomic operation.
This makes this failure fairly rare and hard to reproduce.

Mutexs are implemented in libthr using atomic operations.  When the
above race would occur, a lock could get stuck locked, causing many
downstream problems, as you might expect.

Also, make sure to reset the start and end address when doing a syscall, or
a malicious process could set them before doing a syscall.

Reviewed by: imp, ups (thanks guys)
Pointy hat to: cognet
MFC After: 3 days

16 years agoAdd two new sysctls in support of the forthcoming procstat(1) to support
rwatson [Sun, 2 Dec 2007 10:10:27 +0000 (10:10 +0000)]
Add two new sysctls in support of the forthcoming procstat(1) to support
its -f and -v arguments:

kern.proc.filedesc - dump file descriptor information for a process, if
  debugging is permitted, including socket addresses, open flags, file
  offsets, file paths, etc.

kern.proc.vmmap - dump virtual memory mapping information for a process,
  if debugging is permitted, including layout and information on
  underlying objects, such as the type of object and path.

These provide a superset of the information historically available
through the now-deprecated procfs(4), and are intended to be exported
in an ABI-robust form.

16 years agoHide a debug printf, NDIS_DEBUG is always defined and we test the sysctl.
thompsa [Sun, 2 Dec 2007 09:03:43 +0000 (09:03 +0000)]
Hide a debug printf, NDIS_DEBUG is always defined and we test the sysctl.

MFC after: 3 days

16 years agoCorrect the calculation for the number of 100ns intervals since
thompsa [Sun, 2 Dec 2007 08:54:50 +0000 (08:54 +0000)]
Correct the calculation for the number of 100ns intervals since
January 1, 1601. The 1601 - 1970 period was in seconds rather than 100ns
units.

Remove duplication by having NdisGetCurrentSystemTime call ntoskrnl_time.

16 years agoCorrect a comment.
alc [Sun, 2 Dec 2007 07:43:42 +0000 (07:43 +0000)]
Correct a comment.

16 years agoCorrect the nwbx_ies field type in struct ndis_wlan_bssid_ex.
thompsa [Sun, 2 Dec 2007 04:04:42 +0000 (04:04 +0000)]
Correct the nwbx_ies field type in struct ndis_wlan_bssid_ex.

PR: kern/118369
Submitted by: Weongyo Jeong

16 years agoEliminate vfs_page_set_valid()'s unused argument.
alc [Sun, 2 Dec 2007 01:28:35 +0000 (01:28 +0000)]
Eliminate vfs_page_set_valid()'s unused argument.

16 years agoAdd extra visibility definitions.
jb [Sun, 2 Dec 2007 00:05:18 +0000 (00:05 +0000)]
Add extra visibility definitions.

See: <http://groups.google.com/group/generic-abi/browse_thread/thread/1a84adc15666164>

These are already in OpenSolaris and DTrace uses STV_ELIMINATE.

16 years agoModify stack(9) stack_print() and stack_sbuf_print() routines to use new
rwatson [Sat, 1 Dec 2007 22:04:16 +0000 (22:04 +0000)]
Modify stack(9) stack_print() and stack_sbuf_print() routines to use new
linker interfaces for looking up function names and offsets from
instruction pointers.  Create two variants of each call: one that is
"DDB-safe" and avoids locking in the linker, and one that is safe for
use in live kernels, by virtue of observing locking, and in particular
safe when kernel modules are being loaded and unloaded simultaneous to
their use.  This will allow them to be used outside of debugging
contexts.

Modify two of three current stack(9) consumers to use the DDB-safe
interfaces, as they run in low-level debugging contexts, such as inside
lockmgr(9) and the kernel memory allocator.

Update man page.

16 years agoBased in info gleaned from the web and other drivers (including the Linux
peter [Sat, 1 Dec 2007 20:39:47 +0000 (20:39 +0000)]
Based in info gleaned from the web and other drivers (including the Linux
sx driver), change a magic value in the PLX bridge chip.  Apparently later
builds of the PCI cards had corrected values in the configuration eeprom.
This change supposedly fixes some pci bus problems.

16 years agoRemove XRPU driver, after asking all the users.
phk [Sat, 1 Dec 2007 20:07:45 +0000 (20:07 +0000)]
Remove XRPU driver, after asking all the users.

16 years agoFix a non-fatal off-by-one error in the previous revision.
marius [Sat, 1 Dec 2007 19:42:33 +0000 (19:42 +0000)]
Fix a non-fatal off-by-one error in the previous revision.

16 years agoOnly protect the prototypes with #ifndef _ASSERT_H_, the standards
phk [Sat, 1 Dec 2007 19:28:13 +0000 (19:28 +0000)]
Only protect the prototypes with #ifndef _ASSERT_H_, the standards
specifically allow changes to the NDEBUG macro between #includes of assert.h

16 years agoThe kernel linker includes a number of utility functions to look up symbol
rwatson [Sat, 1 Dec 2007 19:24:28 +0000 (19:24 +0000)]
The kernel linker includes a number of utility functions to look up symbol
information in support of DDB(4); these functions bypass normal linker
locking as they may run in contexts where locking is unsafe (such as the
kernel debugger).

Add a new interface linker_ddb_search_symbol_name(), which looks up a
symbol name and offset given an address, and also
linker_search_symbol_name() which does the same but *does* follow the
locking conventions of the linker.

Unlike existing functions, these functions place the name in a
caller-provided buffer, which is stable even after linker locks have been
released.  These functions will be used in upcoming revisions to stack(9)
to support kernel stack trace generation in contexts as part of a live,
rather than suspended, kernel.

16 years agoAdd missing #ifndef _ASSERT_H_ protection against multiple inclusions
phk [Sat, 1 Dec 2007 18:56:50 +0000 (18:56 +0000)]
Add missing #ifndef _ASSERT_H_ protection against multiple inclusions

16 years agoFor un-prototyped static inline functions declared in pthread_md.h on
rwatson [Sat, 1 Dec 2007 14:24:44 +0000 (14:24 +0000)]
For un-prototyped static inline functions declared in pthread_md.h on
sparc64, use ANSI function headers and specifically indicate the lack of
arguments with 'void'.  Otherwise, warnings are generated at WARNS=3 for
libkse, leading to a compile failure with -Werror.

16 years agoFor un-prototyped static inline functions declared in pthread_md.h on
rwatson [Sat, 1 Dec 2007 14:23:29 +0000 (14:23 +0000)]
For un-prototyped static inline functions declared in pthread_md.h on
ia64, powerpc, and sparc64, use ANSI function headers and specifically
indicate the lack of arguments with 'void'.  Otherwise, warnings are
generated at WARNS=3, leading to a compile failure with -Werror.

16 years agoFix a broken check that recently became more annoying because it now
kensmith [Sat, 1 Dec 2007 13:12:43 +0000 (13:12 +0000)]
Fix a broken check that recently became more annoying because it now
gets enabled when INVARIANTS is on instead of DIAGNOSTIC (which apparently
nobody uses).  From Tor's description:

  This happens when the block range spans two block maps, the first in the
  inode (mapping up to NDADDR direct blocks) and the second being the first
  indirect block.  The current check assumes that both block maps are
  indirect blocks.

Work done by: tegge
Tested by: kris, kensmith

16 years agoieee80211com.ic_fixed_rate holds rate instead of rate index
kevlo [Sat, 1 Dec 2007 08:53:03 +0000 (08:53 +0000)]
ieee80211com.ic_fixed_rate holds rate instead of rate index

Reviewed by: Weongyo Jeong

16 years agoCentralize and correct computation of TCP-MD5 signature offset within
bz [Fri, 30 Nov 2007 23:46:51 +0000 (23:46 +0000)]
Centralize and correct computation of TCP-MD5 signature offset within
the packet (tcp header options field).

Reviewed by: tools/regression/netinet/tcpconnect
MFC after: 3 days
Tested by: Nick Hilliard (see net@)

16 years agoMove call to tcp_signature_compute() after we adjusted the payload offset
bz [Fri, 30 Nov 2007 23:41:51 +0000 (23:41 +0000)]
Move call to tcp_signature_compute() after we adjusted the payload offset
in the tcp header. With relevant parts of the tcp header changing after
the 'signature' was computed, the signature becomes invalid.

Reviewed by: tools/regression/netinet/tcpconnect
MFC after: 3 days
Tested by: Nick Hilliard (see net@)

16 years agoAdd ipv6 to ng_cisco node. ipv6 wasn't a reality when I wrote it..
julian [Fri, 30 Nov 2007 23:27:39 +0000 (23:27 +0000)]
Add ipv6 to ng_cisco node. ipv6 wasn't a reality when I wrote it..

Submitted by: Marko Zec

16 years ago- Add the PCI side of the HOST-PCI bridge itself to the bus. This
marius [Fri, 30 Nov 2007 23:02:42 +0000 (23:02 +0000)]
- Add the PCI side of the HOST-PCI bridge itself to the bus. This
  is required by the X.Org PCI domains code and additionally needs
  a workaround for Hummingbird and Sabre bridges as these don't
  allow their config headers to be read at any width, which is an
  unusual behavior.
- In psycho(4) take advantage of DEFINE_CLASS_0 and use more
  appropriate types for some softc members.

MFC after: 3 days

16 years agoAllow the sio acpi attachment to be disabled (ie: use hints only). This
peter [Fri, 30 Nov 2007 21:45:07 +0000 (21:45 +0000)]
Allow the sio acpi attachment to be disabled (ie: use hints only).  This
hack means you can get the units and flags to match up more easily with
serial consoles on machines with acpi tables that cause the com ports
to be probed in the wrong order (and hence get the wrong sio unit number).

This replaces the common alternative hack of editing the code to comment
out the acpi attachment.  This could go away entirely when device wiring
patches are committed.

16 years agoAdd sio_puc_kludge_unit() to stop sio devices originating from puc
peter [Fri, 30 Nov 2007 21:36:12 +0000 (21:36 +0000)]
Add sio_puc_kludge_unit() to stop sio devices originating from puc
stomping on the units intended for the motherboard sio ports.  This is
no real substitute for the not-yet-committed device wiring enhancements.

Code taken from sio's pci attachment.

16 years agoDeal with the possibility of device_set_unit() being called when attaching
peter [Fri, 30 Nov 2007 21:30:14 +0000 (21:30 +0000)]
Deal with the possibility of device_set_unit() being called when attaching
the associated devinfo sysctl tree.

16 years agoAdd sysctl_rename_oid() to support device_set_unit() usage. Otherwise,
peter [Fri, 30 Nov 2007 21:29:08 +0000 (21:29 +0000)]
Add sysctl_rename_oid() to support device_set_unit() usage.  Otherwise,
when unit numbers are changed, the sysctl devinfo tree gets out of sync
and duplicate trees are attempted to be attached with the original name.

16 years agoWARNS=3'ify.
deischen [Fri, 30 Nov 2007 17:20:29 +0000 (17:20 +0000)]
WARNS=3'ify.

16 years agoInitialize the current thread and signal locks so that sigaction()
deischen [Fri, 30 Nov 2007 17:16:14 +0000 (17:16 +0000)]
Initialize the current thread and signal locks so that sigaction()
will work after a fork().

WARNS=3'ify.

16 years agoAdd a cross-reference to newgrp(1).
philip [Fri, 30 Nov 2007 11:02:36 +0000 (11:02 +0000)]
Add a cross-reference to newgrp(1).

Every time I need newgrp, I forget its name but I remember it's like
login for groups - newgrp(1) already cross-references login(1).

MFC after: 2 days

16 years agoImprove get_pv_entry()'s handling of low-memory conditions. After page
alc [Fri, 30 Nov 2007 07:14:42 +0000 (07:14 +0000)]
Improve get_pv_entry()'s handling of low-memory conditions.  After page
allocation fails and pv entries are reclaimed, there may be an unused pv
entry in a pv chunk that survived the reclamation.  However, previously,
after reclamation, get_pv_entry() did not look for an unused pv entry in
a surviving pv chunk; it simply retried the page allocation.  Now, it
does look for an unused pv entry before retrying the page allocation.

Note: This only applies to RELENG_7.  Earlier branches use a different
pv entry allocator.

MFC after: 6 weeks

16 years agoUse "8-current" manpage entities.
bmah [Fri, 30 Nov 2007 05:01:23 +0000 (05:01 +0000)]
Use "8-current" manpage entities.

16 years agoTo reduce the impact of possible removal of the syscalls required by
brooks [Thu, 29 Nov 2007 21:49:08 +0000 (21:49 +0000)]
To reduce the impact of possible removal of the syscalls required by
libkse in FreeBSD 8.0, do not build or install static versions of libkse
(i.e. libkse*.a) in the default case.  Static versions will be built and
installed if libthr is not built or if libkse is the default threading
library.

Discussed on: freebsd-arch
MFC after: 3 days

16 years agoAdjust the padding to account for the change of size of the MI part
jb [Thu, 29 Nov 2007 20:50:40 +0000 (20:50 +0000)]
Adjust the padding to account for the change of size of the MI part
of struct pcpu.

16 years agoBump .Dd for my last commit adding PCI IDs.
emaste [Thu, 29 Nov 2007 18:53:11 +0000 (18:53 +0000)]
Bump .Dd for my last commit adding PCI IDs.

16 years agoDocument PCI IDs of controllers added in aac_pci.c v1.63
emaste [Thu, 29 Nov 2007 17:56:55 +0000 (17:56 +0000)]
Document PCI IDs of controllers added in aac_pci.c v1.63

16 years agoAdd description of stack_print() and MLINK.
rwatson [Thu, 29 Nov 2007 17:16:55 +0000 (17:16 +0000)]
Add description of stack_print() and MLINK.

16 years agoCorrect a random value disclosure in random(4).
simon [Thu, 29 Nov 2007 16:06:12 +0000 (16:06 +0000)]
Correct a random value disclosure in random(4).

Security: FreeBSD-SA-07:09.random

16 years agoMove use of 'i' in cp_time sysctl under SCTL_MASK32 so that it compiles
rwatson [Thu, 29 Nov 2007 08:38:22 +0000 (08:38 +0000)]
Move use of 'i' in cp_time sysctl under SCTL_MASK32 so that it compiles
without warnings on systems that don't define it.

16 years agoRevert revision 1.4.
jkoshy [Thu, 29 Nov 2007 06:43:58 +0000 (06:43 +0000)]
Revert revision 1.4.

Intel CPUs with family 0x6, model 0xE and later (i.e., Intel Core(TM))
have a PMC architecture that differs somewhat from previous CPUs in
family 0x6.  Even though the basic programming model is similar, the
documented set of legal values that may be loaded into their PMC MSRs
differs from that of the previous PMCs in family 0x6 and reusing bit
values valid for the older PMCs could result in undefined behaviour in
the general case.

16 years agoMove the shared cp_time array (counts %sys, %user, %idle etc) to the
peter [Thu, 29 Nov 2007 06:34:30 +0000 (06:34 +0000)]
Move the shared cp_time array (counts %sys, %user, %idle etc) to the
per-cpu area.  cp_time[] goes away and a new function creates a merged
cp_time-like array for things like linprocfs, sysctl etc.  The
atomic ops for updating cp_time[] in statclock go away, and the scope
of the thread lock is reduced.

sysctl kern.cp_time returns a backwards compatible cp_time[] array.
A new kern.cp_times sysctl returns the individual per-cpu stats.

I have pending changes to make top and vmstat optionally show per-cpu
stats.

I'm very aware that there are something like 5 or 6 other versions "out
there" for doing this - but none were handy when I needed them.

I did merge my changes with John Baldwin's, and ended up replacing a
few chunks of my stuff with his, and stealing some other code.

Reviewed by:  jhb
Partly obtained from:  jhb

16 years agoDon't use plain "ret" instructions at targets of jump instructions,
bde [Thu, 29 Nov 2007 02:01:21 +0000 (02:01 +0000)]
Don't use plain "ret" instructions at targets of jump instructions,
since the branch caches on at least Athlon XP through Athlon 64 CPU's
don't understand such instructions and guarantee a cache miss taking
at least 10 cycles.  Use the documented workaround "ret $0" instead
("nop; ret" also works, but "ret $0" is probably faster on old CPUs).

Normal code (even asm code) doesn't branch to "ret", since there is
usually some cleanup to do, but the __mcount, .mcount and .mexitcount
entry points were optimized too well to have the minimum number of
instructions (3 instructions each if profiling is not enabled) and
they did this.  I didn't see a significant number of cache misses for
.mexitcount, but for the shared "ret" for __mcount and .mcount I
observed cache misses costing 26 cycles each.  For a send(2) syscall
that makes about 70 function calls, the cost of these cache misses
alone increased the syscall time from about 4000 cycles to about 7000
cycles.  4000 is for a profiling (GUPROF) kernel with profiling disabled;
after this fix, configuring profiling only costs about 600 cycles in the
4000, which is consistent with almost perfect branch prediction in the
mcounting calls.

16 years agoRemove entry points for -finstrument functions since they are currently
bde [Thu, 29 Nov 2007 01:15:03 +0000 (01:15 +0000)]
Remove entry points for -finstrument functions since they are currently
unused except to obfuscate disassemblies.  -mprofiler-epilogue is
currently with gcc-4 (it does too little), but -finstrument-functions
is broken in a different way (it does too much).

amd64 version: meger whitespace fixes from i386 version.

16 years agoRemove some compatibility stuff that we now get from the Solaris header.
jb [Thu, 29 Nov 2007 00:15:08 +0000 (00:15 +0000)]
Remove some compatibility stuff that we now get from the Solaris header.

16 years agoRemove an OpenSolaris compatibility header that is no longer referenced.
jb [Wed, 28 Nov 2007 23:21:55 +0000 (23:21 +0000)]
Remove an OpenSolaris compatibility header that is no longer referenced.

16 years agoAdd COHERENT to descriptor mem allocation for the
jfv [Wed, 28 Nov 2007 23:04:11 +0000 (23:04 +0000)]
Add COHERENT to descriptor mem allocation for the
benefit of ARM (request from Olivier Houchard), its
a noop on most architectures and goodness on those
that use it.

16 years agoRemove _SOLARIS_C_SOURCE now that it doesn't do anything in FreeBSD
jb [Wed, 28 Nov 2007 22:58:09 +0000 (22:58 +0000)]
Remove _SOLARIS_C_SOURCE now that it doesn't do anything in FreeBSD
headers. All OpenSolaris compatibility comes via the set of specific
compatibility headers in src/compat/opensolaris and
src/sys/compat/opensolaris.

16 years agoFixes for ARM9/ARM10 :
cognet [Wed, 28 Nov 2007 22:55:55 +0000 (22:55 +0000)]
Fixes for ARM9/ARM10 :
Call uma_sel_align() there at well.
Set CPU_CONTROL_VECRELOC if we're using the high vectors page.

Submitted by: Rafal Jaworowski <raj AT semihalf DOT com>
MFC After: 1 week

16 years agoAdd /root/, /.cshrc, and /.profile to the default UpdateIfUnmodified
cperciva [Wed, 28 Nov 2007 22:45:09 +0000 (22:45 +0000)]
Add /root/, /.cshrc, and /.profile to the default UpdateIfUnmodified
directive.  Users get irritated if FreeBSD Update steps on these while
upgrading to a new release.

MFC after: 3 days

16 years agoAccount for pv entry pages in the total number of wired pages. (Note: pv
alc [Wed, 28 Nov 2007 22:41:14 +0000 (22:41 +0000)]
Account for pv entry pages in the total number of wired pages.  (Note: pv
entry pages have always been included in the total number of wired pages
on i386 just not amd64.)

MFC after: 6 weeks

16 years agoUpdate man page to reflect latest work on enc(4):
bz [Wed, 28 Nov 2007 22:35:48 +0000 (22:35 +0000)]
Update man page to reflect latest work on enc(4):

- added sysctls to if_enc(4) to control whether the firewalls or
  bpf will see inner and outer headers or just inner headers
  for incoming and outgoing IPsec packets.

- if_enc work with IPv6 now as well.

Reviewed by: brueffer

16 years agoAdd sysctls to if_enc(4) to control whether the firewalls or
bz [Wed, 28 Nov 2007 22:33:53 +0000 (22:33 +0000)]
Add sysctls to if_enc(4) to control whether the firewalls or
bpf will see inner and outer headers or just inner or outer
headers for incoming and outgoing IPsec packets.

This is useful in bpf to not have over long lines for debugging
or selcting packets based on the inner headers.
It also properly defines the behavior of what the firewalls see.

Last but not least it gives you if_enc(4) for IPv6 as well.

[ As some auxiliary state was not available in the later
  input path we save it in the tdbi. That way tcpdump can give a
  consistent view of either of (authentic,confidential) for both
  before and after states. ]

Discussed with: thompsa (2007-04-25, basic idea of unifying paths)
Reviewed by: thompsa, gnn