]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoDocument r305514, getdtablesize(2) in capability mode.
gjb [Thu, 1 Jun 2017 14:39:10 +0000 (14:39 +0000)]
Document r305514, getdtablesize(2) in capability mode.
Document r305516, kern.proc.nfds in capability mode.
Document r306213, bspatch(1) capsicum support.

Submitted by: emaste
Sponsored by: The FreeBSD Foundation

6 years agoMFC r318832: MFV r316923: 8026 retire zfs_throttle_delay and zfs_throttle_resolution
avg [Thu, 1 Jun 2017 14:07:17 +0000 (14:07 +0000)]
MFC r318832: MFV r316923: 8026 retire zfs_throttle_delay and zfs_throttle_resolution

6 years agoMFC r318830: MFV r316921: 8027 tighten up dsl_pool_dirty_delta
avg [Thu, 1 Jun 2017 14:05:28 +0000 (14:05 +0000)]
MFC r318830: MFV r316921: 8027 tighten up dsl_pool_dirty_delta

6 years agoMFC r318450:
kib [Thu, 1 Jun 2017 13:20:47 +0000 (13:20 +0000)]
MFC r318450:
Add tests for some cases in r318298.

PR: 219154

6 years agoMFC r317730:
tuexen [Thu, 1 Jun 2017 12:33:33 +0000 (12:33 +0000)]
MFC r317730:
Add support for listen() call.

MFC r317731:
Add Socklent for handling args of type socklen_t.

MFC r317732:
Decode the third argument of socket().

MFC r317736:
Add support for [gs]etsockopt().

MFC r317737:
Decode the fourth argument of sendto and recvfrom call.

MFC r317739:
Add support for sendmsg() and recvmsg().

MFC r317747:
Add support for socket option names related to the IPPROTO_SCTP level.

MFC r317748:
Add support for socket option names related to the IPPROTO_IPV6 level.

MFC r317750:
Add support for sctp_generic_sendmsg() and sctp_generic_recvmsg().

MFC r317789:
Add support for socket option names related to the level IPPROTO_UDPLITE.

MFC r318879:
Improve the decoding of the third argument of the socket() call.

Decoding of the third argument depends on the first one. For doing this,
add a corresponding function to libsysdecode.

Thanks to jhb@ for suggesting this.

6 years agoMFC r319096: zfs_lookup: fix bogus arguments to lookup of "snapshot" directory
avg [Thu, 1 Jun 2017 11:47:56 +0000 (11:47 +0000)]
MFC r319096: zfs_lookup: fix bogus arguments to lookup of "snapshot" directory

6 years agoMFC r318649:
tuexen [Thu, 1 Jun 2017 10:03:41 +0000 (10:03 +0000)]
MFC r318649:

The connect() system call should return -1 and set errno to EAFNOSUPPORT
if it is called on a TCP socket
 * with an IPv6 address and the socket is bound to an
   IPv4-mapped IPv6 address.
 * with an IPv4-mapped IPv6 address and the socket is bound to an
   IPv6 address.
Thanks to Jonathan T. Leighton for reporting this issue.

Reviewed by: bz, gnn
Differential Revision: https://reviews.freebsd.org/D9163

6 years agoMFC r317597:
tuexen [Thu, 1 Jun 2017 09:21:25 +0000 (09:21 +0000)]
MFC r317597:

Allow SCTP to use the hostcache.

This patch allows the MTU stored in the hostcache to be used as an
initial value for SCTP paths. When an ICMP PTB message is received,
store the MTU in the hostcache.

6 years agoMFC r317592:
tuexen [Thu, 1 Jun 2017 09:18:03 +0000 (09:18 +0000)]
MFC r317592:

Don't set the DF-bit on timer based retransmissions.

6 years agoMFC r317558:
tuexen [Thu, 1 Jun 2017 09:14:43 +0000 (09:14 +0000)]
MFC r317558:

Set the DF bit for responses to out-of-the-blue packets.

6 years agoMFC r317512:
tuexen [Thu, 1 Jun 2017 09:00:38 +0000 (09:00 +0000)]
MFC r317512:

armv8 has support for optional CRC32C instructions. This patch checks if they are
available and if that is true make use of them.
Thank you very much to Andrew Turner for providing help and review the patch!

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D10499

6 years agoMFC 317464:
tuexen [Thu, 1 Jun 2017 08:58:39 +0000 (08:58 +0000)]
MFC 317464:

Fix an issue with MTU calculation if an ICMP message is received
for an SCTP/UDP packet.

6 years agoMFC r317457:
tuexen [Thu, 1 Jun 2017 08:48:16 +0000 (08:48 +0000)]
MFC r317457:

Use consistently uint32_t for mtu values.

This does not change functionality, but this cleanup is need for further
improvements of ICMP handling.

6 years agoMFC r317244:
tuexen [Thu, 1 Jun 2017 08:42:53 +0000 (08:42 +0000)]
MFC r317244:

Represent "a syncache overflow hasn't happend yet" by using
-(SYNCOOKIE_LIFETIME + 1) instead of INT64_MIN, since it is
good enough and works when time_t is int32 or int64.
This fixes the issue reported by cy@ on i386.

Reported by: cy

6 years agoMFC r317208:
tuexen [Thu, 1 Jun 2017 08:32:35 +0000 (08:32 +0000)]
MFC r317208:

Syncoockies can be used in combination with the syncache. If the cache
overflows, syncookies are used.
This patch restricts the usage of syncookies in this case: accept
syncookies only if there was an overflow of the syncache recently.
This mitigates a problem reported in PR217637, where is syncookie was
accepted without any recent drops.
Thanks to glebius@ for suggesting an improvement.

PR: 217637
Reviewed by: gnn, glebius
Differential Revision: https://reviews.freebsd.org/D10272

6 years agoMFC r316743:
tuexen [Thu, 1 Jun 2017 08:29:08 +0000 (08:29 +0000)]
MFC r316743:

The sysctl variable net.inet.tcp.drop_synfin is not honored in all states,
for example not in SYN-SENT.
This patch adds code to check the sysctl variable in other states than
LISTEN.
Thanks to ae and gnn for providing comments.

Reviewed by: gnn
Differential Revision: https://reviews.freebsd.org/D9894

6 years agoMFC r316038:
tuexen [Thu, 1 Jun 2017 08:25:45 +0000 (08:25 +0000)]
MFC r316038:

Tweak the Makefiles a bit to allow using "tcp" in MODULES_OVERRIDE
to build the tcp modules.

6 years agoMFC r314155:
tuexen [Thu, 1 Jun 2017 08:19:45 +0000 (08:19 +0000)]
MFC r314155:

TCP window updates are only sent if the window can be increased by at
least 2 * MSS. However, if the receive buffer size is small, this might
be impossible. Add back a criterion to send a TCP window update if
the window can be increased by at least half of the receive buffer size.
This condition was removed in r242252. This patch simply brings it back.

PR: 211003
Reviewed by: gnn
Differential Revision: https://reviews.freebsd.org/D9475

6 years agoMFC r313032:
tuexen [Thu, 1 Jun 2017 08:15:33 +0000 (08:15 +0000)]
MFC r313032:

Ensure that the variable bail is always initialized before used.

6 years agoMFC r313031:
tuexen [Thu, 1 Jun 2017 08:12:44 +0000 (08:12 +0000)]
MFC r313031:

Take the SCTP common header into account when computing the
space available for chunks. This unbreaks the handling of
ICMPV6 packets indicating "packet too big". It just worked
for IPv4 since we are overbooking for IPv4.

6 years agoMFC r313030:
tuexen [Thu, 1 Jun 2017 08:09:54 +0000 (08:09 +0000)]
MFC r313030:

Remove a duplicate debug statement.

6 years agoMFC r312722:
tuexen [Thu, 1 Jun 2017 08:07:09 +0000 (08:07 +0000)]
MFC r312722:

Fix a bug where the overhead of the I-DATA chunk was not considered.

6 years agoMFC r312063:
tuexen [Thu, 1 Jun 2017 08:04:09 +0000 (08:04 +0000)]
MFC r312063:

Ensure that the buffer length and the length provided in the IPv4
header match when using a raw socket to send IPv4 packets and
providing the header. If they don't match, let send return -1
and set errno to EINVAL.

Before this patch is was only enforced that the length in the header
is not larger then the buffer length.

PR: 212283
Reviewed by: ae, gnn
Differential Revision: https://reviews.freebsd.org/D9161

6 years agoRegenerate src.conf(5)
ngie [Thu, 1 Jun 2017 06:58:43 +0000 (06:58 +0000)]
Regenerate src.conf(5)

6 years agoMFC r314579,r314785:
ngie [Thu, 1 Jun 2017 06:56:32 +0000 (06:56 +0000)]
MFC r314579,r314785:

r314579 (by np):

Add cxgbetool(8) to the base system.

Move cxgbetool from tools/tools to usr.sbin. Compile and install it on
platforms where cxgbe(4) is built by default.  Knobs (WITH_CXGBETOOL and
WITHOUT_CXGBETOOL) have been added so that the user can override the
default setting.

r314785:

Fix some trivial manlint warnings

Sentences should begin on new lines, per manlint.

Bump .Dd for the change

6 years agoMFC r318437:
ngie [Thu, 1 Jun 2017 06:42:21 +0000 (06:42 +0000)]
MFC r318437:

Revert local changes to find_progenv accidentally committed in r318436

MFC with: r318436

6 years agoMFC r318436:
ngie [Thu, 1 Jun 2017 06:41:24 +0000 (06:41 +0000)]
MFC r318436:

usr.bin/getconf: add some initial tests

Items tested via this commit are:
- Some basic POSIX constants.
- Some valid programming environments with -v.
- Some invalid programming environments via -v.

NOTE: this test makes assumptions about ILP32/LP32 vs LP64 that are
currently not true on all architectures to avoid hardcoding some
architectures in the tests. I'm working on improving getconf(1) to be
more sane about handling ILP32/LP32 vs LP64. Future commits are coming
soon to address this.

Tested with: amd64, i386

6 years agoMFC r318434:
ngie [Thu, 1 Jun 2017 06:39:57 +0000 (06:39 +0000)]
MFC r318434:

Make the `.gperf.c` suffix rule depend on fake-gperf.awk

Parameterize out fake-gperf.awk to avoid duplicating the path

6 years agoMFC r318177:
ngie [Thu, 1 Jun 2017 06:36:40 +0000 (06:36 +0000)]
MFC r318177:

Unconditionally install udp(4) and udplite(4) again

I added this to the MK_USB != no block in error in r278202.

6 years agoMFC r319157:
ngie [Thu, 1 Jun 2017 06:35:37 +0000 (06:35 +0000)]
MFC r319157:

fma_test: mute a warning about unreachable code on amd64 by restructuring
the #ifdef block to only handle the rest of the logic in the loop in the
#else case.

CID: 1346844

6 years agoMFC r319158:
ngie [Thu, 1 Jun 2017 06:34:35 +0000 (06:34 +0000)]
MFC r319158:

logarithm_test: assert that feclearexcept succeeds

This helps ensure that test preconditons are fulfilled.

CID: 1346572

6 years agoMFC r318175,r318178,r318179:
ngie [Thu, 1 Jun 2017 06:26:35 +0000 (06:26 +0000)]
MFC r318175,r318178,r318179:

r318175:

procstat(1): clarify the Signal Disposition section

- Fix a typo (SIGIGN -> SIG_IGN). Use .Dv when referencing SIG_IGN.
- Use semi-colons as soft breaks when separating sentences for
  the FLAGS section.
- Tweak wording for C slightly to flow better and to be a bit
  more technically correct (signals with handlers installed will
  be caught by the target program).
- Reference signal(3) in the SEE ALSO section.

r318178:

procstat(1): document all possible `PRO` (network protocol) values

Reference the appropriate section 4 manpages for networking
protocols.

r318179:

procstat(1): also reference icmp(4) and sctp(4)

This was missed in the previous commit by accident.

MFC with: r318178

6 years agoMFC r319156,r319159:
ngie [Thu, 1 Jun 2017 06:17:01 +0000 (06:17 +0000)]
MFC r319156,r319159:

r319156:

:nvlist_unpack__duplicate_key : check the result of nvlist_pack(3)

This fixes a potential NULL pointer dereference.

CID: 1362051

r319159:

:dnvlist_get_string__default_value: fix a bogus string comparison test

Check actual_value vs "5", not "5" vs itself.

CID: 1362021

6 years agoMFC r319137:
kib [Thu, 1 Jun 2017 00:50:58 +0000 (00:50 +0000)]
MFC r319137:
Correct explanation of the dynamic tokens handling.

6 years agoMFC r319138:
kib [Thu, 1 Jun 2017 00:48:59 +0000 (00:48 +0000)]
MFC r319138:
Document direct execution mode for rtld.

6 years agoMFC r318592: compress: Allow uncompress -c with multiple pathnames,
jilles [Wed, 31 May 2017 21:54:21 +0000 (21:54 +0000)]
MFC r318592: 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

6 years agoMFC r318586
vangyzen [Wed, 31 May 2017 21:20:42 +0000 (21:20 +0000)]
MFC r318586

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

6 years agoMFC r318585
vangyzen [Wed, 31 May 2017 21:19:21 +0000 (21:19 +0000)]
MFC r318585

dma.8: use the correct name for 'SECURETRANSFER'

The code uses 'SECURETRANS', but the config file uses 'SECURETRANSFER'.

6 years agoMFC r319022
vangyzen [Wed, 31 May 2017 21:16:10 +0000 (21:16 +0000)]
MFC r319022

Fix INSTALL_AS_USER with external nsswitch databases

The INSTALL_AS_USER option tells "install" to use the current
user name as the owner of the installed file.  The "install"
command executed by the build is statically linked, so it does not
load nsswitch modules, such as nss_ldap.so, so it fails when
the user is only defined in such a database.

Fix it to use the current UID instead of user name.  This works
for all users.  I expect it is also slightly more efficient.

Sponsored by: Dell EMC

6 years agoMFC r319020
vangyzen [Wed, 31 May 2017 21:15:05 +0000 (21:15 +0000)]
MFC r319020

Fix INSTALL_AS_USER

Move INSTALL_AS_USER into bsd.init.mk to maximize the chance that
it has final authority over fooOWN and fooGRP.

Reviewed by: sjg
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10810

6 years agoDocument r319349, byacc(1) version 20170201.
gjb [Wed, 31 May 2017 19:26:20 +0000 (19:26 +0000)]
Document r319349, byacc(1) version 20170201.

Sponsored by: The FreeBSD Foundation

6 years agoMFC: r313105, r313106
jkim [Wed, 31 May 2017 19:16:22 +0000 (19:16 +0000)]
MFC: r313105, r313106

Update byacc to 20170201.

6 years agoDocument r319244, rpcbind(8) warmstart support knob.
gjb [Wed, 31 May 2017 13:33:04 +0000 (13:33 +0000)]
Document r319244, rpcbind(8) warmstart support knob.

Sponsored by: The FreeBSD Foundation

6 years agoDocument r319269, cxgbe(4) firmware update.
gjb [Wed, 31 May 2017 13:33:03 +0000 (13:33 +0000)]
Document r319269, cxgbe(4) firmware update.

Sponsored by: The FreeBSD Foundation

6 years agoMFC r319086:
kib [Wed, 31 May 2017 09:23:21 +0000 (09:23 +0000)]
MFC r319086:
Mention that the basep argument to getdirentries(2) can be NULL.

6 years agoMFC r317632:
ngie [Wed, 31 May 2017 08:46:39 +0000 (08:46 +0000)]
MFC r317632:

Fix "make cscope-clean" when .OBJDIR already exists

The cscope generated files are always put in .CURDIR .

6 years agoMFC r316742:
ngie [Wed, 31 May 2017 08:43:46 +0000 (08:43 +0000)]
MFC r316742:

Clarify units for mediasize and sectorsize in DoFile(..)

They're byte quantities.

6 years agoMFC r316740:
ngie [Wed, 31 May 2017 08:42:31 +0000 (08:42 +0000)]
MFC r316740:

Clarify `minfree` warning message in check_space(..)

- State that the units are kB.
- Be more complete/concise in terms of what is required (in this case
  `minfree` must be at least `X`kB)

6 years agoMFC r317311,r317312,r319019:
ngie [Wed, 31 May 2017 08:40:39 +0000 (08:40 +0000)]
MFC r317311,r317312,r319019:

r317311:

Check for failures from getpagesize(3)

Return errno on failure, similar to the open(2) call above it.

CID: 1193753

r317312:

Fix type for `pagesize` to match the return type for getpagesize(3)
to fix the build

Pointyhat to: ngie

r319019:

Remove getpagesize(3) error checking added in r317312

getpagesize(3) no longer fails as of r317436.

6 years agoMFC r319056,r319058,r319059,r319060,r319061,r319078:
ngie [Wed, 31 May 2017 08:36:43 +0000 (08:36 +0000)]
MFC r319056,r319058,r319059,r319060,r319061,r319078:

r319056:

tests/sys/file/ftruncate_test: use an exit code of 1 instead
of -1 with err*(3).

An exit code of -1 is implementation defined -- it's best to stick
with something well-defined (1).

r319058:

Create a deterministic file in the kyua sandbox, instead of a
temporary file outside the kyua sandbox

This helps ensure that the file is removed at test exit, and as
a side effect, cures a warning about umasks with Coverity.

r319059:

Use an exit code of 1 instead of -1 for reasons noted in r319056

r319060:

Use main(void) instead of main(argc __unused, argv __unused)

r319061:

Don't leak accept_fd on thread completion

CID: 1296068

r319078:

Tweak r319058 slightly

- Specify an explicit mode when using O_CREAT per open(2).
- Fix the error message (add missing enclosing parentheses).

MFC with: r319058

6 years agoMFC r319027,r319028,r319029,r319030,r319031,r319033,r319034,r319035,r319036,r319037...
ngie [Wed, 31 May 2017 08:32:05 +0000 (08:32 +0000)]
MFC r319027,r319028,r319029,r319030,r319031,r319033,r319034,r319035,r319036,r319037,r319038,r319039,r319040,r319041,r319042,r319043,r319044,r319045,r319046:

r319027:

lib/libc/tests/nss: use calloc appropriately

The pattern used prior to this commit was `calloc(1, n * sizeof(type))`;
the pattern that should be used however is `calloc(n, sizeof(type))`.

r319028:

Sort make variables to suit style.Makefile(5)

This is being done prior to functional changes.

r319029:

Staticize functions and remove unused variables to aid with bumping WARNS

r319030:

Fix -Wsign-compare warnings

r319031:

getusershell_test: staticize run_tests(..) to fix warnings

r319033:

getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings

r319034:

getaddrinfo_test: fix -Wsign-compare warnings

r319035:

getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings

r319036:

getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings

r319037:

getaddrinfo_test: mark unused function parameters __unused to fix -Wunused
warnings

r319038:

getusershell_test: mark mdata parameter in compare_usershell __unused

r319039:

getserv_test: mark unused parameters __unused to fix corresponding
warnings

r319040:

getrpc_test: fix -Wunused warnings

- Mark unused function parameters unused.
- Remove an unused function prototype.

r319041:

getproto_test: fix -Wunused warnings

Mark unused parameters __unused in functions.

r319042:

gethostby_test: fix multiple warning types

- Fix -Wmissing-declaration warning by staticizing run_tests.
- Fix -Wsign-compare warnings by casting size_t types to int
  for comparisons.

Reindent some of the code in sdump_hostent(..) to accomodate the
overall changes.

r319043:

getpw_test: fix -Wunused warnings

- Mark unused parameters __unused.
- Put dump_passwd under DEBUG as it's only used in that case.

r319044:

getgr_test: fix -Wunused warnings

r319045:

Fix -Wunused and -Wshadow warnings

r319046:

Fix a -Wunused-but-set-variable warning reported by gcc 6.3.0

6 years agoMFC r306691,310036:
delphij [Wed, 31 May 2017 08:21:16 +0000 (08:21 +0000)]
MFC r306691,310036:

Merge byacc 20161202.

6 years agoMFC r319062:
ngie [Wed, 31 May 2017 08:07:51 +0000 (08:07 +0000)]
MFC r319062:

Initial `srv` before using it in bind(2)

CID: 1357526

6 years agoMFC r304106:
delphij [Wed, 31 May 2017 06:47:56 +0000 (06:47 +0000)]
MFC r304106:

Add timingsafe_bcmp and timingsafe_memcmp.

Obtained from: OpenBSD
Reviewed by: trasz

6 years agoMFC r316649 (kan):
delphij [Wed, 31 May 2017 06:07:19 +0000 (06:07 +0000)]
MFC r316649 (kan):

Add missing double quote to fix r316635 commit.

6 years agoMFC r318514-r318515, r318517, r318917
delphij [Wed, 31 May 2017 05:52:32 +0000 (05:52 +0000)]
MFC r318514-r318515, r318517, r318917

r318514:
Use size_t.

Inspired by: OpenBSD src/lib/libc/stdlib/qsort.c,v 1.11

r318515:
The current qsort(3) implementation ignores the sizes of partitions, and
always perform recursion on the left partition, then use a tail call to
handle the right partition.  In the worst case this could require O(N)
levels of recursions.

Reduce the possible recursion level to log2(N) by always recursing on the
smaller partition instead.

Obtained from: PostgreSQL 9d6077abf9d6efd992a59f05ef5aba981ea32096

r318517:
Sync qsort.c with userland r318515.

(Note that MIN macro is removed in favor of sys/param.h's version).

PR: 213922

r318917:
Disconnect heimdal version of qsort.c from build because we are already
using libc's version of qsort.

PR: bin/213922

6 years agoMFC r311989 (cem):
delphij [Wed, 31 May 2017 05:45:06 +0000 (05:45 +0000)]
MFC r311989 (cem):

libkern: Remove obsolete 'register' keyword

6 years agoMFC r316635:
delphij [Wed, 31 May 2017 05:37:51 +0000 (05:37 +0000)]
MFC r316635:

Enable 16-bit longest_match for x86.

This gives a ~2% improvement in compression tests.

7 years agoMFC r313327:
delphij [Wed, 31 May 2017 05:29:20 +0000 (05:29 +0000)]
MFC r313327:

Reflect actual NetBSD revision we already have.

7 years agoMFC r313695, r313760, r314769, r314863, r314865, r316125
delphij [Wed, 31 May 2017 05:20:59 +0000 (05:20 +0000)]
MFC r313695, r313760, r314769, r314863, r314865, r316125

r313695:
MFV r313676: libpcap 1.8.1

r313760:
MFV r313759: license change for a few headers (4 clause BSD to 3 clause BSD).

X-MFC-with: r313695

r314769:
Remove compatibility with old libpcap.

Differential Revision: https://reviews.freebsd.org/D9606

r314863:
Stop installing pcap-int.h, which is the internal interface for libpcap.

Reference: https://github.com/the-tcpdump-group/libpcap/issues/560
PR: 217221

r314865:
Bump __FreeBSD_version for removal of pcap-int.h.

PR: 217221

r316125:
MFV r316124: Fix build when WITHOUT_INET6.

Reported by: Randy Westlund <rwestlun gmail com>

7 years agoMFC r315272, r315370
delphij [Wed, 31 May 2017 05:10:03 +0000 (05:10 +0000)]
MFC r315272, r315370

r315272:
Implement INHERIT_ZERO for minherit(2).

INHERIT_ZERO is an OpenBSD feature.

When a page is marked as such, it would be zeroed
upon fork().

This would be used in new arc4random(3) functions.

PR: 182610
Reviewed by: kib (earlier version)
Differential Revision: https://reviews.freebsd.org/D427

r315370:
The adj_free and max_free values of new_entry will be calculated and
assigned by subsequent vm_map_entry_link(), therefore, remove the
pointless copying.

Submitted by: alc

7 years agoMFC r315615:
delphij [Wed, 31 May 2017 05:05:32 +0000 (05:05 +0000)]
MFC r315615:

Make space style consistent with earlier entries.

7 years agoMFC r318975:
delphij [Wed, 31 May 2017 05:00:02 +0000 (05:00 +0000)]
MFC r318975:

Tighten /entropy permissions.

PR: 219527
Reported by: Lu Tung-Pin <lutungpin at openmailbox.org>
Submitted by: jilles

7 years agoMFC r318774:
np [Wed, 31 May 2017 00:43:34 +0000 (00:43 +0000)]
MFC r318774:

cxgbe/iw_cxgbe: sodisconnect failures are harmless and should not be
treated as fatal errors.

Sponsored by: Chelsio Communications

7 years agoMFC r318762:
np [Wed, 31 May 2017 00:16:05 +0000 (00:16 +0000)]
MFC r318762:

cxgbe(4): Update the T4, T5, and T6 firmwares to 1.16.45.0.

The latest firmware has a number of link related fixes, support for a
new custom card, and the fix for a bug that affected rate limiting on
FreeBSD.

Relnotes: Yes
Sponsored by: Chelsio Communications

7 years agoMFC r314176 and r318973.
np [Tue, 30 May 2017 21:55:48 +0000 (21:55 +0000)]
MFC r314176 and r318973.

r314176:
Add support for RDMA from userspace with T6 cards.

r318973:
libcxgb4: Use memcpy instead of copying WRs 8B at a time in the userspace
RDMA library for cxgbe(4).

Sponsored by: Chelsio Communications

7 years agoRegenerate src.conf(5)
ngie [Tue, 30 May 2017 18:08:33 +0000 (18:08 +0000)]
Regenerate src.conf(5)

7 years agoMFC r313169,r319246:
ngie [Tue, 30 May 2017 18:04:55 +0000 (18:04 +0000)]
MFC r313169,r319246:

r313169 (by wblock):

Clarify some option descriptions, add a line of text to makeman to
add the slightest hint of a shade of a clue of what it does.

r319246:

Use .Xr to reference libblacklist(3), blacklistctl(8), and blacklistd(8)

7 years agoMFC r317168:
ngie [Tue, 30 May 2017 17:47:19 +0000 (17:47 +0000)]
MFC r317168:

Add a knob, WITH*_RPCBIND_WARMSTART_SUPPORT, to allow the end-user to build
rpcbind(8) with/without warmstart support.

The knob defaults to off to preserve POLA for the feature.

See rpcbind(8) for more details about the warmstart feature.

Relnotes: yes

7 years agoMFC r317155,r317162,r317163,r317164:
ngie [Tue, 30 May 2017 17:37:40 +0000 (17:37 +0000)]
MFC r317155,r317162,r317163,r317164:

r317155:

rpcbind(8): wordsmith -h description and mention -W in the SYNOPSIS section

-W was already documented in the OPTIONS section.

r317162:

rpcbind(8): add a description for /var/run/rpcbind.sock under the FILES section

r317163:

rpcbind(8): post-humously document -w (warmstart) support added in r74462

warmstart support saves portmap/rpcbind(8) registration state on exit and
restores the saved registration state on restart.

r317164:

Fix indentation per style.Makefile(5)

7 years agoMFC r318305: makeman: reword description, based on feedback from wblock
emaste [Tue, 30 May 2017 17:09:47 +0000 (17:09 +0000)]
MFC r318305: makeman: reword description, based on feedback from wblock

7 years agoMFC arch.7 man page describing some arch-specific details
emaste [Tue, 30 May 2017 17:07:40 +0000 (17:07 +0000)]
MFC arch.7 man page describing some arch-specific details

MFC of r318386, r317938, r317844, r317843, r317840, r317835, r317809,
       r317790, r317754, r317708, r317681, r312563, r308251, r308130,
       r307687, r303153, r303134, r303045, r303044, r303033
Changes by br, emaste, jhb, jhibbits, kevlo, kib

Sponsored by: The FreeBSD Foundation

7 years agoMFC r318316: uniq: allow -c to be used with -d or -u
emaste [Tue, 30 May 2017 16:55:15 +0000 (16:55 +0000)]
MFC r318316: uniq: allow -c to be used with -d or -u

Bring in some bits from NetBSD and lift the restriction in uniq(1) that
-c cannot be used with the -d and -u options.  This restriction seems
unnecessary and is supported at least by GNU, OpenBSD, and NetBSD.  Lift
the restriction and simplify the show() logic a little bit to maintain
functionality when -c is provided with -d/-u.

Also with this change, -d and -u are now actually a mutually exclusive,
albeit valid, combination.  Given that they both indicate opposite
behavior, uniq(1) will no longer output anything if both -d and -u are
supplied.  This is in line with NetBSD as well as GNU.

Adjust the man page and usage() to reflect that -c is its own standalone
option.

PR: 200553
Submitted by: Kyle Evans <kevans91@ksu.edu>

7 years agoMFC r318689: Add parent interface reference counting to if_vlan.
mav [Tue, 30 May 2017 16:34:18 +0000 (16:34 +0000)]
MFC r318689: Add parent interface reference counting to if_vlan.

Using plain ifunit() looks like a request for troubles.

7 years agoMFC r318593:
asomers [Tue, 30 May 2017 15:33:27 +0000 (15:33 +0000)]
MFC r318593:

Fix build of AIO tests with -DDEBUG

Also, redefine some constants for clarity.  No functional change.

7 years agoMFC r318141, r318143-r318144
asomers [Tue, 30 May 2017 15:18:22 +0000 (15:18 +0000)]
MFC r318141, r318143-r318144

r318141:
strcpy => strlcpy

Reported by: Coverity
CID: 1352771
Sponsored by: Spectra Logic Corp

r318143:
strcpy => strlcpy

Reported by: Coverity
CID: 1006715
Sponsored by: Spectra Logic Corp

r318144:
Don't depend on assert(3) getting evaluated

Reported by: imp
X-MFC-With: 318141, 318143
Sponsored by: Spectra Logic Corp

7 years agoMFC r307334, r318252: Support write-through caches on arm64
andrew [Tue, 30 May 2017 13:56:38 +0000 (13:56 +0000)]
MFC r307334, r318252: Support write-through caches on arm64

r307334:
Create macros for the MAIR memory attributes. While here add an uncached
memory type, however the VM code still needs to be taught about this.

r318252:
Add the VM_MEMATTR_WRITE_THROUGH memory type to arm64 and use it to support
VM_MEMATTR_WRITE_COMBINING in the kernel. This fixes a bug where Xorg would
use write back cached memory for its graphics buffers. This would produce
artifacts on the screen as cachelines were written to memory.

7 years agoMFC r317824:
andrew [Tue, 30 May 2017 13:35:54 +0000 (13:35 +0000)]
MFC r317824:

Add reclaim_pv_chunk on arm64. This is based on the amd64 code so should
operate similarly, other than not needing the delayed invalidation.

It has been tested with artificial injection of vm_page_alloc failures
while running 'sort /dev/zero'.

7 years agoMFC r317361:
andrew [Tue, 30 May 2017 13:26:37 +0000 (13:26 +0000)]
MFC r317361:

Call the PSCI reset from cpu_reset on arm64. When rebooting from DDB the
kernel calls this directly so the event handler is not called, meaning
the computer fails to reboot.

7 years agoMFC r317197:
andrew [Tue, 30 May 2017 13:21:43 +0000 (13:21 +0000)]
MFC r317197:

Restrict the arm64 supervisor all instructions to only allow a zero
immediate value for system calls. We may wish to use other values in the
future for other purposes.

7 years agoMFC r317192:
andrew [Tue, 30 May 2017 13:16:06 +0000 (13:16 +0000)]
MFC r317192:

Push loading curthread into assembly in the synchronous exception handlers.
This will help investigating the performance impact of moving parts of the
switch statement in do_el0_sync into assembly.

7 years agoMFC r313396:
andrew [Tue, 30 May 2017 13:02:10 +0000 (13:02 +0000)]
MFC r313396:

Push reading of ESR_EL1 to assembly. Among other uses this will allow us
to expose this to signal handlers, e.g. for the clang sanitizers.

7 years agoMFC r316734, r316761: Support Execute-Never bit in the arm64 pmap.
andrew [Tue, 30 May 2017 12:44:01 +0000 (12:44 +0000)]
MFC r316734, r316761: Support Execute-Never bit in the arm64 pmap.

r316734:
Start to use the User and Privileged execute-never bits in the arm64
pagetables. This sets both bits when entering an address we know shouldn't
be executed.

I expect we could mark all userspace pages as Privileged execute-never to
ensure the kernel doesn't branch to one of these addresses.

While here add the ARMv8.1 upper attributes.

r316761:
Set the arm64 Execute-never bits in more places.

We need to set the Execute-never bits when mapping device memory as the
hardware may perform speculative instruction fetches.

Set the Privileged Execute-ever bit on userspace memory to stop the kernel
if it is tricked into executing it.

7 years agoMFC r316732, r316756: Enable Privileged Access Never on arm64.
andrew [Tue, 30 May 2017 12:26:36 +0000 (12:26 +0000)]
MFC r316732, r316756: Enable Privileged Access Never on arm64.

r316732:
Use the unprivileged variant of the load and store instructions most
places possible in the kernel. This forces these functions to fail if
userspace is unable to access a given memory location, even if it is in
the user memory range.

This will simplify adding Privileged Access Never support later.

r316756:
In ARMv8.1 ARM has added a process state bit to disable access to userspace
from the kernel. Make use of this to restrict accessing userspace to just
the functions that explicitly handle crossing the user kernel boundary.

7 years agoMFC r316755:
andrew [Tue, 30 May 2017 11:03:05 +0000 (11:03 +0000)]
MFC r316755:

Add SCTLR bits added in ARMv8.1 and ARMv8.2 and start to use them in the
early boot code.

7 years agoMFC r312703:
andrew [Tue, 30 May 2017 10:50:15 +0000 (10:50 +0000)]
MFC r312703:

Fix the error value we write in cerror. __error returns an int *, however
we were writing a 64 bit value meaning the 32 bits after this would be
trashed.

7 years agoRegenerate src.conf(5) after MK_DIALOG was added
ngie [Tue, 30 May 2017 07:31:02 +0000 (07:31 +0000)]
Regenerate src.conf(5) after MK_DIALOG was added

7 years agoMFC r314463:
ngie [Tue, 30 May 2017 07:29:18 +0000 (07:29 +0000)]
MFC r314463:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

7 years agoMFC r306375,r307802:
ngie [Tue, 30 May 2017 07:28:27 +0000 (07:28 +0000)]
MFC r306375,r307802:

r306375 (by emaste):

Add a WITHOUT_DIALOG src.conf(5) knob

It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup).

r307802 (by bapt):

Fix build of tzsetup when WITHOUT_DIALOG is set

Hide dialog specific code behind HAVE_DIALOG. It allows to build a stripped
down version (missing the dialog UI) but perfectly function tzsetup when
world is built WITHOUT_DIALOG

Reorganise a bit the code to limit the number of blocks under HAVE_DIALOG

7 years agoMFC r314451,r314452,r314453,r314456,r314457,r314458,r314459,r314460,r314461,r314462...
ngie [Tue, 30 May 2017 05:15:09 +0000 (05:15 +0000)]
MFC r314451,r314452,r314453,r314456,r314457,r314458,r314459,r314460,r314461,r314462,r314464,r314466,r314468,r314470,r314472,r314478:

r314451:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

The SRCTOP conversion simplifies pathing in make/displayed output.

Also, while here, change a hardcoded path to ar5523.bin.uu in the make target
with ${.ALLSRC} .

r314452:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

r314453:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

r314456:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

r314457:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

The SRCTOP conversion simplifies pathing in make/displayed output.

Also, while here, change a hardcoded path to ${RPCDIR}/ypupdate_prot.x in
the make targets with ${.ALLSRC} .

r314458:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

r314459:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

r314460:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

r314461:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

r314462:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

The SRCTOP conversion simplifies pathing in make/displayed output.

Also, while here, change a hardcoded path to ${RPCDIR}/ypxfrd.x in
the make targets with ${.ALLSRC} .

r314464:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

r314466:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

r314468:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

Also, use :H where possible/sensical to manipulate .CURDIR-relative paths

This simplifies pathing in make/displayed output.

r314470:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

r314472:

Simplify/improve idioms in usr.sbin/ntp Makefiles

- Use SRCTOP-relative paths to other directories instead of
  .CURDIR-relative ones. This simplifies pathing in make/displayed output.
- Also, use :H where possible/sensical to manipulate .CURDIR-relative
  paths
- Remove superfluous bsd.own.mk .includes which are already handled via
  src.opts.mk .includes

r314478:

Simplify idioms in Makefiles further

- Use SRCTOP-relative paths instead of .CURDIR-relative ones where possible
- Use :H to manipulate .CURDIR in areas instead of ..-relative paths.

7 years agoMFC r314541:
ngie [Tue, 30 May 2017 04:45:11 +0000 (04:45 +0000)]
MFC r314541:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

7 years agoMFC r314658:
ngie [Tue, 30 May 2017 04:42:36 +0000 (04:42 +0000)]
MFC r314658:

crypto: normalize paths using SRCTOP-relative paths or :H when possible

This simplifies make logic/output

7 years agoMFC r318439:
ngie [Tue, 30 May 2017 04:36:11 +0000 (04:36 +0000)]
MFC r318439:

Normalize .PATH on SRCTOP

This will help Jenkins dedupe 9 warnings between the static build and
the module build of ipsec(4).

Missed in SRCTOP conversion in r314651.

MFC with: r314651

7 years agoMFC r307741:
ngie [Tue, 30 May 2017 04:31:35 +0000 (04:31 +0000)]
MFC r307741:
r307741 (by emaste):

Allow all subdirectories to be optional via SUBDIR.${MK_*}

Tested by: br
Pointy hat to: emaste

7 years agoMFC r315170:
ngie [Tue, 30 May 2017 04:27:05 +0000 (04:27 +0000)]
MFC r315170:
r315170 (by imp):

Adopt SRCTOP in usr.bin

Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo
over ${.CURDIR}/../foo for paths in Makefiles.

Silence on: arch@ (twice)

7 years agoMFC r314655:
ngie [Tue, 30 May 2017 04:17:22 +0000 (04:17 +0000)]
MFC r314655:

bin: normalize paths using SRCTOP-relative paths or :H when possible

This simplifies make logic/output

7 years agoMFC r314655:
ngie [Tue, 30 May 2017 04:15:40 +0000 (04:15 +0000)]
MFC r314655:

bin: normalize paths using SRCTOP-relative paths or :H when possible

This simplifies make logic/output

7 years agoMFC r314657:
ngie [Tue, 30 May 2017 04:13:06 +0000 (04:13 +0000)]
MFC r314657:

kerberos5: normalize paths using SRCTOP-relative paths or :H when possible

This simplifies make logic/output

7 years agoMFC r314651,r318439,r318440:
ngie [Tue, 30 May 2017 04:11:12 +0000 (04:11 +0000)]
MFC r314651,r318439,r318440:

r314651:

sys/modules: normalize .CURDIR-relative paths to SRCTOP

This simplifies make output/logic

Tested with: `cd sys/modules; make ALL_MODULES=` on amd64

r318439:

Normalize .PATH on SRCTOP

This will help Jenkins dedupe 9 warnings between the static build and
the module build of ipsec(4).

Missed in SRCTOP conversion in r314651.

MFC with: r314651

r318440:

Normalize SYSDIR on SRCTOP instead of .CURDIR

This is being done to simplify pathing for CFLAGS and source files.

7 years agoMFC r307698:
ngie [Tue, 30 May 2017 04:00:26 +0000 (04:00 +0000)]
MFC r307698:
r307698 (by lwhsu):

- Add required header for fixing `make` in sys/modules/gpio