]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoDocument r265132, addition of full(4).
Glen Barber [Sun, 4 May 2014 01:32:55 +0000 (01:32 +0000)]
Document r265132, addition of full(4).

Sponsored by: The FreeBSD Foundation

10 years agoReally sort out the headers.
Luiz Otavio O Souza [Sat, 3 May 2014 20:33:00 +0000 (20:33 +0000)]
Really sort out the headers.

sys/systm.h must always come after sys/param.h.

Remove sys/types.h which should never be included together with sys/param.h.

Add sys/malloc.h for correctness even if it seems to don't be needed.

Remove more unused headers found by unusedinc (from bde@) and tested with a
universe build.

Reported by: bde

10 years agoFix panic on IPv4 address removal introduced in r265279.
Alexander V. Chernikov [Sat, 3 May 2014 20:22:13 +0000 (20:22 +0000)]
Fix panic on IPv4 address removal introduced in r265279.

Reported by: Trond Endrestøl
MFC with: r265279

10 years agoFix SYNOPSIS ("device if_vtnet" -> "device vtnet").
Bryan Venteicher [Sat, 3 May 2014 19:57:17 +0000 (19:57 +0000)]
Fix SYNOPSIS ("device if_vtnet" -> "device vtnet").

Obtained from: DragonFlyBSD
MFC after: 3 days

10 years agoDocumented the pget(9) system kernel interface.
Sergey Kandaurov [Sat, 3 May 2014 18:50:47 +0000 (18:50 +0000)]
Documented the pget(9) system kernel interface.

Reviewed by: trociny, kib
MFC after: 1 week

10 years agoFix sysctl_ifmalist() broken in r265019.
Alexander V. Chernikov [Sat, 3 May 2014 17:57:06 +0000 (17:57 +0000)]
Fix sysctl_ifmalist() broken in r265019.

Reported by: Olivier Cochard-Labbé
MFC with: r265019

10 years agoRemove additional fib checks from rtalloc1_fib.
Alexander V. Chernikov [Sat, 3 May 2014 16:38:05 +0000 (16:38 +0000)]
Remove additional fib checks from rtalloc1_fib.
It looks like current consumers are either unaware
of MRT (and uses RT_DEFAULT_FIB implicitly) or
know what thay are doing, In latter case they
will be either hit by KASSERT or ESCRH will be returned
due to NULL rnh.

10 years agoPass radix head ptr along with rte to rtexpunge().
Alexander V. Chernikov [Sat, 3 May 2014 16:28:54 +0000 (16:28 +0000)]
Pass radix head ptr along with rte to rtexpunge().
Rename rtexpunge to rt_expunge().

10 years agoFix a typo.
Mark Johnston [Sat, 3 May 2014 16:18:42 +0000 (16:18 +0000)]
Fix a typo.

MFC after: 3 days

10 years agoAfter r254627, the deupdate() started writing the directory entries to
Konstantin Belousov [Sat, 3 May 2014 16:11:55 +0000 (16:11 +0000)]
After r254627, the deupdate() started writing the directory entries to
disk.  That has a side effect of corrupting the "." entries names on
rename, since the call to createde() in the msdosfs_rename() sets the
de_Name to the target name.  If any change to the directory attributes
is performed, the wrong name is written back to the on-disk direntry
on update.

Overwrite the de_Name for the directories on rename to correct the dot
name.

Submitted by: bde
MFC after: 1 week

10 years agoAdd urtwn(4) to the hardware notes.
Christian Brueffer [Sat, 3 May 2014 15:33:48 +0000 (15:33 +0000)]
Add urtwn(4) to the hardware notes.

MFC after: 1 week

10 years agoMake the HARDWARE section ready for release notes generation; sort SEE ALSO.
Christian Brueffer [Sat, 3 May 2014 15:31:54 +0000 (15:31 +0000)]
Make the HARDWARE section ready for release notes generation; sort SEE ALSO.

MFC after: 1 week

10 years agoFix width/alignment of JID column. Make it support up to the maximum
Bryan Drewery [Sat, 3 May 2014 15:03:47 +0000 (15:03 +0000)]
Fix width/alignment of JID column. Make it support up to the maximum
7-wide JIDs. On a system using jails for common tasks the JID can
quickly increase.

MFC after: 2 weeks

10 years agoAdd rsu(4) to the hardware notes.
Christian Brueffer [Sat, 3 May 2014 11:39:04 +0000 (11:39 +0000)]
Add rsu(4) to the hardware notes.

MFC after: 1 week

10 years agoMake this manpage ready for hardware notes generation, add more Xrefs and perform
Christian Brueffer [Sat, 3 May 2014 11:34:54 +0000 (11:34 +0000)]
Make this manpage ready for hardware notes generation, add more Xrefs and perform
general cleanup.

In particular, don't claim rsu(4) devices can be configured with hostname(1)...

MFC after: 1 week

10 years agodrm/radeon: Add 32bit ioctls support
Jean-Sébastien Pédron [Sat, 3 May 2014 11:23:10 +0000 (11:23 +0000)]
drm/radeon: Add 32bit ioctls support

This allows to run 32bit applications on a 64bit host. This was tested
successfully with Wine (emulators/i386-wine-devel) and StarCraft II.

Submitted by: Jan Kokemüller <jan.kokemueller@gmail.com>
MFC after: 1 week

10 years agoAdd a missing colon.
Christian Brueffer [Sat, 3 May 2014 11:15:28 +0000 (11:15 +0000)]
Add a missing colon.

10 years agoAdd appropriate quoting to allow building with a KERNCONFDIR containing
Thomas Quinot [Sat, 3 May 2014 09:24:20 +0000 (09:24 +0000)]
Add appropriate quoting to allow building with a KERNCONFDIR containing
spaces.

PR: kern/162736
MFC after: 1 week

10 years agoMinor comment fix: dbsz is the block size as set by bs/ibs/obs,
Thomas Quinot [Sat, 3 May 2014 09:07:02 +0000 (09:07 +0000)]
Minor comment fix: dbsz is the block size as set by bs/ibs/obs,
not the size of the buffer.

10 years agoMinor comment fix.
Thomas Quinot [Sat, 3 May 2014 09:06:11 +0000 (09:06 +0000)]
Minor comment fix.

10 years agoFix syntax error with modern shells
Eitan Adler [Sat, 3 May 2014 08:52:52 +0000 (08:52 +0000)]
Fix syntax error with modern shells

Submitted by: multiple

10 years agoAllow "a.out" as an alias for the executable if no other matching entries
Mark Johnston [Sat, 3 May 2014 04:44:03 +0000 (04:44 +0000)]
Allow "a.out" as an alias for the executable if no other matching entries
are found. This improves compatibility with Solaris' libproc and fixes a
number of failing DTrace tests that rely on this feature.

MFC after: 3 weeks

10 years agoFix the tinderbox armv6/arm build failure.
Luiz Otavio O Souza [Sat, 3 May 2014 03:40:36 +0000 (03:40 +0000)]
Fix the tinderbox armv6/arm build failure.

VYBRID code depends on FDT.

10 years agoDon't treat TRIM requests returning ENOTSUP as an unexpected error.
Steven Hartland [Sat, 3 May 2014 02:30:01 +0000 (02:30 +0000)]
Don't treat TRIM requests returning ENOTSUP as an unexpected error.

MFC after: 1 month
X-MFC-With: r265152

10 years agoThe new draft specification for NFSv4.0 specifies that a server
Rick Macklem [Sat, 3 May 2014 00:13:45 +0000 (00:13 +0000)]
The new draft specification for NFSv4.0 specifies that a server
should either accept owner and owner_group strings that are just
the digits of the uid/gid or return NFS4ERR_BADOWNER.
This patch adds a sysctl vfs.nfsd.enable_stringtouid, which can
be set to enable the server w.r.t. accepting numeric string. It
also ensures that NFS4ERR_BADOWNER is returned if numeric uid/gid
strings are not enabled. This fixes the server for recent Linux
nfs4 clients that use numeric uid/gid strings by default.

Reported and tested by: craigyk@gmail.com
MFC after: 2 weeks

10 years ago- Add J command to help.
Bryan Drewery [Fri, 2 May 2014 23:47:14 +0000 (23:47 +0000)]
- Add J command to help.

MFC after: 2 weeks
X-MFC-with: r265249

10 years ago- Add a hint for 'u' and 'J' command that '+' displays all.
Bryan Drewery [Fri, 2 May 2014 23:32:44 +0000 (23:32 +0000)]
- Add a hint for 'u' and 'J' command that '+' displays all.

MFC after: 2 weeks

10 years agoAdd -J command/flag to filter by jail name/jid. This will automatically
Bryan Drewery [Fri, 2 May 2014 23:30:39 +0000 (23:30 +0000)]
Add -J command/flag to filter by jail name/jid. This will automatically
display the JID as well (the -j command/flag).

  0 displays host.
  + displays all.

MFC after: 2 weeks
Relnotes: yes

10 years agoAllow GEOM_VINUM to be statically compiled into the kernel.
Marius Strobl [Fri, 2 May 2014 23:23:18 +0000 (23:23 +0000)]
Allow GEOM_VINUM to be statically compiled into the kernel.

Submitted by: gleb
MFC after: 3 days

10 years agoRequest a non-exiting process in sysctl_kern_proc_{o,}filedesc
Mateusz Guzik [Fri, 2 May 2014 21:55:09 +0000 (21:55 +0000)]
Request a non-exiting process in sysctl_kern_proc_{o,}filedesc

This fixes a race with exit1 freeing p_textvp.

Suggested by: kib
MFC after: 1 week

10 years agoFix typo in KF_FD_TYPE_TRACE comment: ptrace -> ktrace
Mateusz Guzik [Fri, 2 May 2014 21:41:35 +0000 (21:41 +0000)]
Fix typo in KF_FD_TYPE_TRACE comment: ptrace -> ktrace

10 years agoFree resources in an error case.
Christian Brueffer [Fri, 2 May 2014 21:34:17 +0000 (21:34 +0000)]
Free resources in an error case.

CID: 1018947
Found with: Coverity Prevent(tm)
MFC after: 1 week

10 years agoGenerate hardware notes for mpr(4) and bump copyright for 2014.
Christian Brueffer [Fri, 2 May 2014 21:19:13 +0000 (21:19 +0000)]
Generate hardware notes for mpr(4) and bump copyright for 2014.

10 years agoUse our standard SYNOPSIS wording; perform some cleanup while here.
Christian Brueffer [Fri, 2 May 2014 21:14:28 +0000 (21:14 +0000)]
Use our standard SYNOPSIS wording; perform some cleanup while here.

10 years agoProperly free resources in case of error.
Christian Brueffer [Fri, 2 May 2014 20:45:55 +0000 (20:45 +0000)]
Properly free resources in case of error.

CID: 1007032
Found with: Coverity Prevent(tm)
MFC after: 2 weeks

10 years ago- Fix build WITHOUT_ZFS/WITHOUT_CDDL after r265229, bin/ps needs libjail.
Bryan Drewery [Fri, 2 May 2014 20:45:34 +0000 (20:45 +0000)]
- Fix build WITHOUT_ZFS/WITHOUT_CDDL after r265229, bin/ps needs libjail.

MFC after: 2 weeks
X-MFC-with: r265229

10 years agoProperly free resources in case of error.
Christian Brueffer [Fri, 2 May 2014 20:41:09 +0000 (20:41 +0000)]
Properly free resources in case of error.

CID: 1007032
Found with: Coverity Prevent(tm)
MFC after: 2 weeks

10 years agoAdd the mpr(4) man page to the man4 Makefile.
Kenneth D. Merry [Fri, 2 May 2014 20:36:20 +0000 (20:36 +0000)]
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

10 years agoBring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers.
Kenneth D. Merry [Fri, 2 May 2014 20:25:09 +0000 (20:25 +0000)]
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>
MFC after: 3 days
Tested by: Chris Reeves <chrisr@spectralogic.com>
Sponsored by: LSI, Spectra Logic
Relnotes: LSI 12Gb SAS driver mpr(4) added

10 years agoFix a panic caused by doing "ifconfig -am" while a lagg is being destroyed.
Alan Somers [Fri, 2 May 2014 16:24:09 +0000 (16:24 +0000)]
Fix a panic caused by doing "ifconfig -am" while a lagg is being destroyed.
The thread that is destroying the lagg has already set sc->sc_psc=NULL when
the "ifconfig -am" thread gets to lacp_req().  It tries to dereference
sc->sc_psc and panics.  The solution is for lacp_req() to check the value of
sc->sc_psc.  If NULL, harmlessly return an lacp_opreq structure full of
zeros.  Full details in GNATS.

PR: kern/189003
Reviewed by: timeout on freebsd-net@
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation

10 years agogcc: fix strict alignment.
Pedro F. Giffuni [Fri, 2 May 2014 16:15:34 +0000 (16:15 +0000)]
gcc: fix strict alignment.

From the OpenBSD log:

x86-64 ABI requires arrays greater than 16 bytes to be aligned to
16byte boundary.  However, GCC 16-byte aligns arrays of >=16 BITS,
not BYTES.

This diff improves bug detectability for code which has local arrays
of [16 .. 127] bits:  in those cases SSP will now detect even 1-byte
overflows.

Obtained from: OpenBSD (CVS rev 1.4)
MFC after: 1 week

10 years agoClarify that MAKEOBJDIRPREFIX and MAKEOBJDIR are not
Glen Barber [Fri, 2 May 2014 15:52:50 +0000 (15:52 +0000)]
Clarify that MAKEOBJDIRPREFIX and MAKEOBJDIR are not
honored as make(1) arguments.

Requested by: smh
MFC After: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoAdd -J to filter by matching jail IDs and names.
Bryan Drewery [Fri, 2 May 2014 15:05:47 +0000 (15:05 +0000)]
Add -J to filter by matching jail IDs and names.

-J 0 can be used to show only host processes.

Patch partially based on work by bz@

PR: bin/78763
MFC after: 2 weeks
Relnotes: yes

10 years agoClean up more lindev(4) vestiges.
Christian Brueffer [Fri, 2 May 2014 11:09:01 +0000 (11:09 +0000)]
Clean up more lindev(4) vestiges.

10 years agoRemoved pointless / duplicated call to trim_map_first.
Steven Hartland [Fri, 2 May 2014 09:31:21 +0000 (09:31 +0000)]
Removed pointless / duplicated call to trim_map_first.

MFC after: 1 month
X-MFC-With: r265152

10 years agolibdev(4) has been removed, get rid of the module as well to fix the build.
Christian Brueffer [Fri, 2 May 2014 09:24:06 +0000 (09:24 +0000)]
libdev(4) has been removed, get rid of the module as well to fix the build.

Submitted by: Sainath Varanasi

10 years agoGarbage collect mtxpool_lockbuilder, the mutex pool historically used
Robert Watson [Fri, 2 May 2014 07:57:40 +0000 (07:57 +0000)]
Garbage collect mtxpool_lockbuilder, the mutex pool historically used
for lockmgr and sx interlocks, but unused since optimised versions of
those sleep locks were introduced.  This will save a (quite) small
amount of memory in all kernel configurations.  The sleep mutex pool is
retained as it is used for 'struct bio' and several other consumers.

Discussed with: jhb
MFC after: 3 days

10 years agolindev(4): finish the partial commit in r265212
Eitan Adler [Fri, 2 May 2014 07:14:22 +0000 (07:14 +0000)]
lindev(4): finish the partial commit in r265212

lindev(4) was only used to provide /dev/full which is now a standard feature of
FreeBSD.  /dev/full was never linux-specific and provides a generally useful
feature.

Document this in UPDATING and bump __FreeBSD_version.  This will be documented
in the PH shortly.

Reported by: jkim

10 years agolindev(4): remove the device
Eitan Adler [Fri, 2 May 2014 05:30:49 +0000 (05:30 +0000)]
lindev(4): remove the device

lindev(4) was only used to provide /dev/full which is now a standard feature of
FreeBSD.  /dev/full was never linux-specific and provides a generally useful
feature.

Document this in UPDATING and bump __FreeBSD_version.  This will be documented
in the PH shortly.

Reported by: jkim

10 years agoDon't allow MPtable generation if there are multiple PCI hierarchies. This is
Neel Natu [Fri, 2 May 2014 04:51:31 +0000 (04:51 +0000)]
Don't allow MPtable generation if there are multiple PCI hierarchies. This is
because there isn't a standard way to relay this information to the guest OS.

Add a command line option "-Y" to bhyve(8) to inhibit MPtable generation.

If the virtual machine is using PCI devices on buses other than 0 then it can
still use ACPI tables to convey this information to the guest.

Discussed with: grehan@

10 years agoHonor the max-frequency property if it appears in the fdt data.
Ian Lepore [Fri, 2 May 2014 01:28:19 +0000 (01:28 +0000)]
Honor the max-frequency property if it appears in the fdt data.
Adjust the exynos and zedboard dts files to use max-frequency (the
documented standard property) instead of clock-frequency.

Submitted by: Thomas Skibo <ThomasSkibo@sbcglobal.net>

10 years agoSwitch to use arm_devmap_add_entry() to setup static device mapping.
Ganbold Tsagaankhuu [Fri, 2 May 2014 01:20:13 +0000 (01:20 +0000)]
Switch to use arm_devmap_add_entry() to setup static device mapping.

Approved by: stas (mentor)

10 years agoIgnore the error from pipespace_new when creating a pipe.
Mateusz Guzik [Fri, 2 May 2014 00:52:13 +0000 (00:52 +0000)]
Ignore the error from pipespace_new when creating a pipe.

It can fail if pipe map is exhausted (as a result of too many pipes created),
but it is not fatal and could be provoked by unprivileged users. The only
consequence is worse performance with given pipe.

Reported by: ivoras
Suggested by: kib
MFC after: 1 week

10 years agoAdd tracking for self-generated frames when the VAP is in sleep state.
Adrian Chadd [Fri, 2 May 2014 00:48:09 +0000 (00:48 +0000)]
Add tracking for self-generated frames when the VAP is in sleep state.

The hardware can generate its own frames (eg RTS/CTS exchanges, other
kinds of 802.11 management stuff, especially when it comes to 802.11n)
and these also have PWRMGT flags.  So if the VAP is asleep but the
NIC is in force-awake for some reason, ensure that the self-generated
frames have PWRMGT set to 1.

Now, this (like basically everything to do with powersave) is still
racy - the only way to guarantee that it's all actually consistent
is to pause transmit and let it finish before transitioning the VAP
to sleep, but this at least gets the basic method of tracking and
updating the state debugged.

Tested:

* AR5416, STA mode
* AR9380, STA mode

10 years agoAdd logic in the HLT exit handler to detect if the guest has put all vcpus
Neel Natu [Fri, 2 May 2014 00:33:56 +0000 (00:33 +0000)]
Add logic in the HLT exit handler to detect if the guest has put all vcpus
to sleep permanently by executing a HLT with interrupts disabled.

When this condition is detected the guest with be suspended with a reason of
VM_SUSPEND_HALT and the bhyve(8) process will exit.

Tested by executing "halt" inside a RHEL7-beta guest.

Discussed with: grehan@
Reviewed by: jhb@, tychon@

10 years agoregex: Remove some unreachable breaks.
Pedro F. Giffuni [Thu, 1 May 2014 23:34:14 +0000 (23:34 +0000)]
regex: Remove some unreachable breaks.

This is based on a much bigger cleanup done in Illumos.

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

MFC after: 1 week

10 years agoFix a 2038 bug.
Brooks Davis [Thu, 1 May 2014 22:28:14 +0000 (22:28 +0000)]
Fix a 2038 bug.

If time_t is 64-bit (i.e. isn't 32-bit) allow any value of year, not
just years less than 2038.

Don't bother fixing the underflow in the case of years before 1903.

MFC after: 1 week
Sponsored by: DARPA, AFRL

10 years agoFix a leak in g_uzip_taste(). After retrieve all the block offsets from
Luiz Otavio O Souza [Thu, 1 May 2014 15:23:20 +0000 (15:23 +0000)]
Fix a leak in g_uzip_taste().  After retrieve all the block offsets from
the uzip image, free the last data read.

10 years agoFix rnh_walktree_from() function (patch from kern/174959).
Alexander V. Chernikov [Thu, 1 May 2014 15:04:32 +0000 (15:04 +0000)]
Fix rnh_walktree_from() function (patch from kern/174959).
Require valid netmask to be passed since host route is always a leaf.

PR: kern/174959
Submitted by: Keith Sklower
MFC after: 2 weeks

10 years agoActually the FEATURE() macro is defined on sys/sysctl.h.
Luiz Otavio O Souza [Thu, 1 May 2014 14:59:04 +0000 (14:59 +0000)]
Actually the FEATURE() macro is defined on sys/sysctl.h.

Pointyhat to: loos

10 years agoSome style and whitespace fixes. Reduce the difference between geom_uzip(4)
Luiz Otavio O Souza [Thu, 1 May 2014 14:47:27 +0000 (14:47 +0000)]
Some style and whitespace fixes.  Reduce the difference between geom_uzip(4)
and geom_uncompress(4).  Now, they produce an almost clean diff(1) output.

Remove a duplicated variable from g_uncompress.c and an unnecessary header
from g_uzip.c.

No functional changes.

10 years agoRemove unnecessary headers. Sort out the headers. Add a missing header on
Luiz Otavio O Souza [Thu, 1 May 2014 14:09:47 +0000 (14:09 +0000)]
Remove unnecessary headers.  Sort out the headers.  Add a missing header on
ofw_gpiobus.c (it was working because of sys/libkern.h).

10 years agoUse mkimg instead of md(4) and gpart.
Nathan Whitehorn [Thu, 1 May 2014 03:24:41 +0000 (03:24 +0000)]
Use mkimg instead of md(4) and gpart.

10 years agoAdd freebsd-boot to recognized partition types.
Nathan Whitehorn [Thu, 1 May 2014 03:24:20 +0000 (03:24 +0000)]
Add freebsd-boot to recognized partition types.

10 years agocitrus: Avoid invalid code points.
Pedro F. Giffuni [Thu, 1 May 2014 01:42:48 +0000 (01:42 +0000)]
citrus: Avoid invalid code points.

From the OpenBSD log:
The UTF-8 decoder should not accept byte sequences which decode to unicode
code positions U+D800 to U+DFFF (UTF-16 surrogates), U+FFFE, and U+FFFF.

http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
http://unicode.org/faq/utf_bom.html#utf8-4

Reported by: Stefan Sperling
Obtained from: OpenBSD
MFC after: 5 days

10 years agoProvide an alias for the userboot console and name it 'comconsole'.
Peter Grehan [Thu, 1 May 2014 00:12:24 +0000 (00:12 +0000)]
Provide an alias for the userboot console and name it 'comconsole'.
This allows existing loader.conf files that set "console=comconsole"
to work without failing. No functional difference otherwise.

Reported by: Michael Dexter, pfSense install.
Reviewed by: neel
MFC after: 3 weeks

10 years agoSmall cleanup: mostly whitespace vs. tabs.
Pedro F. Giffuni [Wed, 30 Apr 2014 21:19:46 +0000 (21:19 +0000)]
Small cleanup: mostly whitespace vs. tabs.

10 years agoFix logic error. <blush>
Warner Losh [Wed, 30 Apr 2014 20:52:38 +0000 (20:52 +0000)]
Fix logic error. <blush>

Submitted by: ian@

10 years agoTurns out this .if evaluated not in the context of the makedtb target
Warner Losh [Wed, 30 Apr 2014 20:47:40 +0000 (20:47 +0000)]
Turns out this .if evaluated not in the context of the makedtb target
sometimes due to Makefile expansion rules. Make the test for things
being NULL elsewhere...

10 years agoRespect MAXIMUM TRANSFER LENGTH field of Block Limits VPD page.
Alexander Motin [Wed, 30 Apr 2014 19:44:31 +0000 (19:44 +0000)]
Respect MAXIMUM TRANSFER LENGTH field of Block Limits VPD page.

Nobody yet reported disk supporting I/Os less then our MAXPHYS value, but
since we any way have code to read Block Limits VPD page, that is easy.

MFC after: 2 weeks

10 years agokldxref: Clean up error reporting
Ed Maste [Wed, 30 Apr 2014 18:11:53 +0000 (18:11 +0000)]
kldxref: Clean up error reporting

Omit "too many sections" warnings if the ELF file is not dynamically
linked (and is therefore skipped anyway), and otherwise output it only
once.  An errant core file would previously cause kldxref to output a
number of warnings.

Also introduce a MAXSEGS #define and replace literal 2 with it, to make
comparisons clear.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation

10 years agoThis was copied to IMX6, which has since evolved further. Remove this
Warner Losh [Wed, 30 Apr 2014 18:02:19 +0000 (18:02 +0000)]
This was copied to IMX6, which has since evolved further. Remove this
as it is no longer needed.

10 years agoOmit from the universe build all config files tagged with
Warner Losh [Wed, 30 Apr 2014 18:02:10 +0000 (18:02 +0000)]
Omit from the universe build all config files tagged with
#NO_UNIVERSE. Many of these config files are important examples, but
add little to no regresive value to the intended purpose of
UNIVERSE. We now build over 120 kernels during universe. There's
really little to no value to this over building say 60 or even 30 of
them (either is still a way too big number). This is especially true
for kernels that are nothing more than including a common base and
adding a static DTB file. Start by pruning 1/3 of the arm kernels that
add little regresion value.

10 years agoAllow FDT_DTS_FILE to be a list, either in the makedtb target, or in a
Warner Losh [Wed, 30 Apr 2014 18:02:04 +0000 (18:02 +0000)]
Allow FDT_DTS_FILE to be a list, either in the makedtb target, or in a
kernel config file. If you also want to have a static DTB compiled
into your kernel, however, it cannot be a list. We have no mechanism
in the kernel for picking one, so that doesn't make sense and will
result in a compile-time error.

10 years agoReintroduce priority for the TRIM ZIOs instead of using the "NOW" priority
Steven Hartland [Wed, 30 Apr 2014 17:46:29 +0000 (17:46 +0000)]
Reintroduce priority for the TRIM ZIOs instead of using the "NOW" priority

The changes how TRIM requests are generated to use ZIO_TYPE_FREE + a priority
instead of ZIO_TYPE_IOCTL, until processed by vdev_geom; only then is it
translated the required geom values. This reduces the amount of changes
required for FREE requests to be supported by the new IO scheduler. This
also eliminates the need for a specific DKIOCTRIM.

Also fixed FREE vdev child IO's from running ZIO_STAGE_VDEV_IO_DONE as part
of their schedule.

As the new IO scheduler can result in a request to execute one type of IO to
actually run a different type of IO it requires that zio_trim requests are
processed without holding the trim map lock (tm->tm_lock), as the free request
execute call may result in write request running hence triggering a
trim_map_write_start call, which takes the trim map lock and hence would result
in recused on no-recursive sx lock.

This is based off avg's original work, so credit to him.

MFC after: 1 month

10 years agoDo not reread SCSI disk VPD pages on every device open.
Alexander Motin [Wed, 30 Apr 2014 17:38:26 +0000 (17:38 +0000)]
Do not reread SCSI disk VPD pages on every device open.

Instead of rereading VPD pages on every device open, do it only on initial
device probe, and in cases when device reported via UNIT ATTENTIONs that
something has changed.  Capacity is still rereaded on every open because
it is more critical for operation and more probable to change in run time.

On my tests with Intel 530 SSDs on mps(4) HBA this change reduces time
GEOM needs to retaste the device (that includes few open/close cycles)
from ~150ms to ~30ms.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

10 years agoMake uninteresting PCI devices with no attached drivers only print out
Steven Hartland [Wed, 30 Apr 2014 16:42:12 +0000 (16:42 +0000)]
Make uninteresting PCI devices with no attached drivers only print out
on a verbose boot

MFC after: 2 weeks

10 years agoConvert the Zynq SoC support to the new routines for static device mapping.
Ian Lepore [Wed, 30 Apr 2014 14:38:13 +0000 (14:38 +0000)]
Convert the Zynq SoC support to the new routines for static device mapping.

10 years agoDon't forget to remember previous element at the end of the loop.
Pawel Jakub Dawidek [Wed, 30 Apr 2014 09:58:28 +0000 (09:58 +0000)]
Don't forget to remember previous element at the end of the loop.

Reported by: brueffer
Found with: Coverity Prevent(tm)
CID: 1135301

10 years agoDocument m_get2().
Kevin Lo [Wed, 30 Apr 2014 08:51:30 +0000 (08:51 +0000)]
Document m_get2().

Reviewed by: glebius

10 years agoChange type from int to short to match function prototypes.
Kevin Lo [Wed, 30 Apr 2014 07:17:51 +0000 (07:17 +0000)]
Change type from int to short to match function prototypes.

Reviewed by: glebius

10 years agoAdd missing comma
Eitan Adler [Wed, 30 Apr 2014 06:54:35 +0000 (06:54 +0000)]
Add missing comma

Relnotes: yes (/dev/full)

10 years agonull.c: uio is unused
Eitan Adler [Wed, 30 Apr 2014 06:40:30 +0000 (06:40 +0000)]
null.c: uio is unused

Mark another parameter as unused

Reported by: rpaulo

10 years agoman pages: add missing comma
Eitan Adler [Wed, 30 Apr 2014 06:34:53 +0000 (06:34 +0000)]
man pages: add missing comma

Reported by: brueffer

10 years agonull.c: fix ordering
Eitan Adler [Wed, 30 Apr 2014 06:30:37 +0000 (06:30 +0000)]
null.c: fix ordering

Use a consistent ordering of full -> null -> zero (alphabetical) in null.c

Reported by: mjg

10 years agoAdd a /dev/full device.
Eitan Adler [Wed, 30 Apr 2014 06:20:48 +0000 (06:20 +0000)]
Add a /dev/full device.

/dev/full is similar to /dev/zero except it always returns
ENOSPC when you attempt to write to it.

Reviewed by: jhibbits
Discussed with: rpaulo

10 years agoFix TCP reassembly vulnerability.
Xin LI [Wed, 30 Apr 2014 04:02:57 +0000 (04:02 +0000)]
Fix TCP reassembly vulnerability.

Patch done by: glebius
Security: FreeBSD-SA-14:08.tcp
Security: CVE-2014-3000

10 years agoFix OpenSSL use-after-free vulnerability.
Xin LI [Wed, 30 Apr 2014 04:02:36 +0000 (04:02 +0000)]
Fix OpenSSL use-after-free vulnerability.

Obtained from: OpenBSD
Security: FreeBSD-SA-14:09.openssl
Security: CVE-2010-5298

10 years agoFix devfs rules not applied by default for jails.
Xin LI [Wed, 30 Apr 2014 04:02:32 +0000 (04:02 +0000)]
Fix devfs rules not applied by default for jails.

Security: FreeBSD-SA-14:07.devfs
Security: CVE-2014-3001

10 years ago* Modify the beacon interval in debugging to be ni_intval, not 102400
Adrian Chadd [Wed, 30 Apr 2014 02:44:07 +0000 (02:44 +0000)]
* Modify the beacon interval in debugging to be ni_intval, not 102400
* Be paranoid about avoiding divide-by-zero.

Tested:

* AR9380, STA mode

10 years agoAdd ar9300_get_next_tbtt().
Adrian Chadd [Wed, 30 Apr 2014 02:29:31 +0000 (02:29 +0000)]
Add ar9300_get_next_tbtt().

Tested:

* AR9380, STA mode

10 years agoBring over some initial power save management support, reset path
Adrian Chadd [Wed, 30 Apr 2014 02:19:41 +0000 (02:19 +0000)]
Bring over some initial power save management support, reset path
fixes and beacon programming / debugging into the ath(4) driver.

The basic power save tracking:

* Add some new code to track the current desired powersave state; and
* Add some reference count tracking so we know when the NIC is awake; then
* Add code in all the points where we're about to touch the hardware and
  push it to force-wake.

Then, how things are moved into power save:

* Only move into network-sleep during a RUN->SLEEP transition;
* Force wake the hardware up everywhere that we're about to touch
  the hardware.

The net80211 stack takes care of doing RUN<->SLEEP<->(other) state
transitions so we don't have to do it in the driver.

Next, when to wake things up:

* In short - everywhere we touch the hardware.
* The hardware will take care of staying awake if things are queued
  in the transmit queue(s); it'll then transit down to sleep if
  there's nothing left.  This way we don't have to track the
  software / hardware transmit queue(s) and keep the hardware
  awake for those.

Then, some transmit path fixes that aren't related but useful:

* Force EAPOL frames to go out at the lowest rate.  This improves
  reliability during the encryption handshake after 802.11
  negotiation.

Next, some reset path fixes!

* Fix the overlap between reset and transmit pause so we don't
  transmit frames during a reset.
* Some noisy environments will end up taking a lot longer to reset
  than normal, so extend the reset period and drop the raise the
  reset interval to be more realistic and give the hardware some
  time to finish calibration.
* Skip calibration during the reset path.  Tsk!

Then, beacon fixes in station mode!

* Add a _lot_ more debugging in the station beacon reset path.
  This is all quite fluid right now.
* Modify the STA beacon programming code to try and take
  the TU gap between desired TSF and the target TU into
  account.  (Lifted from QCA.)

Tested:

* AR5210
* AR5211
* AR5212
* AR5413
* AR5416
* AR9280
* AR9285

TODO:

* More AP, IBSS, mesh, TDMA testing
* Thorough AR9380 and later testing!
* AR9160 and AR9287 testing

Obtained from: QCA

10 years agoIgnore writes to microcode update MSR. This MSR is accessed by RHEL7 guest.
Neel Natu [Wed, 30 Apr 2014 02:08:27 +0000 (02:08 +0000)]
Ignore writes to microcode update MSR. This MSR is accessed by RHEL7 guest.
Add KTR tracepoints to annotate wrmsr and rdmsr VM exits.

10 years agoOnly track the power state variable if the power state is changed,
Adrian Chadd [Wed, 30 Apr 2014 02:03:47 +0000 (02:03 +0000)]
Only track the power state variable if the power state is changed,
not if the self-generated frame state is changed.

10 years ago* Only update ah_powerMode if we're setting the chip sleep state.
Adrian Chadd [Wed, 30 Apr 2014 02:03:13 +0000 (02:03 +0000)]
* Only update ah_powerMode if we're setting the chip sleep state.
  Some code will appear soon that is actually setting the chip powerstate
  separate from the self-generated frames power state.
* Allow the AR5416 family chips to actually have the power state changed
  from the self generated state change.

Tested (STA mode):

* AR5210
* AR5211
* AR5412
* AR5413
* AR5416
* AR9285

10 years agoMake this declaration into a proper function prototype.
Ian Lepore [Tue, 29 Apr 2014 23:29:28 +0000 (23:29 +0000)]
Make this declaration into a proper function prototype.

10 years agoUpdate comment.
Marius Strobl [Tue, 29 Apr 2014 20:57:25 +0000 (20:57 +0000)]
Update comment.

10 years agoGiven that as of r258002 the last external user is gone, make sched_lock
Marius Strobl [Tue, 29 Apr 2014 20:51:57 +0000 (20:51 +0000)]
Given that as of r258002 the last external user is gone, make sched_lock
static.

10 years agoBe consistent with the whitespace in the rest of these files.
Ryan Stone [Tue, 29 Apr 2014 20:49:47 +0000 (20:49 +0000)]
Be consistent with the whitespace in the rest of these files.

X-MFC-With: r264007

10 years agoPartially revert r265019 - allocating 512 bytes on stack
Alexander V. Chernikov [Tue, 29 Apr 2014 19:48:11 +0000 (19:48 +0000)]
Partially revert r265019 - allocating 512 bytes on stack
can be too much for architectures like ARM. Always use rounded
malloc instead.

Discussed with: jmallett
MFC after: 4 weeks