]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC r312664: Always initialize 'c'.
delphij [Mon, 6 Feb 2017 05:22:55 +0000 (05:22 +0000)]
MFC r312664: Always initialize 'c'.

7 years agoMFC r303802:
bcr [Sun, 5 Feb 2017 22:18:45 +0000 (22:18 +0000)]
MFC r303802:
Update with the members of the 9th core team.

7 years agoMFC r308583:
bcr [Sun, 5 Feb 2017 21:56:36 +0000 (21:56 +0000)]
MFC r308583:
Fix a broken link to the USB audio class specs.

PR: 214240
Submitted by: Tobias Kortkamp t@tobik.me

7 years agoMFC r310096: reaper: Make REAPER_KILL_SUBTREE actually work.
jilles [Sun, 5 Feb 2017 20:55:01 +0000 (20:55 +0000)]
MFC r310096: reaper: Make REAPER_KILL_SUBTREE actually work.

7 years agoMFC r312721: skel: Remove reference to deleted part in previous commit
jilles [Sun, 5 Feb 2017 14:25:31 +0000 (14:25 +0000)]
MFC r312721: skel: Remove reference to deleted part in previous commit
to this file.

7 years agoMFC r312954:
kib [Sun, 5 Feb 2017 00:39:44 +0000 (00:39 +0000)]
MFC r312954:
Do not leave stale 4K TLB entries on pde (superpage) removal or
protection change.

7 years agoMFC r311585:
ngie [Sat, 4 Feb 2017 17:26:28 +0000 (17:26 +0000)]
MFC r311585:

Conditionalize building libwrap support into sshd

Only build libwrap support into sshd if MK_TCP_WRAPPERS != no

This will unbreak the build if libwrap has been removed from the system

PR: 210141

7 years agoMFC r311174:
ngie [Sat, 4 Feb 2017 17:21:17 +0000 (17:21 +0000)]
MFC r311174:

Make /usr/lib/libbsnmptools.so.0 into an INTERRNALLIB

Although it increases the size of the bsnmp{get,set,walk} binaries by
four on my [amd64] system, it removes the need for producing .debug
files, profiled libraries, and for installing the library itself,
reducing the overall size use on disk by the utilities noted
previously.

Plus, it guards against ABI/API compatibility issues with the library
as it's only used internal to the tools themselves.

7 years agoMFC r311394:
ngie [Sat, 4 Feb 2017 17:18:49 +0000 (17:18 +0000)]
MFC r311394:

op_usm_users: don't deref uusers if it's NULL when SETting the value

Add an XXX comment to note that the conditional seems suspect given
how it's handled elsewhere in the SNMP_OP_SET case.

CID: 1008573

7 years agoMFC r312332,r312446,r312451:
ngie [Sat, 4 Feb 2017 17:17:38 +0000 (17:17 +0000)]
MFC r312332,r312446,r312451:

r312332:

Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of
unnecessarily long relative path .PATH values with make

r312446 (by emaste):

libc: remove reference to nonexistent lib/locale directory

As far as I can tell this was introduced in r72406 and updated in several
subsequent revisions, but the lib/locale directory it referenced never
existed.

r312451:

Replace dot-dot relative pathing with SRCTOP-relative paths where possible

This reduces build output, need for recalculating paths, and makes it clearer
which paths are relative to what areas in the source tree. The change in
performance over a locally mounted UFS filesystem was negligible in my testing,
but this may more positively impact other filesystems like NFS.

LIBC_SRCTOP was left alone so Juniper (and other users) can continue to
manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as
include Makefiles with custom options.

Discussed with: marcel, sjg

7 years agoMFC r311744,r312328,r312329,r312330:
ngie [Sat, 4 Feb 2017 17:10:19 +0000 (17:10 +0000)]
MFC r311744,r312328,r312329,r312330:

r311744:

Document bsd.snmpmod.mk from a high-level

r312328:

Add a make target (smilint) for running smilint tool against BMIBS

Running smilint against MIB definitions is useful in finding
functional problems with MIB definitions/descriptions.

This is inspired by the smilint targets defined in
usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile

Document all of the variables that are involved in running the
smilint target, as well as all of the prerequisites to running
it.

r312329:

Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328

r312330:

Add smilint target to subdir targets so "make smilint" here will run
the smilint target in subdirs

While here, convert a path that's .CURDIR relative to SRCTOP

7 years agoMFC r310467:
ngie [Sat, 4 Feb 2017 17:08:21 +0000 (17:08 +0000)]
MFC r310467:

Provide some guidance when dealing with sections and variables contained
within them

For example, using variables designated for %usm requires uncommenting
%usm section header

7 years agoMFC r303841,r312012,r312213:
ngie [Sat, 4 Feb 2017 17:06:51 +0000 (17:06 +0000)]
MFC r303841,r312012,r312213:

r303841 (by bdrewery):

Revert r298434 which should be fixed by r301287, r301394, and r301403.

PR: 208703, 208963

r312012:

fmaxmin_test still fails with clang 3.9.x.. bypass the test

PR: 208703

r312213:

Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check
of the clang version

This works around breakage on ^/stable/10 when running installworld from
a ^/stable/10 host where the test wouldn't be compiled on the first
go-around and would be missing when make installworld is run.

PR: 208703

7 years agoMFC r312114:
ngie [Sat, 4 Feb 2017 17:02:54 +0000 (17:02 +0000)]
MFC r312114:

Enable WARNS?= 6 across all of tests/sys

7 years agoMFC r312120:
ngie [Sat, 4 Feb 2017 17:01:53 +0000 (17:01 +0000)]
MFC r312120:

Fix warnings

- Staticize test_num
- Promote i to size_t to deal with -Wsign-compare issues

Tested with: clang, gcc, gcc49

7 years agoMFC r312110:
ngie [Sat, 4 Feb 2017 16:58:06 +0000 (16:58 +0000)]
MFC r312110:

Fix -Wsign-compare warnings

The loop index (i) doesn't need to be size_t as its comparison is signed

7 years agoMFC r312164:
ngie [Sat, 4 Feb 2017 16:56:51 +0000 (16:56 +0000)]
MFC r312164:

Fix -Wformat issue

Use %zu for printing out results from nitems, as it's size_t based

7 years agoMFC r311473:
ngie [Sat, 4 Feb 2017 16:55:46 +0000 (16:55 +0000)]
MFC r311473:

Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard

This will allow the code to stand by itself without libwrap

7 years agoMFC r311471:
ngie [Sat, 4 Feb 2017 16:54:44 +0000 (16:54 +0000)]
MFC r311471:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into sendmail.

7 years agoMFC r311469:
ngie [Sat, 4 Feb 2017 16:52:48 +0000 (16:52 +0000)]
MFC r311469:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into ypserv.

7 years agoMFC r311972:
ngie [Sat, 4 Feb 2017 16:49:50 +0000 (16:49 +0000)]
MFC r311972:

Add __BIT and __BITS macros from NetBSD to help support new testcases

7 years agoMFC r311925,r311968,r311969,r312102,r312108:
ngie [Sat, 4 Feb 2017 16:47:56 +0000 (16:47 +0000)]
MFC r311925,r311968,r311969,r312102,r312108:

r311925:

Import testcase updates with code contributed back to NetBSD

This also (inadvertently) contains an update to
contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases).

In collaboration with: christos@NetBSD.org

r311968:

Fix lib/libc/sys/access_test after r311925

sys/param.h needs to be #included in order for __FreeBSD_version to be checked

r311969:

Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile

This is to enable support in other testcases

Inspired by lib/msun/tests/Makefile .

r312102:

Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD

r312108:

Delete trailing whitespace and use __arraycount instead of nitems in contrib code

7 years agoMFC r312119,r312216,r312226:
ngie [Sat, 4 Feb 2017 16:02:48 +0000 (16:02 +0000)]
MFC r312119,r312216,r312226:

r312119:

encode_long, encode_timeval: mechanically replace `exp` with `exponent`

This helps fix a -Wshadow issue with exp(3) with tests/sys/acct/acct_test,
which include math.h, which in turn defines exp(3)

Tested with: clang, gcc 4.2.1, gcc 4.9

r312216:

Revert r312119 and reword the intent to fix -Wshadow issues
between exp(3) and `exp` var.

The approach taken previously was not ideal for multiple
functional and stylistic reasons.

Add to existing sed call in Makefile to replace `exp` with
`exponent` instead.

Requested by: bde

r312226:

Fix typo in r312216

I meant to replace "exp" with "exponent", not "expected"

Pointyhat to: ngie

7 years agoMFC r311472:
ngie [Sat, 4 Feb 2017 16:00:19 +0000 (16:00 +0000)]
MFC r311472:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into amd(8).

7 years agoMFC r311470:
ngie [Sat, 4 Feb 2017 15:56:24 +0000 (15:56 +0000)]
MFC r311470:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into rpcbind.

7 years agoFreeBSD 11.0 release date added.
sevan [Sat, 4 Feb 2017 15:53:34 +0000 (15:53 +0000)]
FreeBSD 11.0 release date added.

7 years agoAdd NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
sevan [Sat, 4 Feb 2017 15:52:49 +0000 (15:52 +0000)]
Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
Ammend the position of NetBSD 6.0.2 release in the tree as it came
after OpenBSD[1] & DragonFlyBSD[2] release according to the release
information.
The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from
NetBSD CVS copy) and confirmed with history page[3]

[1] http://www.openbsd.org/53.html
[2] https://www.dragonflybsd.org/releases/
[3] http://netbsd.org/releases/formal.html#history

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8099

7 years agoOpenBSD 6.0 added.
sevan [Sat, 4 Feb 2017 15:51:45 +0000 (15:51 +0000)]
OpenBSD 6.0 added.

7 years agoDragonFly 4.6.0 release added.
sevan [Sat, 4 Feb 2017 15:50:47 +0000 (15:50 +0000)]
DragonFly 4.6.0 release added.

7 years agoMFC r312105,r312162:
ngie [Sat, 4 Feb 2017 15:49:50 +0000 (15:49 +0000)]
MFC r312105,r312162:

r312105:

Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS

This will allow inetd to stand by itself without libwrap.

Relnotes: yes

r312162:

Fix up r312105

- Only #include tcpd.h when LIBWRAP is true to avoid header include errors
- Only define whichaf when LIBWRAP is true to avoid -Wunused warning and
  to avoid issues with structs being defined that should only be defined
  when tcpd.h is included.

Pointyhat to: ngie

7 years agoFix the previous commit to the family tree file. It is too early
sevan [Sat, 4 Feb 2017 15:48:53 +0000 (15:48 +0000)]
Fix the previous commit to the family tree file.  It is too early
to list 11.0, and we do not list -CURRENT here.

Submitted by: maxim
Sponsored by: The FreeBSD Foundation

7 years agoMFC r311263:
ngie [Sat, 4 Feb 2017 15:45:39 +0000 (15:45 +0000)]
MFC r311263:

Use calloc instead of malloc with buffers in snmp_{recv,send}_packet

This doesn't fix the issue noted in the PR, but at the very least it
cleans up the error so it looks a bit more sane, and in the event
that bsnmp did wander off into the weeds, the likelihood of it
crashing with more sensible output is greater, in my opinion

MFC counter set high so I have enough time to resolve the real
underlying bug in bsnmpwalk

PR: 215721

7 years agoMFC r312937:
ngie [Sat, 4 Feb 2017 15:43:54 +0000 (15:43 +0000)]
MFC r312937:

Fix typo in lib/Makefile

The SUBDIR_DEPEND variable should be for librpcsec_gss, not
liblibrpc_gss

PR: 216409

7 years agoBelatedly add FreeBSD 11.0 and 12.0 to the family tree file.
sevan [Sat, 4 Feb 2017 15:41:59 +0000 (15:41 +0000)]
Belatedly add FreeBSD 11.0 and 12.0 to the family tree file.

Submitted by: des (a while back)
Sponsored by: The FreeBSD Foundation

7 years agoMFC r312935:
ngie [Sat, 4 Feb 2017 15:41:44 +0000 (15:41 +0000)]
MFC r312935:

Remove duplicate bhnd SUBDIR entry

PR: 216413

7 years agoMFC r310124 (by andrew):
gonzo [Sat, 4 Feb 2017 01:24:21 +0000 (01:24 +0000)]
MFC r310124 (by andrew):

Add -fPIC to the ubldr build. Without this the self relocation code will
try to use an absolute address in a switch statement, jumping to an invalid
memory location.

Sponsored by: ABT Systems Ltd

PR: 216504

7 years agoMFC 312904: Don't drop a reference to the TOE PCB in undo_offload_socket().
jhb [Fri, 3 Feb 2017 23:48:56 +0000 (23:48 +0000)]
MFC 312904: Don't drop a reference to the TOE PCB in undo_offload_socket().

undo_offload_socket() is only called by t4_connect() during a connection
setup failure, but t4_connect() still owns the TOE PCB and frees ita
after undo_offload_socket() returns.  Release a reference in
undo_offload_socket() resulted in a double-free which panicked when
t4_connect() performed the second free.  The reference release was
added to undo_offload_socket() incorrectly in r299210.

Sponsored by: Chelsio Communications

7 years agoMFC 312906:
jhb [Fri, 3 Feb 2017 23:33:06 +0000 (23:33 +0000)]
MFC 312906:
Unregister CPL handlers for TOE-related messages when unloading TOM.

Sponsored by: Chelsio Communications

7 years agoMFC 313020: Fix a couple of issues with t4iov probe and attach.
jhb [Fri, 3 Feb 2017 21:37:27 +0000 (21:37 +0000)]
MFC 313020: Fix a couple of issues with t4iov probe and attach.

- Check for Chelsio vendor ID in probe routines.
- Fail attach instead of faulting if pci_find_dbsf() doesn't find a
  device.

PR: 216539
Sponsored by: Chelsio Communications

7 years agoMFC r312993:
dim [Fri, 3 Feb 2017 19:15:53 +0000 (19:15 +0000)]
MFC r312993:

Pull in r279454 from upstream llvm trunk (by James Molloy):

  [SROA] Remove incorrect assertion

  Confirmed with aprantl, this assertion is incorrect - code can get
  here (for example 80-bit FP types) and if it does it's benign. This
  is exposed by a completely unrelated patch of mine, so stop the
  compiler falling over.

  Original differential: http://reviews.llvm.org/D16187
  aprantl's advice to remove assertion:
  http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382129.html

This should fix assertions when building the math/opensolaris-libm port.

Reported by: marino

7 years agoMFC r312832:
dim [Fri, 3 Feb 2017 19:12:54 +0000 (19:12 +0000)]
MFC r312832:

Pull in r278160 from upstream llvm trunk (by Wei Mi):

  Recommit "Use ValueOffsetPair to enhance value reuse during SCEV
  expansion".

  The fix for PR28705 will be committed consecutively.

  In D12090, the ExprValueMap was added to reuse existing value during
  SCEV expansion. However, const folding and sext/zext distribution can
  make the reuse still difficult.

  A simplified case is: suppose we know S1 expands to V1 in
  ExprValueMap, and
    S1 = S2 + C_a
    S3 = S2 + C_b
  where C_a and C_b are different SCEVConstants. Then we'd like to
  expand S3 as V1 - C_a + C_b instead of expanding S2 literally. It is
  helpful when S2 is a complex SCEV expr and S2 has no entry in
  ExprValueMap, which is usually caused by the fact that S3 is
  generated from S1 after const folding.

  In order to do that, we represent ExprValueMap as a mapping from SCEV
  to ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a}
  into the ExprValueMap when we create SCEV for V1. When S3 is
  expanded, it will first expand S2 to V1 - C_a because of S2->{V1,
  C_a} in the map, then expand S3 to V1 - C_a + C_b.

  Differential Revision: https://reviews.llvm.org/D21313

Pull in r278161 from upstream llvm trunk (by Wei Mi):

  Fix the runtime error caused by "Use ValueOffsetPair to enhance value
  reuse during SCEV expansion".

  The patch is to fix the bug in PR28705. It was caused by setting
  wrong return value for SCEVExpander::findExistingExpansion. The
  return values of findExistingExpansion have different meanings when
  the function is used in different ways so it is easy to make mistake.
  The fix creates two new interfaces to replace
  SCEVExpander::findExistingExpansion, and specifies where each
  interface is expected to be used.

  Differential Revision: https://reviews.llvm.org/D22942

Pull in r281439 from upstream llvm trunk (by Wei Mi):

  Create a getelementptr instead of sub expr for ValueOffsetPair if the
  value is a pointer.

  This patch is to fix PR30213. When expanding an expr based on
  ValueOffsetPair, if the value is of pointer type, we can only create
  a getelementptr instead of sub expr.

  Differential Revision: https://reviews.llvm.org/D24088

This should fix assertion failures when building OpenCV >= 3.1, and also
allow building lang/spidermonkey24 without any further assertions.

PR: 215649

7 years agoAdd history section for dd(1)
sevan [Fri, 3 Feb 2017 16:57:14 +0000 (16:57 +0000)]
Add history section for dd(1)
First version of UNIX to include dd found using TUHS
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c

PR: 211777
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r312001:
pfg [Fri, 3 Feb 2017 16:35:10 +0000 (16:35 +0000)]
MFC r312001:
Remove __nonnull() attributes from x86 machine check architecture.

In this case the attributes serve little purpose as they just don't
enforce run time checks, If anything the attributes would cause NULL pointer
checks to be ignored but there are no such checks so the only effect is
cosmetic.

Reviewed by: jhb, avg

7 years agoRevert previous merge as it contained incorrect commit message.
sevan [Fri, 3 Feb 2017 12:47:24 +0000 (12:47 +0000)]
Revert previous merge as it contained incorrect commit message.

7 years agoMFC r312555:
kib [Fri, 3 Feb 2017 12:03:10 +0000 (12:03 +0000)]
MFC r312555:
Use SFENCE for ordering CLFLUSHOPT.

7 years agoIn v3 UNIX, the kill utility is documented in category 8, not 1.
sevan [Fri, 3 Feb 2017 11:17:44 +0000 (11:17 +0000)]
In v3 UNIX, the kill utility is documented in category 8, not 1.
Add a note of it.
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8

PR: 211786
Approved by: bcr (mentor)
Obtained from: TUHS
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoFix the previous commit to the family tree file. It is too early
sevan [Fri, 3 Feb 2017 11:04:50 +0000 (11:04 +0000)]
Fix the previous commit to the family tree file.  It is too early
to list 11.0, and we do not list -CURRENT here.

Submitted by: maxim
Sponsored by: The FreeBSD Foundation

7 years agoMFC r310724:
markj [Fri, 3 Feb 2017 01:32:04 +0000 (01:32 +0000)]
MFC r310724:
Follow DW_AT_specification when looking up DW_AT_type attributes.

PR: 215350, 215395

7 years agoMFC r308773:
markj [Fri, 3 Feb 2017 01:30:51 +0000 (01:30 +0000)]
MFC r308773:
Define dependencies for some auto-generated source files in libdtrace.

7 years agoMFC r307400, r307401:
markj [Fri, 3 Feb 2017 01:28:57 +0000 (01:28 +0000)]
MFC r307400, r307401:
DTrace test fixes.

7 years agoMFC r305055:
markj [Fri, 3 Feb 2017 01:23:39 +0000 (01:23 +0000)]
MFC r305055:
Recursively enumerate anonymous structs and unions in ctf_member_info().

7 years agoMFC r302793:
markj [Fri, 3 Feb 2017 01:21:56 +0000 (01:21 +0000)]
MFC r302793:
Allow ACPI wakeup code and page tables to be stored in non-contiguous pages.

7 years agoMFC r307693:
markj [Fri, 3 Feb 2017 01:19:48 +0000 (01:19 +0000)]
MFC r307693:
Simplify keg_drain() a bit by using LIST_FOREACH_SAFE.

7 years agoMFC r309698, r309699, r309700:
markj [Fri, 3 Feb 2017 01:18:47 +0000 (01:18 +0000)]
MFC r309698, r309699, r309700:
DTrace test fixes.

7 years agoMFC r309200:
markj [Fri, 3 Feb 2017 01:16:54 +0000 (01:16 +0000)]
MFC r309200:
Launder VPO_NOSYNC pages upon vnode deactivation.

7 years agoMFC r310420, r310421, r310422:
markj [Fri, 3 Feb 2017 01:15:31 +0000 (01:15 +0000)]
MFC r310420, r310421, r310422:
Fix races and logic errors around dlclose().

7 years agoMFC r310316:
markj [Fri, 3 Feb 2017 01:10:38 +0000 (01:10 +0000)]
MFC r310316:
Consistently print D variable indices in decimal when disassembling.

7 years agoMFC r312209:
markj [Fri, 3 Feb 2017 01:04:22 +0000 (01:04 +0000)]
MFC r312209:
Suppress a warning about m_assertbuf being unused.

7 years agoMFC r311902:
markj [Fri, 3 Feb 2017 00:58:08 +0000 (00:58 +0000)]
MFC r311902:
Coalesce TLB shootdowns of global PTEs in pmap_advise() on x86.

7 years agoMFC r312893:
markj [Fri, 3 Feb 2017 00:55:31 +0000 (00:55 +0000)]
MFC r312893:
Fix an off-by-one in an assertion on fasttrap tracepoint sizes.

7 years agoMFC r312199:
markj [Fri, 3 Feb 2017 00:54:27 +0000 (00:54 +0000)]
MFC r312199:
Stop the scheduler upon panic even in non-SMP kernels.

7 years agoMFC r312307:
markj [Fri, 3 Feb 2017 00:53:33 +0000 (00:53 +0000)]
MFC r312307:
Improve some of the sysctl descriptions added in r299827.

7 years agoMFC r310332:
markj [Fri, 3 Feb 2017 00:50:41 +0000 (00:50 +0000)]
MFC r310332:
Avoid modifying the object string table when patching USDT probes.

7 years agoMFC r310180, r310327
asomers [Thu, 2 Feb 2017 21:05:55 +0000 (21:05 +0000)]
MFC r310180, r310327

r310180:
Fix panic during lagg destruction with simultaneous status check

If you run "ifconfig lagg0 destroy" and "ifconfig lagg0" at the same time a
page fault may result. The first process will destroy ifp->if_lagg in
lagg_clone_destroy (called by if_clone_destroy). Then the second process
will observe that ifp->if_lagg is NULL at the top of lagg_port_ioctl and
goto fallback: where it will promptly dereference ifp->if_lagg anyway.

The solution is to repeat the NULL check for ifp->if_lagg

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8512

r310327:
Remove stray debugging code from r310180

Reported by: rstone
Pointy hat to: asomers
MFC after: 3 weeks
X-MFC-with: 310180
Sponsored by: Spectra Logic Corp

7 years agoMFC r311160, r311210, r311288, r311292, r311298, r311340
asomers [Thu, 2 Feb 2017 18:27:20 +0000 (18:27 +0000)]
MFC r311160, r311210, r311288, r311292, r311298, r311340

r311160:
misc minor fixes in mpr(4)

sys/dev/mpr/mpr_sas.c
* Fix a potential null pointer dereference (CID 1305731)
* Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID
  1211934)

sys/dev/mpr/mpr_sas_lsi.c
* Nullify a dangling pointer in mprsas_get_sata_identify
* Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935)

Reported by: Coverity (partially)
CID: 1305731 1211934 1211935
Reviewed by: slm
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8880

r311210:
Quell Coverity for diskinfo(8)

* CID 1198994: Don't run the speed disk on a disk with no sectors
* CID 1011442: Don't call close(2) if open(2) fails
* CID 1011161: Use snprintf instead of sprintf
* CID 1009825: Check the return value of lseek

Reported by: Coverity
CID: 1198994 1011442 1011161 1009825
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311288:
Delete dead code in chat(8)

It's always been dead, ever since first import in 1994.  It's still dead in
OpenBSD's version, too.

Reported by: Coverity
CID: 270586
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311292:
Remove dead code in rpc_parse.c

It's been dead ever since it was imported from TI-RPC in 1995.  The dead
code is still present in Illumos today, but was removed from NetBSD in 2006.

Reported by: Coverity
CID: 270097
Obtained from: NetBSD
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311298:
Remove dead code in dhclient(8)

The offending code has been dead ever since the import from OpenBSD in
r195805.  OpenBSD later deleted that entire function.

Reported by: Coverity
CID: 500059
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311340:
Misc Coverity fixes for tail(1)

CID 1006402: Initialize stack variable
CID 271580: Don't leak memory when ENOMEM.

Reported by: Coverity
CID: 271580 1006402
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

7 years agoMFC r312649:
kib [Thu, 2 Feb 2017 01:21:55 +0000 (01:21 +0000)]
MFC r312649:
Document mount option "nonc" for tmpfs.

7 years agoMFC r312432:
kib [Thu, 2 Feb 2017 01:18:54 +0000 (01:18 +0000)]
MFC r312432:
Add a mount option for tmpfs(5) to not use namecache.

7 years agoMFC r312430:
kib [Thu, 2 Feb 2017 01:17:04 +0000 (01:17 +0000)]
MFC r312430:
Implement VOP_VPTOCNP() for tmpfs.

7 years agoMFC r312429:
kib [Thu, 2 Feb 2017 01:14:44 +0000 (01:14 +0000)]
MFC r312429:
VNON nodes cannot exist.

7 years agoMFC r312428:
kib [Thu, 2 Feb 2017 01:11:49 +0000 (01:11 +0000)]
MFC r312428:
Refcount tmpfs nodes and mount structures.

7 years agoMFC r312728
davidcs [Thu, 2 Feb 2017 00:12:24 +0000 (00:12 +0000)]
MFC r312728
  Added support for if_transmit and if_qflush
  Removed if_start
  updated version to 3.10.33

7 years agoMFC 312782
kp [Wed, 1 Feb 2017 20:27:38 +0000 (20:27 +0000)]
MFC 312782

bridge: Release the bridge lock when calling bridge_set_ifcap()

This calls ioctl() handlers for the different interfaces in the bridge.
These handlers expect to get called in an ioctl context where it's safe
for them to sleep. We may not sleep with the bridge lock held.

However, we still need to protect the interface list, to ensure it
doesn't get changed while we iterate over it.
Use BRIDGE_XLOCK(), which prevents bridge members from being removed.
Adding bridge members is safe, because it uses LIST_INSERT_HEAD().

This caused panics when adding xen interfaces to a bridge.

PR: 216304
Reviewed by: ae
Sponsored by: RootBSD
Differential Revision: https://reviews.freebsd.org/D9290

7 years agoMFC r312678: Eliminate misleading comments and dead code in
rpokala [Wed, 1 Feb 2017 04:53:52 +0000 (04:53 +0000)]
MFC r312678: Eliminate misleading comments and dead code in
lacp_port_create()

Variables "fast" and "active" are both constant in lacp_port_create(), but
comments mispleadingly suggest that "fast" can be changed via ioctl. The
constant values control the value of "lp->lp_state", so it too is constant,
and the code for assigning different value to it is essentially dead.

Remove both "fast" and "active", and set "lp->lp_state" unconditionally;
that gets rid of the dead code and misleading comments.

7 years agoMFC r312531: vmm_dev: work around a bogus error with gcc 6.3.0
avg [Mon, 30 Jan 2017 14:33:53 +0000 (14:33 +0000)]
MFC r312531: vmm_dev: work around a bogus error with gcc 6.3.0

7 years agoMFC r312228: Make `camcontrol cmd ... -i ...` return only valid bytes.
mav [Sun, 29 Jan 2017 14:28:29 +0000 (14:28 +0000)]
MFC r312228: Make `camcontrol cmd ... -i ...` return only valid bytes.

Previously code ignored resid field and returned extra zeroes in case of
data underflow.  Now it returns only real bytes received from target.

7 years agoMFC r312647:
kib [Sun, 29 Jan 2017 10:33:42 +0000 (10:33 +0000)]
MFC r312647:
Add comments explaining unobvious td_critnest adjustments in
critical_exit().

7 years agoMFC r312644, r312650
bapt [Sat, 28 Jan 2017 17:40:37 +0000 (17:40 +0000)]
MFC r312644, r312650

r312644:
Readd a feature lost in pw(8) refactoring

pw usermod foo -m

It used to be able to (re)create the home directory if it didn't exists

PR: 216224
Reported by: ae
MFC after: 3 days

r312650:
Really restore the old behaviour for pw usermod -m

It again reinstall missing skel files without overwriting changed one
Add a regression test about it

Reported by: ae
MFC after: 3 days

7 years agoMFC r311659:
bapt [Sat, 28 Jan 2017 17:37:51 +0000 (17:37 +0000)]
MFC r311659:

remove network mask calculation for Classful network

Nowadays it's not necessary to compute network mask from the IP address and
compare to given by DHCP.

Submitted by: kczekirda
Reviewed by: glebius, bapt
Sponsored by: Oktawave
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D8740

7 years agoMFC r312547: Mention sendfile(2) by popular demand.
wblock [Fri, 27 Jan 2017 17:54:24 +0000 (17:54 +0000)]
MFC r312547: Mention sendfile(2) by popular demand.

Sponsored by: iXsystems

7 years agoMFC r312699:
tijl [Fri, 27 Jan 2017 10:06:20 +0000 (10:06 +0000)]
MFC r312699:

Apply r210555 to 64 bit linux support:

The interpreter name should no longer be treated as a buffer that can be
overwritten.

PR: 216346

7 years agoMFH: r308671
julian [Fri, 27 Jan 2017 09:11:44 +0000 (09:11 +0000)]
MFH: r308671

When you select make OLDTIMEZONES=1 then you need a few added directories
to be made or the command fails

Sponsored by: panzura

MFH: r310426

If you are going to be run individually to make a new timezone set
then ensure the destination directories exist.
Especially if you define OLDTIMEZONES because the mtree pass
doesn't do it for you.

Sponsored by: Panzura

7 years agoMFC r312533: Report disk addition errors on `add` or `create` subcommand.
mav [Fri, 27 Jan 2017 05:58:53 +0000 (05:58 +0000)]
MFC r312533: Report disk addition errors on `add` or `create` subcommand.

7 years agoMFC r312538:
pfg [Fri, 27 Jan 2017 04:52:27 +0000 (04:52 +0000)]
MFC r312538:
Addition of clang nullability qualifiers.

For consistency with the qualifiers added in r310977, define a new
qualifier _Null_unspecified which is also defined in clang 3.7+.

Add two new macros:
__NULLABILITY_PRAGMA_PUSH
__NULLABILITY_PRAGMA_POP

These are for use in headers when we want avoid noisy warnings if
some pointers are left without nullability annotations.

These are added with way ahead of their first use to teach the GCC
ports headers of their existance before their first use.

7 years agoMFC r311993: Fix typo in r311971 and now in r312405 too.
kan [Fri, 27 Jan 2017 03:44:50 +0000 (03:44 +0000)]
MFC r311993: Fix typo in r311971 and now in r312405 too.

7 years agoMFC r310698:
araujo [Fri, 27 Jan 2017 02:35:05 +0000 (02:35 +0000)]
MFC r310698:

Print hostcache usage counts with TCP statistics.

PR: 196252
Submitted by: Anton Yuzhaninov <citrin+pr@citrin.ru>
MFC after: 3 weeks.

7 years agoMFC r312232: Add under-/overrun support to IOCTL and CAM SIM frontends.
mav [Thu, 26 Jan 2017 21:21:26 +0000 (21:21 +0000)]
MFC r312232: Add under-/overrun support to IOCTL and CAM SIM frontends.

7 years agoMFC r312231: When in kernel, map ctl_scsi_zero_io() to ctl_zero_io().
mav [Thu, 26 Jan 2017 21:08:27 +0000 (21:08 +0000)]
MFC r312231: When in kernel, map ctl_scsi_zero_io() to ctl_zero_io().

7 years agoMFC r312026: Improve CAM_CDB_POINTER support.
mav [Thu, 26 Jan 2017 21:06:59 +0000 (21:06 +0000)]
MFC r312026: Improve CAM_CDB_POINTER support.

7 years agoMFC r311873: Fix malloc(M_WAITOK) under mutex, introduced at r311787.
mav [Thu, 26 Jan 2017 21:01:38 +0000 (21:01 +0000)]
MFC r311873: Fix malloc(M_WAITOK) under mutex, introduced at r311787.

7 years agoMFC r311804: Rewrite CTL statistics in more simple and scalable way.
mav [Thu, 26 Jan 2017 20:59:36 +0000 (20:59 +0000)]
MFC r311804: Rewrite CTL statistics in more simple and scalable way.

Instead of collecting statistics for each combination of ports and logical
units, that consumed ~45KB per LU with present number of ports, collect
separate statistics for every port and every logical unit separately, that
consume only 176 bytes per each single LU/port.  This reduces struct
ctl_lun size down to just 6KB.

Also new IOCTL API/ABI does not hardcode number of LUs/ports, and should
allow handling of very large quantities.

Old API is still enabled in stable branches for compatibility reasons.

7 years agoMFC r311787: Allocate memory for prevent flags only for removable LUs.
mav [Thu, 26 Jan 2017 20:57:19 +0000 (20:57 +0000)]
MFC r311787: Allocate memory for prevent flags only for removable LUs.

This array takes 64KB of RAM now, that was more then half of struct ctl_lun
size.  If at some point we support more ports, this may need another tune.

7 years agoMFC r311680: Make CTL_GETSTATS ioctl return partial data if buffer is small.
mav [Thu, 26 Jan 2017 20:51:18 +0000 (20:51 +0000)]
MFC r311680: Make CTL_GETSTATS ioctl return partial data if buffer is small.

7 years agoMFC r310778, r310782: Improve use of I/O's private area.
mav [Thu, 26 Jan 2017 20:49:19 +0000 (20:49 +0000)]
MFC r310778, r310782: Improve use of I/O's private area.

 - Since I/Os are allocates from per-port pools, make allocations store
pointer to CTL softc there, and use it where needed instead of global.
 - Created bunch of helper macros to access LUN, port and CTL softc.

7 years agoMFC r310786, r310803, r310985, r311894
asomers [Thu, 26 Jan 2017 20:15:14 +0000 (20:15 +0000)]
MFC r310786, r310803, r310985, r311894

r310786:
Reduce the runtime of the GELI tests

There is no reduction in test coverage.  On my system runtime is reduced
from 38m32s to 6m24s.

tests/sys/geom/class/eli/conf.sh
tests/sys/geom/class/eli/init_a_test.sh
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/integrity_copy_test.sh
tests/sys/geom/class/eli/integrity_data_test.sh
tests/sys/geom/class/eli/integrity_hmac_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
tests/sys/geom/class/eli/onetime_test.sh
Move the looping code into common functions in conf.sh, and remove
alias ciphers from the list.

tests/sys/geom/class/eli/init_a_test.sh
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/integrity_copy_test.sh
tests/sys/geom/class/eli/integrity_data_test.sh
tests/sys/geom/class/eli/integrity_hmac_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
Move a few commands that don't need to be in the inner loop out.

tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
Reduce the sector count

tests/sys/geom/class/eli/Makefile
tests/sys/geom/class/eli/init_alias_test.sh
Add a test for initializing a GELI device using one of the cipher
aliases, and check that the alias is correctly interpreted.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8814

r310803:
ATFify the gnop tests

Also, add test cases for the -p, -P, and -s options to gnop create

Reviewed by: ngie
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D8892

r310985:
Update ObsoleteFiles.inc for r310803

MFC after: 26 days
X-MFC-with: 310803

r311894:
Fix typo from change 310985 in ObsoleteFiles.inc

MFC after: 16 days
X-MFC-With: 310803
Sponsored by: Spectra Logic Corp

7 years agoMFC: r312825
jkim [Thu, 26 Jan 2017 19:14:14 +0000 (19:14 +0000)]
MFC: r312825

Merge OpenSSL 1.0.2k.

7 years agoMFC r312423:
kib [Thu, 26 Jan 2017 11:06:39 +0000 (11:06 +0000)]
MFC r312423:
Refresh tmpfs(5) man page.

MFC r312648:
Editing and clarifications for tmpfs(5).

7 years agoMFC r312425:
kib [Thu, 26 Jan 2017 11:03:19 +0000 (11:03 +0000)]
MFC r312425:
Make tmpfs directory cursor available outside tmpfs_subr.c.

7 years agoMFC r312414:
kib [Thu, 26 Jan 2017 10:58:12 +0000 (10:58 +0000)]
MFC r312414:
Rename tmpfs_mount member allnode_lock to include namespace prefix.

7 years agoMFC r312410:
kib [Thu, 26 Jan 2017 10:53:05 +0000 (10:53 +0000)]
MFC r312410:
Rework some tmpfs lock assertions.

MFC r312412:
Protect macro argument.

7 years agoMFC r312409:
kib [Thu, 26 Jan 2017 10:47:05 +0000 (10:47 +0000)]
MFC r312409:
Style fixes and comment updates.

MFC r312435:
Remove mistakenly merged field.