Commit Graph

211484 Commits

Author SHA1 Message Date
Jilles Tjoelker
1f9b8f8e0d install: Add some tests. 2016-05-08 21:11:24 +00:00
Rick Macklem
90ce51106e Make "-S" a default option for mountd.
After a discussion on freebsd-fs@ there seemed to be a consensus that
the "-S" option for mountd should become the default.
Since the only known issue w.r.t. using "-S" was fixed by r299201,
this commit adds "-S" to the default mountd_flags.

Discussed on:	freebsd-fs
PR:		9619, 131342, 206855
MFC after:	2 weeks
Relnotes:	yes
2016-05-08 20:10:22 +00:00
Adrian Chadd
e83ce34035 [bhnd] Initial bhnd(4) SPROM/NVRAM support.
This adds support for the NVRAM handling and the basic SPROM
hardware used on siba(4) and bcma(4) devices, including:

* SPROM directly attached to the PCI core, accessible via PCI configuration
  space.
* SPROM attached to later ChipCommon cores.
* SPROM variables vended from the parent SoC bus (e.g. via a directly-attached
  flash device).

Additional improvements to the NVRAM/SPROM interface will
be required, but this changeset stands alone as working
checkpoint.

Submitted by:	Landon Fuller <landonf@landonf.org>
Reviewed by:	Michael Zhilin <mizkha@gmail.com> (Broadcom MIPS support)
Differential Revision:	https://reviews.freebsd.org/D6196
2016-05-08 19:14:05 +00:00
Adrian Chadd
f74f1a68d5 [bhnd] Add support for matching on chip identifiers.
This is used by the upcoming SPROM code to match on chipsets
that require special handling of muxed SPROM pins.

Submitted by:	Landon Fuller <landonf@landonf.org>
Differential Revision:	https://reviews.freebsd.org/D6195
2016-05-08 18:30:08 +00:00
Adrian Chadd
a73ac06d93 [bhnd] Add bhnd_resource support for the bus_(read|write)(_multi_)stream_* functions.
This adds additional bhnd_resource shims used by the upcoming SPROM deltas.

Submitted by:	Landon Fuller <landonf@landonf.org>
Differential Revision:	https://reviews.freebsd.org/D6194
2016-05-08 18:20:01 +00:00
Xin LI
53021c7e30 MFV r299237: apply two upstream revisions to address upstream bug PR/540.
PR:		209211
MFC after:	2 weeks
X-MFC:		if there is no new file release
2016-05-08 18:18:35 +00:00
Xin LI
d86e76fccb Apply upstream changes:
3ca1d7b07cf7b7c7433e8dabbcbc566c64c6e07f Don't make exceeding magic
offsets an error; just fail this magic entry test. Consider truncated
files...

20c59ad54afc7427ea680f84c8ee5a576ba54b08: Downgrade DER comparison
and offset lookup failures to be handled as match failures.

Upstream bug: http://bugs.gw.com/view.php?id=540
2016-05-08 18:15:58 +00:00
Adrian Chadd
d935257080 [bhnd] Replace is_hostb_device() with a more general find_hostb_device()
This allows bus children to query for the host bridge device, rather
than having to iterate over all attached devices.

Submitted by:	Landon Fuller <landonf@landonf.org>
Differential Revision:	https://reviews.freebsd.org/D6193
2016-05-08 17:52:12 +00:00
Xin LI
7206c4fc60 MFV r299233: Apply upstream fix 11edb37a71851b5bcbd4e51ca6ad3dcbf57e9761:
Revert: Don't close stdin...

This have been observed by portupgrade in its interaction with file(1),
as reported as a regression in bin/209211.

PR:		209211
MFC after:	3 days
2016-05-08 09:30:36 +00:00
Xin LI
464d64c863 Apply upstream fix 11edb37a71851b5bcbd4e51ca6ad3dcbf57e9761:
Revert: Don't close stdin...
2016-05-08 09:27:29 +00:00
Svatopluk Kraus
f7f2b2fbe3 INTRNG - update gpio pin capabilities according to r299198. 2016-05-08 09:01:30 +00:00
Svatopluk Kraus
aa0d25b7a1 INTRNG - update gpio pin capabilities according to r299166.
Note that the updated comment is valid only for INTRNG. This should not
be a problem as not INTRNG code is left in place for debugging reasons
only and should not be used anymore. It's anticipated that this old
code will be removed soon.
2016-05-08 08:57:50 +00:00
Mateusz Guzik
0cfe1a1fec fd: assert dropped filedesc lock in fdcloseexec 2016-05-08 03:26:12 +00:00
Rick Macklem
de2413b95e Don't increment srvrpccnt[] for the NFSv4.1 operations.
When support for NFSv4.1 was added to the NFS server, it broke
the server rpc count stats, since newnfsstats.srvrpccnt[] doesn't
have entries for the new NFSv4.1 operations.
Without this patch, the code was incrementing bogus entries in
newnfsstats for the new NFSv4.1 operations.
This patch is an interim fix. The nfsstats structure needs to be
updated and that will come in a future commit.

Reported by:	cem
MFC after:	2 weeks
2016-05-07 22:45:08 +00:00
Baptiste Daroussin
dbc0cf500d Only one program is build in usr.bin/sdiff use the right include 2016-05-07 20:23:26 +00:00
Baptiste Daroussin
1ddda798a6 Revert r299218 VISUAL is actually a perfecly valid env to specify an editor 2016-05-07 18:58:07 +00:00
Baptiste Daroussin
041db57684 Only use EDITOR as a variable to specify which text editor to use 2016-05-07 18:48:48 +00:00
Baptiste Daroussin
15eaa1aea0 Directly call the editor if needed instead of spawning /bin/sh 2016-05-07 18:44:30 +00:00
Baptiste Daroussin
0c4ac56e16 Replace fparseln(3) with getline(3)
It removes a dependency on libutil.
2016-05-07 18:21:58 +00:00
Mark Johnston
20b5f02214 Clean up callers of nd6_prelist_add().
nd6_prelist_add() sets *newp if and only if it is successful, so there's no
need for code that handles the case where the return value is 0 and
*newp == NULL. Fix some style bugs in nd6_prelist_add() while here.

MFC after:	1 week
2016-05-07 03:41:29 +00:00
Mark Johnston
83631b16a7 Remove two useless local variables from prelist_update().
MFC after:	1 week
2016-05-07 03:32:29 +00:00
Pedro F. Giffuni
b6f5aa5715 sed: rewrite the main loop.
Rewrite the main loop of the "sed s/..." command, shortening it by ten
lines and simplifying it by removing the switch statement implementing
/g, /1, and /2 separately and repetitively.

This will be needed to bring a fix from OpenBSD later.

Obtained from:	OpenBSD (schwarze CVS Rev. 1.18)
MFC after:	3 weeks
2016-05-07 01:44:22 +00:00
John Baldwin
dc9643853d Use DDP to implement zerocopy TCP receive with aio_read().
Chelsio's TCP offload engine supports direct DMA of received TCP payload
into wired user buffers.  This feature is known as Direct-Data Placement.
However, to scale well the adapter needs to prepare buffers for DDP
before data arrives.  aio_read() is more amenable to this requirement than
read() as applications often call read() only after data is available in
the socket buffer.

When DDP is enabled, TOE sockets use the recently added pru_aio_queue
protocol hook to claim aio_read(2) requests instead of letting them use
the default AIO socket logic.  The DDP feature supports scheduling DMA
to two buffers at a time so that the second buffer is ready for use
after the first buffer is filled.  The aio/DDP code optimizes the case
of an application ping-ponging between two buffers (similar to the
zero-copy bpf(4) code) by keeping the two most recently used AIO buffers
wired.  If a buffer is reused, the aio/DDP code is able to reuse the
vm_page_t array as well as page pod mappings (a kind of MMU mapping the
Chelsio NIC uses to describe user buffers).  The generation of the
vmspace of the calling process is used in conjunction with the user
buffer's address and length to determine if a user buffer matches a
previously used buffer.  If an application queues a buffer for AIO that
does not match a previously used buffer then the least recently used
buffer is unwired before the new buffer is wired.  This ensures that no
more than two user buffers per socket are ever wired.

Note that this feature is best suited to applications sending a steady
stream of data vs short bursts of traffic.

Discussed with:	np
Relnotes:	yes
Sponsored by:	Chelsio Communications
2016-05-07 00:33:35 +00:00
John Baldwin
826c2372c5 Set the correct vnet in TOE event handlers.
Differential Revision:	https://reviews.freebsd.org/D6152
2016-05-06 23:49:10 +00:00
John Baldwin
1963070cd3 Restore name=value format of PCI location strings.
When devctl was added, the location string for PCI devices was changed to
use the PCI "selector" that pciconf and devctl accept.  However, devd
assumes that location strings are formatted as a list of name=value pairs.
As a result, devd is no longer parsing any of the values out of PCI
device events.  Restore the previous format of the PCI location strings
to restore the location and slot keywords in case any devd scripts are
using this.  Add the "selector" as a new 'dbsf' location variable.

Reviewed by:	imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D6253
2016-05-06 23:46:35 +00:00
Pedro F. Giffuni
ee58b56452 nfsserver: minor spelling fix in comment.
No functional change.
2016-05-06 23:40:37 +00:00
Pedro F. Giffuni
1762773d79 sys/opencrypto: minor spelling fixes.
No functional change.

Reviewed by:	jmg
2016-05-06 23:37:19 +00:00
Rick Macklem
8eabbbe24b Give mountd -S priority over outstanding RPC requests when suspending the nfsd.
It was reported via email that under certain heavy RPC loads
long delays before the exports would be updated was observed
when using "mountd -S". This patch reverses the priority between
the exclusive lock request to suspend the nfsd threads and the
shared lock request for performing RPCs.
As such, when mountd attempts to suspend the nfsd threads, it
gets priority over outstanding RPC requests to do this.
I suspect that the case reported was an artificial test load,
but this patch did fix the problem for the reporter.

Reported and Tested by:	josephlai@qnap.com
MFC after:	2 weeks
2016-05-06 23:26:17 +00:00
Pedro F. Giffuni
363089d89e dev/e1000,ixgbe: minor spelling fixes.
No functional change.

Differential Revision:	https://reviews.freebsd.org/D6177
2016-05-06 22:54:56 +00:00
Ed Maste
8edac6eee6 Add nid_namelen bounds check to nfssvc system call
This is only allowed by root and only used by the nfs daemon, which
should not provide an incorrect value. However, it's still good
practice to validate data provided by userland.

PR:		206626
Reported by:	CTurt <cturt@hardenedbsd.org>
Reviewed by:	rmacklem
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D6201
2016-05-06 21:19:28 +00:00
Svatopluk Kraus
6247277a02 INTRNG - support new interrupt mapping type INTR_MAP_DATA_GPIO
introduced in r298738.
2016-05-06 20:57:41 +00:00
Svatopluk Kraus
c28b681c3e INTRNG - use gpio interrupt modes definitions added in r298738 and
implement also GPIO_INTR_EDGE_BOTH mode. All reasonable interrupt
modes are supported now.
2016-05-06 20:55:14 +00:00
Renato Botelho
89d18e14f1 Add missing parameters -N and -l to reroot and halt usage()
Approved by:	bapt
Sponsored by:	Rubicon Communications (Netgate)
Differential Revision:	https://reviews.freebsd.org/D6173
2016-05-06 20:49:14 +00:00
Maxim Sobolev
e3d7ead7df Add missing include "opt_geom.h" to make GEOM_UZIP_DEBUG option working,
also rename enum member so it does not conflict with GEOM_UZIP option
name.

Submitted by:	mizhka@gmail.com
Differential Revision:	https://reviews.freebsd.org/D6207
2016-05-06 20:32:39 +00:00
Pedro F. Giffuni
8c6a0d07a6 Revert r298938: Change x/a to work similar to gdb.
This badly breaks x/ia: ddb and gdb syntax are quite different and it is
unclear if they can be reconciled.
2016-05-06 20:28:28 +00:00
Andriy Voskoboinyk
bec488d17d iwn: fix comments for iwn_read_eeprom_channels().
It's used for all channels (20MHz and 40MHz).
2016-05-06 17:39:12 +00:00
Sean Bruno
40b6008fc5 Since igb_detach() cleans up all the data structures that will be
free'd by the functions following its call, we can simply return instead
of crashing and burning in the event of igb_detach() failing.

PR:		197139
Submitted by:	rupavath@juniper.net
MFC after:	2 weeks
2016-05-06 17:00:45 +00:00
Pedro F. Giffuni
bc5ade0d10 sys/security: minor spelling fixes.
No functional change.
2016-05-06 16:59:04 +00:00
Pedro F. Giffuni
ea0ccffc39 cam/scsi: Remove mostly unused scsi_quirk_table_size.
It was only being used only once and it can be directly replaced
instead.
2016-05-06 16:51:56 +00:00
Roger Pau Monné
288b2385b8 xen/privcmd: fix integer truncation in IOCTL_PRIVCMD_MMAPBATCH
The size field in the XENMEM_add_to_physmap_range is an uint16_t, and the
privcmd driver was doing an implicit truncation of an int into an uint16_t
when filling the hypercall parameters.

Fix this by adding a loop and making sure privcmd splits ioctl request into
2^16 chunks when issuing the hypercalls.

Reported and tested by:	Marcin Cieslak <saper@saper.info>
Sponsored by:		Citrix Systems R&D
2016-05-06 16:44:46 +00:00
Roger Pau Monné
03f5b58d56 bitset: introduce helpers to allocate a bitset at runtime
Introduce some new helpers to declare and allocate a dynamic bitset, whose
size is not a constant.

Sponsored by:		Citrix Systems R&D
Reviewed by:		kib jhb
Differential revision:	https://reviews.freebsd.org/D6226
2016-05-06 16:41:23 +00:00
Pedro F. Giffuni
89017bc259 libc/xdr: unsign some loop indexes.
Although usually small, values produced by nitems() are unsigned.
Unsign inxdeing variables related to nitems() macros to avoid
signed vs. unsigned comparisons.
2016-05-06 16:03:40 +00:00
Sean Bruno
eb9f04ddd9 If ALTQ is defined in the kern conf, switch to Legacy Mode.
PR:		208409
Submitted by:	freebsd@mcwest.org
MFC after:	2 weeks
2016-05-06 15:41:38 +00:00
Pedro F. Giffuni
a5a274d0d4 sys/ofed: minor spelling fix.
No functional change.

Reviewed by:	hselasky
2016-05-06 15:37:06 +00:00
Pedro F. Giffuni
c1f403238a sys/cam/scsi: unsigned some loop indexes.
Although usually small, values produced by nitems() are unsigned.
One more case where unsgining the index may be useful.
2016-05-06 15:36:25 +00:00
Pedro F. Giffuni
bf5cba36db ofed/drivers: minor spelling fixes.
No functional change.

Reviewed by:	hselasky
2016-05-06 15:16:13 +00:00
Pedro F. Giffuni
2a392dd62b sys/cam/scsi: unsigned some loop indexes.
Although usually small, values produced by nitems() are unsigned.
By unsigning the corresponding indexes we avoid signed vs unsigned
comparisons. This may have some effect on performance, although given the
small sizes the effect will not be perceivable and it makes the code
clearer.
2016-05-06 15:13:44 +00:00
Pedro F. Giffuni
25cd047538 dev/usb: unsigned some loop indexes.
Although usually small, values produced by nitems() are unsigned.
By unsigning the corresponding indexes we avoid signed vs unsigned
comparisons. This may have some effect on performance, although given the
small sizes the effect will not be perceivable, and it makes the code
clearer.

Respect the style of the changed files: one uses u_int while the other
uses "unsigned int".

Reviewed by:	hselasky
2016-05-06 15:09:21 +00:00
Edward Tomasz Napierala
b0b3f0e152 Add the "-r" flag to iscsictl(8).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-06 13:45:42 +00:00
Edward Tomasz Napierala
6735d50255 Document the "Protocol" field of iscsi.conf(5).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-06 13:44:56 +00:00