Commit graph

8096 commits

Author SHA1 Message Date
Ed Maste e5c2ece714 Pull in r322131 from upstream llvm trunk (by Rafael Espíndola):
Use a MCExpr for the size of MCFillFragment.

  This allows the size to be found during ralaxation. This fixes
  [LLVM] pr35858.

Requested by:	royger
2018-01-30 16:43:20 +00:00
Ed Maste 88e56272f9 Pull in r322123 from upstream llvm trunk (by Rafael Espíndola):
Don't create MCFillFragment directly.

  Instead use higher level APIs that take care of most bookkeeping.
2018-01-30 16:42:08 +00:00
Ed Maste 00da656e30 Pull in r322108 from upstream llvm trunk (by Rafael Espíndola):
Make one of the emitFill methods non virtual. NFC.

  This is just preparatory work to fix [LLVM] PR35858.
2018-01-30 16:41:38 +00:00
Kyle Evans acfa114e53 Remove t_grep:mmap_eof_not_eol test
The test was marked as an expected failure in r320414 after r319971's import
of a newer jemalloc removed an essential feature (opt.redzone) for
reproducing the behavior it was testing. Since then, no way has been found
or demonstrated to reliably test the behavior, so remove the test.

PR:		220309
2018-01-29 18:50:45 +00:00
Ed Maste 54a6825c80 lld: Put the header in the first PT_LOAD even if that PT_LOAD has a LMAExpr
The root problem is that we were creating a PT_LOAD just for the header.
That was technically valid, but inconvenient: we should not be making
the ELF discontinuous.

The solution is to allow a section with LMAExpr to be added to a PT_LOAD
if that PT_LOAD doesn't already have a LMAExpr.

LLVM PR:	36017
Obtained from:	LLVM r323625 by Rafael Espindola
2018-01-29 13:55:50 +00:00
Ed Maste 1da0355521 lld: Move LMAOffset from the OutputSection to the PhdrEntry. NFC.
If two sections are in the same PT_LOAD, their relatives offsets,
virtual address and physical addresses are all the same.

[Rafael] initially wanted to have a single global LMAOffset, on the
assumption that every ELF file was in practiced loaded contiguously in
both physical and virtual memory.

Unfortunately that is not the case. The linux kernel has:

  LOAD           0x200000 0xffffffff81000000 0x0000000001000000 0xced000 0xced000 R E 0x200000
  LOAD           0x1000000 0xffffffff81e00000 0x0000000001e00000 0x15f000 0x15f000 RW  0x200000
  LOAD           0x1200000 0x0000000000000000 0x0000000001f5f000 0x01b198 0x01b198 RW  0x200000
  LOAD           0x137b000 0xffffffff81f7b000 0x0000000001f7b000 0x116000 0x1ec000 RWE 0x200000

The delta for all but the third PT_LOAD is the same:
0xffffffff80000000. [Rafael] thinks the 3rd one is a hack for implementing
per cpu data, but we can't break that.

Obtained from:	LLVM r323456 by Rafael Espindola
2018-01-29 13:54:51 +00:00
Ed Maste 2b8c81f1b9 lld: Improve LMARegion handling.
This fixes the crash reported at [LLVM] PR36083.

The issue is that we were trying to put all the sections in the same
PT_LOAD and crashing trying to write past the end of the file.

This also adds accounting for used space in LMARegion, without it all
3 PT_LOADs would have the same physical address.

Obtained from:	LLVM r323449 by Rafael Espindola
2018-01-29 13:52:42 +00:00
Ed Maste 5a2ea37829 lld: Simplify. NFC.
Obtained from:	LLVM r323440 by Rafael Espindola
2018-01-29 13:51:13 +00:00
Ed Maste 6fcb8605ef lld: Remove MemRegionOffset. NFC.
We can just use a member variable in MemoryRegion.

Obtained from:	LLVM r323399 by Rafael Espindola
2018-01-29 13:50:28 +00:00
Ed Maste 70bad66509 lld: Only lookup LMARegion once. NFC.
This is similar to how we handle MemRegion.

Obtained from:	LLVM r323396 by Rafael Espindola
2018-01-29 13:49:10 +00:00
Ed Maste 032c24abe6 lld: Use lookup instead of find. NFC, just simpler.
Obtained from:	LLVM r323395 by Rafael Espindola
2018-01-29 13:48:15 +00:00
Pedro F. Giffuni d54cfbd18e ftp(1): Use closefrom() instead of individual close()s.
Use closefrom(3) instead of manually closing all file descriptors
between 3 and 19.

Obtained from:	OpenBSD (CVS 1.80)
2018-01-29 01:05:57 +00:00
Dimitry Andric 48d95fd235 Pull in r322245 from upstream clang trunk (by Craig Topper):
[X86] Make -mavx512f imply -mfma and -mf16c in the frontend like it
  does in the backend.

  Similarly, make -mno-fma and -mno-f16c imply -mno-avx512f.

  Withou this  "-mno-sse -mavx512f" ends up with avx512f being enabled
  in the frontend but disabled in the backend.

Reported by:	pawel
PR:		225488
2018-01-28 16:10:40 +00:00
Pedro F. Giffuni a645f2a50a Revert r328492:
"Fix gcc80 -Wsizeof-pointer-memaccess warning."

The warning is bogus: GCC8 only looks at the size of the destination.
We shouldn't be fixing imaginary problems, so perhaps its better to deal
with this later on by disabling such warnings.

Pointed out by:	ed, bde
2018-01-28 03:16:54 +00:00
Pedro F. Giffuni e28c47b570 Fix gcc80 -Wsizeof-pointer-memaccess warning.
Obtained from:	DragonFlyBSD (git 56267d362d5769c8df07bf26d5e322610e0d24b4)
2018-01-27 22:16:19 +00:00
Michael Tuexen 51eff8efd9 When using SCTP for sending probe packets, use INIT chunks for payloads
larger than or equal to 32 bytes. For smaller probe packets, keep using
SHUTDOWN-ACK chunks, possibly bundled with a PAD chunk.
Packets with INIT chunks more likely pass through firewalls. Therefore,
use them when possible.

MFC after:	1 week
2018-01-27 19:23:42 +00:00
Warner Losh 919cf86c87 Gross hack to omit printing hex floating point when the lua number
type is int64. While lua is setup for the representation, it's not
setup to properly print the numbers as ints. This is the least-gross
way around that, and won't affect the bootloader where we do this.
2018-01-26 17:56:20 +00:00
Warner Losh 18dd077da6 Preserve the original luaconf.h in a convenient place. Clients will
almost certainly need to override this, so reinforce that. If that's
not hte case, clients can always do a #include luaconf.h.dist.
2018-01-26 17:24:25 +00:00
Dimitry Andric 042b1c2ef5 Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
6.0.0 (branches/release_60 r323338).

MFC after:	3 months
X-MFC-With:	r327952
PR:		224669
2018-01-24 22:35:00 +00:00
Martin Matuska a2a3407c7e MFV r328323,328324:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #893: delete dead ppmd7 alloc callbacks
  PR #904: Fix archive freeing bug in bsdcat
  PR #961: Fix ZIP format names
  PR #962: Don't modify attributes for existing directories
           when ARCHIVE_EXTRACT_NO_OVERWRITE is set
  PR #964: Fix -Werror=implicit-fallthrough= for GCC 7
  PR #970: zip: Allow backslash as path separator

MFC after:	1 week
2018-01-24 14:24:17 +00:00
Philip Paeps afb91be3c9 Import tzdata 2018c
Changes: https://github.com/eggert/tz/blob/2018c/NEWS

MFC after:	3 days
2018-01-24 06:48:42 +00:00
Ed Maste da1eeb70d3 lld: Don't mark a shared library as needed because of a lazy symbol.
Obtained from:	LLVM r323221 by Rafael Espíndola
2018-01-23 17:54:39 +00:00
Alan Somers 76f9d2759b mlock(2): correct documentation for error conditions.
The man page is years out of date regarding errors. Our implementation _does_
allow unaligned addresses, and it _does_not_ check for negative lengths,
because the length is unsigned. It checks for overflow instead.

Update the tests accordingly.

Reviewed by:	bcr
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D13826
2018-01-22 21:45:54 +00:00
Andrey V. Elsukov 7e03e18104 Rename "index" variable to "idx" since gcc complains that it shadows
index(3) function declaration.

Reported by:	lwhsu
MFC after:	2 weeks
2018-01-19 20:33:47 +00:00
Andrey V. Elsukov f3afd27f5f Add to bsnmpd(1) ability to specify multiple community strings with
different access rights.

By default there are two community strings with index 1 and 2, one for
read-only access and second for read-write access:

  begemotSnmpdCommunityString.0.1 = $(read)
  begemotSnmpdCommunityString.0.2 = $(write)

Now it is possible to define additional community strings using different
indexes:

  begemotSnmpdCommunityString.0.3 = "SomeString1"
  begemotSnmpdCommunityPermission.0.3 = 1
  begemotSnmpdCommunityString.0.4 = "SomeString2"
  begemotSnmpdCommunityPermission.0.4 = 2
  begemotSnmpdCommunityString.0.5 = "SomeString3"
  begemotSnmpdCommunityString.0.6 = "SomeString4"

New attribute begemotSnmpdCommunityPermission can be used to specify access
rights: 1 means "read-only" access, 2 means "read-write" access. If
attribute is not specified for some index this means "read-only" rights.

Community strings must be unique, i.e. must not be the same for different
indexes.

Obtained from:		Yandex LLC
MFC after:		2 weeks
Sponsored by:		Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D13785
2018-01-19 08:48:14 +00:00
Dimitry Andric 024469e429 Pull in r322106 from upstream llvm trunk (by Alexey Bataev):
[COST]Fix PR35865: Fix cost model evaluation for shuffle on X86.

  Summary:
  If the vector type is transformed to non-vector single type, the
  compile may crash trying to get vector information about non-vector
  type.

  Reviewers: RKSimon, spatel, mkuper, hfinkel

  Subscribers: llvm-commits

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

This should fix "Not a vector MVT!" errors when building the
games/dhewm3 port.

Reported by:	jbeich
PR:		225271
2018-01-18 21:46:09 +00:00
Dimitry Andric 6bee06efd1 Pull in r322016 from upstream llvm trunk (by Sanjay Patel):
[ValueTracking] remove overzealous assert

  The test is derived from a failing fuzz test:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5008

  Credit to @rksimon for pointing out the problem.

This should fix "Bad flavor while matching min/max" errors when building
the graphics/libsixel and science/kst2 ports.

Reported by:	jbeich
PR:		225268, 225269
2018-01-18 21:44:07 +00:00
Ed Maste 62de8f4add lld: Fix incorrect physical address on self-referencing AT command.
When a section placement (AT) command references the section itself,
the physical address of the section in the ELF header was calculated
incorrectly due to alignment happening right after the location
pointer's value was captured.

The problem was diagnosed and the first version of the patch written
by Erick Reyes.

Obtained from:	LLVM r322421 by Rafael Espindola
2018-01-18 21:39:59 +00:00
Ed Maste cc877d7c33 lld: Handle parsing AT(ADDR(.foo-bar)).
The problem we had with it is that anything inside an AT is an
expression, so we failed to parse the section name because of the - in
it.

Requested by:	royger
Obtained from:	LLVM r322801 by Rafael Espindola
2018-01-18 21:39:19 +00:00
Ed Maste d3f08be7dc lld: Fix for ld.lld does not accept "AT" syntax for declaring LMA region
AT> lma_region expression allows to specify the memory region
for section load address.

Should fix [upstream LLVM] PR35684.

LLVM review: https://reviews.llvm.org/D41397

Obtained from:	LLVM r322359 by George Rimar
2018-01-18 21:38:21 +00:00
Dimitry Andric d23c4359df Pull in r322623 from upstream llvm trunk (by Andrew V. Tischenko):
Allow usage of X86-prefixes as separate instrs.
  Differential Revision: https://reviews.llvm.org/D42102

This should fix parse errors when x86 prefixes (such as 'lock' and
'rep') are followed by various non-mnemonic tokens, e.g. comments, .byte
directives and labels.

PR:		224669,225054
2018-01-17 17:11:55 +00:00
Philip Paeps f2fcff28d0 Import tzdata 2018a
Changes: https://github.com/eggert/tz/blob/2018a/NEWS

MFC after:	3 days
2018-01-16 18:36:25 +00:00
Dimitry Andric a7264ff541 Pull in r322473 from upstream llvm trunk (by Andrei Elovikov):
[LV] Don't call recordVectorLoopValueForInductionCast for
  newly-created IV from a trunc.

  Summary:
  This method is supposed to be called for IVs that have casts in their
  use-def chains that are completely ignored after vectorization under
  PSE. However, for truncates of such IVs the same InductionDescriptor
  is used during creation/widening of both original IV based on PHINode
  and new IV based on TruncInst.

  This leads to unintended second call to
  recordVectorLoopValueForInductionCast with a VectorLoopVal set to the
  newly created IV for a trunc and causes an assert due to attempt to
  store new information for already existing entry in the map. This is
  wrong and should not be done.

  Fixes PR35773.

  Reviewers: dorit, Ayal, mssimpso

  Reviewed By: dorit

  Subscribers: RKSimon, dim, dcaballe, hsaito, llvm-commits, hiraditya

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

This should fix "Vector value already set for part" assertions when
building the net/iodine and sysutils/daa2iso ports.

Reported by:	jbeich
PR:		224867,224868
2018-01-15 18:20:15 +00:00
Dimitry Andric 72bfb31a82 Merge ^/head r327886 through r327930. 2018-01-13 17:52:55 +00:00
Dimitry Andric 55f46b3c87 Pull in r314499 from upstream clang trunk (by Daniel Marjamäki):
[Sema] Suppress warnings for C's zero initializer

  Patch by S. Gilles!

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

Pull in r314838 from upstream clang trunk (by Richard Smith):

  Suppress -Wmissing-braces warning when aggregate-initializing a
  struct with a single field that is itself an aggregate.

  In C++, such initialization of std::array<T, N> types is guaranteed
  to work by the standard, is completely idiomatic, and the "suggested"
  alternative from Clang was technically invalid.

Together, these suppress unneeded "suggest braces around initialization
of subobject" warnings for C++11 initializer lists.

MFC after:	3 days
2018-01-13 17:47:34 +00:00
Ed Maste 982fabe12e Revert r280909 "unwind-d2 build workaround for arm64"
We no longer try to build unwind-dw2.c on arm64 so no need for this
workaround.

Sponsored by:	The FreeBSD Foundation
2018-01-12 20:03:24 +00:00
Dimitry Andric c79126f2e4 Merge ^/head r327624 through r327885. 2018-01-12 18:23:35 +00:00
Dimitry Andric 782f2e69ab Pull in r321994 from upstream llvm trunk (by Alexey Bataev):
[SLP] Fix PR35777: Incorrect handling of aggregate values.

  Summary:
  Fixes the bug with incorrect handling of InsertValue|InsertElement
  instrucions in SLP vectorizer. Currently, we may use incorrect
  ExtractElement instructions as the operands of the original
  InsertValue|InsertElement instructions.

  Reviewers: mkuper, hfinkel, RKSimon, spatel

  Subscribers: llvm-commits

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

This should fix "Invalid InsertValueInst operands!" errors when building
certain parts of editors/libreoffice.

Reported by:	jbeich
PR:		225086
2018-01-12 18:19:14 +00:00
Dimitry Andric 83ae25da0f Pull in r322264 from upstream lld trunk (by me):
Fix thread race between SectionPiece's OutputOff and Live members

  Summary:
  As reported in bug 35788, rL316280 reintroduces a race between two
  members of SectionPiece, which share the same 64 bit memory location.

  To fix the race, check the hash before checking the Live member, as
  suggested by Rafael.

  Reviewers: ruiu, rafael

  Reviewed By: ruiu

  Subscribers: smeenai, emaste, llvm-commits

  Differential Revision: https://reviews.llvm.org/D41884
2018-01-12 18:16:51 +00:00
Dimitry Andric 76401e35e3 Pull in r316581 from upstream llvm trunk (by John Baldwin):
Don't try to use a non-existent header on FreeBSD/mips.

  Reviewers: dim

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

Requested by:	jhb
MFC after:	3 days
2018-01-11 21:12:23 +00:00
Alan Somers 324efdfba2 Add Pull Request to the Subversion commit template
Reviewed by:	emaste
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D13178
2018-01-09 21:02:39 +00:00
Dimitry Andric 66f8bb86f8 Pull in r322056 from upstream llvm trunk (by Serguei Katkov):
[CGP] Fix Complex addressing mode for offset

  If the offset is differ in two addressing mode we can continue only
  if ScaleReg is not set due to we will use it as merge of different
  offsets.

  It should fix PR35799 and PR35805.

  Reviewers: john.brawn, reames
  Reviewed By: reames
  Subscribers: llvm-commits
  Differential Revision: https://reviews.llvm.org/D41227

This should fix "ScaledReg == nullptr" assertions when building the
graphics/xpx, mail/alpine and editors/pico-alpine ports.

Reported by:	jbeich
PR:		224866, 224995
2018-01-09 17:41:34 +00:00
Dimitry Andric 18a7633888 Pull in r322041 from upstream lld trunk (by Rui Ueyama):
Do not use parallelForEach to call maybeCompress().

  Currently LLVM's paralellForEach has a problem with reentracy.
  That caused https://bugs.llvm.org/show_bug.cgi?id=35788 (lld somtimes
  hangs while linking Ruby 2.4) because maybeCompress calls writeTo
  which uses paralellForEach.

  This patch is to avoid using paralellForEach to call maybeCompress to
  workaround the issue.

This should fix potential hangs when linking parts of ruby24.
2018-01-09 17:38:43 +00:00
Dimitry Andric 53743bd4bb Pull in r321986 from upstream lld trunk (by James Henderson):
[ELF] Compress debug sections after assignAddresses and support
  custom layout

  Previously, in r320472, I moved the calculation of section offsets
  and sizes for compressed debug sections into maybeCompress, which
  happens before assignAddresses, so that the compression had the
  required information. However, I failed to take account of
  relocations that patch such sections. This had two effects:

  1. A race condition existed when a debug section referred to a
     different debug section (see PR35788).
  2. References to symbols in non-debug sections would be patched
     incorrectly.  This is because the addresses of such symbols are not
     calculated until after assignAddresses (this was a partial
     regression caused by r320472, but they could still have been
     broken before, in the event that a custom layout was used in a
     linker script).

  assignAddresses does not need to know about the output section size
  of non-allocatable sections, because they do not affect the value of
  Dot. This means that there is no longer a reason not to support
  custom layout of compressed debug sections, as far as I'm aware.
  These two points allow for delaying when maybeCompress can be called,
  removing the need for the loop I previously added to calculate the
  section size, and therefore the race condition. Furthermore, by
  delaying, we fix the issues of relocations getting incorrect symbol
  values, because they have now all been finalized.

This should fix thread race conditions when linking parts of ruby24.
2018-01-09 17:37:09 +00:00
Dimitry Andric 687571a78b Pull in r321963 from upstream libc++ trunk (by me):
Add pre-C++11 is_constructible wrappers for 3 arguments

  Summary:
  After rL319736 for D28253 (which fixes PR28929), gcc cannot compile
  <memory> anymore in pre-C+11 modes, complaining:

  In file included from /usr/include/c++/v1/memory:648:0,
                   from test.cpp:1:
  /usr/include/c++/v1/memory: In static member function 'static std::__1::shared_ptr<_Tp> std::__1::shared_ptr<_Tp>::make_shared(_A0&, _A1&, _A2&)':
  /usr/include/c++/v1/memory:4365:5: error: wrong number of template arguments (4, should be at least 1)
       static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in make_shared" );
       ^
  In file included from /usr/include/c++/v1/memory:649:0,
                   from test.cpp:1:
  /usr/include/c++/v1/type_traits:3198:29: note: provided for 'template<class _Tp, class _A0, class _A1> struct std::__1::is_constructible'
   struct _LIBCPP_TEMPLATE_VIS is_constructible
                               ^~~~~~~~~~~~~~~~
  In file included from /usr/include/c++/v1/memory:648:0,
                   from test.cpp:1:
  /usr/include/c++/v1/memory:4365:5: error: template argument 1 is invalid
       static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in make_shared" );
       ^
  /usr/include/c++/v1/memory: In static member function 'static std::__1::shared_ptr<_Tp> std::__1::shared_ptr<_Tp>::allocate_shared(const _Alloc&, _A0&, _A1&, _A2&)':
  /usr/include/c++/v1/memory:4444:5: error: wrong number of template arguments (4, should be at least 1)
       static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in allocate_shared" );
       ^
  In file included from /usr/include/c++/v1/memory:649:0,
                   from test.cpp:1:
  /usr/include/c++/v1/type_traits:3198:29: note: provided for 'template<class _Tp, class _A0, class _A1> struct std::__1::is_constructible'
   struct _LIBCPP_TEMPLATE_VIS is_constructible
                               ^~~~~~~~~~~~~~~~
  In file included from /usr/include/c++/v1/memory:648:0,
                   from test.cpp:1:
  /usr/include/c++/v1/memory:4444:5: error: template argument 1 is invalid
       static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in allocate_shared" );
       ^

  This is also reported in https://bugs.freebsd.org/224946 (FreeBSD is
  apparently one of the very few projects that regularly builds
  programs against libc++ with gcc).

  The reason is that the static assertions are invoking
  is_constructible with three arguments, while gcc does not have the
  built-in is_constructible feature, and the pre-C++11 is_constructible
  wrappers in <type_traits> only provide up to two arguments.

  I have added additional wrappers for three arguments, modified the
  is_constructible entry point to take three arguments instead, and
  added a simple test to is_constructible.pass.cpp.

  Reviewers: EricWF, mclow.lists

  Reviewed By: EricWF

  Subscribers: krytarowski, cfe-commits, emaste

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

This should allow gcc to compile the libc++ 6.0.0 <memory> header
without problems, in pre-C++11 mode.

Reported by:    jbeich
PR:             224946
2018-01-07 18:33:19 +00:00
Dimitry Andric 30785c0e2b Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788,
update build glue and version numbers.
2018-01-06 23:44:14 +00:00
Dimitry Andric 4b49587c3d Merge ^/head r327341 through r327623. 2018-01-06 16:13:17 +00:00
Dimitry Andric a1ba34d4a7 Tentatively apply https://reviews.llvm.org/D41635:
We normally want to ignore SHT_NOBITS sections when computing
  offsets. The sh_offset of section itself seems to be irrelevant and

  * If the section is in the middle of a PT_LOAD, it will make no
    difference on the computed offset of the followup section.
  * If it is in the end of a PT_LOAD, we want to avoid its alignment
    changing the offset of the followup sections.

  The issue is if it is at the start of the PT_LOAD. In that case we do
  have to align it so that the following sections have congruent
  address and offset module the page size. We were not handling this
  case.

  This should fix freebsd kernel link.

In particular, this fixes ctfmerge and/or objcopy throwing "Layout
constraint violation" errors when processing an lld-linked kernel.
2018-01-06 13:19:36 +00:00
Ed Maste aadb68849f elfcopy: copy raw (untranslated) contents to binary output
Previously elfcopy used elf_getdata to obtain data from ELF sections
being copied to binary output, but elf_getdata returns data that has
been translated - that is, data is in host byte order. When the host and
target differ in endianness (e.g., converting a big-endian MIPS ELF
object to binary on an x86 host) this resulted in byte-swapped data in
certain sections such as .dynamic.

Instead use elf_rawdata to keep data in the original, target endianness.

Reported by:	Hiroki Mori <yamori83@yahoo.co.jp>, Bill Yuan
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-01-02 14:07:55 +00:00
Dimitry Andric 4fc74049d2 Merge ^/head r327169 through r327340. 2017-12-29 12:51:26 +00:00
Dimitry Andric fe4fed2e4d Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.
2017-12-29 00:56:15 +00:00
Ed Maste 7003cfb386 readelf: report byte size for DT_PREINIT_ARRAYSZ
Sponsored by:	The FreeBSD Foundation
2017-12-26 18:10:34 +00:00
Dimitry Andric a6c6e8627e Merge ^/head r327150 through r327164. 2017-12-24 16:53:55 +00:00
Dimitry Andric 34f4d02c2f Fix clang 6.0.0 compiler warnings in binutils
Latest clang git has a warning -Wnull-pointer-arithmetic which will
trigger a -Werror failure. Addition and subtraction from a null pointer
is undefined behaviour and could be optimized into anything.

Furthermore, using the difference between two pointers and casting the
result back to a pointer is not portable since the size of ptrdiff_t
does not necessary have to be the same as size of void* (this happens
e.g. on CHERI). Using intptr_t instead fixes this portability issue and
the compiler warning.

Submitted by;	Alexander Richardson
Obtained from:	CheriBSD
Differential Revision: https://reviews.freebsd.org/D12928
MFC after:	3 days
2017-12-24 16:51:59 +00:00
Dimitry Andric 0e56f9238c For our lldb customizations, instead of commenting out lines, use #ifdef
LLDB_ENABLE_ALL / #endif preprocess directives instead, so our diffs
against upstream only consist of added lines.
2017-12-24 13:39:32 +00:00
Dimitry Andric 39f349c2ce Merge libc++ trunk r321414 to contrib/libc++. 2017-12-24 01:16:28 +00:00
Dimitry Andric 5d5f867805 Merge compiler-rt trunk r321414 to contrib/compiler-rt. 2017-12-24 01:15:12 +00:00
Dimitry Andric 3863851369 Merge lldb trunk r321414 to contrib/llvm/tools/lldb. 2017-12-24 01:12:46 +00:00
Dimitry Andric 8ca4c80b1b Merge lld trunk r321414 to contrib/llvm/tools/lld. 2017-12-24 01:11:19 +00:00
Dimitry Andric 13ddaa8416 Merge clang trunk r321414 to contrib/llvm. 2017-12-24 01:08:34 +00:00
Dimitry Andric da09e106ef Merge llvm trunk r321414 to contrib/llvm. 2017-12-24 01:04:58 +00:00
Dimitry Andric b2c7081bd7 Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
Dimitry Andric 8a51db9c42 Merge compiler-rt trunk r321017 to contrib/compiler-rt. 2017-12-20 19:12:15 +00:00
Dimitry Andric acac075be8 Merge lldb trunk r321017 to contrib/llvm/tools/lldb. 2017-12-20 18:06:09 +00:00
Dimitry Andric 10dc89a5a7 Merge lld trunk r321017 to contrib/llvm/tools/lld. 2017-12-20 15:50:21 +00:00
Dimitry Andric 9a199699c2 Merge clang trunk r321017 to contrib/llvm/tools/clang. 2017-12-20 14:26:54 +00:00
Dimitry Andric 2cab237b5d Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
Ed Maste a5d5fd9ffd lld: Don't write preemptible symbol values to the .got.
It is not necessary and matches what bfd and gold do.

This was a regression from [LLVM] r315658.

Obtained from:	LLVM r321023 by Rafael Espíndola
2017-12-19 03:15:20 +00:00
Dimitry Andric 5bf0d7ad74 Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
5.0.1 release (upstream r320880).

Relnotes:	yes
MFC after:	2 weeks
2017-12-16 18:06:30 +00:00
Ed Maste e10e2b23bf lld: Slightly simplify code and add comment.
Cherry-pick lld r315658 by Rui Ueyama:
    This is not a mechanical transformation. Even though I believe this
    patch is correct, I'm not 100% sure if lld with this patch behaves
    exactly the same way as before on all edge cases. At least all tests
    still pass.

    I'm submitting this patch because it took almost a day to understand
    this function, and I don't want to lose it.

This fixes jemalloc assertion failures observed at startup with i386
binaries and an lld-linked libc.so.

Reviewed by:	dim
Obtained from:	LLVM r315658
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13503
2017-12-16 14:26:11 +00:00
Dimitry Andric e3e18337bf Pull in r320755 from upstream clang trunk (by me):
Don't trigger -Wuser-defined-literals for system headers

  Summary:
  In D41064, I proposed adding `#pragma clang diagnostic ignored
  "-Wuser-defined-literals"` to some of libc++'s headers, since these
  warnings are now triggered by clang's new `-std=gnu++14` default:

  $ cat test.cpp
  #include <string>

  $ clang -std=c++14 -Wsystem-headers -Wall -Wextra -c test.cpp
  In file included from test.cpp:1:
  In file included from /usr/include/c++/v1/string:470:
  /usr/include/c++/v1/string_view:763:29: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
      basic_string_view<char> operator "" sv(const char *__str, size_t __len)
                              ^
  /usr/include/c++/v1/string_view:769:32: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
      basic_string_view<wchar_t> operator "" sv(const wchar_t *__str, size_t __len)
                                 ^
  /usr/include/c++/v1/string_view:775:33: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
      basic_string_view<char16_t> operator "" sv(const char16_t *__str, size_t __len)
                                  ^
  /usr/include/c++/v1/string_view:781:33: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
      basic_string_view<char32_t> operator "" sv(const char32_t *__str, size_t __len)
                                  ^
  In file included from test.cpp:1:
  /usr/include/c++/v1/string:4012:24: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
      basic_string<char> operator "" s( const char *__str, size_t __len )
                         ^
  /usr/include/c++/v1/string:4018:27: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
      basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len )
                            ^
  /usr/include/c++/v1/string:4024:28: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
      basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len )
                             ^
  /usr/include/c++/v1/string:4030:28: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
      basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len )
                             ^
  8 warnings generated.

  Both @aaron.ballman and @mclow.lists felt that adding this workaround
  to the libc++ headers was the wrong way, and it should be fixed in
  clang instead.

  Here is a proposal to do just that.  I verified that this suppresses
  the warning, even when -Wsystem-headers is used, and that the warning
  is still emitted for a declaration outside of system headers.

  Reviewers: aaron.ballman, mclow.lists, rsmith

  Reviewed By: aaron.ballman

  Subscribers: mclow.lists, aaron.ballman, andrew, emaste, cfe-commits

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

This will allow to compile some of the libc++ headers in C++14 mode
(which is the default for gcc 6 and higher, and will be the default for
clang 6.0.0 and higher), with -Wsystem-headers and -Werror enabled.

Reported by:	andrew
MFC after:	3 days
2017-12-15 18:58:21 +00:00
Ed Maste df1f0f9b90 lld: Simplify a boolean expression by De Morgan's laws.
Cherry-pick lld r315653 by Rui Ueyama:
    I don't really understand what exactly this expression means,
    but at least I can mechanically transform it.

Obtained from:	LLVM r315653
MFC after:	1 week
2017-12-15 18:56:12 +00:00
Dimitry Andric f134051fcf Pull in r315334 from upstream lld trunk (by Rafael Espindola):
Don't create a dummy __tls_get_addr.

  We just don't need one with the current setup.

  We only error on undefined references that are used by some
  relocation.

  If we managed to relax all uses of __tls_get_addr, no relocation uses
  it and we don't produce an error.

  This is less code and fixes the case were we fail to relax. Before we
  would produce a broken output, but now we produce an error.

Pull in r320390 from upstream lld trunk (by Rafael Espindola):

  Create reserved symbols early so they can be versioned.

  This fixes pr35570.

  We were creating these symbols after parsing version scripts, so they
  could not be versioned.

  We cannot move the version script parsing later because we need it for
  lto.

  One option is to move both addReservedSymbols and
  createSyntheticSections earlier. The disadvantage is that some
  sections created by createSyntheticSections replace other input
  sections. For example, gdb index replaces .debug_gnu_pubnames, so it
  wants to run after gc sections so that it can set S->Live to false.

  What this patch does instead is to move just the ElfHeader creation
  early.

Pull in r320412 from upstream lld trunk (by Rafael Espindola):

  Handle symbols pointing to output sections.

  Now that gc sections runs after linker defined symbols are added it
  can see symbols that point to an OutputSection.

  Should fix a bot failure.

Pull in r320431 from upstream lld trunk (by Peter Collingbourne):

  ELF: Do not follow relocation edges to output sections during GC.

  This fixes an assertion error introduced by r320390.

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

Together these fix handling of reserved symbols, in particular _end,
which is needed to make brk(2) and sbrk(2) work correctly.  This
unbreaks the emacs ports on amd64, and also appears to unbreak most of
world on i386.

MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D13466
2017-12-13 19:03:48 +00:00
Alan Somers 25b86f88e3 less(1): diff reduction vs upstream
No functional change.

MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
2017-12-12 17:34:35 +00:00
Dimitry Andric 9ce629675f Pull in r320396 from upstream clang trunk (by Malcolm Parsons):
[Sema] Fix crash in unused-lambda-capture warning for VLAs

  Summary:
  Clang was crashing when diagnosing an unused-lambda-capture for a VLA
  because From.getVariable() is null for the capture of a VLA bound.
  Warning about the VLA bound capture is not helpful, so only warn for
  the VLA itself.

  Fixes: PR35555

  Reviewers: aaron.ballman, dim, rsmith

  Reviewed By: aaron.ballman, dim

  Subscribers: cfe-commits

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

This fixes a segfault when building recent audio/zynaddsubfx port
versions.

Reported by:	hps
MFC after:	3 days
2017-12-11 20:04:40 +00:00
Konstantin Belousov b258727e79 ofed: Define barriers for mips and arm.
I used the strongest barriers available on the architectures, so if
the future analysis show that it is excessive, the barriers could be
relaxed. Still, it is unlikely that it is meaningful to run IB on 32bit
ARM or current MIPS machines, so the change is to make WITH_OFED to pass
tinderbox.

Sponsored by:	Mellanox Technologies
Reviewed by:	hselasky
Differential revision:	https://reviews.freebsd.org/D13329
2017-12-11 11:59:45 +00:00
Konstantin Belousov 0521e6e192 ofed: Remove duplicated symbols from the version file.
ld.bfd accepts multiple listing of the same symbol in the version script.
lld is stricter and errors out.  Since arm64 and sometimes amd64 use lld,
we should correct this cosmetic issue.

Sponsored by:	Mellanox Technologies
Reviewed by:	hselasky
Differential revision:	https://reviews.freebsd.org/D13329
2017-12-11 11:57:46 +00:00
Michal Meloun d65a63e3aa Relax too restrictive assert.
The problem has been reported to upstream and similar change will
be included in next jemalloc release.

Submitted by:	David Goldblatt <davidtgoldblatt@gmail.com>
MFC after: 	2 weeks
2017-12-10 09:17:21 +00:00
Michal Meloun e7dad90fe5 Revert r326740. I committed wrong diff. 2017-12-10 09:15:37 +00:00
Michal Meloun 3ee2fe0199 Relax too restrictive assert.
The problem has been reported to upstream and similar change will
be included in next jemalloc release.

Submitted by:	David Goldblatt <davidtgoldblatt@gmail.com>
MFC after: 	2 weeks
2017-12-10 08:55:48 +00:00
Hans Petter Selasky 656371d7c1 Correctly define the unordered_map namespace in ofed/libibnetdisc .
This should fix ofed/libibnetdisc compilation with C-compilers
different from clang and GCC v4.2.1.

Submitted by:	kib
Sponsored by:	Mellanox Technologies
2017-12-08 21:01:09 +00:00
Baptiste Daroussin b0b2d05fd0 Split body of mails not respecting RFC2822
For mails which has a body not respecting RFC2822 (which often happen with
crontabs) try to split by words finding the last space before 1000's character

If no spaces are found then consider the mail to be malformed anyway

PR:		208261
2017-12-06 22:08:35 +00:00
Stephen J. Kiernan b32f189046 The function make_relative_prefix_1 does not properly free locally
allocated memory when it returns early.

Free the memory associated with the variables full_programe, bin_dirs,
prog_dirs, and prefix_dirs when the function returns early.

Submitted by:	Tom Rix <trix@juniper.net>
Reviewed by:	jhibbits, emaste
Approved by:	sjg (mentor)
Obtained from:	Juniper Networks, Inc.
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D9691
2017-12-06 21:18:45 +00:00
Ed Maste 0bff6a5af8 Update tcpdump to 4.9.2
It contains many fixes, including bounds checking, buffer overflows (in
SLIP and bittok2str_internal), buffer over-reads, and infinite loops.

One other notable change:
  Do not use getprotobynumber() for protocol name resolution.
  Do not do any protocol name resolution if -n is specified.

Submitted by:	gordon
Reviewed by:	delphij, emaste, glebius
MFC after:	1 week
Relnotes:	Yes
Security:	CVE-2017-11108, CVE-2017-11541, CVE-2017-11542
Security:	CVE-2017-11543, CVE-2017-12893, CVE-2017-12894
Security:	CVE-2017-12895, CVE-2017-12896, CVE-2017-12897
Security:	CVE-2017-12898, CVE-2017-12899, CVE-2017-12900
Security:	CVE-2017-12901, CVE-2017-12902, CVE-2017-12985
Security:	CVE-2017-12986, CVE-2017-12987, CVE-2017-12988
Security:	CVE-2017-12989, CVE-2017-12990, CVE-2017-12991
Security:	CVE-2017-12992, CVE-2017-12993, CVE-2017-12994
Security:	CVE-2017-12995, CVE-2017-12996, CVE-2017-12997
Security:	CVE-2017-12998, CVE-2017-12999, CVE-2017-13000
Security:	CVE-2017-13001, CVE-2017-13002, CVE-2017-13003
Security:	CVE-2017-13004, CVE-2017-13005, CVE-2017-13006
Security:	CVE-2017-13007, CVE-2017-13008, CVE-2017-13009
Security:	CVE-2017-13010, CVE-2017-13011, CVE-2017-13012
Security:	CVE-2017-13013, CVE-2017-13014, CVE-2017-13015
Security:	CVE-2017-13016, CVE-2017-13017, CVE-2017-13018
Security:	CVE-2017-13019, CVE-2017-13020, CVE-2017-13021
Security:	CVE-2017-13022, CVE-2017-13023, CVE-2017-13024
Security:	CVE-2017-13025, CVE-2017-13026, CVE-2017-13027
Security:	CVE-2017-13028, CVE-2017-13029, CVE-2017-13030
Security:	CVE-2017-13031, CVE-2017-13032, CVE-2017-13033
Security:	CVE-2017-13034, CVE-2017-13035, CVE-2017-13036
Security:	CVE-2017-13037, CVE-2017-13038, CVE-2017-13039
Security:	CVE-2017-13040, CVE-2017-13041, CVE-2017-13042
Security:	CVE-2017-13043, CVE-2017-13044, CVE-2017-13045
Security:	CVE-2017-13046, CVE-2017-13047, CVE-2017-13048
Security:	CVE-2017-13049, CVE-2017-13050, CVE-2017-13051
Security:	CVE-2017-13052, CVE-2017-13053, CVE-2017-13054
Security:	CVE-2017-13055, CVE-2017-13687, CVE-2017-13688
Security:	CVE-2017-13689, CVE-2017-13690, CVE-2017-13725
Differential Revision:	https://reviews.freebsd.org/D12404
2017-12-06 02:21:11 +00:00
Jilles Tjoelker 965f7130a9 mdoc(7): Update .Dd for previous commit 2017-12-05 23:06:15 +00:00
Jilles Tjoelker 6c144446e9 mdocml: Add IEEE Std 1003.1-2008, 2016 edition
Also document IEEE Std 1003.1-2008, 2013 edition in mdoc(7) (as well as the
2016 edition).

Submitted by:	Yuri Pankov
Reviewed by:	bjk
Differential Revision:	https://reviews.freebsd.org/D13349
2017-12-05 23:00:41 +00:00
Warner Losh c87d5a5826 Since this is contrib code, create an upstreamable version of my
change. Now on FreeBSD and NetBSD if _STANDALONE is defined, we
include the kernel version with alloances for the quirky differences
between the two.

Sponsored by: Netflix
2017-12-05 22:24:20 +00:00
Warner Losh 52634ec581 This isn't NetBSD specific code. Include these for any kernel /
standalone use. Tweak for FreeBSD's quirky limits.h stuff.

Sponsored by: Netflix
2017-12-05 21:38:10 +00:00
Hans Petter Selasky be28698cf2 Correctly prefix the infiniband include directory for buildworld. This fixes
the OFED buildworld target, WITH_OFED=YES, when the include files are not
already installed locally, but only in the temporary object directory.

Found by:	kib
Sponsored by:	Mellanox Technologies
2017-12-05 08:25:17 +00:00
Ed Maste a6aca65caf lld: make -v behave similarly to GNU ld.bfd
Previously, lld exited with an error status if the only option given to
the command was -v. GNU linkers gracefully exit in that case. This patch
makes lld behave like GNU.

Note that even with this patch, lld's -v and --version options behave
slightly differently than GNU linkers' counterparts. For example,
if you run ld.bfd -v -v, the version string is printed out twice.
But that is an edge case that I don't think we need to take care of.

Fixes https://bugs.llvm.org/show_bug.cgi?id=31582

Obtained from:	LLVM r319717
MFC after:	1 week
2017-12-05 01:47:41 +00:00
Baptiste Daroussin 2c7292e5b4 Properly name the 2013 edition
Reported by:	ed
2017-12-04 09:58:38 +00:00
Baptiste Daroussin ec5c474feb Add Posix 2013 référence for manpages
PR:		223930
Reported by:	Mateusz Piotrowski <mpp302@gmail.com>
MFC after:	2 days
2017-12-04 09:48:55 +00:00
Andrey V. Elsukov 49ba44e765 Fix format string warning with enabled DEBUGGING.
MFC after:	1 week
2017-12-04 09:17:28 +00:00
Dimitry Andric d4419f6fa8 Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch.  This corresponds to 5.0.1 rc2.

MFC after:	2 weeks
2017-12-03 12:14:34 +00:00
Warner Losh 8e3e3a7ae8 Import lua 5.3.4 to contrib 2017-11-29 00:46:36 +00:00
Brooks Davis ff88ef4183 Update vis(3) the latest from NetBSD.
This adds VIS_DQ for compatiblity with OpenBSD.

Correct by an off-by-one error and a read buffer overflow detected using
asan.

MFC after:	1 day
2017-11-28 01:35:28 +00:00
Hans Petter Selasky 8a53e1340f Merge ^/head r326132 through r326161. 2017-11-24 12:13:27 +00:00
Hans Petter Selasky e833305789 Simplify the build dependencies when building the OFED libraries.
Suggested by:	bdrewery@
Sponsored by:	Mellanox Technologies
2017-11-24 09:01:08 +00:00
Ed Maste b452493a3d bfd: avoid crash on corrupt binaries
From binutils commits 5a4b0ccc20ba30caef53b01bee2c0aaa5b855339 and
7e1e19887abd24aeb15066b141cdff5541e0ec8e, made available under GPLv2
by Nick Clifton.

PR:		198824
MFC after:	1 week
Security:	CVE-2014-8501
Security:	CVE-2014-8502
2017-11-23 16:04:52 +00:00
Ed Maste bd036e101c bfd: fix segfault in the ihex parser on malformed ihex file
From binutils commit 0102ea8cec5fc509bba6c91df61b7ce23a799d32, made
available under GPLv2 by Nick Clifton.

PR:		198824
MFC after:	1 week
Security:	CVE-2014-8503
2017-11-23 14:30:41 +00:00
Hans Petter Selasky 82725ba9bf Merge ^/head r325999 through r326131. 2017-11-23 14:28:14 +00:00
Xin LI b2ea244070 MFV r326007: less v529.
MFC after:	2 weeks
2017-11-20 08:52:33 +00:00
Hans Petter Selasky d39ec9aea1 There is no need to depend on libthr.
Suggested by:	bdrewery@
Sponsored by:	Mellanox Technologies
2017-11-19 12:29:50 +00:00
Hans Petter Selasky 0b12d33c3c Fix compilation of libibnetdisc using in-base GCC v4.2.1.
Sponsored by:	Mellanox Technologies
2017-11-17 15:23:42 +00:00
Hans Petter Selasky 7093892ca0 Fix compilation for libsysdecode.
Don't install the ib_user_mad.h header file into user-space,
because it conflicts with umad.h from libibumad.h when building
libsysdecode.

Sponsored by:	Mellanox Technologies
2017-11-16 15:18:36 +00:00
Hans Petter Selasky f04e941e25 Remove conflicting uint definition.
Already defined by sys/types.h

Sponsored by:	Mellanox Technologies
2017-11-16 15:16:53 +00:00
Hans Petter Selasky 55b1c6e7e4 Merge ^/head r325663 through r325841. 2017-11-15 11:28:11 +00:00
Warner Losh 0c16b53773 Move zstd from contrib to sys/contrib so it can be used in the
kernel. Adjust the Makefiles that referenced it to the new path.

Sponsored by: Netflix
OK'd by: cem@ and AllanJude@
2017-11-14 05:03:38 +00:00
Hans Petter Selasky e110d0774b Fix OFED library dependencies.
Sponsored by:	Mellanox Technologies
2017-11-13 12:36:36 +00:00
Hans Petter Selasky d388615314 Remove no longer needed TESTBUILD defines from OFED Makefiles.
Sponsored by:	Mellanox Technologies
2017-11-13 11:36:22 +00:00
Baptiste Daroussin 1abf619a8a Update to zstd 1.3.2 2017-11-11 13:54:37 +00:00
Baptiste Daroussin 653667f9dc import zstd 1.3.2 2017-11-09 15:38:02 +00:00
Navdeep Parhar 5c2bacde58 Update the iw_cxgbe bits in the projects branch.
Submitted by:	Krishnamraju Eraparaju @ Chelsio
Sponsored by:	Chelsio Communications
2017-11-07 23:52:14 +00:00
Hans Petter Selasky c2c014f24c Merge ^/head r323559 through r325504. 2017-11-07 08:39:14 +00:00
Ed Maste cdf46f9946 lld: accept EINVAL to indicate posix_fallocate is unsupported
As of r325320 posix_fallocate on a ZFS filesystem returns EINVAL to
indicate that the operation is not supported. (I think this is a strange
choice of errno on the part of POSIX.)

PR:		223383, 223440
Reported by:	Mark Millard
Tested by:	Mark Millard
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-11-05 00:51:53 +00:00
Simon J. Gerraty e22fef7dc1 Update to bmake-20171028
Ignore empty MAKEOBJDIR[PREFIX]

Reported by:	bdrewery
2017-11-02 20:08:00 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Philip Paeps 8d7edd1726 Import tzdata 2017c
Changes: https://mm.icann.org/pipermail/tz-announce/2017-October/000047.html

MFC after:	2 days
2017-10-28 18:54:45 +00:00
Ed Maste 8448a47dcb dma: fix use-after-free
Sponsored by:	The FreeBSD Foundation
2017-10-27 20:21:09 +00:00
Dimitry Andric cc718496a9 After jemalloc was updated to version 5.0.0 in r319971, i386 executables
linked with AddressSanitizer (even those linked on earlier versions of
FreeBSD, or with external versions of clang) started failing with errors
similar to:

  ==14688==AddressSanitizer CHECK failed:
  /usr/src/contrib/compiler-rt/lib/asan/asan_poisoning.cc:36
  "((AddrIsAlignedByGranularity(addr))) != (0)" (0x0, 0x0)

This is because AddressSanitizer expects all the TLS data in the program
to be aligned to at least 8 bytes.

Before the jemalloc 5.0.0 update, all the TLS data in the i386 version
of libc.so added up to 80 bytes (a multiple of 8), but 5.0.0 made this
grow to 2404 bytes (not a multiple of 8).  This is due to added caching
data in jemalloc's internal struct tsd_s.

To fix AddressSanitizer, ensure this struct is aligned to at least 16
bytes, which can be done unconditionally for all architectures.  (An
earlier version of the fix aligned the struct to 8 bytes, but only for
ILP32 architectures.  This was deemed unnecessarily complicated.)

PR:		221337
X-MFC-With:	r319971
2017-10-23 21:31:04 +00:00
Dimitry Andric 738eacb46b Pull in r316035 from upstream llvm trunk (by Tim Northover):
AArch64: account for possible frame index operand in compares.

  If the address of a local is used in a comparison, AArch64 can fold
  the address-calculation into the comparison via "adds".
  Unfortunately, a couple of places (both hit in this one test) are not
  ready to deal with that yet and just assume the first source operand
  is a register.

This should fix an assertion failure while building the test suite of
www/firefox for AArch64.

PR:		223048
MFC after:	3 days
2017-10-21 19:14:45 +00:00
Gordon Tetlow a2063804a2 Update wpa_supplicant/hostapd for 2017-01 vulnerability release.
hostapd: Avoid key reinstallation in FT handshake
Prevent reinstallation of an already in-use group key
Extend protection of GTK/IGTK reinstallation of WNM-Sleep Mode cases
Fix TK configuration to the driver in EAPOL-Key 3/4 retry case
Prevent installation of an all-zero TK
Fix PTK rekeying to generate a new ANonce
TDLS: Reject TPK-TK reconfiguration
WNM: Ignore Key Data in WNM Sleep Mode Response frame if no PMF in use
WNM: Ignore WNM-Sleep Mode Response if WNM-Sleep Mode has not been used
WNM: Ignore WNM-Sleep Mode Response without pending request
FT: Do not allow multiple Reassociation Response frames
TDLS: Ignore incoming TDLS Setup Response retries

Submitted by:	jhb
Obtained from:	https://w1.fi/security/2017-01/ (against later version)
Security:	FreeBSD-SA-17:07
Security:	CERT VU#228519
Security:	CVE-2017-13077
Security:	CVE-2017-13078
Security:	CVE-2017-13079
Security:	CVE-2017-13080
Security:	CVE-2017-13081
Security:	CVE-2017-13082
Security:	CVE-2017-13086
Security:	CVE-2017-13087
Security:	CVE-2017-13088
Differential Revision:	https://reviews.freebsd.org/D12693
2017-10-17 17:22:36 +00:00
Ed Maste 2be6126d2a libunwind: use upstream patch to disable executable stacks
arm uses '@' as a comment character, and cannot use @progbits in the
.section directive. Apply the upstream noexec stach change which avoids
this issue.

Obtained from:	LLVM r277868
2017-10-11 19:26:39 +00:00
Justin Hibbits 7a174c3469 Do exception offset computations in 64 bits, not 32.
This fixes clang-built binaries on a gcc powerpc64 world.  Gets us one step
closer to a clang-built world.  The same change was made in later upstream
binutils.

Submitted by:	rdivacky
MFC after:	2 weeks
2017-10-11 02:39:20 +00:00
Baptiste Daroussin 1e515e9434 Import mandoc 1.14.3
MFC after:	1 week
2017-10-06 12:31:55 +00:00
Baptiste Daroussin 8194a60137 Revert r324358, some cruft when in with it, it will be
properly reimported in another commit
2017-10-06 12:30:54 +00:00
Baptiste Daroussin dcfb9248ec Import 1.14.3
MFC after:	1 week
2017-10-06 11:48:09 +00:00
Mariusz Zaborski b01988a5f5 Partially revert r323866.
Using HAVE_* is a internal tcpdump style standard.
We want to be consistent with the standard to upstream those changes in
the future.

Requested by: glebius@
2017-10-04 21:05:44 +00:00
Martin Matuska 5c831a5bd6 MFV r324145,324147:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #905: Support for Zstandard read and write filters
  PR #922: Avoid overflow when reading corrupt cpio archive
  Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166)
  OSS-Fuzz 2936: Place a limit on the mtree line length
  OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough
  OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502)

MFC after:	1 week
Security:	CVE-2017-14166, CVE-2017-14502
2017-10-01 00:40:23 +00:00
Martin Matuska 533ab3c53e Update vendor/libarchive to git 92366744a52f3fa83c3899e375e415a5080a05f2
Relevant vendor changes:
  PR #905: Support for Zstandard read and write filters
  PR #922: Avoid overflow when reading corrupt cpio archive
  Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166)
  OSS-Fuzz 2936: Place a limit on the mtree line length
  OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough
  OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502)

Security: CVE-2017-14166, CVE-2017-14502
2017-09-30 23:33:19 +00:00
Ian Lepore 996a93432a Fix the return value from _Unwind_Backtrace() on arm.
If unwinding stops due to hitting the end of the call chain, the return
value is supposed to be _URC_END_OF_STACK; other values indicate internal
errors.  The return value from get_eit_entry() is now returned without
translating it to _URC_FAILURE, so that callers can see _URC_END_OF_STACK
when it happens.
2017-09-25 23:50:10 +00:00
Ian Lepore 237d41f89e Fix handling of uncaught exceptions in a std::terminate() handler on arm.
When raising an exception, the unwinder searches for a catch handler and if
none is found it should invoke std::terminate() with the uncaught exception
as the "current" exception.  Before this change, the terminate handler was
invoked with no exception as current (abi::__cxa_current_exception_type()
returned NULL), because the return value from the unwinder indicated an
internal failure in unwinding.  It turns out that was because all errors
from get_eit_entry() were translated to _URC_FAILURE.  Now the error is
returned untranslated, which allows _URC_END_OF_STACK to percolate upwards
to throw_exception() in libcxxrt.  When it sees that return status it
properly calls std::terminate() with the uncaught exception installed
as the current exception, allowing custom terminate handlers to work
with it.
2017-09-25 23:24:41 +00:00
Warner Losh d12420d872 Don't display empty error context.
Context extraction didn't handle this case and showed uninitialized memory.

Obtained from: OpenBSD lib.c 1.21
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12379
2017-09-24 05:04:06 +00:00
Warner Losh 8e537f8ae0 Fix %c for floating values that become 0 when coerced to int.
Obtained from: OpenBSD run.c 1.36 (From Jeremy Devenport)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12379
2017-09-24 05:04:02 +00:00
Warner Losh 547f34cace Fix uninitialized variable
echo | awk 'BEGIN {i=$1; print i}' prints a boatload of stack
garbage. NUL terminate the memory returned from malloc to prevent it.

Obtained from: OpenBSD run.c 1.40
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12379
2017-09-24 05:03:57 +00:00
Mariusz Zaborski 2560d18180 We use a few different ifdef's names to check if we are using Casper or not,
let's standardize this. Now we are always use WITH_CASPER name.

Discussed with:	emaste@
MFC after:	1 month
2017-09-21 14:41:41 +00:00
Gordon Tetlow 40427cca7a MFV r323678: file 5.32
Approved by:	emaste (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D12400
2017-09-17 19:14:38 +00:00
John Baldwin 9fb35c8d7b Add missing newline after unknown MIPS-specific dynamic entries.
Reviewed by:	emaste
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D12384
2017-09-15 22:56:39 +00:00
John Baldwin 369bd05bc6 Recognize NT_PTLWPINFO and NT_ARM_VFP in FreeBSD ELF cores.
Reviewed by:	emaste
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D12371
2017-09-14 16:41:24 +00:00
Warner Losh 73f7ff91b2 Implement gawk multiple-arg extension to and, or, and xor.
gawk allows multiple arguemnts to bit-wiste and, or and xor
functions. Implement an arbitrary number of arguments for these
functions. Also, use NULL in preference to 0 to match rest of file.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12361
2017-09-14 05:48:23 +00:00
Warner Losh 69679fc10f Bring in bit operation functions, ala gawk.
These are from OpenBSD:
>>> Extend awk with bitwise operations. This is an extension to the awk
>>> spec and documented as such, but comes in handy from time to time.
>>> The prototypes make it compatible with a similar GNU awk extension.
>>>
>>> ok millert@, enthusiasm from deraadt@

Edited to fix cut and paste in error messages, as well as
using tabs instead of spaces after #defines added.

Obtained From: OpenBSD awk.h 1.12, lex.c 1.10, run.c 1.29
Differential Revision: https://reviews.freebsd.org/D12361
Sponsored by: Netflix
2017-09-14 05:47:55 +00:00
Navdeep Parhar b754c27916 MFH @ r323558. 2017-09-13 19:12:28 +00:00
Marius Strobl f47cbbee8a MFV: r323381
Permit a deflateParams() parameter change as soon as possible.

This change fixes compression errors seen when the embedded Tomcat
web server of a UniFi Controller zlib compresses responses. Given
that Tomcat just uses Java/OpenJDK which in turn employs zlib for
its compression/decompression support, this bug might very well
affect other applications, too.

PR:	222136
2017-09-10 01:25:15 +00:00
Gordon Tetlow 367cf59651 Fix an incorrectly used conditional causing a stack buffer overflow.
Reported by:	Thomas Jarosch of Intra2net AG
Reviewed by:	emaste, jhb
Security:	CVE-2017-1000249
2017-09-07 18:54:54 +00:00
Dimitry Andric c891abb2ae Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
5.0.0 release (upstream r312559).

Release notes for llvm, clang and lld will be available here soon:
<http://releases.llvm.org/5.0.0/docs/ReleaseNotes.html>
<http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html>
<http://releases.llvm.org/5.0.0/tools/lld/docs/ReleaseNotes.html>

Relnotes:	yes
MFC after:	1 month
X-MFC-with:	r321369
2017-09-06 21:21:13 +00:00
Ryan Libby 1a11bb8f76 gnu binutils: FSGSBASE assembly/disassembly
Enable the in-tree binutils to assemble and disassemble amd64 FSGSBASE
instructions (rdfsbase, rdgsbase, wrfsbase, wrgsbase), used in the base
system since r322763.

This gives one last gasp for in-tree gcc, and provides a small
enhancement for in-tree binutils objdump.

Reviewed by:	dim, kib
Approved by:	markj (mentor)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12222
2017-09-05 19:04:07 +00:00
Dimitry Andric 3ea909cc76 Upgrade our copies of clang, llvm, lldb and compiler-rt to r312293 from
the upstream release_50 branch.  This corresponds to 5.0.0 rc4.

As of this version, the cad/stepcode port should now compile in a more
reasonable time on i386 (see bug 221836 for more information).

PR:		221836
MFC after:	2 months
X-MFC-with:	r321369
2017-09-01 18:53:36 +00:00
Dag-Erling Smørgrav e8a699bb6e Merge upstream r4302 to support multiple concurrently valid anchors.
If an unpatched unbound-anchor is run without a preexisting root anchor
between 2017-09-11 and 2017-10-11, it will fail and Unbound will not be
able to start unless the validator is disabled.  An EN will be issued
with patches for existing systems and information on how to work around
the issue on new installations.
2017-08-31 12:02:14 +00:00
Andrew Turner 8657387683 Work around a bug in QEMU when loading data with a load pair instruction
where the source register is also the first destination register.

If this is the case, and we raise an exception in the middle of the
instruction, for example the load is across two pages and the second page
isn't mapped, QEMU will have overwritten the address with invalid data.

This is a valid behaviour in most cases, with the exception of when a
destination register is also use in address generation. As such switch
the order of the registers to ensure the address register is second so it
will be written to second, after any exceptions have happened.

This has been acknowledged in upstream QEMU, however as the workaround is
simple also handle it here.

Sponsored by:	DARPA, AFRL
2017-08-26 15:08:27 +00:00
John Baldwin a9f6545f43 Extend the workaround for LLVM bug 11663 to MIPS N32.
This fixes infinite recursion in /sbin/init for MIPS N32.

Submitted by:	Robert M. Kovacsics <rmk35@cam.ac.uk>
MFC after:	1 week
Sponsored by:	DARPA / AFRL
2017-08-26 00:17:57 +00:00
Dimitry Andric 0fa4377182 Upgrade our copies of clang, llvm, lldb and compiler-rt to r311606 from
the upstream release_50 branch.

As of this version, lib/msun's trig test should also work correctly
again (see bug 220989 for more information).

PR:		220989
MFC after:	2 months
X-MFC-with:	r321369
2017-08-24 20:19:27 +00:00
Kyle Evans c552f48b6f bsdgrep: add some additional tests for fgrep
Previously added tests only check that fgrep is somewhat sane and works. Add
some more tests that check that the implementation is basically functional
and not producing incorrect results with various flags.

Reviewed by:	cem, emaste, ngie
Approved by:	emaste (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D12056
2017-08-24 01:20:52 +00:00
Ed Maste 726e8d8884 top: use __mips__ and __NetBSD__ for consistency
r322767 fixed the mips64 build failure with Clang with a minimal change
to use __FreeBSD__ instead of FreeBSD in a #if test.  For consistency
and to facilitate possible upstreaming change the other macros in the
test to their canonical form.

Discussed with:	jhb
2017-08-23 17:56:55 +00:00
Baptiste Daroussin e6a4cfc37b Import zstandard 1.3.1 2017-08-22 11:11:49 +00:00
John Baldwin 8cf606a4d6 Fix FreeBSD-presence macro to fix the build on mips with clang.
GCC doesn't define 'mips' which is why it doesn't trip over this.

Sponsored by:	DARPA / AFRL
2017-08-21 17:52:09 +00:00
Hans Petter Selasky 1409e715e6 Merge ^/head r322398 through r322746. 2017-08-21 11:56:47 +00:00
Dimitry Andric 0554abf0e0 Upgrade our copies of clang, llvm, lld and libc++ to r311219 from the
upstream release_50 branch.

MFC after:	2 months
X-MFC-with:	r321369
2017-08-21 07:03:02 +00:00
Ed Maste bdab1e7024 gas: add parens to clarify expression and eliminate clang warning
Building mips64 w/ Clang failed with -Werror,-Wshift-negative-value
error: shifting a negative signed value is undefined
2017-08-18 21:20:38 +00:00
Ed Maste f2356007d5 gas: fix "format string is not a string literal" errors on mips
Sponsored by:	The FreeBSD Foundation
2017-08-18 18:26:30 +00:00
Ed Maste e80e4f3aca bfd: cast BFD_ALIGN to fix clang error on mips
error: implicit conversion from 'bfd_vma' (aka 'unsigned long long')
to 'int' changes value from 18446744073709551615 to -1
  return BFD_ALIGN (ret, 16);
  ~~~~~~ ^~~~~~~~~~~~~~~~~~~
note: expanded from macro 'BFD_ALIGN'
   : ~ (bfd_vma) 0)
     ^~~~~~~~~~~~~

Sponsored by:	The FreeBSD Foundation
2017-08-18 18:20:51 +00:00
Sevan Janiyan 019e613255 typo
PR:		211160
Submitted by:	Dan Robertson <dan.robertson AT anidata DOT org>
Reviewed by:	oshogbo
MFC after:	7 days
Differential Revision:	https://reviews.freebsd.org/D12005
2017-08-18 14:17:12 +00:00
Baptiste Daroussin a54b74c7f3 Remove example from zstd sources, their license does not allow redistribution
Reported by:	joerg@NetBSD
2017-08-18 11:33:10 +00:00
Ruslan Bukin f2653b03e8 Rename RISC-V GCC config directory: riscv64 -> riscv
(to match official RISC-V target for GCC 7.1).

This is only a minimal config required to build c start up (csu).

This fixes build after r322429 ("Make _TO_CPUARCH macro for
ARCH to CPUARCH conversions")

Reported by:	lwhsu
Sponsored by:	DARPA, AFRL
2017-08-14 14:16:56 +00:00
Ed Maste f66f6e66a1 lld: Add -z muldefs option.
Obtained from:	LLVM r310757
2017-08-13 21:11:48 +00:00
Hans Petter Selasky 0275f9dbf7 Merge ^/head r321383 through r322397. 2017-08-11 10:59:34 +00:00
Peter Wemm ee51cfe17c Update from sqlite3-3.14.1 to sqlite3-3.20.0. This is a private lib.
This fixes a possible client-side crash when parsing corrupt databases.
2017-08-11 00:00:01 +00:00
Peter Wemm 081baee06a Update subversion 1.9.5 -> 1.9.7
This includes a client-side fix for CVE-2017-9800.
2017-08-10 22:03:26 +00:00
Ed Maste 4c320ca0d6 lldb: Report inferior signals as signals, not exceptions, on FreeBSD
This is the FreeBSD equivalent of LLVM r238549.

This serves 2 purposes:

* LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/
  SIGFPE the way it is suppose to be handled. Prior to this fix these
  signals will neither create a coredump, nor exit from the debugger
  or work for signal handling scenario.
* eInvalidCrashReason need not report "unknown crash reason" if we have
  a valid si_signo

llvm.org/pr23699

Patch by Karnajit Wangkhem

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

Submitted by:	Karnajit Wangkhem
Obtained from:	LLVM r310591
2017-08-10 13:51:04 +00:00
Ryan Libby 20100e740e Pick 'Remove external linkage for spin_adaptive' from upstream jemalloc
Apply the changes from upstream jemalloc 048c6679.  This is actually not
quite a cherry pick due to makefile difference and because FreeBSD does
not carry the msvc project files which were also modified in that
commit.

Approved by:	jasone (maintainer), markj (mentor)
Sponsored by:	Dell EMC Isilon
2017-08-09 22:58:42 +00:00
Ed Maste 39901227a5 lldb: Make i386-*-freebsd expression work on JIT path
* Enable i386 ABI creation for freebsd
* Added an extra argument in ABISysV_i386::PrepareTrivialCall for mmap
  syscall
* Unlike linux, the last argument of mmap is actually 64-bit(off_t).
  This requires us to push an additional word for the higher order bits.
* Prior to this change, ktrace dump will show mmap failures due to
  invalid argument coming from the 6th mmap argument.

Submitted by:	Karnajit Wangkhem
Differential Revision:	https://reviews.llvm.org/D34776
2017-08-09 19:09:23 +00:00
Dimitry Andric 9dc417c32b Upgrade our copies of clang, llvm and libc++ to r310316 from the
upstream release_50 branch.

MFC after:	2 months
X-MFC-with:	r321369
2017-08-09 17:32:39 +00:00
Kyle Evans a4a801688c regex(3): Handle invalid {} constructs consistently and adjust tests
Currently, regex(3) exhibits the following wrong behavior as demonstrated
with sed:

 - echo "a{1,2,3}b" | sed -r "s/{/_/"     (1)
 - echo "a{1,2,3}b" | sed "s/\}/_/"       (2)
 - echo "a{1,2,3}b" | sed -r "s/{}/_/"    (3)

Cases (1) and (3) should throw errors but they actually succeed, and (2)
throws an error when it should match the literal '}'. The correct behavior
was decided by comparing to the behavior with the equivalent BRE (1)(3) or
ERE (2) and consulting POSIX, along with some reasonable evaluation.

Tests were also adjusted/added accordingly.

PR:		166861
Reviewed by:	emaste, ngie, pfg
Approved by:	emaste (mentor)
MFC after:	never
Differential Revision:	https://reviews.freebsd.org/D10315
2017-08-08 04:10:46 +00:00
Ruslan Bukin ca20f8ec29 o Replace __riscv__ with __riscv
o Replace __riscv64 with (__riscv && __riscv_xlen == 64)

This is required to support new GCC 7.1 compiler.
This is compatible with current GCC 6.1 compiler.

RISC-V is extensible ISA and the idea here is to have built-in define
per each extension, so together with __riscv we will have some subset
of these as well (depending on -march string passed to compiler):

__riscv_compressed
__riscv_atomic
__riscv_mul
__riscv_div
__riscv_muldiv
__riscv_fdiv
__riscv_fsqrt
__riscv_float_abi_soft
__riscv_float_abi_single
__riscv_float_abi_double
__riscv_cmodel_medlow
__riscv_cmodel_medany
__riscv_cmodel_pic
__riscv_xlen

Reviewed by:	ngie
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11901
2017-08-07 14:09:57 +00:00
Pietro Cerutti f9995000bc Enhance top(1) to filter on multiple usernames
Reviewed by:	cognet, bapt
Approved by:	cognet
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D11840
2017-08-07 08:45:08 +00:00
Cy Schubert 11b5e0cd9c loadpoolfile() implements a -R (NORESOLVE) option which is not listed
in usage(). This commit trues up usage() with loadpoolfile().
2017-08-05 06:46:06 +00:00
Phil Shafer fd5e3f3ec6 Update from libxo-0.8.1 to 0.8.4:
0.8.4:
    - void anchor width optimization when we have a custom formatter (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221130)
    - make "{[:/18}" do the right thing (also allows "{[:/%s}", wide ? 40 : 10)
    - Can't skip anchor formatting in non-display styles
    - add test case for {[:/18}
    - add upload-xohtml-files to 'make upload'
  0.8.3:
    - xohtml: Add "-w" option to pull support files from gh_pages
    - Add "upload-xohtml-files" target to publish support files in gh_pages/
    - add HISTORY/AUTHORS section to man pages
  0.8.2:
    - xohtml: Add div.units as standard CSS text
    - Don't treat values as format strings; they are not
    - add "-p" to "mkdir -p build" in setup.sh
    - add test case for {U:%%} (from df.c)
    - detect end-of-string in '%' and '' escaping
    - make xo_simple_field, for common simple cases
    - xohtml: nuke "n" in "echo" commands
    - rename "format" to "fmt" for consistency; same for "str" to "value"

Submitted by:	phil
2017-08-03 15:47:42 +00:00
Hans Petter Selasky d6b92ffa99 OFED user-space import and update for use with Linux-4.9 compatible RDMA
kernel APIs.

List of sources used:

1) rdma-core was cloned from "https://github.com/linux-rdma/rdma-core.git"
Top commit d65138ef93af30b3ea249f3a84aa6a24ba7f8a75

2) OpenSM was cloned from git://git.openfabrics.org/~halr/opensm.git
Top commit 85f841cf209f791c89a075048a907020e924528d

3) libibmad was cloned from "git://git.openfabrics.org/~iraweiny/libibmad.git"
Tag 1.3.13 with some additional patches from Mellanox.

4) infiniband-diags was cloned from "git://git.openfabrics.org/~iraweiny/infiniband-diags.git"
Tag 1.6.7 with some additional patches from Mellanox.

Added the required Makefiles for building and installing.

Sponsored by:	Mellanox Technologies
2017-08-02 16:00:30 +00:00
Enji Cooper 63dc0fc9c7 Fix accidental misconversion done in r321912
SUBDIR.${MK_TESTS} should append osmtest, not tests

MFC after:	1 week
MFC with:	r321912
2017-08-02 09:00:18 +00:00
Enji Cooper 4b330699f8 Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
2017-08-02 08:35:51 +00:00
Baptiste Daroussin 5543d382a7 Update mandoc to 1.14.2 2017-07-31 19:34:38 +00:00
Sepherosa Ziehau c685956956 hyperv: Add VF bringup scripts and devd rules.
How network VF works with hn(4) on Hyper-V in non-transparent mode:

- Each network VF has a cooresponding hn(4).
- The network VF and the it's cooresponding hn(4) have the same hardware
  address.
- Once the network VF is up, e.g. ifconfig VF up:
  o  All of the transmission should go through the network VF.
  o  Most of the reception goes through the network VF.
  o  Small amount of reception may go through the cooresponding hn(4).
     This reception will happen, even if the the cooresponding hn(4) is
     down.  The cooresponding hn(4) will change the reception interface
     to the network VF, so that network layer and application layer will
     be tricked into thinking that these packets were received by the
     network VF.
  o  The cooresponding hn(4) pretends the physical link is down.
- Once the network VF is down or detached:
  o  All of the transmission should go through the cooresponding hn(4).
  o  All of the reception goes through the cooresponding hn(4).
  o  The cooresponding hn(4) fallbacks to the original physical link
     detection logic.

All these features are mainly used to help live migration, during which
the network VF will be detached, while the network communication to the
VM must not be cut off.  In order to reach this level of live migration
transparency, we use failover mode lagg(4) with the network VF and the
cooresponding hn(4) attached to it.

To ease user configuration for both network VF and non-network VF, the
lagg(4) will be created by the following rules, and the configuration
of the cooresponding hn(4) will be applied to the lagg(4) automatically.

Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D11635
2017-07-31 07:18:15 +00:00
Dimitry Andric 37cd60a321 Upgrade our copies of clang, llvm, lld and lldb to r309439 from the
upstream release_50 branch.  This is just after upstream's 5.0.0-rc1.

MFC after:	2 months
X-MFC-with:	r321369
2017-07-30 18:01:34 +00:00
Dimitry Andric 14bc6a676e Pull in r309503 from upstream clang trunk (by Richard Smith):
PR33902: Invalidate line number cache when adding more text to
  existing buffer.

  This led to crashes as the line number cache would report a bogus
  line number for a line of code, and we'd try to find a nonexistent
  column within the line when printing diagnostics.

This fixes an assertion when building the graphics/champlain port.

Reported by:	antoine, kwm
PR:		219139
2017-07-30 11:50:16 +00:00
Martin Matuska a758cabb3f MFV r321673:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #926: ensure ar strtab is null terminated

MFC after:	1 week
2017-07-28 23:56:07 +00:00
Dimitry Andric 4dfab2eb72 Pull in r308891 from upstream llvm trunk (by Benjamin Kramer):
[CodeGenPrepare] Cut off FindAllMemoryUses if there are too many uses.

  This avoids excessive compile time. The case I'm looking at is
  Function.cpp from an old version of LLVM that still had the giant
  memcmp string matcher in it. Before r308322 this compiled in about 2
  minutes, after it, clang takes infinite* time to compile it. With
  this patch we're at 5 min, which is still bad but this is a
  pathological case.

  The cut off at 20 uses was chosen by looking at other cut-offs in LLVM
  for user scanning. It's probably too high, but does the job and is
  very unlikely to regress anything.

  Fixes PR33900.

  * I'm impatient and aborted after 15 minutes, on the bug report it was
    killed after 2h.

Pull in r308986 from upstream llvm trunk (by Simon Pilgrim):

  [X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914)

  D35067/rL308322 attempted to support up to 4 load pairs for memcmp
  inlining which resulted in regressions for some optimized libc memcmp
  implementations (PR33914).

  Until we can match these more optimal cases, this patch reduces the
  memcmp expansion to a maximum of 2 load pairs (which matches what we
  do for -Os).

  This patch should be considered for the 5.0.0 release branch as well

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

These fix a hang (or extremely long compile time) when building older
LLVM ports.

Reported by:    antoine
PR:             219139
2017-07-28 20:13:25 +00:00
Cy Schubert 223428af47 As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024.
PR:		217920
Submitted by:	codarren@hackers.mu
Reviewed by:	emaste, cem
Approved by:	so (implicit, in r315225)
MFC after:	1 week
Differential Revision:	D11747
Patterned after:	r315225
2017-07-27 06:26:15 +00:00
Kyle Evans 0e95794283 bsdgrep(1): Don't exit before processing every file
Given an empty pattern (i.e. grep "" A B), bsdgrep(1) would previously exit()
with the appropriate exit code upon encountering an empty file. Likely intended
as an optimization, but this behavior is technically incorrect since an empty
pattern should match every line.

PR:		220924
Reviewed by:	emaste, cem (earlier version), ngie
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D11698
2017-07-25 01:50:37 +00:00
Simon J. Gerraty c7019bf79d Import bmake-20170720
Includes fix for compat handling of interrupts.
2017-07-24 04:38:05 +00:00
Dimitry Andric 90a5403fea Merge ^/head r321307 through r321350. 2017-07-21 18:54:34 +00:00
Dimitry Andric 754301e94f Pull in r295886 from upstream clang trunk (by Richard Smith):
PR32034: Evaluate _Atomic(T) in-place when T is a class or array type.

  This is necessary in order for the evaluation of an _Atomic
  initializer for those types to have an associated object, which an
  initializer for class or array type needs.

This fixes an assertion when building recent versions of LinuxCNC.

Reported by:	trasz
PR:		220883
MFC after:	1 week
2017-07-21 17:59:54 +00:00
Kyle Evans c043764469 Add regression test for recent regex(3) breakage
BREs recently became prematurely sensitive to the branching operator, which
outright broke expressions that used it instead of failing silently. Test
that \| is matching a literal | for the time being.

Reviewed by:	cem, emaste, ngie
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D11577
2017-07-21 01:35:55 +00:00
Dimitry Andric 2fef18f836 Merge ^/head r320994 through r321238. 2017-07-19 19:43:10 +00:00
Dimitry Andric b40b48b876 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r308421, and update
build glue.
2017-07-19 19:41:41 +00:00
Ed Maste 7582669623 readelf: correct printing of DT_FILTER and DT_AUXILIARY values
Previously these were shown only for MIPS objects.

Obtained from:	ELF Tool Chain r3564
MFC after:	1 week
MFC with:	r321045
Sponsored by:	The FreeBSD Foundation
2017-07-16 16:22:52 +00:00
Ed Maste d62ecb4ecd readelf: fix printing of DT_FILTER and some other DT_* values
Some non-processor-specific DT_* values overlap the range DT_LOPROC to
DT_HIPROC.  Handle common ones first, then the processor-specific ones.

Obtained from:	ELF Tool Chain r3563
Sponsored by:	The FreeBSD Foundation
2017-07-16 12:30:39 +00:00
Simon J. Gerraty 8695518c44 Import bmake-20170711 2017-07-15 21:19:27 +00:00
Dimitry Andric 03f072d13d Merge ^/head r320971 through r320993. 2017-07-14 17:38:44 +00:00
Baptiste Daroussin 8f5003ea4a Update zstd to 1.3.0 2017-07-14 14:55:34 +00:00
Baptiste Daroussin affe9eaf78 Import zstd 1.3.0 2017-07-14 14:51:28 +00:00
Dimitry Andric d2043ca373 Merge ^/head r320573 through r320970. 2017-07-13 22:01:38 +00:00
Dimitry Andric c439438675 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and update
build glue.
2017-07-13 21:58:45 +00:00
Martin Matuska 422f92722d Fix libarchive mismerge of r320927 in libarchive_entry.h
MFC after:	1 week
X-MFC-with:	320927
Reported by:	Ngie Cooper <ngie@FreeBSD.org>
2017-07-13 04:46:00 +00:00
Martin Matuska b86cbbb3ad Fix libarchive mismerge of r320927
MFC after:	1 week
X-MFC-with:	320927
Reported by:	Ngie Cooper <ngie@FreeBSD.org>
2017-07-13 04:42:29 +00:00
Martin Matuska 8bad9d67f0 MFV r320924:
Bump libarchive to 3.3.2

Vendor changes:
  PR #901: don't depend on stdin in a testcase

MFC after:	1 week
2017-07-13 00:28:36 +00:00
Alan Somers 97ae05e314 Remove an extraneous strlen from t_setdomainname.c
Reported by:	Coverity
CID:		1377568
MFC after:	15 days
X-MFC-With:	320737
Sponsored by:	Spectra Logic Corp
2017-07-12 14:51:32 +00:00
Konstantin Belousov 99ac8154ff Provide libdl.
Create libdl.so.1 as a filter for libc.so.7 which exports public dl*
functions. The functions are resolved from the rtld instead, the goal
of creating library is to avoid errors from the static linker due to
missed libdl. For static binaries, an empty .o is compiled into
libdl.a so that static binaries still get dl stubs from libc.a.

Right now lld cannot create filter objects, disable libdl on arm64
when binutils are not used.

Reviewed by:	bdrewery, dim (previos version); emaste
Exp run:	PR 220525, done by antoine
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D11504
2017-07-10 14:59:21 +00:00
Alan Somers eaca103d94 Fix cleanup in lib/libc/gen/setdomainname_test
ATF cleanup routines run in separate processes from the tests themselves, so
they can't share global variables.

Also, setdomainname_test needs to be is_exclusive because the test cases
access a global resource.

PR:		219967
Reviewed by:	ngie
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D11188
2017-07-06 14:47:59 +00:00
Enji Cooper 1c227d0049 :snprintf_float: don't blindly set RLIMIT_DATA and RLIMIT_AS to 1 MB -- raise
the limit to 32MB instead.

Require user=root and memory=64MB+ first so one can be reasonably sure that
the test will function appropriately.

MFC after:	1 month
MFC with:	r320726
PR:	220502
2017-07-06 07:59:00 +00:00
Enji Cooper 1f73e6d888 Expect :snprintf_float to segfault
This issue started occurring within the past month or so.

PR:	220502
Reported by:	Jenkins (amd64-head job)
2017-07-06 07:45:20 +00:00
Cy Schubert e7df11b869 Document supported poollist() (ippool -l) options in usage() and in
ippool.8 man page.
2017-07-05 05:50:36 +00:00
Ed Maste 0a7e7475c3 lld: [ELF] Remove unused synthetic sections from script commands
Script commands are processed before unused synthetic sections are
removed. Therefore, if a linker script matches one of these sections
it'll get emitted as an empty output section because the logic for
removing unused synthetic sections ignores script commands which
could have already matched and captured one of these sections. This
patch fixes that by also removing the unused synthetic sections from
the script commands.

Discussed with:	dim
Obtained from:	LLVM r307037
Sponsored by:	The FreeBSD Foundation
2017-07-04 17:32:51 +00:00
Jason Evans 8b2f5aaf29 Update jemalloc to 5.0.1. 2017-07-03 23:27:57 +00:00
Sean Bruno 4b85e937ef Clear clang warning:
warning: macro expansion producing 'defined' has undefined behavior
  [-Wexpansion-to-defined]

Submitted by:	Aaron Prieger <aprieger@llnw.com>
Reviewed by:	dim
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D11166
2017-07-03 19:49:25 +00:00
Ed Maste bb07ac4d64 Revert LLVM r306813: Resolve references properly when using .symver
This LLD commit was intended to fix one case of symbol versioning
(LLVM PR28414) but broke FreeBSD buildworld.  It has been reverted
upstream in LLVM r306996.

Discussed with:	dim
2017-07-03 13:41:05 +00:00
Dimitry Andric f6e653bb10 Merge ^/head r320398 through r320572. 2017-07-02 11:48:07 +00:00
Dimitry Andric a580b01494 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and update
build glue.
2017-07-02 11:41:15 +00:00
Jason Evans 1a78ec8941 Default the abort_conf malloc option to false.
This avoids troublesome backward compatibility issues.
2017-06-30 17:45:51 +00:00
Enji Cooper 4fb696d630 atf-sh(3): document atf_init_test_cases(3) fully
The function was missing from the NAME/SYNOPSIS sections. Add a manpage link
to complete the documentation reference.

MFC after:	1 month
2017-06-30 05:49:12 +00:00
Cy Schubert e5426b9f65 Ansify entry and exit points.
MFC after:	1 month
2017-06-28 19:08:07 +00:00
Enji Cooper 3416500aef Pull down pjdfstest 0.1
The summary of changes is as follows..

Generic changes::
- Added configure support [2].
- Check for lchmod filesystem support with create_file(..); for
  testcases that require lchmod, skip the testcase -- otherwise
  use chmod directly [1].
- Added Travis CI integration [2].
- Added utimensat testcases [1].

Linux support::
- Fixed Linux support to pass on later supported versions of
  Fedora/Ubuntu [2].
- Conditionally enable posix_fallocate(2) support [2].

OSX support::
- Fixed compilation on OSX [2].
- Added partial OSX support (the test run isn't fully green yet)
  [2].

MFC after:	2 months
Obtained from:	https://github.com/pjd/pjdfstest/tree/0.1
Relnotes:	yes
Submitted by:	asomers [1], ngie [2]
Tested with:	UFS, ZFS
2017-06-28 09:22:45 +00:00
Cy Schubert 3fe0d81e1f In poolnodecommand() (ippool -a and ippool -r) -m (pool name) is not
optional.
2017-06-28 02:30:32 +00:00
Enji Cooper 69a3d9e7dc Expect :mmap_eof_not_eol to fail
It relies on a jemalloc feature (opt.redzone) no longer available after
r319971.

MFC with:	r318908, r319971
PR:		220309
2017-06-27 17:22:03 +00:00
Dimitry Andric a3604b95ed Merge ^/head r320042 through r320397. 2017-06-27 06:44:32 +00:00
Dimitry Andric edd7eaddc8 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306325, and update
build glue.
2017-06-27 06:40:39 +00:00
Cy Schubert f21680fd98 Replace AF_INET6 ifdefs with USE_INET6 to be consistent with the rest
of the ipfilter souce tree.
2017-06-27 04:54:58 +00:00
Ed Maste 18f4c9db68 Update to ELF Tool Chain snapshot at r3561
This update is primarily bug fixes in C++ symbol demangling, including:

- rvalue reference
- builtin type auto and decltype(auto)
- revamped support for function return types
- formatting fixes
- omit void when its the only param
- ref-qualifiers and others in function types
- type qualifiers in pointer-to-member function types
- incorrect handling regarding CV-qualifiers in function types
- ref-qualifier found in nested-name
- properly handle <name> ::= <substitute><template-args>
- make sure that nested function name is not a substitute candidate
- correctly handle expression in template args
- skip unknown substitution abbreviations

MFC after:	4 days
2017-06-25 22:39:28 +00:00
Cy Schubert 43988e3f50 Replace AF_INET6 ifdefs with USE_INET6 ifdefs. This is more consistent
and guaranteed to build everywhere in ipfilter.

Not all of this commit can be MFCed. Some is original code while others
are not.
2017-06-23 02:42:04 +00:00
Cy Schubert cd32671786 In poolnodcommand(): TTL (-T) is only valid when adding a node to a
pool (ippool -a) not when removing a node from a pool (ippool -r).
Flag -T as an error in ippool -r.
2017-06-22 12:46:48 +00:00
Cy Schubert 3f296d78cc poolflush() has no positional arguments. 2017-06-22 06:25:34 +00:00
Cy Schubert 3f6a9d3760 Fix -S handling within poolcommand(). Specifying a seed (-S) is only
valid when adding a pool (ippool -A), not when removing a pool
(ippool -R). It is a command line syntax error if specifying a seed (-S)
is specified when emoving a pool (-R).
2017-06-21 12:19:05 +00:00
Andriy Gapon cec9c3b13b remove bogus declaration of malloc from tcp_wrappers
The declaration was already inactive when INET6 was enabled
and it causes a build error in the other case because of
a conflict with the correct definition in stdlib.h.

Discussed with:	dim, ume
MFC after:	2 weeks
2017-06-20 16:40:31 +00:00
Cy Schubert 49742409a3 Flag poolnodecommand() (ippool -a and ippool -r) command line syntax
errors.
2017-06-20 12:31:58 +00:00
Cy Schubert 254a06e0b3 poolcommand() (ippool -A and ippool -R) seed takes an argument. 2017-06-19 19:27:37 +00:00
Cy Schubert eeafb4bc10 Flag poolcommand() (ippool -A and ippool -R) command line syntax errors. 2017-06-19 12:33:22 +00:00
Dimitry Andric 4dd7e43662 Revert changes in r312891 and go back to stock lld code for rounding the
PT_GNU_RELRO p_memsz.  This should now work properly for FreeBSD.
2017-06-18 12:59:43 +00:00
Dimitry Andric f32b3b5783 Repair a few mismerges in r320041 and r320042. 2017-06-17 12:48:31 +00:00
Konstantin Belousov 2b34e84335 Add abstime kqueue(2) timers and expand struct kevent members.
This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which
specifies that the data field contains absolute time to fire the
event.

To make this useful, data member of the struct kevent must be extended
to 64bit.  Using the opportunity, I also added ext members.  This
changes struct kevent almost to Apple struct kevent64, except I did
not changed type of ident and udata, the later would cause serious API
incompatibilities.

The type of ident was kept uintptr_t since EVFILT_AIO returns a
pointer in this field, and e.g. CHERI is sensitive to the type
(discussed with brooks, jhb).

Unlike Apple kevent64, symbol versioning allows us to claim ABI
compatibility and still name the new syscall kevent(2).  Compat shims
are provided for both host native and compat32.

Requested by:	bapt
Reviewed by:	bapt, brooks, ngie (previous version)
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D11025
2017-06-17 00:57:26 +00:00
Dimitry Andric 4198293b25 Merge ^/head r319801 through r320041. 2017-06-17 00:14:54 +00:00
Dimitry Andric 24d58133b7 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305575, and update
build glue.
2017-06-17 00:09:34 +00:00
Sean Bruno 74812c2ba4 TCP Wrappers: tcpdchk (tcp wrapper configuration checker) and tcpdmatch
(tcp wrapper oracle) warning fixes via edits to the C code files

contrib/tcp_wrappers/fakelog.c
  Warnings for each of functions: openlog( ), vsyslog( ), VARARGS( ),
  closelog( )
    warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    warning: control reaches end of non-void function [-Wreturn-type]
  Fixes:
      Explicitly added specification of function type to void for each
        function, suppressing both warnings for each function listed
contrib/tcp_wrappers/inetcf.c
  Warnings:
      warning: incompativle redeclaration of library function 'malloc'
        note: 'malloc' is a builtin with type 'void *(unsigned long)'
      warning: implicit declaration of function 'check_path' is invalid in C99
        [-Wimplicit-function-declaration]
  Fixes:
      Removed redeclaration of malloc on line 21
      Included library <stdlib.h> in the code which contains the malloc( )
        function in it's library
      Included scaffold.h header file in the code that contains check-path( )
        function
contrib/tcp_wrappers/scaffold.c
  Warnings:
      warning: implicitly declaring library function 'exit' with type
        'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration]
      note: include the header <stdlib.h> or explicitly provide a declaration
        for 'exit'
  Fixes:
      Included <stdlib.h> in the code which contains the exit( ) function in
      it's library
contrib/tcp_wrappers/tcpdchk.c
  Warnings:
      warning: implicit declaration of function 'getopt' is invalid
        in C99 [-Wimplicit-function-declaration]
      warning: implicit declaration of function 'atoi' is invalid
        in C99 [-Wimplicit-function-declaration]
  Fixes:
      Included the specific function <getopt.h> library to the code
      Included<stdlib.h> to the code which contains the atoi( ) function in
        the library
contrib/tcp_wrappers/tcpdmatch.c
  Warnings:
      warning: implicit declaration of function 'getopt' is invalid in C99
        [-Wimplicit-function-declaration]
  Fixes:
      Included<stdlib.h> to the code which contains the getopt( ) function in
        the library

Submitted by:	Aaron Prieger <aprieger@llnw.com>
Reviewed by:	vangyzen
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D10995
2017-06-16 22:32:23 +00:00
Phil Shafer 264104f268 Merge libxo-0.8.2:
- xohtml: Add "-w" option to pull support files from gh_pages
- Add "upload-xohtml-files" target to publish support files in gh_pages/
- add HISTORY/AUTHORS section to man pages
- xohtml: Add div.units as standard CSS text
- Don't treat values as format strings; they are not
- add "-p" to "mkdir -p build" in setup.sh
- add test case for {U:%%} (from df.c)
- detect end-of-string in '%' and '' escaping
- make xo_simple_field, for common simple cases
- xohtml: nuke "n" in "echo" commands
- rename "format" to "fmt" for consistency; same for "str" to "value"
- update test cases

Submitted by:	phil
2017-06-16 06:29:21 +00:00
Jason Evans b7eaed250f Update jemalloc to 5.0.0. 2017-06-15 07:15:05 +00:00
Cy Schubert ed840c526f Correct example directory location.
Submitted by:	olivier@
MFC after:	3 days
2017-06-15 00:59:02 +00:00
Ed Maste ec21d1a149 lld: Add armelf emulation mode
Obtained from:	LLD r305375
2017-06-14 19:36:28 +00:00
Ed Maste afb4d242bc lld: Fix weak symbols on arm and aarch64
Given

.weak target
 .global _start
_start:
 b target

The intention is that the branch goes to the instruction after the
branch, effectively turning it on a nop.  The branch adds the runtime
PC, but we were adding it statically too.

I noticed the oddity by inspection, but llvm-objdump seems to agree,
since it now prints things like:

b       #-4 <_start+0x4>

Obtained from:  LLD commit r305212
Differential Revision:  https://reviews.freebsd.org/D11191

Reviewed by:	dim, Rafael Espíndola
Obtained from:	LLD r305212
MFC after:	3 days
2017-06-14 18:56:33 +00:00
Ed Maste dbb5554133 lld: sort relocations
No functional change; applied to facilitate merge of later LLD commit.

Reviewed by:	dim, Rafael Espíndola
Obtained from:	LLD r298797
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D11190
2017-06-14 18:53:33 +00:00
Cy Schubert 2d1353a21d Chase r319848: remove -v option from getopt() call. 2017-06-14 02:42:38 +00:00
Cy Schubert 40ad94e00a -n (do nothing) is not a commmand option. 2017-06-14 02:41:22 +00:00
Ed Maste a443511817 lld: revert accidentally committed change from r319887
This change is a portion of LLD rev 305212 which accidentally ended
up in my svn tree. We do want to backport the change to LLD 4.0, but
it needs additional work and was not supposed to be included in
r319887.
2017-06-13 01:25:19 +00:00
Ed Maste e47ea033a1 hexdump: actually enter capability mode on last file
Reviewed by:	cem, Kyle Evans
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10897
2017-06-13 01:05:55 +00:00