]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoAdd missing break in lock_partialfilelock(..) with NFS_RESERR
ngie [Mon, 13 Jun 2016 11:19:06 +0000 (11:19 +0000)]
Add missing break in lock_partialfilelock(..) with NFS_RESERR

This will help ensure that the right error is trickled up when the
function is called if the lock status is NFS_RESERR

Differential Revision: https://reviews.freebsd.org/D6622
Reviewed by: rmacklem
Approved by: re (gjb)
Tested with: fsx; svn info/svnversion (uses bdb locking); locktests from Bull http://nfsv4.bullopensource.org/tools/tests/locktest.php
MFC after: 2 weeks
Reported by: Coverity
CID: 10081611304956
Sponsored by: EMC / Isilon Storage Division

8 years agozfs_vptocnp: check for an invalid znode
avg [Mon, 13 Jun 2016 10:53:34 +0000 (10:53 +0000)]
zfs_vptocnp: check for an invalid znode

... which can arise after the receive or rollback
and failed zfs_rezget().

Approved by: re (kib)
MFC after: 1 week

8 years agoChange my given name from "Garrett" to "Ngie"
ngie [Mon, 13 Jun 2016 10:35:11 +0000 (10:35 +0000)]
Change my given name from "Garrett" to "Ngie"

A legal name change from "Garrett" to "Ngie", as well as a FreeBSD
account name change, is pending.

Approved by: re (hrs)

8 years agoImplement AUE_PREAD and AUE_PWRITE BSM conversion support, eliminating
rwatson [Mon, 13 Jun 2016 09:22:20 +0000 (09:22 +0000)]
Implement AUE_PREAD and AUE_PWRITE BSM conversion support, eliminating
console warnings when pread(2) and pwrite(2) are used with full
system-call auditing enabled.  We audit the same file-descriptor data
for these calls as we do read(2) and write(2).

Approved by: re (kib)
MFC after: 3 days
Sponsored by: DARPA, AFRL

8 years agoDo not access pv_table array for fictitious pages, since the array
kib [Mon, 13 Jun 2016 03:45:08 +0000 (03:45 +0000)]
Do not access pv_table array for fictitious pages, since the array
does not cover the dynamically registered ficititious ranges, and
fictitious pages mappings are not promoted.  Offer a dummy struct
md_page to fetch constant superpage pv list generation to satisfy
logic.  Also, by initializing the pv_dummy pv_list to empty, we can
remove several explicit PG_FICTITIOUS tests.

Reported and tested by: Michael Butler <imb@protected-networks.net>
(previous version)
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D6728
Approved by: re (hrs)

8 years agoFix inconsistent locking of the swap pager named objects list.
kib [Mon, 13 Jun 2016 03:42:46 +0000 (03:42 +0000)]
Fix inconsistent locking of the swap pager named objects list.

Right now, all modifications of the list are locked by sw_alloc_mtx.
But initial lookup of the object by the handle in swap_pager_alloc()
is not protected by sw_alloc_mtx, which means that
vm_pager_object_lookup() could follow freed pointer.

Create a new named swap object with the OBJT_SWAP type, instead
of OBJT_DEFAULT.  With this change, swp_pager_meta_build() never need
to upgrade named OBJT_DEFAULT to OBJT_SWAP (in the other place, we do
not forbid for client code to create named OBJT_DEFAULT objects at
all).

That change allows to remove sw_alloc_mtx and make the list locked by
sw_alloc_sx lock.  Update swap_pager_copy() to new locking mode.

Create helper swap_pager_alloc_init() to consolidate named and
anonymous swap objects creation, while a caller ensures that the
neccesary locks are held around the helper.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Approved by: re (hrs)

8 years agoExplicitely initialize sw_alloc_sx. Currently it is not initialized
kib [Mon, 13 Jun 2016 03:39:16 +0000 (03:39 +0000)]
Explicitely initialize sw_alloc_sx.  Currently it is not initialized
but works due to zeroed out bss on startup.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (hrs)

8 years ago[mips] set hardfloat for fpu instruction generation for gcc/binutils 5.x
adrian [Mon, 13 Jun 2016 03:17:00 +0000 (03:17 +0000)]
[mips] set hardfloat for fpu instruction generation for gcc/binutils 5.x

This allows -HEAD to be compiled again using the gcc-5 mips port compiler.

Reviewed by: imp
Approved by: re@

8 years agoFix compile warning.
hselasky [Mon, 13 Jun 2016 01:33:02 +0000 (01:33 +0000)]
Fix compile warning.

Approved by: re (delphij)
MFC after: 1 week

8 years ago[iwm] Fix up busdma use in the RX path
adrian [Mon, 13 Jun 2016 00:13:20 +0000 (00:13 +0000)]
[iwm] Fix up busdma use in the RX path

When allocating a new mbuf or bus_dmamap_load()-ing it fails,
we can just keep the old mbuf since we are dropping that packet anyway.
Instead of doing bus_dmamap_create() and bus_dmamap_destroy() all the time,
create an extra bus_dmamap_t which we can use to safely try
bus_dmamap_load()-ing the new mbuf. On success we just swap the spare
bus_dmamap_t with the data->map of that ring entry.

Tested:

Tested with Intel AC7260, verified with vmstat -m that new kernel no
longer visibly leaks memory from the M_DEVBUF malloc type.
Before, leakage was 1KB every few seconds while ping(8)-ing over the wlan
connection.

Submitted by: Imre Vadasz <imre@vdsz.com>
Approved by: re@
Obtained from: DragonflyBSD.git cc440b26818b5dfdd9af504d71c1b0e6522b53ef
Differential Revision: https://reviews.freebsd.org/D6742

8 years agoDon't close fd if it's lower then stderr, otherwise we can close
oshogbo [Mon, 13 Jun 2016 00:03:55 +0000 (00:03 +0000)]
Don't close fd if it's lower then stderr, otherwise we can close
one of the descriptor which we just set.

Pointed out by: jilles
Approved by: re (hrs)

8 years agoAdd ipfilter support to blacklistd-helper
lidl [Sun, 12 Jun 2016 23:34:48 +0000 (23:34 +0000)]
Add ipfilter support to blacklistd-helper

In addition to adding initial support for the ipfilter
packet filtering system, wrap a few long lines, perform
whitespace cleanup and sync with upstream changes made
in NetBSD.

Submitted by: cy
Reviewed by: cy
Approved by: re (hrs)
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6823

8 years agoImplement code to stop all USB endpoints before executing a USB device
hselasky [Sun, 12 Jun 2016 23:26:38 +0000 (23:26 +0000)]
Implement code to stop all USB endpoints before executing a USB device
reset command, alternate setting command or set configuration
command. Else LibUSB v1.0 will not re-open the endpoints which the
kernel closes and the USB application might wait infinitely for
transfers to complete.

Approved by: re (hrs)
MFC after: 3 days

8 years agoFix an issue with multicast hash filters on Amlogic and Allwinner boards.
jmcneill [Sun, 12 Jun 2016 22:55:50 +0000 (22:55 +0000)]
Fix an issue with multicast hash filters on Amlogic and Allwinner boards.

For DWC_GMAC_ALT_DESC implementations, the multicast hash table has only
64 entries. Instead of 8 registers starting at 0x500, a pair of registers
at 0x08 and 0x0c are used instead.

Approved by: re (hrs)
Submitted by: Guy Yur <guyyur@gmail.com>

8 years agoswap_dev_info() does not require Giant, so Giant locking around
kib [Sun, 12 Jun 2016 11:13:38 +0000 (11:13 +0000)]
swap_dev_info() does not require Giant, so Giant locking around
the loop in linprocfs_doswaps() is useless.
List of the registered filesystems is protected by vfsconf_sx,
not by the Giant.  Adjust linprocfs_dofilesystems() correspondingly.

Approved by: re (delphij), des (linprocfs maintainer)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoUpdate 11.0 to ALPHA3 in preparation for new snapshot builds.
gjb [Fri, 10 Jun 2016 19:29:55 +0000 (19:29 +0000)]
Update 11.0 to ALPHA3 in preparation for new snapshot builds.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

8 years agoChange the default build behavior so we don't compile extra TCP modules by
jtl [Fri, 10 Jun 2016 19:06:11 +0000 (19:06 +0000)]
Change the default build behavior so we don't compile extra TCP modules by
default. At least initially, the feature to support multiple TCP stacks is
aimed at supporting advanced use cases and TCP development, but it is not
necessarily aimed at a wide audience. Therefore, there is no need to build
and install the extra TCP stacks by default. Instead, the people who are
using or developing this functionality can add the extra option to build/
install the extra TCP stacks.

However, we do want to build the extra TCP stacks as part of test builds
(e.g. LINT or tinderbox) to ensure that developers who are testing their
changes will know that their changes do not break the additional TCP
stack modules.

After this change, a user will need to add WITH_EXTRA_TCP_STACKS=1 to
make.conf or the kernel config in order to build the extra TCP modules.

Differential Revision: https://reviews.freebsd.org/D6795
Reviewed by: sjg
Approved by: re (kib)

8 years agoDeobfuscate cleanup path in clnt_bck_create(..)
ngie [Fri, 10 Jun 2016 17:53:28 +0000 (17:53 +0000)]
Deobfuscate cleanup path in clnt_bck_create(..)

Similar to r300836, cl and ct will always be non-NULL as they're allocated
using the mem_alloc routines, which always use `malloc(..., M_WAITOK)`.

Deobfuscating the cleanup path fixes a leak where if cl was NULL and
ct was not, ct would not be free'd, and also removes a duplicate test for
cl not being NULL.

Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D6801
MFC after: 1 week
Reported by: Coverity
CID: 1229999
Reviewed by: cem
Sponsored by: EMC / Isilon Storage Division

8 years agoRelnotes entries for blacklist project
lidl [Fri, 10 Jun 2016 15:05:35 +0000 (15:05 +0000)]
Relnotes entries for blacklist project

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

8 years agoFix a miss merge in the services_mkdb(8) man page
allanjude [Fri, 10 Jun 2016 14:59:11 +0000 (14:59 +0000)]
Fix a miss merge in the services_mkdb(8) man page

Restore the cross reference to getservent(3) to the correct line

Approved by: re (gjb)
Sponsored by: BSDCan Hacker Lounge

8 years agoFix bsdinstall for root-on-zfs with MBR partitioning
allanjude [Fri, 10 Jun 2016 14:31:59 +0000 (14:31 +0000)]
Fix bsdinstall for root-on-zfs with MBR partitioning

Fix an error where vfs.root.mountfrom was not always set as required
when creating a bootpool. After the recent geliboot changes, it was only
set if the main pool was encrypted.

Also resolve an error where the bootpool was unmounted twice causing
bsdinstall to stop with an error message about the failed command.

Approved by: re (gjb)
Sponsored by: BSDCan Hacker Lounge

8 years ago- Add myself (tz / Torsten Zuehlsdorff) to ports commiters
tz [Fri, 10 Jun 2016 08:33:15 +0000 (08:33 +0000)]
- Add myself (tz / Torsten Zuehlsdorff) to ports commiters
- Add mentors junovitch, pi, swills

Approved by: re (gjb), junovitch (mentor)

8 years agoCommit the bits of nda that were missed. This should fix the build.
imp [Fri, 10 Jun 2016 06:04:53 +0000 (06:04 +0000)]
Commit the bits of nda that were missed. This should fix the build.

Approved by: re@

8 years agoFix regression from r301461.
pfg [Fri, 10 Jun 2016 05:21:52 +0000 (05:21 +0000)]
Fix regression from r301461.

The fix to the __collate_range_cmp() ABI breakage missed some replacements
in libc's vfscanf().  Replace them with __wcollate_range_cmp() which
does what is expected.

This was breaking applications like xterm and pidgin when using wide
characters.

Reported by: Vitalij Satanivskij
Approved by: re

8 years agoClarify the wording to be more accurate.
cy [Fri, 10 Jun 2016 01:10:48 +0000 (01:10 +0000)]
Clarify the wording to be more accurate.

Approved by: re@ (gjb)
MFC after: 1 week
X-MFC with: r301773

8 years agoUpdate the man ipf.8 man page to accurately reflect that the -6
cy [Fri, 10 Jun 2016 00:06:58 +0000 (00:06 +0000)]
Update the man ipf.8 man page to accurately reflect that the -6
option is a noop and only here for backward compatibility.

MFC after: 1 week

8 years agoNew NVMe front end (nda).
imp [Thu, 9 Jun 2016 22:39:02 +0000 (22:39 +0000)]
New NVMe front end (nda).

8 years agorpcbind(8): Make use of some xdr_* macros.
pfg [Thu, 9 Jun 2016 22:25:00 +0000 (22:25 +0000)]
rpcbind(8): Make use of some xdr_* macros.

xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
versions of FreeBSD but fixed in r296394.  Give them some use
hoping they help make the code somewhat more readable.

8 years agolibc/rpc: Make use of some xdr_* macros. (part 2)
pfg [Thu, 9 Jun 2016 22:18:25 +0000 (22:18 +0000)]
libc/rpc: Make use of some xdr_* macros. (part 2)

xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
versions of FreeBSD but fixed in r296394.  Give them some use
hoping they help make the code somewhat more readable.

8 years agoutimes(2),utime(3): Add deprecation in favour of utimensat(2) and futimens(2).
jilles [Thu, 9 Jun 2016 22:14:58 +0000 (22:14 +0000)]
utimes(2),utime(3): Add deprecation in favour of utimensat(2) and futimens(2).

Setting time by seconds or microseconds may cause unexpected effects
especially if sysctl vfs.timestamp_precision=3 (not default).

Calling the obsolete functions with NULL timestamps is acceptable.

8 years ago[ath] add a placeholder event for debuggin EDMA TX FIFO push events.
adrian [Thu, 9 Jun 2016 22:01:05 +0000 (22:01 +0000)]
[ath] add a placeholder event for debuggin EDMA TX FIFO push events.

Some later code I'll commit pushes lists of frames into the EDMA TX
FIFO, rather than a single frame at a time.  The CABQ code already
pushes frame lists, but it turns out we should actually be doing it
in general or performance tanks. :(

8 years ago[ath] report node queue overflows.
adrian [Thu, 9 Jun 2016 21:59:36 +0000 (21:59 +0000)]
[ath] report node queue overflows.

I need to also update athstats to report this too.

8 years agoinstall: When preserving timestamps, also copy the nanoseconds part.
jilles [Thu, 9 Jun 2016 21:59:35 +0000 (21:59 +0000)]
install: When preserving timestamps, also copy the nanoseconds part.

Now that we have utimensat in -legacy, install(1) can use it.

This is a revert of r299942 which is itself a revert of r299850.

8 years agoFix a vnode leak when giving a child jail a too-long path when
jamie [Thu, 9 Jun 2016 21:59:11 +0000 (21:59 +0000)]
Fix a vnode leak when giving a child jail a too-long path when
debug.disablefullpath=1.

8 years agobuild: Add legacy support for futimens() and utimensat().
jilles [Thu, 9 Jun 2016 21:57:34 +0000 (21:57 +0000)]
build: Add legacy support for futimens() and utimensat().

In order to allow using utimensat() in install(1), add futimens() and
utimensat() to -legacy.

The files futimens.c and utimensat.c are modified copies of the files under
lib/libc/sys/ since the libc versions use symbols that do not exist in the
libc on the build system (sys_futimens and sys_utimensat) . I expect the
next non-sweeping change to both sets of files to be to delete them, anyway.

This will allow reverting r299942 (which is a revert of r299850) enabling
nanosecond timestamps in install(1).

Reviewed by: bdrewery

8 years agourtwn: reinstall group keys on every device startup.
avos [Thu, 9 Jun 2016 21:19:46 +0000 (21:19 +0000)]
urtwn: reinstall group keys on every device startup.

Since key table is cleared on every device shutdown,
static WEP keys (which are set only once) need to be
reinstalled manually every time when device starts running.

Tested with RTL8188EU, STA (all ciphers) / IBSS (WPA-none) modes.

8 years agoFix frexpl() declaration to not include the field name.
trasz [Thu, 9 Jun 2016 20:49:26 +0000 (20:49 +0000)]
Fix frexpl() declaration to not include the field name.

MFC after: 1 month

8 years agoRe-order some jail parameter reading to prevent a vnode leak.
jamie [Thu, 9 Jun 2016 20:43:14 +0000 (20:43 +0000)]
Re-order some jail parameter reading to prevent a vnode leak.

8 years agoUpdate to latest upstream version
des [Thu, 9 Jun 2016 20:40:12 +0000 (20:40 +0000)]
Update to latest upstream version

PR: 209177
Reported by: Vitaly Magerya
MFC after: 1 week

8 years agoClean up some logic in jail error messages, replacing a missing test and
jamie [Thu, 9 Jun 2016 20:39:57 +0000 (20:39 +0000)]
Clean up some logic in jail error messages, replacing a missing test and
a redundant test with a single correct test.

8 years agoDefine tunable instead of using CTLFLAG_RWTUN flag with kern.corefile.
oshogbo [Thu, 9 Jun 2016 20:23:30 +0000 (20:23 +0000)]
Define tunable instead of using CTLFLAG_RWTUN flag with kern.corefile.

The allproc_lock lock used in the sysctl_kern_corefile function is initialized
in the procinit function which is called after setting sysctl values at boot.
That means if we set kern.corefile at boot we will be trying to use
lock with is uninitialized and machine will crash.

If we define kern.corefile as tunable instead of using CTFLAG_RWTUN we will
not call the sysctl_kern_corefile function and we will not use an uninitialized
lock. When machine will boot then we will start using function depending on
the lock.

Reviewed by: pjd

8 years agolibc/rpc: Make use of some xdr_* macros.
pfg [Thu, 9 Jun 2016 19:44:47 +0000 (19:44 +0000)]
libc/rpc: Make use of some xdr_* macros.

xdr_rpcprog and xdr_rpcvers were broken in older versions of FreeBSD
but were fixed in r296394. Give them some use hoping they help make
the code somewhat more readable.

8 years agoFix up r274061
ngie [Thu, 9 Jun 2016 19:12:51 +0000 (19:12 +0000)]
Fix up r274061

Detect /usr/share/dict/words the "right way" by using require.files instead of
the hacked up attempt in the dict(..) function, which didn't work properly on
systems where MK_DICT == no.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate `goodResult` after recent changes made to the PRNG in libc
ngie [Thu, 9 Jun 2016 18:35:37 +0000 (18:35 +0000)]
Update `goodResult` after recent changes made to the PRNG in libc

The PRNG was changed in r300953/r300956, and subsequently, the numbers
generated have changed. This is expected ABI breakage per ache

X-MFC with: r300953, r300956
Tested with: amd64, i386
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd DDB command "kldstat"
cem [Thu, 9 Jun 2016 18:27:41 +0000 (18:27 +0000)]
Add DDB command "kldstat"

It prints much the same information as kldstat(8) without any arguments.

Suggested by: jhibbits
Sponsored by: EMC / Isilon Storage Division

8 years agokvprintf: Pad %*c to width, like %*s
cem [Thu, 9 Jun 2016 18:24:51 +0000 (18:24 +0000)]
kvprintf: Pad %*c to width, like %*s

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd debug output to aid in determining why `goodResult` != `result`
ngie [Thu, 9 Jun 2016 18:11:42 +0000 (18:11 +0000)]
Add debug output to aid in determining why `goodResult` != `result`

MFC after: 1 week
PR: 210619 (for diagnosis)
Sponsored by: EMC / Isilon Storage Division

8 years agourtwn(4): refresh manpage.
avos [Thu, 9 Jun 2016 17:26:54 +0000 (17:26 +0000)]
urtwn(4): refresh manpage.

Mention URTWN_WITHOUT_UCODE option (r295871), hardware encryption support
(r292175), IBSS (r290651) and HOSTAP (r290631) mode support;
cleanup CAVEATS section (some 11n support was added in r297175 + add a
note about current rate control issues).

8 years agoAdd PCDuino3b dts. It uses the pcduino3 dts from upstream and adds the hdmi node...
manu [Thu, 9 Jun 2016 17:10:19 +0000 (17:10 +0000)]
Add PCDuino3b dts. It uses the pcduino3 dts from upstream and adds the hdmi node, axp gpio and changes the phy mode to rgmii.

Approved by: andrew (mentor)
Differential Revision: https://reviews.freebsd.org/D6775

8 years agoUse -L to specify compat32 library paths instead of -Y
emaste [Thu, 9 Jun 2016 17:03:03 +0000 (17:03 +0000)]
Use -L to specify compat32 library paths instead of -Y

-Y is an uncommon linker option that is rather similar to -L.  In
discussion with Peter it seems early amd64 development might have
required the -Y-specific behaviour, but it is no longer necessary.

Switch to -L which is more widely supported and much more commonly
used, to make it easier to link the FreeBSD base system with linkers
other than ld.bfd.

Submitted by: Rafael Ávila de Espíndola
Differential Revision: https://reviews.freebsd.org/D6681

8 years agoMake sure the OSD methods for jail set and remove can't run concurrently,
jamie [Thu, 9 Jun 2016 16:41:41 +0000 (16:41 +0000)]
Make sure the OSD methods for jail set and remove can't run concurrently,
by holding allprison_lock exclusively (even if only for a moment before
downgrading) on all paths that call PR_METHOD_REMOVE.  Since they may run
on a downgraded lock, it's still possible for them to run concurrently
with PR_METHOD_GET, which will need to use the prison lock.

8 years agoxen/timer: re-introduce the inittodr call in the resume path
royger [Thu, 9 Jun 2016 16:15:01 +0000 (16:15 +0000)]
xen/timer: re-introduce the inittodr call in the resume path

r298930 removed the inittodr call, but it seems like this prevents
"calcru: runtime went backwards ..." messages from occasionally appearing
when resuming from migration.

Reported by: Karl Pielorz <kpielorz@tdx.co.uk>
Sponsored by: Citrix Systems R&D

8 years agoAdd place holder for SDIO CAM stuff for CCB XPT type.
imp [Thu, 9 Jun 2016 16:05:56 +0000 (16:05 +0000)]
Add place holder for SDIO CAM stuff for CCB XPT type.

Sponsored by: Netflix

8 years agoAdd NVME IO type.
imp [Thu, 9 Jun 2016 16:05:49 +0000 (16:05 +0000)]
Add NVME IO type.

8 years agoImprove debugging of xpt.
imp [Thu, 9 Jun 2016 16:05:40 +0000 (16:05 +0000)]
Improve debugging of xpt.

Sponsored by: Netflix

8 years agoRemove a comment that was part of copied code, and is misleading in
jamie [Thu, 9 Jun 2016 15:34:33 +0000 (15:34 +0000)]
Remove a comment that was part of copied code, and is misleading in
the new location.

8 years agoAdd IPFW support to blacklistd-helper
lidl [Thu, 9 Jun 2016 15:19:48 +0000 (15:19 +0000)]
Add IPFW support to blacklistd-helper

Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6753

8 years agoRevert previous commit, until issue with sparc64 resolved.
sjg [Thu, 9 Jun 2016 14:44:05 +0000 (14:44 +0000)]
Revert previous commit, until issue with sparc64 resolved.

Approved by: so (implicit)

8 years agoFix the rpcb_getaddr() definition to match its declaration.
kevlo [Thu, 9 Jun 2016 14:33:00 +0000 (14:33 +0000)]
Fix the rpcb_getaddr() definition to match its declaration.

Submitted by: Sebastian Huber <sebastian dot huber at embedded-brains dot de>

8 years agorum(4): refresh manpage.
avos [Thu, 9 Jun 2016 14:18:12 +0000 (14:18 +0000)]
rum(4): refresh manpage.

Add a note about hardware encryption support (r288633),
adhoc-demo mode (r288622) and remove BUGS section (fixed in r288632).

8 years agoSwitch from console="comconsole" to boot_multicons="YES" in EC2.
cperciva [Thu, 9 Jun 2016 13:58:31 +0000 (13:58 +0000)]
Switch from console="comconsole" to boot_multicons="YES" in EC2.

Amazon recently introduced an API for capturing screenshots of an
emulated VGA device; this commit makes that (somewhat) useful.

MFC after: 3 weeks

8 years agonet80211: discard an injected frame if it is smaller than header length.
avos [Thu, 9 Jun 2016 13:42:18 +0000 (13:42 +0000)]
net80211: discard an injected frame if it is smaller than header length.

Do not try to pass such frames; a correct frame cannot be smaller than
(the corresponding) header size.
(for wpi(4) an additional check was added in r289012).

PR: 144987

8 years agoDocument 292432, OpenBSM updated to version 1.2 alpha 4.
skreuzer [Thu, 9 Jun 2016 13:36:31 +0000 (13:36 +0000)]
Document 292432, OpenBSM updated to version 1.2 alpha 4.

Approved by: re (gjb, implicit, relnotes)

8 years agoDocument 300879, acpica updated to version 20160527
skreuzer [Thu, 9 Jun 2016 13:33:13 +0000 (13:33 +0000)]
Document 300879, acpica updated to version 20160527

Approved by: re (gjb, implicit, relnotes)

8 years agoDocument 291125, xz updated to version 5.2.2
skreuzer [Thu, 9 Jun 2016 13:23:13 +0000 (13:23 +0000)]
Document 291125, xz updated to version 5.2.2

Approved by: re (gjb, implicit, relnotes)

8 years agoFix some cosmetic issues in kern_fail.c omitted from r296927.
markj [Thu, 9 Jun 2016 13:17:08 +0000 (13:17 +0000)]
Fix some cosmetic issues in kern_fail.c omitted from r296927.

Obtained from: Matthew Bryan <matthew.bryan@isilon.com>

8 years agoConsistently use 'unsigned int' for session IDs.
trasz [Thu, 9 Jun 2016 13:04:57 +0000 (13:04 +0000)]
Consistently use 'unsigned int' for session IDs.

MFC after: 1 month

8 years agosfxge(4): bump version to the closest out-of-tree driver version
arybchik [Thu, 9 Jun 2016 12:33:53 +0000 (12:33 +0000)]
sfxge(4): bump version to the closest out-of-tree driver version

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): handle negative ticks difference correctly
arybchik [Thu, 9 Jun 2016 12:29:03 +0000 (12:29 +0000)]
sfxge(4): handle negative ticks difference correctly

ticks are signed int and if statistics is not updated for a long time
(more than INT_MAX ticks, but less than UINT_MAX) difference becomes
negative and less than hz for a long time.

Other option to repeat is simply load driver (which initializes
timestamps to 0) when ticks are negative.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6777

8 years agoAdd some spares to structs used by iscsi(4), to avoid ABI problems
trasz [Thu, 9 Jun 2016 11:39:50 +0000 (11:39 +0000)]
Add some spares to structs used by iscsi(4), to avoid ABI problems
during 11-STABLE.

MFC after: 1 month

8 years agonet80211: fix duplicate packet counter incrementation.
avos [Thu, 9 Jun 2016 08:19:42 +0000 (08:19 +0000)]
net80211: fix duplicate packet counter incrementation.

Remove 'if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);' from raw xmit
and apbridge path; it will be incremented by ieee80211_tx_complete()
after packet transmission.

Noticed by: Imre Vadasz <imre@vdsz.com>

8 years agoDecouple MaxBurstLength and FirstBurstLength from MaxRecvDataSegmentLength
trasz [Thu, 9 Jun 2016 07:49:20 +0000 (07:49 +0000)]
Decouple MaxBurstLength and FirstBurstLength from MaxRecvDataSegmentLength
reported by the ICL module in iscsid(8).  This harmed performance and was
just wrong.

MFC after: 1 month

8 years agoDon't cap FirstBurstLength to maximum MaxRecvDataSegmentLength claimed
trasz [Thu, 9 Jun 2016 07:19:02 +0000 (07:19 +0000)]
Don't cap FirstBurstLength to maximum MaxRecvDataSegmentLength claimed
by the offload driver; there is no reason to do so, and it actually
harms performance.

MFC after: 1 month

8 years agoFix a bunch of "xref refers to *this* page" igor(1) warnings.
trasz [Thu, 9 Jun 2016 06:55:00 +0000 (06:55 +0000)]
Fix a bunch of "xref refers to *this* page" igor(1) warnings.

MFC after: 1 month

8 years agoUpdate jemalloc to 4.2.1.
jasone [Thu, 9 Jun 2016 06:10:20 +0000 (06:10 +0000)]
Update jemalloc to 4.2.1.

8 years agoCleanup unneded include "opt_ipfw.h".
ae [Thu, 9 Jun 2016 05:48:34 +0000 (05:48 +0000)]
Cleanup unneded include "opt_ipfw.h".

It was used for conditional build IPFIREWALL_FORWARD support.
But IPFIREWALL_FORWARD option was removed a long time ago.

8 years agoAdd 'env - PATH=$$PATH' to bsdec2-image-upload make command, in order to
cperciva [Thu, 9 Jun 2016 03:54:25 +0000 (03:54 +0000)]
Add 'env - PATH=$$PATH' to bsdec2-image-upload make command, in order to
avoid environment pollution problems.  That port uses <bsd.prog.mk> but
is not compatible with the latest mk bits in HEAD.

Reported by: gjb
No rush, but make sure it's in the tree before tomorrow by: gjb

8 years agoAdd support for truss'ing Linux/x86_64 binaries under amd64.
jhb [Thu, 9 Jun 2016 02:21:07 +0000 (02:21 +0000)]
Add support for truss'ing Linux/x86_64 binaries under amd64.

Prodding by: xmj

8 years agoPrint a message when the efi disk isn't a logical partition.
manu [Thu, 9 Jun 2016 02:02:50 +0000 (02:02 +0000)]
Print a message when the efi disk isn't a logical partition.

Approved by: andrew (mentor)
Differential Revision: https://reviews.freebsd.org/D6782

8 years agoAdd a prototype for random_harvest_queue to dev/random/random_harvestq.h
sjg [Thu, 9 Jun 2016 01:50:43 +0000 (01:50 +0000)]
Add a prototype for random_harvest_queue to dev/random/random_harvestq.h
This fixes a warning that occurs in a number of files that use the
random_harvest_queue function.

Differential Revision: https://reviews.freebsd.org/D4229
Submitted by: stevek@juniper.net
Reviewed by: markm
Approved by: so

8 years agoioat(4): Add ddb "show ioat <unit>" debugger command
cem [Thu, 9 Jun 2016 01:31:09 +0000 (01:31 +0000)]
ioat(4): Add ddb "show ioat <unit>" debugger command

Sponsored by: EMC / Isilon Storage Division

8 years agoImplement an NSS backend for netgroups and add getnetgrent_r(3).
markj [Thu, 9 Jun 2016 01:28:44 +0000 (01:28 +0000)]
Implement an NSS backend for netgroups and add getnetgrent_r(3).

This support appears to have been documented in nsswitch.conf(5) for some
time. The implementation adds two NSS netgroup providers to libc. The
default, compat, provides the behaviour documented in netgroup(5), so this
change does not make any user-visible behaviour changes. A files provider
is also implemented.

innetgr(3) is implemented as an optional NSS method so that providers such
as NIS which are able to implement efficient reverse lookup can do so.
A fallback implementation is used otherwise. getnetgrent_r(3) is added for
convenience and to provide compatibility with glibc and Solaris.

With a small patch to net/nss_ldap, it's possible to specify an ldap
netgroup provider, allowing one to query nisNetgroupTriple entries.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix an infinite loop in setnetgrent(3) with NIS netgroups.
markj [Thu, 9 Jun 2016 01:11:48 +0000 (01:11 +0000)]
Fix an infinite loop in setnetgrent(3) with NIS netgroups.

Handle an empty result from yp_match() by returning NULL, which is
consistent with the handling of an empty netgroup in /etc/netgroup.
setnetgrent(3) has no return value, so there is no particular need to
distinguish this case from an error.

PR: 26486
MFC after: 2 weeks

8 years agoUse a more common spelling for "(char *)0" in the getnetgrent man page.
markj [Thu, 9 Jun 2016 01:05:23 +0000 (01:05 +0000)]
Use a more common spelling for "(char *)0" in the getnetgrent man page.

MFC after: 3 days

8 years agoRevert r301707
ngie [Wed, 8 Jun 2016 23:30:13 +0000 (23:30 +0000)]
Revert r301707

getnetent_p doesn't return NULL like getnetent does. coccinelle got confused and
I didn't verify that it worked before committing the change

MFC after: 1 week
X-MFC with: r301707
Pointyhat to: ngie

8 years agoUse NULL instead of `0` in _ht_getnetbyname(..)
ngie [Wed, 8 Jun 2016 23:23:19 +0000 (23:23 +0000)]
Use NULL instead of `0` in _ht_getnetbyname(..)

- getnetent returns NULL on completion/error.
- .h_aliases is NULL terminated.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAlso set -fshort-wchar on arm64, this fixes parsing strings from UEFI,
andrew [Wed, 8 Jun 2016 23:23:16 +0000 (23:23 +0000)]
Also set -fshort-wchar on arm64, this fixes parsing strings from UEFI,
e.g. on the command line.

Sponsored by: ABT Systems Ltd

8 years agoThe code responsible for opening and rotating pcap files is independent
oshogbo [Wed, 8 Jun 2016 23:22:59 +0000 (23:22 +0000)]
The code responsible for opening and rotating pcap files is independent
of Capser and should use openat(2) unconditionally on FreeBSD.
openat(2) is mandatory when sandboxed with Capsicum, but still works
in the absence of Capsicum.

Reviewed by: AllanJude

8 years agoTest for strchr(3) returning NULL, not 0
ngie [Wed, 8 Jun 2016 23:17:30 +0000 (23:17 +0000)]
Test for strchr(3) returning NULL, not 0

MFC after: 3 days
Reported by: coccinelle
Sponsored by: EMC / Isilon Storage Division

8 years agoPrint the newline character along with the carriage return when TERM_EMU is
andrew [Wed, 8 Jun 2016 23:13:20 +0000 (23:13 +0000)]
Print the newline character along with the carriage return when TERM_EMU is
disabled. Without this we print all lines over top of each other.

Sponsored by: ABT Systems Ltd

8 years agoAllow libefi to be built with TERM_EMU undefined. There were a few places
andrew [Wed, 8 Jun 2016 22:36:55 +0000 (22:36 +0000)]
Allow libefi to be built with TERM_EMU undefined. There were a few places
where we assumed TERM_EMU was defined but didn't check. Fix these by also
including them under the ifdefs.

As HO is called from loader we need a null implementation so loader.efi
doesn't need to know which version of libefi it is building against.

Sponsored by: ABT Systems Ltd

8 years agoFix spelling of the casper introduced in the r296047.
oshogbo [Wed, 8 Jun 2016 22:30:21 +0000 (22:30 +0000)]
Fix spelling of the casper introduced in the r296047.

PR: 210031
Reported by: AllanJude, jmallett

8 years agoRemove the ARMv4/ARMv5 userland atomic support from struct proc on armv6.
andrew [Wed, 8 Jun 2016 22:29:30 +0000 (22:29 +0000)]
Remove the ARMv4/ARMv5 userland atomic support from struct proc on armv6.
Nothing should use this on armv6 as we use the atomic instructions added in
ARMv6k.

Sponsored by: ABT Systems Ltd

8 years agobhnd(4): Fix mips/broadcom core matching and bus pass order.
landonf [Wed, 8 Jun 2016 21:38:51 +0000 (21:38 +0000)]
bhnd(4): Fix mips/broadcom core matching and bus pass order.

Changes:

- Fixed incorrect MIPS74k vendor ID in the bhnd core descriptor tables
- Fixed MIPS core driver's matching against MIPS/MIPS33 cores.
- Improved MIPS3302 core description.
- Enabled BUS_PASS_BUS on the bhnd nexus drivers to allow early probing
  of the MIPS core.
- Enabled BUS_PASS_CPU on the MIPS core driver to ensure correct attach
  order.
- Disabled matching of the MIPS core driver on non-SoC devices.

Reviewed by: Michael Zhilin <mizhka@gmail.com>
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6735

8 years agobhnd(4): Add a vendor parameter to BHND_DEVICE(), replacing vendor-specific
landonf [Wed, 8 Jun 2016 21:31:33 +0000 (21:31 +0000)]
bhnd(4): Add a vendor parameter to BHND_DEVICE(), replacing vendor-specific
BHND_*_DEVICE macros.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6736

8 years agoDon't let ATF call basename() and dirname() in a non-standard way.
ed [Wed, 8 Jun 2016 20:54:56 +0000 (20:54 +0000)]
Don't let ATF call basename() and dirname() in a non-standard way.

POSIX basename() and dirname() are allowed to overwrite the input
buffer. The advantage of implementing it that way is that the functions
can be thread-safe, as they don't store the result in a global buffer.

It looks like ATF wants to call basename() and dirname() in the
non-standard way where the argument is of type "const char *". This
change disables the calls to basename() and dirname(), which only seems
to affect the formatting of some rare debug/error messages.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D6627

8 years agobsdinstall: add country/regulatory domain configuration dialog.
avos [Wed, 8 Jun 2016 20:42:35 +0000 (20:42 +0000)]
bsdinstall: add country/regulatory domain configuration dialog.

Allow to setup country and/or regulatory domain before scanning
(since channel list is affected by regulatory restrictions this may
impact scan results).

PR: 182600 (originally)
Differential Revision: https://reviews.freebsd.org/D6325

8 years agoMulticast filters on DWC_GMAC_ALT_DESC type implementations use a different
jmcneill [Wed, 8 Jun 2016 20:22:25 +0000 (20:22 +0000)]
Multicast filters on DWC_GMAC_ALT_DESC type implementations use a different
hash register setup. In addition, strip trailing FCS in receive path.

Reviewed by: loos
Differential Revision: https://reviews.freebsd.org/D6653

8 years agobwn, bwn_pci, siba_bwn: add missing opt_*.h dependencies.
avos [Wed, 8 Jun 2016 20:01:10 +0000 (20:01 +0000)]
bwn, bwn_pci, siba_bwn: add missing opt_*.h dependencies.

8 years agoRevert r301689 - one-true-awk: Avoid a NULL dereference.
pfg [Wed, 8 Jun 2016 19:39:44 +0000 (19:39 +0000)]
Revert r301689 - one-true-awk: Avoid a NULL dereference.

I got this wrong and the coverity report doesn't match the NetBSD change,
which was thought for a different version.

The change wouldn't hurt but let's wait until upstream figures this out.