Commit Graph

213466 Commits

Author SHA1 Message Date
Alan Somers
9be960da8d Fix usr.sbin/extattr testcases on tmpfs
Skip the usr.sbin/extattr testscases if $TMPDIR is tmpfs, which doesn't
support extended attributes

PR:		210184
Reported by:	ngie
Reviewed by:	ngie
Approved by:	re (glebius)
MFC after:	4 weeks
Differential Revision:	https://reviews.freebsd.org/D6802
Sponsored by:	Spectra Logic Corp
2016-06-13 22:00:44 +00:00
Andriy Gapon
55be2f79e5 l2arc: reset b_tmp_cdata to NULL in the case of unset b_daddr
The change is in arc_buf_l2_cdata_free().
Without this we can trip the assertion in arc_hdr_realloc()
if INVARIANTS option is enabled.

Approved by:	re (kib)
MFC after:	1 week
2016-06-13 18:39:13 +00:00
Ian Lepore
e2a03c1fe5 Do not define __NO_STRICT_ALIGNMENT for armv6. While the requirements
are no longer natural-alignment strict, there are still some restrictions.

FreeBSD network code assumes data is naturally-aligned or is running
on a platform with no restrictions; pointers are not annotated to
indicate the data pointed to may be packed or unaligned.  The clang
optimizer can sometimes combine the load or store of a pair of adjacent
32-bit values into a single doubleword load/store, and that operation
requires at least 4-byte alignment.  __NO_STRICT_ALIGNMENT can lead
to tcp headers being only 2-byte aligned.

Note that alignment faults remain disabled on armv6, this change reverts
only the defining of the symbol which leads to some overly-agressive code
shortcuts when building common/shared drivers and network code for arm.

Approved by:	re(kib)
2016-06-13 16:48:27 +00:00
Enji Cooper
47c5f8f2fe 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: 1008161, 1304956
Sponsored by: EMC / Isilon Storage Division
2016-06-13 11:19:06 +00:00
Andriy Gapon
aa14503e8e 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
2016-06-13 10:53:34 +00:00
Enji Cooper
0433f59514 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)
2016-06-13 10:35:11 +00:00
Enji Cooper
2c212dcc1e 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)
2016-06-13 10:30:49 +00:00
Robert Watson
2aa8c03917 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
2016-06-13 09:22:20 +00:00
Konstantin Belousov
b9c8a54dc3 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)
2016-06-13 03:45:08 +00:00
Konstantin Belousov
eb4d6a1b3b 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)
2016-06-13 03:42:46 +00:00
Konstantin Belousov
1571927369 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)
2016-06-13 03:39:16 +00:00
Adrian Chadd
ff4ef6bf5e [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@
2016-06-13 03:17:00 +00:00
Hans Petter Selasky
f357b4f65d Fix compile warning.
Approved by:	re (delphij)
MFC after:	1 week
2016-06-13 01:33:02 +00:00
Adrian Chadd
5799c2bce7 [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
2016-06-13 00:13:20 +00:00
Mariusz Zaborski
59cf368df4 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)
2016-06-13 00:03:55 +00:00
Kurt Lidl
74bc093c1c 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
2016-06-12 23:34:48 +00:00
Hans Petter Selasky
90988efdc5 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
2016-06-12 23:26:38 +00:00
Jared McNeill
eeec1f9fbf 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>
2016-06-12 22:55:50 +00:00
Konstantin Belousov
eb00e5b783 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
2016-06-12 11:13:38 +00:00
Glen Barber
f6596b97a8 Update 11.0 to ALPHA3 in preparation for new snapshot builds.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-06-10 19:29:55 +00:00
Jonathan T. Looney
ad8874fd21 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)
2016-06-10 19:06:11 +00:00
Enji Cooper
ea85a1540a 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
2016-06-10 17:53:28 +00:00
Kurt Lidl
340acf4d09 Relnotes entries for blacklist project
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2016-06-10 15:05:35 +00:00
Allan Jude
213a73b338 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
2016-06-10 14:59:11 +00:00
Allan Jude
52fffe9307 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
2016-06-10 14:31:59 +00:00
Torsten Zuehlsdorff
ef80036fc9 - Add myself (tz / Torsten Zuehlsdorff) to ports commiters
- Add mentors junovitch, pi, swills

Approved by:	re (gjb), junovitch (mentor)
2016-06-10 08:33:15 +00:00
Warner Losh
f24c011beb Commit the bits of nda that were missed. This should fix the build.
Approved by: re@
2016-06-10 06:04:53 +00:00
Pedro F. Giffuni
b2f8f05c89 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
2016-06-10 05:21:52 +00:00
Cy Schubert
ca94cc3b74 Clarify the wording to be more accurate.
Approved by:	re@ (gjb)
MFC after:	1 week
X-MFC with:	r301773
2016-06-10 01:10:48 +00:00
Cy Schubert
dbef02b209 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
2016-06-10 00:06:58 +00:00
Warner Losh
baabaca31b New NVMe front end (nda). 2016-06-09 22:39:02 +00:00
Pedro F. Giffuni
c7310cbc6a 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.
2016-06-09 22:25:00 +00:00
Pedro F. Giffuni
478eb9e9ca 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.
2016-06-09 22:18:25 +00:00
Jilles Tjoelker
f4aa4c78c7 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.
2016-06-09 22:14:58 +00:00
Adrian Chadd
ef347e56a2 [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. :(
2016-06-09 22:01:05 +00:00
Adrian Chadd
729ecfbb8e [ath] report node queue overflows.
I need to also update athstats to report this too.
2016-06-09 21:59:36 +00:00
Jilles Tjoelker
649a3a5626 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.
2016-06-09 21:59:35 +00:00
Jamie Gritton
932a6e432d Fix a vnode leak when giving a child jail a too-long path when
debug.disablefullpath=1.
2016-06-09 21:59:11 +00:00
Jilles Tjoelker
d80f1dd1d7 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
2016-06-09 21:57:34 +00:00
Andriy Voskoboinyk
ad02cb0399 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.
2016-06-09 21:19:46 +00:00
Edward Tomasz Napierala
b8f41779a2 Fix frexpl() declaration to not include the field name.
MFC after:	1 month
2016-06-09 20:49:26 +00:00
Jamie Gritton
cf0313c679 Re-order some jail parameter reading to prevent a vnode leak. 2016-06-09 20:43:14 +00:00
Dag-Erling Smørgrav
3f68b24e10 Update to latest upstream version
PR:		209177
Reported by:	Vitaly Magerya
MFC after:	1 week
2016-06-09 20:40:12 +00:00
Jamie Gritton
176ff3a066 Clean up some logic in jail error messages, replacing a missing test and
a redundant test with a single correct test.
2016-06-09 20:39:57 +00:00
Mariusz Zaborski
fb4cdc96a8 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
2016-06-09 20:23:30 +00:00
Dag-Erling Smørgrav
43830b3b61 upstream hg 0289cde234a0 2016-06-09 20:02:31 +00:00
Pedro F. Giffuni
ea21823d9f 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.
2016-06-09 19:44:47 +00:00
Enji Cooper
86c9d9918f 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
2016-06-09 19:12:51 +00:00
Enji Cooper
d44d3fbae9 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
2016-06-09 18:35:37 +00:00
Conrad Meyer
8a3aeac27b 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
2016-06-09 18:27:41 +00:00