Commit Graph

223110 Commits

Author SHA1 Message Date
Glen Barber
c820048f66 Add 11.1 to the mdoc(7) mdoc.local.in.
Sponsored by:	The FreeBSD Foundation
2017-05-22 14:21:07 +00:00
Glen Barber
f0c9042b38 Correct the "first appeared in" version for efivar(8).
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-05-22 13:55:59 +00:00
Eric van Gyzen
cfc1010f6d Revert r318583 (libthr: use default WARNS level of 6)
Revert this while I fix RISC-V, SPARC, and probably all architectures
that use GCC.

Reported by:	kib
Pointy hat to:	vangyzen
Sponsored by:	Dell EMC
2017-05-22 13:21:28 +00:00
Ed Maste
bd309b323a Regen sysent after r318634, no open(2) in capability mode
Sponsored by:	The FreeBSD Foundation
2017-05-22 11:45:45 +00:00
Ed Maste
68fc8f3934 disallow open(2) in capability mode
Previously open(2) was allowed in capability mode, with a comment that
suggested this was likely the case to facilitate debugging. The system
call would still fail later on, but it's better to disallow the syscall
altogether.

We now have the kern.trap_enotcap sysctl or PROC_TRAPCAP_CTL proccontrol
to aid in debugging.

In any case libc has translated open() to the openat syscall since
r277032.

Reviewed by:	kib, rwatson
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10850
2017-05-22 11:43:19 +00:00
Roger Pau Monné
d7640440fb bsdinstall: do not use distextract in scripted mode
It requires a tty, which might not be available in scripted installs. Instead
extract the sets manually using tar.

Reviewed by:		tsoome
Sponsored by:		Citrix Systems R&D
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D10736
2017-05-22 11:41:17 +00:00
Roger Pau Monné
2f34d6c344 bsdinstall: mount is not needed for the ZFS install case
Because the datasets are already mounted by zfsboot, and the mount script
doesn't know anything about ZFS. Also do not execute the "umount" script for
ZFS for the same reasons.

Reviewed by:		dteske, tsoome
Sponsored by:		Citrix Systems R&D
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D10738
2017-05-22 11:38:39 +00:00
Roger Pau Monné
477a40c74f xen/netfront: don't drop the RX lock in xn_rxeof
Since netfront uses different locks for the RX and TX paths there's no need to
drop the RX lock before calling if_input.

Suggested by:	jhb
Tested by:	cperciva
Sponsored by:	Citrix Systems R&D
MFC with:	r318523
2017-05-22 11:33:44 +00:00
Cy Schubert
10ee220f07 Refactor & compact struct i6addr_t #ifdef: remove redundant structure
definintion when USE_INET6 is false.

MFC after:	1 week
2017-05-22 03:01:35 +00:00
Ed Maste
9257ada0a4 nm: document 'r' symbol type
PR:		219245
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-05-22 01:10:12 +00:00
Adrian Chadd
9f329febcb [ar71xx] fix up dump space a la what jhb@ did elsewhere a while ago. 2017-05-21 23:55:58 +00:00
Adrian Chadd
66ed774149 [libcompiler-rt] add bswapdi2/bswapsi2
This is required for mips gcc 6.3 userland to build/run.

Reviewed by:	emaste, dim
Approved by:	emaste
Differential Revision:	https://reviews.freebsd.org/D10838
2017-05-21 23:15:32 +00:00
Baptiste Daroussin
4d16f068f2 Make catman(1) use mandoc(1) by default
catman(1) checks if mandoc(1) do support the manpage before trying to generate
the catpage and falls back on nroff, using the same mechanism as man(1).
2017-05-21 22:28:28 +00:00
Benjamin Kaduk
98120473ab Updates for efivar.8
Fix spelling [1], appease igor and mandoc -Tlint, and adopt the
language style to be more consistent with our corpus.

PR:		219434 [1]
Submitted by:	olgeni [1]
2017-05-21 22:10:08 +00:00
Dimitry Andric
fc539a44ac Add PICFLAG to build libc++experimental.a, so it can be used in all
situations.

Noticed by:	kib
2017-05-21 21:33:15 +00:00
Ed Maste
6403a57bcc msdosfs: constify
Obtained from:	NetBSD
Sponsored by:	The FreeBSD Foundation
2017-05-21 20:00:49 +00:00
Ed Maste
c8b163b617 msdosfs: correct constant and typo in comment
Revisions:
fat.h	1.5 1.6

Obtained from:	NetBSD
Sponsored by:	The FreeBSD Foundation
2017-05-21 19:48:16 +00:00
Ed Maste
9287dbaae9 msdosfs: capitalize FAT appropriately
Diff reduction with NetBSD, including some nearby minor whitespace or
style fixes.

Obtained from:	NetBSD
Sponsored by:	The FreeBSD Foundation
2017-05-21 19:29:28 +00:00
Dimitry Andric
6930ca7463 Add libc++experimental.a for std::experimental support
This adds a separate library for supporting std::experimental features.
It is purposefully static, and must be explicitly linked into programs
using -lc++experimental.

PLEASE NOTE: there is NO WARRANTY as to any stability or continuing
existence of the features in the std::experimental parts of the C++
library!

Reviewed by:	ed
Differential Revision: https://reviews.freebsd.org/D10840
2017-05-21 17:07:12 +00:00
Alan Somers
95c91f3b1d Fix build of AIO tests with -DDEBUG
Also, redefine some constants for clarity.  No functional change.

MFC after:	1 week
2017-05-21 15:37:08 +00:00
Jilles Tjoelker
f084f76687 compress: Allow uncompress -c with multiple pathnames, as required by POSIX.
Per POSIX, allow passing multiple pathnames to uncompress -c, concatenating
the uncompressed data.

Passing multiple pathnames to compress -c remains disallowed, since the
result cannot be decompressed.

PR:		219387
Reported by:	Jörg Schilling
2017-05-21 14:35:16 +00:00
Jilles Tjoelker
fd1c67ef4e compress: Add basic tests. 2017-05-21 14:05:32 +00:00
Mark Johnston
d6c8335623 Add get_cpu() and put_cpu().
MFC after:	1 week
2017-05-21 00:06:36 +00:00
Rick Macklem
6ab9e0df87 Update the exports.5 man page to reflect the change in default uid/gid
made by r318262.

This is a content change.
2017-05-20 23:25:07 +00:00
Cy Schubert
1232628506 Fix up two assertions following malloc(). vangyzen@ notified me of
the second one. The first one is fixed as well.

Reported by:	vangyzen@
MFC after:	1 week
2017-05-20 18:16:26 +00:00
Dag-Erling Smørgrav
13e8eaeb39 Add -w to usage string.
Reported by:	Jamie Landeg-Jones <jamie@catflap.org>
MFC after:	1 week
2017-05-20 18:02:31 +00:00
Eric van Gyzen
d7b1cc206c dma.8: fix problems reported by igor and 'mandoc -Tlint'
dma.8:77:contraction:Queue the mail, but [don't] attempt to deliver it.
dma.8:85:repeated:s [are are] ignored.
dma.8:87:contraction:[Don't] run in the background.
dma.8:201:contraction:Use the catch-all alias only if you [don't] want any local mail to be

mandoc: dma.8:308:5: WARNING: macro neither callable nor escaped: Sm

MFC after:	3 days
2017-05-20 17:42:58 +00:00
Eric van Gyzen
7e9a704046 dma.8: use the correct name for 'SECURETRANSFER'
The code uses 'SECURETRANS', but the config file uses 'SECURETRANSFER'.

MFC after:	3 days
2017-05-20 17:39:23 +00:00
Eric van Gyzen
0b2f3f2058 libthr: Use CLI flags instead of pragmas to disable warnings
People tweaking the build system or compilers tend to look into
the Makefile and not into the source.  Having some warning controls
in the Makefile and some in the source code is surprising.

Pragmas have the advantage that they leave the warnings enabled
for more code, but that advantage isn't very relevant in these cases.

Requested by:	kib
Reviewed by:	kib
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10832
2017-05-20 17:33:47 +00:00
Eric van Gyzen
d71b289766 libthr: use default WARNS level of 6
Reviewed by:	kib
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10832
2017-05-20 17:32:30 +00:00
Eric van Gyzen
07f29d9f76 Remove old spinlock_debug code from libc
This no longer seems useful.  Remove it.

This was prompted by a "cast discards volatile qualifier" warning
in libthr when WARNS=6.

Reviewed by:	kib
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10832
2017-05-20 17:32:01 +00:00
Eric van Gyzen
048ad6aedc libthr: change CHECK_AND_INIT_RWLOCK to an inline function
This was prompted by a compiler warning about 'ret' shadowing
a local variable in the callers of the macro.

Reviewed by:	kib
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10832
2017-05-20 17:30:48 +00:00
Eric van Gyzen
6eccf6e38f libthr: disable thread-safety warnings
These warnings don't make sense for code that implements
the locking primitives.

Reviewed by:	kib
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10832
2017-05-20 17:29:36 +00:00
Cy Schubert
8af0c00bd6 Fix non-recoverable name resolution failures due to negative cache
entries never expiring. This patch honours the negative cache timeout.

To test/experience the failure do the following:

1. Edit /etc/ncd.conf to adjust the cache timeouts as follows:

	positive-time-to-live hosts 30
	negative-time-to-live hosts 1

2. Ensure that nsswitch.conf hosts line contains something like:

	hosts: files cache dns

	Note that cache must be specified before dns.

3. Start nscd.

4. Run the following command:

	while true; do nc -z -w 3 www.google.com 80; sleep 5; done

5. While running the command, remove or comment out all nameserver
   statements in /etc/resolv.conf. After a short while you will notice
   non-recoverable name rsolution failures.

6. Uncomment or replace all nameserver statements back into
   /etc/resolv.conf. Take note that name resolution never recovers.
   To recover nscd must be restarted. This patch fixes this.

PR:		207804
Submitted by:	Jov <amutu@amutu.com>
MFC after:	1 week
2017-05-20 16:58:48 +00:00
Michael Reifenberger
e817140df0 Improve time-since-last-scrub calculation.
This can be needed to compensate anticongestion delays in 410.pkg-audit or 480.leapfile-ntpd.

PR:		217622
Submitted by:	wbe@psr.com
MFC after:	2 weeks
2017-05-20 16:47:00 +00:00
Dimitry Andric
775e1e023f After r317383 (removal of NATM), also remove usr/include/dev/utopia from
BSD.include.dist.
2017-05-20 11:40:37 +00:00
Ed Maste
6d635d3b32 bsdgrep: Correct per-line line metadata printing
Metadata printing with -b, -H, or -n flags suffered from a few flaws:

1) -b/offset printing was broken when used in conjunction with -o

2) With -o, bsdgrep did not print metadata for every match/line, just
   the first match of a line

3) There were no tests for this

Address these issues by outputting this data per-match if the -o flag is
specified, and prior to outputting any matches if -o but not --color,
since --color alone will not generate a new line of output for every
iteration over the matches.

To correct -b output, fudge the line offset as we're printing matches.

While here, make sure we're using grep_printline in -A context.  Context
printing should *never* look at the parsing context, just the line.

The tests included do not pass with gnugrep in base due to it exhibiting
similar quirky behavior that bsdgrep previously exhibited.

Submitted by:	Kyle Evans <kevans91@ksu.edu>
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10580
2017-05-20 11:20:03 +00:00
Ed Maste
fe8c9d5bf1 bsdgrep: emit more than MAX_LINE_MATCHES per line
We should not set an arbitrary cap on the number of matches on a line,
and in any case MAX_LINE_MATCHES of 32 is much too low.  Instead, if we
match more than MAX_LINE_MATCHES, keep processing and matching from the
last match until all are found.

For the regression test, we produce 4096 matches (larger than we expect
we'll ever set MAX_LINE_MATCHES) and make sure we actually get 4096
lines of output with the -o flag.

We'll also make sure that every distinct line is getting its own line
number to detect line metadata not being printed as appropriate along
the way.

PR:		218811
Submitted by:	Kyle Evans <kevans91@ksu.edu>
Reported by:	jbeich
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10577
2017-05-20 03:51:31 +00:00
Adrian Chadd
85c4e67075 [net80211] prepare for A-MSDU/A-MPDU offload crypto / sequence number checking.
When doing AMSDU offload, the driver (for now!) presents 802.11 frames with
the same sequence number and crypto sequence number / IV values up to the stack.
But, this will trip afoul over the sequence number detection.

So drivers now have a way to signify that a frame is part of an offloaded
AMSDU group, so we can just ensure that we pass those frames up to the
stack.

The logic will be a bit messy - the TL;DR will be that if it's part of
the previously seen sequence number then it belongs in the same burst.
But if we get a repeat of the same sequence number (eg we sent an ACK
but the receiver didn't hear it) then we shouldn't be passing those frames
up.  So, we can't just say "all subframes go up", we need to track
whether we've seen the end of a burst of frames for the given sequence
number or not, so we know whether to actually pass them up or not.

The first part of doing all of this is to ensure the ieee80211_rx_stats
struct is available in the RX sequence number check path and the
RX ampdu reorder path.  So, start by passing the pointer into these
functions to avoid doing another lookup.

The actual support will come in a subsequent commit once I know the
functionality actually works!
2017-05-20 00:43:52 +00:00
Ed Maste
9a1452026e bsdgrep: fix segfault with --mmap
r313948 partially fixed --mmap behavior but was incomplete.  This commit
generally reverts it and does it the more correct way- by just consuming
the rest of the buffer and moving on.

PR:		219402
Submitted by:	Kyle Evans <kevans91@ksu.edu>
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10820
2017-05-20 00:42:47 +00:00
John Baldwin
1ec22b4425 Exclude ccr(4) from arm LINT since it excludes cxgbe(4). 2017-05-19 22:54:45 +00:00
Maxim Konovalov
6dce7e9908 o Missed flag restored.
PR:		219395
Submitted by:	Tiwei Bie
2017-05-19 20:02:32 +00:00
Ed Maste
23c5331208 msdosfs: use C99 types
General cleanup, for diff reduction with NetBSD and future use by FAT
support in makefs.

Submitted by:	Siva Mahadevan <smahadevan@freebsdfoundation.org>
Obtained from:	NetBSD
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10821
2017-05-19 18:13:41 +00:00
Enji Cooper
99429157e8 sys/fs/tmpfs/vnd_test: make md(4) allocation dynamic
The previous logic was flawed in the sense that it assumed that /dev/md3
was always available. This was a caveat I noted in r306038, that I hadn't
gotten around to solving before now.

Cache the device for the mountpoint after executing mdmfs, then use the
cached value in basic_cleanup(..) when unmounting/disconnecting the md(4)
device.

Apply sed expressions to use reuse logic in the NetBSD code that could
also be applied to FreeBSD, just with different tools.

Differential Revision:	D10766
MFC after:	1 week
Reviewed by:	bdrewery
Sponsored by:	Dell EMC Isilon
2017-05-19 17:14:29 +00:00
Enji Cooper
56ba774ebc Install {cron.d,newsyslog.conf.d,syslog.d} via make distribution, not make install
I incorrectly started this pattern in r277541 with the opensm newsyslog.conf.d file,
and continued using it in r318441 and r318443.

This will fix the files being handled improperly via installworld, preventing tools like
etcupdate, mergemaster, etc from functioning properly when comparing the installed
contents on a system vs the contents in a source tree when doing merges.

PR:		219404
Submitted by:	Dan McGregor <dan.mcgregor@usask.ca>
MFC after:	2 weeks
MFC with:	r277541, r318441, r318443
Sponsored by:	Dell EMC Isilon
2017-05-19 17:04:01 +00:00
Eric van Gyzen
d2335a57f4 libthr: fix warnings at WARNS=6
Fix warnings about the following when WARNS=6 (which I will commit soon):

- casting away const
- no previous 'extern' declaration for non-static variable
- others as explained by #pragmas and comments
- unused parameters

The last is the only functional change.

Reviewed by:	kib
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10808
2017-05-19 13:04:05 +00:00
Hans Petter Selasky
fe3ca95c9d mlx4: Use the CQ quota for SRIOV when creating completion EQs
When creating EQs to handle CQ completion events for the PF or for
VFs, we create enough EQE entries to handle completions for the max
number of CQs that can use that EQ.

When SRIOV is activated, the max number of CQs a VF (or the PF) can
obtain is its CQ quota (determined by the Hypervisor resource
tracker).  Therefore, when creating an EQ, the number of EQE entries
that the VF should request for that EQ is the CQ quota value (and not
the total number of CQs available in the firmware).

Under SRIOV, the PF, also must use its CQ quota, because the resource
tracker also controls how many CQs the PF can obtain.

Using the firmware total CQs instead of the CQ quota when creating EQs
resulted wasting MTT entries, due to allocating more EQEs than were
needed.

MFC after:		3 days
Sponsored by:		Mellanox Technologies
2017-05-19 12:22:48 +00:00
Michal Meloun
d304b9ec4a Increase maximum text segment size.
LLVM binaries are huge...

MFC after:	3 days
2017-05-19 11:45:14 +00:00
Don Lewis
d196c9ee16 Fix the queue delay estimation in PIE/FQ-PIE when the timestamp
(TS) method is used.  When packet timestamp is used, the "current_qdelay"
keeps storing the last queue delay value calculated in the dequeue
function.  Therefore, when a burst of packets arrives followed by
a pause, the "current_qdelay" will store a high value caused by the
burst and stick to that value during the pause because the queue
delay measurement is done inside the dequeue function.  This causes
the drop probability calculation function to calculate high drop
probability value instead of zero and prevents the burst allowance
mechanism from working properly.  Fix this problem by resetting
"current_qdelay" inside the drop probability calculation function
when the queue length is zero and TS option is used.

Submitted by:	Rasool Al-Saadi <ralsaadi@swin.edu.au>
MFC after:	1 week
2017-05-19 08:38:03 +00:00
Wojciech Macek
22a752b482 Fix boot up on ARMADA38X uniprocessor variant
Marvell Armada 380 is a uni-processor variant of the 38x SoC
family. A function platform_mp_setmaxid() was setting a hardcoded
value, which caused boot fail on A380. Fix this by relying on
the CPU count obtained from device tree nodes.

Submitted by:  Marcin Wojtas <mw@semihalf.com
Obtained from: Semihalf
Sponsored by:  Netgate
Reviewed by:   loos
Differential revision: https://reviews.freebsd.org/D10783
2017-05-19 08:26:41 +00:00