195469 Commits

Author SHA1 Message Date
np
34844b41eb MFC r261804:
Provide additional information in some panic strings.
2014-05-06 03:05:14 +00:00
np
bb4526b702 MFC r261534:
cxgbetool: Display the congestion channel map in hex.
2014-05-06 03:02:02 +00:00
rmacklem
5bd3f1337e MFC: r264630
For NFS mounts using rsize,wsize=65536 over TSO enabled
network interfaces limited to 32 transmit segments, there
are two known issues.
The more serious one is that for an I/O of slightly less than 64K,
the net device driver prepends an ethernet header, resulting in a
TSO segment slightly larger than 64K. Since m_defrag() copies this
into 33 mbuf clusters, the transmit fails with EFBIG.
A tester indicated observing a similar failure using iSCSI.

The second less critical problem is that the network
device driver must copy the mbuf chain via m_defrag()
(m_collapse() is not sufficient), resulting in measurable overhead.

This patch reduces the default size of if_hw_tsomax
slightly, so that the first issue is avoided.
Fixing the second issue will require a way for the
network device driver to inform tcp_output() that it
is limited to 32 transmit segments.
2014-05-06 02:54:59 +00:00
rmacklem
a54326376a MFC: r264517
Vlan did not set the value of if_hw_tsomax, so when vlan
was stacked on top of a network interface that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface. This patch modifies vlan so that
it sets if_hw_tsomax to the value of the parent interface.
2014-05-06 02:49:31 +00:00
rmacklem
1f951a5c9b MFC: r264469, r264498
Lagg did not set the value of if_hw_tsomax, so when lagg
was stacked on top of network interfaces that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface(s). This patch modifies lagg so that
it sets if_hw_tsomax to the minimum of the value(s) for the
underlying network interfaces.
2014-05-06 02:44:01 +00:00
np
3942b0b24c MFC r261533, r261536, r261537, and r263457.
r261533:
cxgbe(4): Use the port's tx channel to identify it to t4_clr_port_stats.

r261536:
cxgbe(4): The T5 allows for a different freelist starvation threshold
for queues with buffer packing.  Use the correct value to calculate a
freelist's low water mark.

r261537:
cxgbe(4): Use the rx channel map (instead of the tx channel map) as the
congestion channel map.

r263457:
cxgbe(4):  Recognize the "spider" configuration where a T5 card's 40G
QSFP port is presented as 4 distinct 10G SFP+ ports to the driver.
2014-05-06 02:22:52 +00:00
brueffer
f850b5a0a2 MFC: r265242
Generate hardware notes for mpr(4) and bump copyright for 2014.
2014-05-05 21:34:10 +00:00
ken
a354f057f0 MFC the mpr(4) driver for LSI's 12Gb SAS cards.
This includes r265236, r265237, r265241 and r265261:

  ------------------------------------------------------------------------
  r265236 | ken | 2014-05-02 14:25:09 -0600 (Fri, 02 May 2014) | 51 lines

  Bring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers.

  This is derived from the mps(4) driver, but it supports only the 12Gb
  IT and IR hardware including the SAS 3004, SAS 3008 and SAS 3108.

  Some notes about this driver:
   o The 12Gb hardware can do "FastPath" I/O, and that capability is included in
     this driver.

   o WarpDrive functionality has been removed, since it isn't supported in
     the 12Gb driver interface.

   o The Scatter/Gather list handling code is significantly different between
     the 6Gb and 12Gb hardware.  The 12Gb boards support IEEE Scatter/Gather
     lists.

  Thanks to LSI for developing and testing this driver for FreeBSD.

  share/man/man4/mpr.4:
  	mpr(4) man page.

  sys/dev/mpr/*:
  	mpr(4) driver files.

  sys/modules/Makefile,
  sys/modules/mpr/Makefile:
  	Add a module Makefile for the mpr(4) driver.

  sys/conf/files:
  	Add the mpr(4) driver.

  sys/amd64/conf/GENERIC,
  sys/i386/conf/GENERIC,
  sys/mips/conf/OCTEON1,
  sys/sparc64/conf/GENERIC:
  	Add the mpr(4) driver to all config files that currently
  	have the mps(4) driver.

  sys/ia64/conf/GENERIC:
  	Add the mps(4) and mpr(4) drivers to the ia64 GENERIC
  	config file.

  sys/i386/conf/XEN:
  	Exclude the mpr module from building here.

  Submitted by:	Steve McConnell <Stephen.McConnell@lsi.com>
  Tested by:	Chris Reeves <chrisr@spectralogic.com>
  Sponsored by:	LSI, Spectra Logic
  Relnotes:	LSI 12Gb SAS driver mpr(4) added

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265237 | ken | 2014-05-02 14:36:20 -0600 (Fri, 02 May 2014) | 8 lines

  Add the mpr(4) man page to the man4 Makefile.

  This should have been included in r265236.

  Submitted by:	Steve McConnell <Stephen.McConnell@lsi.com>
  MFC after:	3 days
  Sponsored by:	LSI, Spectra Logic

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265241 | brueffer | 2014-05-02 15:14:28 -0600 (Fri, 02 May 2014) | 2 lines

  Use our standard SYNOPSIS wording; perform some cleanup while here.

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265261 | brueffer | 2014-05-03 05:15:28 -0600 (Sat, 03 May 2014) | 2 lines

  Add a missing colon.

  ------------------------------------------------------------------------

Submitted by:	Steve McConnell <Stephen.McConnell@lsi.com>
Tested by:	Chris Reeves <chrisr@spectralogic.com>
Sponsored by:	LSI, Spectra Logic
Relnotes:	LSI 12Gb SAS driver mpr(4) added
2014-05-05 20:35:35 +00:00
ghelmer
037558ada7 MFC r264617:
Fix releasing the lock in the parent atrun process after the queue
directory has been processed. Otherwise, a long-running child process
caused other atrun invocations to stall unnecessarily.

Submitted by:	J.R. Oldroyd  jr at opal.com
2014-05-05 16:52:38 +00:00
pfg
9fe5eca952 MFC r265095, r265167;
citrus: Avoid invalid code points.

The UTF-8 decoder should not accept byte sequences which decode to
unicode code positions U+D800 to U+DFFF (UTF-16 surrogates).[1]

Contrary to the original OpenBSD patch, we do pass U+FFFE and U+FFFF,
both values are valid "non-characters" [2] and must be mapped through
UTFs.

[1] http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
[2] http://www.unicode.org/faq/private_use.html

Reported by:	Stefan Sperling [1]
Thanks to:	jilles [2]
Obtained from:	OpenBSD
2014-05-05 14:50:53 +00:00
markj
0bbe9c267f MFC r262661:
Fix emulation of call and jmp instructions on i386 and for 32-bit processes
on amd64.
2014-05-05 03:15:53 +00:00
kevlo
896088154c MFC r264317, r264864:
- Add the Asus USB-N10 NANO [1]
- Fix panic by adding mtx_assert() to urtwn_init_locked() and
  urtwn_stop_locked() [2]

Tested by:	Kuan-Chung Chiu <buganini@gmail.com> [1]
		Anthony Jenkins <scoobi_doo at yahoo dot com> [2]
2014-05-05 01:50:01 +00:00
gjb
cf561a1a55 MRC r265230:
Clarify that MAKEOBJDIRPREFIX and MAKEOBJDIR are not
  honored as make(1) arguments.

Sponsored by:	The FreeBSD Foundation
2014-05-05 01:29:20 +00:00
kib
9fc9efdfd5 MFC r265003:
Fix order of libthr and libc in the global dso list for sshd.
2014-05-04 07:28:26 +00:00
kib
2dee5cfb76 MFC r265004:
Same as it was done in r263878 for invlrng_handler(), fix order of
checks for special pcid values in invlpg_pcid_handler().
2014-05-04 07:22:51 +00:00
kib
839393d336 MFC r265002:
Fix vm_fault_copy_entry() operation on upgrade; allow it to find the
pages in the shadowed objects.
2014-05-04 07:19:37 +00:00
gjb
0bda42d935 MFC r264933:
Fix indentation in make-memstick.sh.

Sponsored by:	The FreeBSD Foundation
2014-05-04 00:13:07 +00:00
bryanv
9653be1bc2 MFC r261150, r261151, r261164, r261166, r261167, r261168, r261394, r261395:
- Read and write the MAC address in the config space byte by byte
 - Also include the mbuf's csum_flags in an assert message
 - Remove stray space
 - Move duplicated transmit start code into a single function
 - Avoid queue unlock followed by relock when the enable interrupt race
   is lost
 - Check for a full virtqueue in the multiqueue transmit path
 - Do not place the sglist used for Rx/Tx on the stack
 - Use m_defrag() instead of m_collapse() to compact a long mbuf chain
2014-05-03 19:40:41 +00:00
bryanv
8d49b2e263 MFC r261147:
Remove spaces before tabs in the function prototype list
MFC r261149:
    Read each field of the configuration individually
2014-05-03 17:33:30 +00:00
markj
ca7f99a689 MFC r262543:
Fix the struct reg mappings for i386 and amd64, which differ between illumos
and FreeBSD.
2014-05-03 16:24:18 +00:00
markj
607e8b47f9 MFC r262542:
Move some files that are identical on i386 and amd64 to an x86 subdirectory
rather than keeping duplicate copies.
2014-05-03 16:08:52 +00:00
dumbbell
ee189cb17a date(1): Add "-R" flag to use RFC 2822 date and time output format [MFC]
As stated in the man page, this is equivalent to use "%a, %d %b %Y %T %z"
as the output format while LC_TIME is set to the "C" locale.

This is compatible with date(1) from the GNU core utilities.

This is an MFC of r264968 and r264970.
2014-05-03 13:19:11 +00:00
ae
1029f2ba6f MFC r264494:
Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure.
  When server doesn't support this request, try to use SMB_INFO_ALLOCATION.
  And use SMB_COM_QUERY_INFORMATION_DISK request as fallback.

MFC r264600:
  Remove redundant unlock.

  This code was removed from the opensolaris and darwin's
  netsmb implementations, in DfBSD it also has been disabled.
2014-05-02 21:30:59 +00:00
pfg
7c82f25917 MFC r264040:
4248 dtrace(1M) should never create DOF with empty probes section
4249 Only probes from the first DTrace object file will be included

Illumos Revision:	4a20ab41aadcb81c53e72fc65886e964e9add59

Reference:
https://www.illumos.org/issues/4248
https://www.illumos.org/issues/4249

Obtained from:	Illumos
2014-05-02 20:12:31 +00:00
trociny
4d8a3153db MFC r264963:
Define startup order the same way as it is in dummynet.
2014-05-02 14:44:17 +00:00
marius
02f351fb35 MFC: r265090
Merge r133175 from upstream:

2008-03-13  Dennis Czeremin  <dennis.czeremin@smiths-heimann.com>

	PR libstdc++/35566
	* include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator,
	_InputIterator)): Forward to _M_insert_equal, not _M_insert_unique.

This patch was GPL2 at the time and fixes a regression introduced with
the merge of GCC r129013 in FreeBSD r236829.

Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-05-02 10:29:54 +00:00
markj
79d434517b MFC r262733:
Use a full path to the target for make rules which create symlinks @,
machine and ${MACHINE_CPUARCH}. Otherwise the presence of a file named
"x86" or "x86.c" in the make path can cause problems.
2014-05-01 03:18:11 +00:00
imp
41b3f9a061 MFC: r258705,r258709,r263140,r263184,r263185,r263186,r263187,r263188,
r263189,r263190,r263192,r263193,r263287,r263288,r263890,r264281,
r264655,r264656,r264856,r264857,r264858,r264859,r264860,r264861,
r264891,r264892,r264909

Catch up on all the referenced changes in -current, in brief:

r258705 | n_hibma | Use NANO_PMAKE for build, but not install
r258709 | mr | pkgng goo + bootstrap
r263140 | glebius | Axe IPX.
r263184 | imp | Fix build with spaces in names.
r263185 | imp | Make pcengines config files compile again.
r263186 | imp | Use UFS2 by default, but allow fallback to UFS1
r263187 | imp | Print an error message when we exit out early.
r263188 | imp | Sometimes only copy MBR when backing via swap
r263189 | imp | Update save_cfg
r263190 | imp | Be more explicit about setting SRCCONF to /dev/null
r263192 | imp | Rely on default UFS type
r263193 | imp | Remove TARGET_BIG_ENDIAN. It's no longer relevant.
r263287 | bdrewery | pkg(8) has no limits
r263288 | bdrewery | Remove comment meant for removal in r263287
r263890 | imp | Up default media size to 1GB.
r264281 | imp | Ignore .hg and .git files
r264655 | imp | rm -x for safety
r264656 | imp | new example: dhcpd derived from FreeNAS/BSDRP
r264856 | imp | Override the parallel make target to use all CPUs.
r264857 | imp | No need for true here, remove it.
r264858 | imp | NANO_PKG_META_BASE
r264859 | imp | stylize umount hack
r264860 | imp | switch dhcpd to pkg(8).
r264861 | imp | CR and CR0 added from dhcpd
r264891 | imp | Try to alwaays use () for functions
r264892 | imp | bash whines about r264857, revert
r264909 | imp | Move back to {} for functions that need global effects
2014-05-01 00:31:19 +00:00
pfg
2372623c9c MFC r264581, r264744:
Various style(9) fixes and typos in printf, grep, sort and patch.

#define should be followed by a tab.
2014-04-30 20:39:08 +00:00
smh
e6ff96679c MFC r265046
Fix ZIO reordering issue which could cause data loss / corruption.

Sponsored by:	Multiplay
2014-04-30 09:55:50 +00:00
delphij
acd7398463 Fix devfs rules not applied by default for jails.
Fix OpenSSL use-after-free vulnerability.

Fix TCP reassembly vulnerability.

Security:	FreeBSD-SA-14:07.devfs
Security:	CVE-2014-3001
Security:	FreeBSD-SA-14:08.tcp
Security:	CVE-2014-3000
Security:	FreeBSD-SA-14:09.openssl
Security:	CVE-2010-5298
2014-04-30 04:03:05 +00:00
hselasky
65035c2d37 MFC r265015:
Setting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel
LynxPoint USB 3.0 controllers found in MacBookPro 2013's.
2014-04-29 05:45:17 +00:00
markj
ac8b74dc0a MFC r262775:
Log the name of the file that we failed to open rather than an
uninitialized buffer.
2014-04-29 03:49:40 +00:00
markj
652284a343 MFC r264436:
Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain the
first address after the end of the map entry and should therefore be
excluded.
2014-04-29 03:36:04 +00:00
ian
3e706bc125 MFC r263052, r263124, r263265, r263267... Enhance loaderdev env var.
Enhance the mechanism that lets you configure the ubldr boot device by
setting the u-boot environment variable loaderdev=.  It used to accept only
'disk' or 'net'.  Now it allows specification of unit, slice, and partition
as well.  In addition to the generic 'disk' it also accepts specific
storage device types such as 'mmc' or 'sata'.

If there isn't a loaderdev env var, the historical behavior is maintained.
It will use the first storage device it finds, or a network device if
no working storage device exists.

99% of the work on this was done by Patrick Kelsey, but I made some
changes, so if anything goes wrong, blame me.

(Indeed, the 3 followup commits fixed things I got wrong on the first.)
2014-04-29 00:45:42 +00:00
ian
4d985863b1 MFC r262666: exit with code 0xbadab1 if the u-boot API support is missing. 2014-04-29 00:38:46 +00:00
ian
0eaada9b3b MFC r262664, r262694:
Prevent fdt data loaded from a file from overwriting the kernel environment,
  by having uboot_autoload() do the fdt setup (which may load a file) rather
  than waiting until we're actually in the process of launching the kernel.

  As part of making this happen...
   - Define LOADER_FDT_SUPPORT on the uboot/lib compile command line when
     MK_FDT is set.
   - Make fdt_setup_fdtb() public.
   - Declare public fdt_whatever() functions in a header instead of using
     scattered extern decls in .c files.
2014-04-29 00:36:51 +00:00
ian
56bd016e78 MFC r262340, r262345, r262347, find and load an appropriate dtb file.
The search order for a usable dtb in fdt_setup_fdtp() is now

 - A dtb loaded with an explicit "load -t dtb" command.
 - A dtb already loaded into memory somehow[*] and pointed to by fdt_to_load.
 - A dtb in the memory pointed to by the u-boot env vars fdtaddr or fdt_addr.
 - A file named by the u-boot env vars fdtfile or fdt_file.
 - A static dtb compiled into the kernel.

 * Presumably by some arch-specific command or code.
2014-04-29 00:31:32 +00:00
ian
4793c2eddb MFC r262337: Allow the boot device to be choosen by a u-boot env variable.
If a "loaderdev=<device>" env variable is set and the named device
  exists, it is used.  If the device doesn't exist, fall back to the
  historic "probe" loop that prefers disk devices over network devices.
2014-04-29 00:17:30 +00:00
ian
d388ba01ef MFC r262326 (white space) and r262327 (fdt_addr).
This change was supposed to be whitespace only, but a functional change
snuck in, as follows:

  Look for both fdtaddr and fdt_addr env var names.  Grepping the u-boot
  source shows that board vendors seem to be about evenly split on this.
  The added lines were:

    /* Board vendors use both fdtaddr and fdt_addr names.  Grrrr. */

    if (s == NULL)
        s = ub_env_get("fdt_addr");
2014-04-29 00:13:25 +00:00
ian
a021bcb6d4 MFC r261819 & r262242: Actually validate the header of a loaded dtb file. 2014-04-29 00:09:48 +00:00
ian
bd2b096941 MFC r257210, r258527: No hardfloat in ubldr, save/restore r9 for api calls. 2014-04-28 23:46:04 +00:00
ian
faf1fb2259 MFC r264018: update list of supported FTDI chips. 2014-04-28 13:18:30 +00:00
ian
1fa6b5cd9c MFC r264800: fixes for problems found by Coverity scan...
- Get transmit loop more in line with the other serial drivers.
  - Add a comment about FTDI and ZLPs.
  - Correctly check odditiy of baud rate divisor.
  - Correct IOCTL handling for "error" and "event" char.
2014-04-28 13:12:19 +00:00
ian
cb4d7c77b6 MFC uftdi(4) driver changes...
r264010: Support speeds up to 12mbaud on newer chips.
  r264031: Use 2K IO buffers for improved throughput.
  r264149: Add ioctl(2) calls to access bitbang, MPSSE, CPU_FIFO,
           and other modes.
2014-04-28 12:46:23 +00:00
delphij
e852cd6938 MFC r264467:
Take into account when zpool history block grows exceeding 128KB in zpool(8)
and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in
spa_history_create_obj()).

PR:		bin/186574
Submitted by:	Andrew Childs <lorne cons org nz> (with changes)
2014-04-28 06:11:03 +00:00
jmmv
797209d767 MFC r264741: Add placeholder Kyuafiles for various top-level hierarchies.
This is "make tinderbox" clean.
2014-04-28 04:20:14 +00:00
mm
5b89692b00 MFC r264689:
De-virtualize UMA zone pf_mtag_z and move to global initialization part.

The m_tag struct does not know about vnet context and the pf_mtag_free()
callback is called unaware of current vnet. This causes a panic.

PR:		kern/182964
2014-04-27 09:05:34 +00:00
jmmv
1e4589b921 MFC various moves of tools/regressions/ tests to the new infrastructure.
- r263220 Migrate tools/regression/sbin/ to the new tests layout.
- r263222 Add Makefile missed in r263220.
- r263226 Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout.
- r263227 Migrate most of tools/regression/usr.bin/ to the new tests layout.
- r263345 Expand tabs that sneaked in into spaces.
- r263346 Migrate tools/regression/usr.bin/make/ to the new tests layout.
- r263348 Add Makefiles missed in r263346.
- r263351 Migrate tools/regression/usr.bin/pkill/ to the new tests layout.
- r263388 Mark multi_test as requiring /usr/share/dict/words.
- r263814 Fix path to the run.pl script to let these tests run.
- r264742 Prevent building tests when bootstrapping make.

This is 'make tinderbox' clean.
2014-04-27 01:15:10 +00:00
marius
5b12da65bf MFC: r264832
- Sprinkle const and static as appropriate.
- Convert the remainder of snd_hda(4) to take advantage of nitems().
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
2014-04-26 01:00:28 +00:00