Commit Graph

182750 Commits

Author SHA1 Message Date
Alexander Motin
8531bb3f0c Introduce 3 seconds timeout on graid stop command (mostly with -f flag).
Since completion waiting goes in g_event thread, it may cause GEOM deadlock
if consumer on top (for example, ZFS) uses g_event thread for closing.
2013-07-27 15:02:19 +00:00
Adrian Chadd
af4791e31f Implement some function tracing.
Submitted by:	Cedric GROSS <cg@cgross.info>
2013-07-27 14:58:23 +00:00
Navdeep Parhar
2393220538 Display a string instead of a numeric code in the linkdnrc sysctl.
Submitted by:	gnn@
2013-07-27 07:43:43 +00:00
Navdeep Parhar
716c9e1b58 Expand the list of devices claimed by cxgbe(4). 2013-07-27 00:53:07 +00:00
Jeff Roberson
bb7858ea20 Improve page LRU quality and simplify the logic.
- Don't short-circuit aging tests for unmapped objects.  This biases
   against unmapped file pages and transient mappings.
 - Always honor PGA_REFERENCED.  We can now use this after soft busying
   to lazily restart the LRU.
 - Don't transition directly from active to cached bypassing the inactive
   queue.  This frees recently used data much too early.
 - Rename actcount to act_delta to be more consistent with use and meaning.

Reviewed by:	kib, alc
Sponsored by:	EMC / Isilon Storage Division
2013-07-26 23:22:05 +00:00
Xin LI
4202b2ded4 Fix Denial of Service vulnerability in named(8). [13:07]
Security:	CVE-2013-4854
Security:	FreeBSD-SA-13:07.bind
Approved by:	so
2013-07-26 22:40:17 +00:00
Navdeep Parhar
caf20efcde Add support for packet-sniffing tracers to cxgbe(4). This works with
all T4 and T5 based cards and is useful for analyzing TSO, LRO, TOE, and
for general purpose monitoring without tapping any cxgbe or cxl ifnet
directly.

Tracers on the T4/T5 chips provide access to Ethernet frames exactly as
they were received from or transmitted on the wire.  On transmit, a
tracer will capture a frame after TSO segmentation, hw VLAN tag
insertion, hw L3 & L4 checksum insertion, etc.  It will also capture
frames generated by the TCP offload engine (TOE traffic is normally
invisible to the kernel).  On receive, a tracer will capture a frame
before hw VLAN extraction, runt filtering, other badness filtering,
before the steering/drop/L2-rewrite filters or the TOE have had a go at
it, and of course before sw LRO in the driver.

There are 4 tracers on a chip.  A tracer can trace only in one direction
(tx or rx).  For now cxgbetool will set up tracers to capture the first
128B of every transmitted or received frame on a given port.  This is a
small subset of what the hardware can do.  A pseudo ifnet with the same
name as the nexus driver (t4nex0 or t5nex0) will be created for tracing.
The data delivered to this ifnet is an additional copy made inside the
chip.  Normal delivery to cxgbe<n> or cxl<n> will be made as usual.

/* watch cxl0, which is the first port hanging off t5nex0. */
# cxgbetool t5nex0 tracer 0 tx0  (watch what cxl0 is transmitting)
# cxgbetool t5nex0 tracer 1 rx0  (watch what cxl0 is receiving)
# cxgbetool t5nex0 tracer list
# tcpdump -i t5nex0   <== all that cxl0 sees and puts on the wire

If you were doing TSO, a tcpdump on cxl0 may have shown you ~64K
"frames" with no L3/L4 checksum but this will show you the frames that
were actually transmitted.

/* all done */
# cxgbetool t5nex0 tracer 0 disable
# cxgbetool t5nex0 tracer 1 disable
# cxgbetool t5nex0 tracer list
# ifconfig t5nex0 destroy
2013-07-26 22:04:11 +00:00
Jung-uk Kim
bf6fac21dc Merge ACPICA 20130725. 2013-07-26 21:34:09 +00:00
Pedro F. Giffuni
21244d5227 Make the BSD-licensed patch the default.
The BSD-licensed patch(1) command has matured and it's behaviour
can be considered equivalent to the older version of GNU patch
in the tree.

The switch has been extensively tested [1] and only two ports
presented regressions, which have since been fixed.

For convenience a new WITH_GNU_PATCH option is available,
but it will likely be removed in the near future.

PR:		176313
Approved by:	portmgr
2013-07-26 21:25:18 +00:00
Navdeep Parhar
4ff45b8b45 Reserve room for ioctls that aren't in this copy of the driver yet. 2013-07-26 20:54:33 +00:00
Adrian Chadd
49de4f2214 Break out the static, global LACP debug options into a per-lagg unit
sysctl tree.

* Create a net.link.lagg.X.lacp node
* Add a debug node under that for tx_test and rx_test
* Add lacp_strict_mode, defaulting to 1

tx_test and rx_test are still a bitmap of unit numbers for now.
At some point it would be nice to create child nodes of the lagg bundle
for each sub-interface, and then populate those with various knobs
and statistics.

Sponsored by:	Netflix
2013-07-26 19:41:13 +00:00
Jeff Roberson
2f84c08eee - Use kmem_malloc rather than kmem_alloc() for GDT/LDT/tss allocations etc.
This eliminates some unusual uses of that API in favor of more typical
   uses of kmem_malloc().

Discussed with:	kib/alc
Tested by:	pho
Sponsored by:	EMC / Isilon Storage Division
2013-07-26 19:06:14 +00:00
Jung-uk Kim
dbded195f9 Import ACPICA 20130725. 2013-07-26 18:20:00 +00:00
Dag-Erling Smørgrav
dcd47379ff Implement certificate verification, and many other SSL-related
imrovements; complete details in the PR.

PR:		kern/175514
Submitted by:	Michael Gmelin <freebsd@grem.de>
MFC after:	1 week
2013-07-26 15:53:43 +00:00
Andriy Gapon
663dea3d1b fix UPDATING entry in r253677
MFC after:	3 weeks
X-MFC with:	r253677
2013-07-26 14:43:38 +00:00
Pedro F. Giffuni
e75a1c78e0 Style issue in r253661.
Pointed out by:	avg
MFC after:	1 month
2013-07-26 14:37:23 +00:00
Andriy Gapon
8e94193e58 make path matching in devfs rules consistent and sane (and safer)
Before this change path matching had the following features:
- for device nodes the patterns were matched against full path
- in the above case '/' in a path could be matched by a wildcard
- for directories and links only the last component was matched

So, for example, a pattern like 're*' could match the following entries:
- re0 device
- responder/u0 device
- zvol/recpool directory

Although it was possible to work around this behavior (once it was spotted
and understood), it was very confusing and contrary to documentation.

Now we always match a full path for all types of devfs entries (devices,
directories, links) and a '/' has to be matched explicitly.
This behavior follows the shell globbing rules.

This change is originally developed by Jaakko Heinonen.
Many thanks!

PR:		kern/122838
Submitted by:	jh
MFC after:	4 weeks
2013-07-26 14:25:58 +00:00
Marius Strobl
bd376402de - Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4.
Introduce $BASEBITSDIR for clarity and in order to avoid repeating this
  mistake in the future. Fixing this ensures that we pick up the newly built
  boot code and loader native to the target, which is especially relevant
  when cross-building release images.
- It is pointless to specify an endianess for ISO 9660 images so strip that.

MFC after:	3 days
2013-07-26 14:23:25 +00:00
Marius Strobl
2e17284732 Ensure that makefs.h is included when using ufs_bswap.h so the FFS_EI macro
is picked up when defined. Previously, ffs_subr.c was always built without
support for opposite endianess as it doesn't include makefs.h on its own.

MFC after:	3 days
2013-07-26 14:22:03 +00:00
Hans Petter Selasky
7dda4bda6b Regenerate usb.conf
MFC after:	1 week
2013-07-26 10:25:18 +00:00
Hans Petter Selasky
06fc83e85b Assume that all Apple products using interface class 255, subclass 253
and protocol 1 are USB ethernet adapters. This avoids keeping and updating
the product list every now and then. This patch will add support for the
USB ethernet interface found in the IPAD.

MFC after:	1 week
2013-07-26 09:58:56 +00:00
Andrey Zonov
20dd2f38dc Remove define and documentation for vm_pageout_algorithm missed in r253587 2013-07-26 02:00:06 +00:00
Pedro F. Giffuni
c7cdfecc89 Fix a segfault in ctfmerge due to a bug in gcc.
GCC can generate bogus dwarf attributes with DW_AT_byte_size
set to 0xFFFFFFFF.
The issue was originaly detected in NetBSD but it has been
adapted for portability and to avoid compiler warnings.

Reference:
https://www.illumos.org/issues/3776

Obtained from:	NetBSD
MFC after:	1 month
2013-07-26 00:28:19 +00:00
Brooks Davis
f1bd660622 Document the sbinuptime() and getsbinuptime() functions introduced in
r247452.

Sponsored by:	DARPA, AFRL
2013-07-25 20:53:15 +00:00
Jilles Tjoelker
b6dda50adc sh: Remove an incorrect comment. 2013-07-25 20:50:35 +00:00
Jilles Tjoelker
0bdd387178 sh: Remove #define MKINIT.
MKINIT only served for the removed mkinit. Many variables can be static now.
2013-07-25 19:48:15 +00:00
Pedro F. Giffuni
9670f48107 ext2fs: Return EINVAL for negative uio_offset as in UFS.
While here drop old comment that doesn't really apply.

MFC after:	1 month
Discussed with:	gleb
2013-07-25 19:37:49 +00:00
John Baldwin
513bfc4fe2 Enhance the description of NOTE_TRACK:
- NOTE_TRACK has never triggered a NOTE_TRACK event from the parent pid.
  If NOTE_FORK is set, the listener will get a NOTE_FORK event from
  the parent pid, but not a separate NOTE_TRACK event.
- Explicitly note that the event added to monitor the child process
  preserves the fflags from the original event.
- Move the description of NOTE_TRACKERR under NOTE_TRACK as it is not a
  bit for the user to set (which is what this list pupports to be).
  Also, explicitly note that if an error occurs, the NOTE_CHILD event
  will not be generated.

MFC after:	1 week
2013-07-25 19:34:24 +00:00
Adrian Chadd
387e754ae5 Fix typo.
Sponsored by:	Netflix
2013-07-25 19:10:23 +00:00
Marcel Moolenaar
a177309ff9 Set the device description after we call uart_probe(). In uart_probe()
we call device-specific probe functions, which can (and typically will)
set the device description based on low-level device probe information.
In the end we never actually used the device description that we so
carefully maintained in the PCI match table. By setting the device
description after we call uart_probe(), we'll print the more user-
friendly description by default.
2013-07-25 16:57:27 +00:00
John Baldwin
ba90c51af3 Avoid trashing IP fragments:
- Only enable UDP/TCP hardware checksums if CSUM_UDP or CSUM_TCP is set.
- Only enable IP hardware checksums if CSUM_IP is set.

PR:		kern/180430
Submitted by:	Meny Yossefi <menyy@mellanox.com>
MFC after:	1 week
2013-07-25 16:34:34 +00:00
Pedro F. Giffuni
0b54fe540c ext2fs: Drop a check that wan't supposed to be in r253651.
MFC after:	1 month
2013-07-25 16:04:55 +00:00
Pedro F. Giffuni
78d912bbc3 ext2fs: Don't assume that on-disk format of a directory is the same
as in <sys/dirent.h>

ext2_readdir() has always been very fs specific and different
with respect to its ufs_ counterpart. Recent changes from UFS
have made it possible to share more closely the implementation.

MFUFS r252438:
Always start parsing at DIRBLKSIZ aligned offset, skip first entries if
uio_offset is not DIRBLKSIZ aligned. Return EINVAL if buffer is too
small for single entry.

Preallocate buffer for cookies.

Skip entries with zero inode number.

Reviewed by:	gleb, Zheng Liu
MFC after:	1 month
2013-07-25 15:34:20 +00:00
Jilles Tjoelker
338b821b0f sh: Remove mkinit.
Replace the RESET blocks with regular functions and a reset() function that
calls them all.

This code generation tool is unusual and does not appear to provide much
benefit. I do not think isolating the knowledge about which modules need to
be reset is worth an almost 500-line build tool and wider scope for
variables used by the reset functions.

Also, relying on reset functions is often wrong: the cleanup should be done
in exception handlers so that no stale state remains after 'command eval'
and the like.
2013-07-25 15:08:41 +00:00
Jilles Tjoelker
f85336594c sh: Remove output.c's reset() handler.
These cleanup operations are not needed because they are already performed
after an optimized command substitution (whether there was an error or not).
2013-07-25 13:09:17 +00:00
Alexander Motin
48f2741c29 Decode some bits defined in AHCI 1.3.1 Device Sleep Technical Proposal.
For now this is only conmetics to report HBA capabilities (Haswell?).

Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2013-07-25 10:29:40 +00:00
Ulrich Spörlein
b4d0045dfb Match function definition to declaration and call-site.
SVN r95378 refactored ahc_9005_subdevinfo_valid out into a separate
function but swapped the vendor/subvendor and device/subdevice pairs of
the parameters.

Found by:	Coverity Prevent, CID 744931
Reviewed by:	gibbs
2013-07-25 09:30:00 +00:00
Ulrich Spörlein
9c8a649226 snd_ds1(4): Fix order of arguments for stereo/16bit mode
This function is called 4 times in this file, with swapped parameter
ordering. Fix the function definition instead of all the call sites.
16bit/stereo or 8bit/mono playback is unaffected and was probably
working fine before, this should fix 16bit/mono and 8bit/stereo
playback.

Found by:	Coverity Scan, CID 1006688
2013-07-25 09:29:48 +00:00
Alexander Motin
f5866522ce Add missing NULL check after malloc(M_NOWAIT).
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2013-07-25 09:12:46 +00:00
Alexander Motin
ffacde9be5 Following r222950, revert unintentional change cls -> class in argument name
in r245264.  Aside from non-uniformity, that again confused C++ compilers.
2013-07-25 08:41:22 +00:00
Rui Paulo
d8df5f3d71 Add ieee80211_add_{qos,wpa,rsn}() functions since they are needed by an
OpenBSD driver that is being ported to FreeBSD.

Reviewed by:	adrian
2013-07-25 06:23:26 +00:00
Rui Paulo
e0af540a91 Bump __FreeBSD_version for the addition of libusb's pkgconf files. 2013-07-25 03:55:50 +00:00
Rui Paulo
041d3f3f09 Add pkgconf files for libusb.
Reviewed by:	hselasky
2013-07-25 03:54:08 +00:00
Tim Kientzle
763d9566fe Clear entire map structure including locks so that the
locks don't accidentally appear to have been already
initialized.

In particular, this fixes a consistent kernel crash on
armv6 with:
  panic: lock "vm map (user)" 0xc09cc050 already initialized
that appeared with r251709.

PR: arm/180820
2013-07-25 03:48:37 +00:00
Rui Paulo
e3542928e3 Revert ROOTDEVNAME change from previous commit. 2013-07-25 03:44:12 +00:00
Rui Paulo
54d04d168c Enable modules for the BeagleBone and for the Raspberry Pi. 2013-07-25 03:31:27 +00:00
John Baldwin
5e3a17c0b9 Use VMFS_OPTIMAL_SPACE instead of VMFS_ALIGNED_SPACE in shm_map(). 2013-07-24 20:34:25 +00:00
Pedro F. Giffuni
7d20a270cc fuse: revert kernel_header update.
It seems to be causing problems due to the lack of the new features.

Found by:	bapt
Pointed hat:	pfg
2013-07-24 20:21:29 +00:00
David E. O'Brien
1ae56a1ce4 per style(9):
Kernel include files (i.e. sys/*.h) come first; normally, include
   <sys/types.h> OR <sys/param.h>, but not both.  <sys/types.h> includes
   <sys/cdefs.h>, and it is okay to depend on that.
2013-07-24 18:32:15 +00:00
Marcel Moolenaar
ba7f4cdc97 Further restrict the MAC addresses that we use for UUID generation
to those that are universally administered. While it is possible to
add locally administered MAC addresses, it's unclear whether those
are (expected) to be more unique than random multicast MAC addresses
or not.

With many U-Boot configurations assigning fixed and non-official MAC
addresses to ethernet ports and without setting the 'X' flag, this
change may have very little value in the embedded (development)
space. Uniqueness of the universally administered addresses is non-
existent on the (H/W) bench and questionable under the (S/W) desk.
In short: this change is aimed at production environments...
2013-07-24 18:13:43 +00:00