Sync to HEAD.
- Simplify the error handling
- Nuke licence clause 3 & 4
- Drop frames to any of the reserved multicast addresses
- Remove duplicated code for testing local packets.
MFC: Do nextboot -D twice during boot. The first time in rc.d/root which ensures
that we can remove the file as early as possible, but shut up nextboot at this
moment if the operation is failed, because /boot is not necessarily a part of /;
the newly added second run is placed in rc.d/mountlate after all filesystems were
mounted.
peter [Wed, 9 Apr 2008 19:05:59 +0000 (19:05 +0000)]
MFC: collect per-cpu stats for %user, %system, %idle etc. Counters are
stored in pcpu area and merged at collection time rather than a common
set being manipulated with atomic ops.
MFC if_lagg.c r1.26-27, ieee8023ad_lacp.c r1.13-15, ieee8023ad_lacp.h r1.9-11
- Pass any unmatched slowprotocols frames up the stack
- Switch the LACP state machine over to its own mutex
MFC r1.97:
Sync with rev 1.63 of NetBSD's ums.c:
If a mouse has both a wheel and a Z direction we report both.
XXX Due to tradition the wheel is reported as the Z direction (and the Z
direction as W).
Now Apple's Mighty Mouse is fully supported, except the X11 mouse driver
doesn't know what to do with the new coordinate.
MFC 1.206: If the disk reports that it support the Compact Flash
Association command set, announce BIO_DELETE capability and issue
ATA_CFA_ERASE when we get one.
MFC aac.c 1.137:
Calling RequestSupplementAdapterInfo before RequestAdapterInfo appears
to trip a bug causing the latter to return a zeroed struct
aac_adapter_info. This causes two issues. One is cosmetic only --
a verbose boot prints information about the controller, and shows all
zero:
The second problem is that the firmware version information is stored
away for aac_rev_check, for userland tools (like aaccli) to query via
the FSACTL_MINIPORT_REV_CHECK and FSACTL_LNX_MINIPORT_REV_CHECK ioctls.
When aaccli encounters this issue it prints
Command Error: <The current AFAAPI.DLL is too old to work with the
current controller software.>
Move the RequestSupplementAdapterInfo call after RequestAdapterInfo,
which seems to fix both problems.
imp@ has already done this in HEAD, refer to revision 1.476 of
i386/conf/GENERIC and revision 1.486 of amd64/conf/GENERIC. It seems only fair
to do the same in RELENG_7.
Discussed with: imp
Approved by: re (bmah, kensmith)
Rather than copying out the full audit trigger record, which includes
a queue entry field, just copy out the unsigned int that is the trigger
message. In practice, auditd always requested sizeof(unsigned int), so
the extra bytes were ignored, but copying them out was not the intent.
Replace somewhat awkward audit trail rotation scheme, which involved the
global audit mutex and condition variables, with an sx lock which protects
the trail vnode and credential while in use, and is acquired by the system
call code when rotating the trail. Previously, a "message" would be sent
to the kernel audit worker, which did the rotation, but the new code is
simpler and (hopefully) less error-prone.
MFC
rev. 1.277 of sys/kern/vfs_mount.c
rev. 1.332 of sys/sys/vnode.h
rev. 1.222 of sys/ufs/ffs/ffs_softdep.c
Yield the cpu in the kernel while iterating the list of the
vnodes belonging to the mountpoint. Also, yield when in the
softdep_process_worklist() even when we are not going to sleep due to
buffer drain.
MFC revisions 1.13, 1.14: Don't try to compute the SHA256 hashes of
files which don't exist; and fix the handling of symlinks to
dynamically linked libraries.
Merge rev 1.20:
Fix a buffer overflow in the processing of various SCSI commands. This
likely fixes a great number of weird problems that have been reported
with this driver.
Use the new command file feature of ddb(8) to support setting ddb(4)
scripts at boot. This is currently disabled by default. /etc/ddb.conf
contains some potentially reasonable default scripts.
MFC: Initialize list of kld's correctly when there are no kld's and catch
errors in kgdb_parse() so it returns 0 for invalid expressions. This
fixes the kld loading for 6.x and 7.x.
MFC rev. 1.6-1.7
- Switch from timeval to bintime, to use 1/(2^20) of seconds instead of
microseconds. It allows to use bit shifts instead of some heavy 64bit
mul/div math operations.
- Account all node stats at the shape mode.
- Do not check destination hook presence, it will be done by netgraph.
- Use u_int instead of int in some places to simplify type conversions.
- Use NG_SEND_DATA_ONLY() macro instead of selfmade equivalent.
Add a /S mode to DDB "ex" command, which interprets and prints the
value at the requested address as a symbol. For example, "ex /S
aio_swake" prints the name of the function currently registered in
via aio_swake hook.
The change as committed differs slightly from the patch in the PR,
as I force the size of the retrieved value (and the automatic
address increment) to be sizeof(void *). This seems to provide
the most useful auto-increment behavior, and defaults using the
default size (4), which is not sizeof(void *) on 64-bit platforms.
PR: 57976
Submitted by: Dan Strick <strick at covad.net>
Use dump_write() instead of direct calls to di->dumper() in textdumps.
Textdumps already do pretty much the same sanity checking, but
abstractions and seatbelts are both useful.
Merge options:1.616, db_capture.c:1.4 from HEAD to RELNEG_7:
Allow DDB_CAPTURE_DEFAULTBUFSIZE and DDB_CAPTURE_MAXBUFSIZE to be
overridden at compile-time using kernel options of the same names.
Rather than doing a compile-time CTASSERT of buffer sizes being
even multiples of block sizes, just adjust them at boottime, as
the failure mode is more user-friendly.
rwatson [Mon, 31 Mar 2008 22:03:54 +0000 (22:03 +0000)]
Merge savecore.8:1.26, savecore.c:1.79 from HEAD to RELENG_7:
Teach savecore(8) how to extract textdump(4) dumps.
Update savecore(8) man page to reflect textdump additions.
Merge savecore.c:1.80 from HEAD to RELENG_7:
Compare kernel dump header magic with textdump magic using strncmp()
rather than the memcmp() which is used for regular dumps: the
textdump string is one character shorter, so we need to stop
comparing at the end of the string.
Use independent version checking logic for architecture-specific
version number vs. textdump version number, as the version sequences
may (someday) differ.
rwatson [Mon, 31 Mar 2008 22:00:27 +0000 (22:00 +0000)]
Merge Makefile:1.401, ddb.4:1.46, textdump.4:1.1 from HEAD to RELENG_7:
Add textdump(4) man page to describe the textdump facility and provide
some stock formulas for use.
Update ddb(4) to reference the textdump(4) page, list the textdump
commands, and suggest using them with scripts and output capture.
Update HISTORY section.
rwatson [Mon, 31 Mar 2008 21:57:24 +0000 (21:57 +0000)]
Merge files:1.1260, db_capture.c:1.2, db_command.c:1.76,
db_textdump.c:1.1, ddb.h:1.46, kern_shutdown.c:1.187 from HEAD to
RELENG_7:
Add textdump(4) facility, which provides an alternative form of kernel
dump using mechanically generated/extracted debugging output rather than
a simple memory dump. Current sources of debugging output are:
- DDB output capture buffer, if there is captured output to save
- Kernel message buffer
- Kernel configuration, if included in kernel
- Kernel version string
- Panic message
Textdumps are stored in swap/dump partitions as with regular dumps, but
are laid out as ustar files in order to allow multiple parts to be stored
as a stream of sequentially written blocks. Blocks are written out in
reverse order, as the size of a textdump isn't known a priori. As with
regular dumps, they will be extracted using savecore(8).
One new DDB(4) command is added, "textdump", which accepts "set",
"unset", and "status" arguments. By default, normal kernel dumps are
generated unless "textdump set" is run in order to schedule a textdump.
It can be canceled using "textdump unset" to restore generation of a
normal kernel dump.
Several sysctls exist to configure aspects of textdumps;
debug.ddb.textdump.pending can be set to check whether a textdump is
pending, or set/unset in order to control whether the next kernel dump
will be a textdump from userspace.
While textdumps don't have to be generated as a result of a DDB script
run automatically as part of a kernel panic, this is a particular useful
way to use them, as instead of generating a complete memory dump, a
simple transcript of an automated DDB session can be captured using the
DDB output capture and textdump facilities. This can be used to
generate quite brief kernel bug reports rich in debugging information
but not dependent on kernel symbol tables or precisely synchronized
source code. Most textdumps I generate are less than 100k including
the full message buffer. Using textdumps with an interactive debugging
session is also useful, with capture being enabled/disabled in order to
record some but not all of the DDB session.
aac.c 1.136, aac_ioctl.h 1.13:
Implement FSACTL_LNX_GET_FEATURES and FSACTL_GET_FEATURES ioctls. RAID
tools (e.g. arcconf) need this to be able to create arrays larger than 2TB.
Submitted by: Adaptec, via driver build 15317
The RELENG_7 and HEAD drivers are in sync as of this commit.
emaste [Mon, 31 Mar 2008 14:32:06 +0000 (14:32 +0000)]
MFC - diff reduction w/ HEAD
aac.c 1.131:
Diff reduction to Adaptec driver build 15317 (refactoring and code shuffling):
- Resource allocation in aac_alloc (moved from from aac_init)
- Interrupt setup in aac_setup_intr (from aac_attach)
- Container probing in aac_get_container_info (from aac_startup and
aac_handle_aif)
- Firmware status check moved to aac_check_firmware from aac_init
aac.c 1.132, aac_cam.c 1.31, aad_debug.c 1.24, aac_disk.c 1.44,
aac_pci.c 1.67, aacvar.h 1.50:
Diff reduction to Adaptec's driver (around build 15317): catch up with a
change in debugging routines.
The fwprintf macro in the AAC_DEBUG case (mapping to printf) isn't from the
Adaptec driver.
aac.c 1.135:
Add \n to the end of a printf string and remove it from panic strings.
rwatson [Sun, 30 Mar 2008 17:20:40 +0000 (17:20 +0000)]
Merge kerneldump.h:1.10 from HEAD to RELENG_7:
Define a new kernel dump "architecture", TEXTDUMPMAGIC, which is used
to identify textdumps in the swap/dump partition. While textdumps
aren't really an architecture, they are architecture-neutral and so
don't really correspond to any existing architecture.
Define a version number for textdumps, KERNELDUMP_TEXT_VERSION, of 1.
rwatson [Sun, 30 Mar 2008 17:07:10 +0000 (17:07 +0000)]
Merge Makefile:1.169, ddb/Makefile:1.1, ddb.8:1.1, ddb.c:1.1,
ddb.h:1.1, ddb_script.c:1.1 from HEAD to RELENG_7:
Add command-line tool ddb(8), which allows DDB(4) scripts to be
managed from userspace. It is largely a wrapper for sysctl()
calls, but because the sysctls for adding and removing scripts
are awkward to use directly, this provides an easier-to-use
interface.
rwatson [Sun, 30 Mar 2008 17:03:58 +0000 (17:03 +0000)]
Merge files:1.1259, db_command.c:1.75, db_command.h:1.14, db_lex.c:1.23,
db_lex.h:1.15, db_main.c:1.7, db_script.c:1.1-1.2, ddb.h:1.45 from HEAD
to RELENG_7:
Add a simple scripting facility to DDB(4), allowing the user to
define a set of named scripts. Each script consists of a list of DDB
commands separated by ";"s that will be executed verbatim. No higher
level language constructs, such as branching, are provided for:
scripts are executed by sequentially injecting commands into the DDB
input buffer.
Four new commands are present in DDB: "run" to run a specific script,
"script" to define or print a script, "scripts" to list currently
defined scripts, and "unscript" to delete a script, modeled on shell
alias commands. Scripts may also be manipulated using sysctls in the
debug.ddb.scripting MIB space, although users will prefer to use the
soon-to-be-added ddb(8) tool for usability reasons.
Scripts with certain names are automatically executed on various DDB
events, such as entering the debugger via a panic, a witness error,
watchdog, breakpoint, sysctl, serial break, etc, allowing customized
handling.
Add a new 'why' argument to kdb_enter(), and a set of constants to use
for that argument. This will allow DDB to detect the broad category of
reason why the debugger has been entered, which it can use for the
purposes of deciding which DDB script to run.
Assign approximate why values to all current consumers of the
kdb_enter() interface.
For ABI/KPI reasons, the MFC creates a new function, kdb_enter_why(),
with the new argument, updating existing consumers to use that,
preserving kdb_enter() with the current argument, and wrapping it around
kdb_enter_why().
mav [Sun, 30 Mar 2008 08:01:48 +0000 (08:01 +0000)]
MFC ng_pptpgre.c rev. 1.41-1.42
Rewrite node to support multiple hooks, alike to ng_l2tp, to use one pair
of pptpgre and ksocket nodes for all calls between two peers. This patch
modifies node's API by adding new "session_%04x" hook names support, while
keeping backward compatibility.