marius [Sun, 31 Jan 2010 17:43:22 +0000 (17:43 +0000)]
MFC: r202903
On LP64 struct ifid is 64-bit aligned while struct fid is 32-bit aligned
so on architectures with strict alignment requirements we can't just simply
cast the latter to the former but need to copy it bytewise instead.
marius [Sun, 31 Jan 2010 17:17:24 +0000 (17:17 +0000)]
MFC: r203094
- Zero the MSI/MSI-X queue argument, otherwise mtx_init(9) can panic
indicating an already initialized lock.
- Check for an empty MSI/MSI-X queue entry before asserting that we have
received a MSI/MSI-X message in order to not panic in case of stray MSI/
MSI-X queue interrupts which may happen in case of using an interrupt
handler rather than a filter.
jh [Sun, 31 Jan 2010 15:07:38 +0000 (15:07 +0000)]
MFC r202944:
Print full path in the error message. It's possible that fts(3)
provides an empty fts_name and reporting the full path is more
appropriate especially with the -R option.
syrinx [Sun, 31 Jan 2010 11:30:28 +0000 (11:30 +0000)]
MFC r202935:
While flushing the multicast filter of an interface, do not zero the relevant
ifmultiaddr structures' reference to the parent interface, unless the parent
interface is really detaching. While here, program only link layer multicast
filters to a wlan's hardware parent interface.
trasz [Sat, 30 Jan 2010 14:49:17 +0000 (14:49 +0000)]
MFC r196754:
Add NFSv4 ACL support to cp(1) and fix a few memory leaks.
Note that this changes error reporting behaviour somewhat - before,
no error was reported if ACL couldn't be copied because the target
filesystem doesn't support ACLs. Now, it will be reported - of course,
only if there actually is an ACL to copy.
trasz [Sat, 30 Jan 2010 14:44:32 +0000 (14:44 +0000)]
MFC r196712:
Add NFSv4 ACL support to ls(1).
MFC r196773:
Fix regression introduced in r196712 - the 'name' string needs
to be rewritten for each file we want to check ACL on. Without
this change, ls(1) would check only the ACL on the first file
to list.
antoine [Sat, 30 Jan 2010 12:11:21 +0000 (12:11 +0000)]
MFC r201145 to stable/8:
(S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages.
Note: this does not affect generated binaries as this argument is not used.
kib [Fri, 29 Jan 2010 20:02:28 +0000 (20:02 +0000)]
MFC r202692:
Remove the signal from sigqueue before notifying the debugger for traced
process, fixing the race between resuming from stopped state and other
thread noting the old signal on the queue and acting.
jilles [Thu, 28 Jan 2010 22:15:29 +0000 (22:15 +0000)]
MFC r202324: In 'make delete-old', use 'exec' to redirect an fd persistently
That is, write 'exec 3<&0' instead of '3<&0'. Due to an sh(1) bug fixed in
head in r199953, the latter also persisted, provided that fd 3 was not open
before. With newer sh or fd 3 open, it would not delete orphaned catpages.
delphij [Thu, 28 Jan 2010 02:33:20 +0000 (02:33 +0000)]
MFC r200135:
Make umount(8) WARNS=6 clean:
- Cast delimiter width to integer [1]
- Solve name conflicts against system header
- Constify parameters to avoid qualifier conflict
joerg [Wed, 27 Jan 2010 10:32:02 +0000 (10:32 +0000)]
Merge of r202870,202898:
Overhaul of the pcii driver:
. Properly allocate all IO space resources. These cards scatter their
IO addresses over a range of 0x1600 bytes, and they require an
additional address for "special interrupt handling".
. Implement the "special interrupt handling" per the GPIB-PCIIA
Technical Reference Manual; this was apparently not declared for the
clone card this driver has been originally implemented for, but it
turned out to be needed for both, an original NI brand PCII/PCIIA
card as well as the Axiom AX5488 clone.
. Add some diagnostic messages for various resource allocation etc.
failures during probe.
. Add some comments about the structure of the IO address space that
is used by these cards.
edwin [Tue, 26 Jan 2010 11:15:03 +0000 (11:15 +0000)]
MFC of tzdata2010b, r203019
Mexico's House of Representatives has approved a proposal for
northern Mexico's border cities to share the same daylight saving
schedule as the United States.
zec [Mon, 25 Jan 2010 14:17:13 +0000 (14:17 +0000)]
MFC r201895:
Reduce recursions on curvnet and thus spamming the console with warning
messages for kernels built with options VIMAGE and VNET_DEBUG enabled.
attilio [Mon, 25 Jan 2010 12:05:51 +0000 (12:05 +0000)]
MFC r201879:
Introduce the new kernel thread called "deadlock resolver".
It is used in order to seek within the threads state and heuristically
understand if there is any deadlock happening.
In order to implement it, the sq_type in sleepqueues is mandatory and not
only compiled along with INVARIANTS option. Additively, a new sleepqueue
function, sleepq_type() is added, returning the type of the sleepqueue
linked to a wchan.
Three new sysctls are added in order to configure the thread:
debug.deadlkres.slptime_threshold
debug.deadlkres.blktime_threshold
debug.deadlkres.sleepfreq
rappresenting the thresholds for sleep and block time that will lead to
a deadlock matching (when exceeded), while the sleepfreq rappresents the
number of seconds between 2 consecutive thread runnings.
In order to enable the deadlock resolver thread recompile your kernel
with the option DEADLKRES.
attilio [Mon, 25 Jan 2010 11:56:53 +0000 (11:56 +0000)]
MFC r201790:
- Set td_slptick to 0 when moving threads out of sleepqueues.
- Move td_slptick from u_int to int in order to follow 'ticks' signedness
and wrap up accordingly.
das [Sun, 24 Jan 2010 20:15:59 +0000 (20:15 +0000)]
MFC r197752:
Better glibc compatibility for getline/getdelim:
- Tolerate applications that pass a NULL pointer for the buffer and
claim that the capacity of the buffer is nonzero.
- If an application passes in a non-NULL buffer pointer and claims the
buffer has zero capacity, we should free (well, realloc) it
anyway. It could have been obtained from malloc(0), so failing to
free it would be a small memory leak.
ed [Sun, 24 Jan 2010 14:30:57 +0000 (14:30 +0000)]
MFC r202500:
Fix a regression that was introduced in r191882.
I changed login_tty() to only work when the application is not a session
leader yet. This works fine for applications in the base system, but it
turns out various applications call this function after daemonizing,
which means they already use their own session.
If setsid() fails, just call tcsetsid() on the current session.
tcsetsid() will already perform proper security checks.
bz [Sat, 23 Jan 2010 16:40:35 +0000 (16:40 +0000)]
MFC r202468:
Add ip4.saddrsel/ip4.nosaddrsel (and equivalent for ip6) to control
whether to use source address selection (default) or the primary
jail address for unbound outgoing connections.
This is intended to be used by people upgrading from single-IP
jails to multi-IP jails but not having to change firewall rules,
application ACLs, ... but to force their connections (unless
otherwise changed) to the primry jail IP they had been used for
years, as well as for people prefering to implement similar policies.
Note that for IPv6, if configured incorrectly, this might lead to
scope violations, which single-IPv6 jails could as well, as by the
design of jails. [1]
rnoland [Sat, 23 Jan 2010 16:29:04 +0000 (16:29 +0000)]
MFC r200764
Fix a handful of issues with via agp support.
* Read the pci capability register to identify AGP 3 support
* Add missing smaller aperture sizes for AGP3 chips.
* Fix the aperture size calculation on AGP2 chips.
All sizes between 32M and 256M reported as 256M.
* Add \n to error string.
delphij [Sat, 23 Jan 2010 00:32:19 +0000 (00:32 +0000)]
MFC r200930:
Adapt OpenBSD pf's "sloopy" TCP state machine which is useful for Direct
Server Return mode, where not all packets would be visible to the load
balancer or gateway.
This commit should be reverted when we merge future pf versions. The
benefit it would provide is that this version does not break any existing
public interface and thus won't be a problem if we want to MFC it to
earlier FreeBSD releases.
Discussed with: mlaier
Obtained from: OpenBSD
Sponsored by: iXsystems, Inc.
Stereo stream is no more duplicated to all ports. If you loose sound, check
you are using right connectors. Front speakers connector is usually green,
center/LFE - orange, rear - black, side - gray.
mav [Fri, 22 Jan 2010 11:30:32 +0000 (11:30 +0000)]
MFC r202166:
Make default recording source choosing more intelligent.
Change default recording level from 0 to 75.
It should increase chances for things to work just out of the box.
jhb [Thu, 21 Jan 2010 19:11:18 +0000 (19:11 +0000)]
MFC 198411:
- Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and
td_name[] arrays are actually MAXCOMLEN + 1 in size and a few places that
created shadow copies of these arrays were just using MAXCOMLEN.
- Prefer using sizeof() of an array type to explicit constants for the
array length in a few places.
- Ensure that all of p_comm[] and td_name[] is always zero'd during
execve() to guard against any possible information leaks. Previously
trailing garbage in p_comm[] could be leaked to userland in ktrace
record headers via td_name[].
jhb [Thu, 21 Jan 2010 17:54:29 +0000 (17:54 +0000)]
MFC 198134,198149,198170,198171,198391,200948:
Add a facility for associating optional descriptions with active interrupt
handlers. This is primarily intended as a way to allow devices that use
multiple interrupts (e.g. MSI) to meaningfully distinguish the various
interrupt handlers.
- Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate
a description with an active interrupt handler setup by BUS_SETUP_INTR.
It has a default method (bus_generic_describe_intr()) which simply passes
the request up to the parent device.
- Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports
printf(9) style formatting using var args.
- Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of
an interrupt handler and copy the name passed to intr_event_add_handler()
into that buffer instead of just saving the pointer to the name.
- Add a new intr_event_describe_handler() which appends a description string
to an interrupt handler's name.
- Implement support for interrupt descriptions on amd64, i386, and sparc64 by
having the nexus(4) driver supply a custom bus_describe_intr method that
invokes a new intr_describe() MD routine which in turn looks up the
associated interrupt event and invokes intr_event_describe_handler().
- Make whois capable of searching for IPv6 addresses just like it can
do for IPv4 addresses without having to explicetly specify that the
ARIN server should be used to get the initial information.
PR: bin/142507, bin/128725
Submitted by: Dan Mahoney <danm@prime.gushi.org>, "Matt D. Harris" <mdh_lists@yahoo.com>