glebius [Fri, 13 Jan 2006 19:21:45 +0000 (19:21 +0000)]
- Restore VLAN_INPUT_TAG() macro to preserve API compatibility for
third party drivers.
- Fix bugs destribed in previous revision using macro with
another name.
glebius [Fri, 13 Jan 2006 11:51:11 +0000 (11:51 +0000)]
MFC:
- Use VLAN_TAG_VALUE() not only to read a dot1q tag
value from an m_tag, but also to set it. This reduces
complex code duplication and improves its readability.
- Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag in
case if memory allocation failed.
- Remove fourth argument from VLAN_INPUT_TAG(), that was used
incorrectly in almost all drivers. Indicate failure with
mbuf value of NULL.
ariff [Fri, 13 Jan 2006 05:24:41 +0000 (05:24 +0000)]
MFC: Another major fixes and enhancements:
- MPSAFE
- Fix / reorganize attach routine. Device specific initialization must
be done after generic bus / DMA setup. At last, Virtual Channels
(vchan) works as expected.
ariff [Fri, 13 Jan 2006 04:26:48 +0000 (04:26 +0000)]
MFC: More thorough fixes to enable inverted external amplifier sense flag.
Instead of dragging the entire ICH4/82801DB into this mess, select
only few boards based on pci subdevice / subvendor.
Tested by: Daisuke Orikasa <luxury-acura-3.5rl at nifty.com>
delphij [Wed, 11 Jan 2006 15:40:00 +0000 (15:40 +0000)]
MFC revision 1.131
date: 2005/12/13 15:32:52; author: delphij; state: Exp; lines: +5 -5
In Linux, kernel parameters passed to ioctl are by value, while in FreeBSD
they are passed by reference. Handle the difference within the
linux_ioctl_termio on the LINUX_TCFLSH path.
Submitted by: Jaroslav Drzik <jaro_AT_coop-voz_dot_sk>
Reminded by: glebius
rwatson [Wed, 11 Jan 2006 10:15:57 +0000 (10:15 +0000)]
MFC devfs_rule.c:1.21 from HEAD to RELENG_6:
When returning EIO from DEVFSIO_RADD ioctl, drop the exclusive rule
lock. Otherwise the system comes to a rather sudden and grinding
halt.
As the underlying devfs locking changes that lead to this bug have not
been merged to RELENG_5, this fix to those locking changes does not
need to be merged.
cperciva [Wed, 11 Jan 2006 08:02:16 +0000 (08:02 +0000)]
Correct insecure temporary file usage in texindex. [06:01]
Correct insecure temporary file usage in ee. [06:02]
Correct a race condition when setting file permissions, sanitize file
names by default, and fix a buffer overflow when handling files
larger than 4GB in cpio. [06:03]
Fix an error in the handling of IP fragments in ipfw which can cause
a kernel panic. [06:04]
date: 2006/01/07 22:10:57; author: krion; state: Exp; lines: +10 -3
When using @cwd %%FOO%%, we must ensure to return in the original
prefix later, but doing so with @cwd %%OLDPREFIX%% (having
PLIST_SUB+="OLDPREFIX=${PREFIX}") hardcodes the value in the packing
list. That's not really a problem when dealing with ports but that's
a problem with packages since pkg_add -p option only overrides the
first @cwd occurrence.
This patch allow us to use @cwd without any argument. If no
directory argument is given, it will set current working directory
to the first prefix given by the @cwd command.
jhb [Tue, 10 Jan 2006 21:37:18 +0000 (21:37 +0000)]
MFC: Fix issues with various Compaq boxes such as some DL360s (and possibly
some DL380s):
- Release the pci_link acpi serial lock if a link device has no actual
links.
- Don't panic if a _PRT entry references an invalid link on a link device
unless we actually try to route an interrupt using that _PRT entry.
glebius [Tue, 10 Jan 2006 10:17:56 +0000 (10:17 +0000)]
MFC 1.55:
When in rev. 1.47 cardbus_alloc_resources() function was moved from
cardbus_cis.c to this file, some code was not merged and thus resource
list entries were invalid. They didn't have a resources attached to
them.
However, the problem was masked for some time later, because newer
resources list entries were added to the head of the list, and
resource_list_find() always returned the first matching resource list
entry. Usually the underlying driver allocated a valid resource and
added it to the head of the list, and invalid one wasn't used.
In rev. 1.174 of subr_bus.c the sorting of resource list entries was
reversed demasking the problem in cardbus_alloc_resources().
This commit fixes the problem returning back some code from
cardbus_cis.c, pre-1.49 revisions.
sobomax [Tue, 10 Jan 2006 00:52:07 +0000 (00:52 +0000)]
MFC: allow execution of ET_DYN elf binaries (aka shared libraries) when
emulating architectures that allow this (Linux so far).
To preserve kernel modules ABI, unlike the version commited into the trunk,
which adds new flag field into Brandinfo structure for this purpose, this
one checks if brand field of Brandinfo matches ELFOSABI_LINUX.
PR: kern/87615
Submitted by: Marcin Koziej <creep@desk.pl>
rse [Sun, 8 Jan 2006 09:21:53 +0000 (09:21 +0000)]
MFC r1.13:
1. Add missing semicolon between "warn" and "return" to make sure
the line continuation backslash doesn't cause "warn" to print "return".
2. Group "warn" and "return" together as the "return 1" should be
performed only if the "kldload nfsclient" also failed (and not
already if the "vfs.nfs" sysctl(8) check failed).
rse [Sun, 8 Jan 2006 09:17:03 +0000 (09:17 +0000)]
MFC r1.276:
Fix semantics in the documentation of the "jail_socket_unixiproute_only"
variable ("YES" vs. "NO") and be more precise and intuitive on what is
actually allowed/restricted by this variable ("UNIX/IP/route sockets"
vs. "TCP/IP protocols").
ceri [Sat, 7 Jan 2006 13:57:58 +0000 (13:57 +0000)]
MFC revision 1.82:
inetd(8) requires that /etc/netconfig be present, and contain entries
for each of udp and tcp (and their IPv6 equivalents when INET6 is
enabled). Note that dependency here.
PR: docs/90435
Submitted by: Dmitry Kazarov <kazarov at mcm dot ru>
Pointed out by: Daniel Gerzo <danger at rulez dot sk>
ceri [Fri, 6 Jan 2006 20:10:41 +0000 (20:10 +0000)]
MFC revision 1.364:
An i386 machine with 32MB of RAM requires a 700MB disk for auto-layout to
succeed, whilst an i386 with 256MB of RAM requires more. Up the amount
of disk hinted at as a minimum requisite for auto-layout.
truckman [Thu, 5 Jan 2006 20:23:10 +0000 (20:23 +0000)]
Diff reduction to HEAD:
Call fill_kinfo_proc_only() instead of fill_kinfo_proc()
before calling fill_kinfo_thread(), because fill_kinfo_proc()
calls both fill_kinfo_proc_only() and fill_kinfo_thread().
This is a minor optimization and there should be no change
in functionality.
kbyanc [Thu, 5 Jan 2006 03:47:24 +0000 (03:47 +0000)]
MFC:
kbyanc 2005-12-28 20:36:55 UTC
FreeBSD src repository
Modified files:
usr.bin/netstat Makefile ipsec.c main.c netstat.h
Added files:
usr.bin/netstat pfkey.c
Log:
Add support for printing IPSEC protocol stats if the kernel was
compiled with FAST_IPSEC rather than the KAME IPSEC stack.
Note that the output of "netstat -s -p ipsec" differs depending on
which stack is compiled into the kernel since they each keep different
stats. This delta also adds the "esp", "ah", and "ipcomp" protocol
stats, which are also available when the kernel is compiled with the
FAST_IPSEC stack (e.g. "netstat -s -p esp").
Submitted by: Matt Titus <titus at nttmcl dot com>
jkoshy [Thu, 5 Jan 2006 03:05:38 +0000 (03:05 +0000)]
MFC r1.1340: "Refer readers to the hwpmc(4) manual page where the additional
architecture specific kernel configuration options needed for
hwpmc are documented."
truckman [Wed, 4 Jan 2006 19:35:24 +0000 (19:35 +0000)]
MFC cd9660_lookup.c 1.42
Original commit message:
Log:
Apply the same fix to a potential race in the ISDOTDOT code in
cd9660_lookup() that was used to fix an actual race in ufs_lookup.c:1.78.
This is not currently a hazard, but the bug would be activated by
marking cd9660 as MPSAFE.
truckman [Wed, 4 Jan 2006 19:32:00 +0000 (19:32 +0000)]
MFC ext2_lookup.c 1.51
Original commit message:
Log:
Apply the same fix to a potential race in the ISDOTDOT code in
ext2_lookup() that was used to fix an actual race in ufs_lookup.c:1.78.
This is not currently a hazard, but the bug would be activated by
marking ext2fs as MPSAFE.
truckman [Wed, 4 Jan 2006 19:27:22 +0000 (19:27 +0000)]
MFC subr_witness.c 1.198 and 1.200.
Original commit messages:
Log:
Track all lock relationships instead of pruning direct relationships
if an indirect relationship exists (keep both A->B->C and A->C).
This allows witness_checkorder() to use isitmychild() instead of
the much more expensive isitmydescendant() to check for valid lock
ordering.
Don't do an expensive tree walk to update the w_level values when
the tree is updated. Only update the w_level values when using the
debugger to display the tree.
Nuke the experimental "witness_watch > 1" mode that only compared
w_level for the two locks. This information is no longer maintained
at run time, and the use of isitmychild() in witness_checkorder
should bring performance close enough to the acceptable level that
this hack is not needed.
Report witness data structure allocation statistics under the
debug.witness sysctl.
Reviewed by: jhb
MFC after: 30 days
Log:
Relocate witness_levelall(), witness_leveldescendents(), and
witness_displaydescendants() so that they are protected by
"#ifdef DDB/#endif" to unbreak kernels not using "option DDB".
ariff [Wed, 4 Jan 2006 00:32:14 +0000 (00:32 +0000)]
MFC:
- Fix possible memory leak due to repetetive strdup(3) without matching
free(3).
- print_recsrc() should honor shortflag and give appropriate output for
later consumption by /etc/rc.d/mixer. This will ensure that recording
device selections survived across reboot. Output everything to stdout
instead of stderr.
emaste [Tue, 3 Jan 2006 16:43:33 +0000 (16:43 +0000)]
MFC kern_clock.c:1.181
In watchdog_config enable the software watchdog iff the WD_ACTIVE flag
is set. When watchdogd(1) is terminated intentionally it clears the
bit, which should then disable it in the kernel.
PR: kern/74386
Submitted by: Alex Hoff <ahoff at sandvine dot com>
Approved by: rwatson (mentor)
netchild [Fri, 30 Dec 2005 19:55:55 +0000 (19:55 +0000)]
MFC nearly everything of the soundsystem except recent commits and
most of the sysctl's (those which would introduce a new interface).
The spdif_enabled sysctl is still there (or more correctly: added
to another driver).
A rough overview what's there now:
- new driver for ATI chips (snd_atiixp)
- support for some Intel HDA chips in AC97 mode (no real HDA
support!), this doesn't work with every mainboard and is
subject to the wiring on the mainboard (no servicable parts
inside)
- MPSAFE and fixes for snd_als4000(4), snd_es137x(4),
snd_via82c686(4), snd_via8233(4) and snd_ich(4)
- 24bit and 32bit sound format support
- feeder infrastructure (format, rate) has been reworked, new
feeder (volume) has been introduced
- lots of LOR and panic issues fixed
- and a lot of small or not so small fixes I may have forgotten...
As noted in UPDATING: you may want to recompile mplayer (after booting
into the new world) to get all new features.
Tested by: a lot of people
Requested by: ariff
Submitted by: ariff
mlaier [Fri, 30 Dec 2005 00:50:18 +0000 (00:50 +0000)]
MFC: pf.c 1.39+1.40 and pfvar.h 1.13+1.14
Move PFSTATE_EXPIRING from sync_flags to a new local_flags. sync_flags
has special handling when zero. This caused no PFSYNC_ACT_DEL message and
thus disfunction of pfflowd and state synchronisation in general.
Discovered by: thompsa
Good catch by: thompsa
and
Only decrement the max-src-conn counter for tcp connections that reached
"established" state.
Similar to OpenBSD's rev. 1.499 by joel but not breaking ABI.
Obtained from: OpenBSD (with changes)
Reported by: Bruno Afonso