Commit Graph

7058 Commits

Author SHA1 Message Date
Pedro F. Giffuni
3b6f4eae15 gas: Implement the .inst assembler directive for arm.
We normally use the binutils from ports but on other systems this
is required for building gcc 4.9.

Obtained from:	OpenBSD (CVS rev. 1.5)
MFC after:	3 weeks
2016-05-20 20:01:10 +00:00
Ed Maste
d28b40c8d9 elftoolchain: backwards compatability for EM_IAMCU definition
It is not provided by sys/elf_common.h on older stable/10.
2016-05-20 18:54:42 +00:00
Pedro F. Giffuni
0d1bd3bc60 GCC: Add support for named initializers for anonymous structs/unions.
Missing hunk from r300301.

Reported by:	Ed Schouten
Obtained from:	OpenBSD (CVS rev. 1.2)
2016-05-20 18:01:53 +00:00
Dimitry Andric
dd8214827f Pull in r270240 from upstream clang trunk (by me):
Make __FreeBSD_cc_version predefined macro configurable at build time

  The `FreeBSDTargetInfo` class has always set the `__FreeBSD_cc_version`
  predefined macro to a rather static value, calculated from the major OS
  version.

  In the FreeBSD base system, we will start incrementing the value of this
  macro whenever we make any signifant change to clang, so we need a way
  to configure the macro's value at build time.

  Use `FREEBSD_CC_VERSION` for this, which we can define in the FreeBSD
  build system using either the `-D` command line option, or an include
  file.  Stock builds will keep the earlier value.

  Differential Revision: http://reviews.llvm.org/D20037

Follow-up commits will start using the __FreeBSD_cc_version to determine
whether a bootstrap compiler has to be built during buildworld.
2016-05-20 17:38:45 +00:00
Simon J. Gerraty
e48f47ddc1 Merge bmake-20160512 2016-05-20 17:35:39 +00:00
Ed Maste
b6b6f9cc7c Update to ELF Tool Chain r3475
Improvements include:

 * Add support for reporting and handling a number of new constants in
   various tools, including:
    * CloudABI OSABI
    * DT_TLSDESC_*
    * i386, MIPS, SPARC and amd64 relocations

 * C++ demangler bug fixes

 * Man page updates

 * Improved input validation in several tools

This update also reduces diffs against upstream as a number of fixes
included in upstream were previously cherry-picked into FreeBSD.

Sponsored by:	The FreeBSD Foundation
2016-05-20 17:24:34 +00:00
Pedro F. Giffuni
2c9dee79ef gas/config/tc-arm.c: Minor re-sorting to match upstream history.
No functional change.

MFC after:	2 weeks
2016-05-20 15:14:38 +00:00
Andrew Turner
94098ab7c3 Remove brk and sbrk from arm64. They were defined in The Single UNIX
Specification, Version 2, but marked as legacy, and have been removed from
later specifications. After 12 years it is time to remove them from new
architectures when the main use for sbrk is an invalid method to attempt
to find how much memory has been allocated from malloc.

There are a few places in the tree that still call sbrk, however they are
not used on arm64. They will need to be fixed to cross build from arm64,
but these will be fixed in a follow up commit.

Old copies of binutils from ports called into sbrk, however this has been
fixed around 6 weeks ago. It is advised to update binutils on arm64 before
installing a world that includes this change.

Reviewed by:	brooks, emaste
Obtained from:	brooks
Relnotes:	yes
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D6464
2016-05-20 15:04:48 +00:00
Pedro F. Giffuni
b7505e07e5 GCC: Add support for named initializers for anonymous structs/unions.
This is a C11 feature that is starting to get used in places such as Mesa.
This implementation takes a different approach to upstream and is
therefore not covered by GPLv3.

Obtained from:	OpenBSD (CVS rev. 1.2)
MFC after:	3 weeks
2016-05-20 14:36:49 +00:00
Cy Schubert
17dd2ae7fb Fix another typo.
Reported by:	cem
MFC after:	6 days
2016-05-19 03:18:54 +00:00
Cy Schubert
0003f67197 Fix typo.
Reported by:	Ruben Kerkhof <ruben@rubenkerkhof.com>
MFC after:	6 days
2016-05-19 02:06:48 +00:00
Gleb Smirnoff
9aa8749970 Revert r299830, it has couple of fatal errors.
The CMSG_ family of macros take care of alignment, so we don't need r299830
at all, even if it was correct.  Put NO_WCAST_ALIGN into Makefile.

Together with:	peter
2016-05-18 22:02:19 +00:00
Konstantin Belousov
71edebc7d5 Add SUSv4 reference macro to our groff mdoc. mdocml already supports it.
Sponsored by:	The FreeBSD Foundation
2016-05-17 09:24:54 +00:00
Martin Matuska
c38ff13d6a Revert r299576 and MFV r299895:
Revert r299576:
Fix broken cpio behavior.

MFV r299895:
Update to vendor git commit 860ec63.

MFC after:	3 weeks (together with libarchive 3.2.0)
Fix broken cpio behavior in pass-through mode with vendor code.
2016-05-16 05:01:44 +00:00
Enji Cooper
9ea0bf43e5 Fix .Dd
Today is the 14th, not the 10th of May

Reported by: igor (derp)
Sponsored by: EMC / Isilon Storage Division
2016-05-15 03:44:32 +00:00
Enji Cooper
9e1f7d9aa0 Fix fully canonicalized example for myvariable.27...
`6` doesn't occur in the OID; it was spurious

Bump .Dd for the change

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-05-15 03:43:36 +00:00
Enji Cooper
3b8e9f554f Remove trailing whitespace in license tort
MFC after: 1 week
Reported by: igor
Sponsored by: EMC / Isilon Storage Division
2016-05-15 03:41:01 +00:00
Enji Cooper
09ac27c318 Fix -Wcast-align warnings
Use memcpy instead of using direct assignment of void* pointers with
CMSG_DATA(..), which changes alignment

MFC after: 3 weeks
Reported by: clang
Sponsored by: EMC / Isilon Storage Division
2016-05-15 03:36:19 +00:00
Enji Cooper
126b5bb6a4 Use SNMPD_INPUT_FAILED instead of SNMP_CODE_FAILED
SNMPD_INPUT_FAILED is `enum snmpd_input_err` type (which matches the return
code from the function). SNMP_CODE_FAILED is `enum snmp_code` type.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-05-15 00:54:21 +00:00
Enji Cooper
a7ff045627 Use sizeof(..)s for the destination buffers instead of hardcoded values corresponding
to the destination buffer sizes

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-05-15 00:13:36 +00:00
Enji Cooper
d208c8fa3f Replace QUADFMT with %ju and QUADXFMT with %jx and cast values with uintmax_t
This will cure some -Wformat warnings

MFC after: 1 week
Reported by: clang, gcc
Sponsored by: EMC / Isilon Storage Division
2016-05-15 00:10:37 +00:00
Xin LI
20f8619da0 MFV r299716: file 5.27
MFC after:	2 weeks
Relnotes:	yes
2016-05-14 08:52:37 +00:00
Jason Evans
fbb1d85eb3 Work around invalid gcc warning (explicit cast apparently lost). 2016-05-13 21:18:10 +00:00
Jason Evans
1f0a49e863 Update jemalloc to 4.2.0. 2016-05-13 04:03:20 +00:00
Martin Matuska
ec0bb2035e Fix broken cpio behavior.
Suggested upstream as PR #704.

MFC:	1 month (together with libarchive 3.2.0)
2016-05-12 22:51:04 +00:00
Martin Matuska
cdf63a700c MFV r299425:
Update libarchive to 3.2.0

New features:
- new bsdcat command-line utility
- LZ4 compression (in src only via external utility from ports)
- Warc format support
- 'Raw' format writer
- Zip: Support archives >4GB, entries >4GB
- Zip: Support encrypting and decrypting entries
- Zip: Support experimental streaming extension
- Identify encrypted entries in several formats
- New --clear-nochange-flags option to bsdtar tries to remove noschg and
  similar flags before deleting files
- New --ignore-zeros option to bsdtar to handle concatenated tar archives
- Use multi-threaded LZMA decompression if liblzma supports it
- Expose version info for libraries used by libarchive

Patched files (fixed compiler warnings):

contrib/libarchive/cat/bsdcat.c (vendor PR #702)
contrib/libarchive/cat/bsdcat.h (vendor PR #702)
contrib/libarchive/libarchive/archive_read_support_format_mtree.c (PR #701)
contrib/libarchive/libarchive_fe/err.c (vendor PR #703)

MFC after:	1 month
Relnotes:	yes
2016-05-12 10:16:16 +00:00
Conrad Meyer
6c8eb57da5 atf map: Fix double-free in low memory error path
If atf_list_append(, X, ) fails, X is freed.  Don't free it again.

If anyone wants to walk this patch upstream, be my guest.  I literally cannot
upstream it myself due to Google's stupid CLA.

Reported by:	Coverity
CID:		979936
Sponsored by:	EMC / Isilon Storage Division
2016-05-11 23:39:39 +00:00
Conrad Meyer
4aa1608aee bsnmpd: Fix size of trapsink::comm to match other community arrays
This fixes a number of possible strcpy() buffer overruns between the various
community strings in trap.c.

Reported by:	Coverity
CIDs:		1006820, 1006821, 1006822
Sponsored by:	EMC / Isilon Storage Division
2016-05-11 17:06:03 +00:00
Conrad Meyer
5f0d846034 bsnmp: Don't overrun privkey buffer by copying wrong size
The 'priv_key' array is SNMP_PRIV_KEY_SIZ bytes, not SNMP_AUTH_KEY_SIZ.

Reported by:	Coverity
CIDs:		1008326, 1009675
Sponsored by:	EMC / Isilon Storage Division
2016-05-11 16:54:34 +00:00
Martin Matuska
4e579f6c94 Update vendor/libarchive/dist to git commit 61c56e5 (post 3.2.0) 2016-05-11 10:19:44 +00:00
Martin Matuska
8c8f03ca5b Keep full libarchive distribution in vendor branch (prep for 3.2.0 update) 2016-05-11 10:10:11 +00:00
Martin Matuska
43341e7cf4 Trim libarchive/dist using FREEBSD-Xlist 2016-05-10 21:12:32 +00:00
Baptiste Daroussin
053a88680a Rename getline with get_line to avoid collision with getline(3)
When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from:	OpenBSD
2016-05-10 11:09:26 +00:00
Bryan Drewery
29df9f6b75 DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.
This avoids running target binaries.

Sponsored by:	EMC / Isilon Storage Division
2016-05-09 22:21:09 +00:00
Xin LI
53021c7e30 MFV r299237: apply two upstream revisions to address upstream bug PR/540.
PR:		209211
MFC after:	2 weeks
X-MFC:		if there is no new file release
2016-05-08 18:18:35 +00:00
Xin LI
7206c4fc60 MFV r299233: Apply upstream fix 11edb37a71851b5bcbd4e51ca6ad3dcbf57e9761:
Revert: Don't close stdin...

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

PR:		209211
MFC after:	3 days
2016-05-08 09:30:36 +00:00
Dimitry Andric
076e75ebe4 Import libcxxrt master 516a65c109eb0a01e5e95fbef455eb3215135cef.
Interesting fixes:
3adaa2e Fix _Unwind_Exception cleanup functions
286776c Check exception cleanup function ptr before calling
edda626 Correct exception specifications on new and delete operators
2016-05-05 22:40:07 +00:00
Dimitry Andric
747872f83f Re-sync the FreeBSD-specific Subversion template with the one from
ports.

MFC after:	11 days
X-MFC-With:	r298845
2016-05-03 18:06:42 +00:00
Dimitry Andric
4c4924e8b0 Update from subversion 1.9.2 to 1.9.4.
This contains only bug fixes, no new features.  The repository format is
also unchanged from 1.9.2.  Full list of changes between 1.9.4 and
earlier versions:

  https://svn.apache.org/repos/asf/subversion/tags/1.9.4/CHANGES

Note that the two security issues fixed in 1.9.4 (CVE-2016-2167 and
CVE-2016-2168) do not affect the version of Subversion in the FreeBSD
base system, since neither SASL nor Apache modules are enabled.

Relnotes:	yes
MFC after:	2 weeks
2016-04-30 10:35:42 +00:00
Andrew Turner
4b6f23dfaf Stop using sbrk(2) with malloc. This helps reduce the number of places
within the tree where we call this legacy interface.

Reviewed by:	jasone
Obtained from:	brooks
Sponsored by:	ABT Systems Ltd
2016-04-28 12:24:58 +00:00
Xin LI
4990d495fc MFV r298691:
ntp 4.2.8p7.

Security:	CVE-2016-1547, CVE-2016-1548, CVE-2016-1549, CVE-2016-1550
Security:	CVE-2016-1551, CVE-2016-2516, CVE-2016-2517, CVE-2016-2518
Security:	CVE-2016-2519
Security:	FreeBSD-SA-16:16.ntp
With hat:	so
2016-04-27 07:46:38 +00:00
Enji Cooper
605e9d2105 Fix up r298368
Remove the semicolon accidentally added after the new conditional that tests
that /dev/zero is opened successfully.

MFC after: 1 week
X-MFC with: r298368
Pointhat to: ngie
Reported by: Coverity
CID: 1354980
Sponsored by: EMC / Isilon Storage Division
2016-04-26 19:21:35 +00:00
Enji Cooper
8ad8cdc95f Use sizeof(*uuser) instead of sizeof(struct usm_user) for consistency with
the rest of the users in the file

No functional change

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2016-04-22 08:11:26 +00:00
Enji Cooper
e9f8d18ebe Return ret in op_ifentry(..) to mute a -Wunused-but-set-variable warning
This will also now detect error conditions with
value->var.subs[sub - 1] == LEAF_ifPhysAddress where `string_get(..)`
could fail if iifp->physaddr and/or iifp->physaddrlen were deemed
invalid.

MFC after: 2 weeks
CID: 1006551
Reported by: Coverity, gcc
Sponsored by: EMC / Isilon Storage Division
2016-04-22 07:51:38 +00:00
Enji Cooper
1422b66c64 Simplify always evaluated branch (e != NULL)
- xalloc(..) ensures that e will be non-null via malloc + err.
- `e` is already dereferenced above, so logically it's impossible
  to hit the lower test without crashing if it was indeed NULL.

MFC after: 3 days
CID: 1007408
Reported by: Coverity
Sponsored by: EMC / Isilon Storage Division
2016-04-22 05:24:15 +00:00
Enji Cooper
f517a30206 Don't leak string in parse_define(..) when a macro has been found
and the parser token != TOK_ASSIGN

MFC after: 1 week
CID: 1007187, 1007188
Reported by: Coverity
Obtained from: Isilon OneFS (part of r445479)
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division
2016-04-22 05:14:12 +00:00
Dimitry Andric
b753b98b16 Pull r266775 from upstream clang trunk (by Douglas Katzman):
Pass dwarf-version to cc1as.

  Fix PR26999 - crashing in cc1as with any '*bsd' target.

This should fix possible crashes when using -g in combination with
-save-temps.
2016-04-21 20:38:10 +00:00
Dimitry Andric
f0a19145c0 Revert r298147 (temporary workaround for LLVM PR 26999) in preparation
for committing the final upstream fix.
2016-04-21 20:37:53 +00:00
Enji Cooper
c935e51525 Fix coverity issue with contrib/netbsd-tests/lib/libc/ssp/h_read.c
Ensure opening /dev/zero succeeds. Abort the test if it doesn't.

Also, use _PATH_DEVZERO instead of hardcoding "/dev/zero"

MFC after: 2 weeks
CID: 1251410
Reported by: Coverity
Sponsored by: EMC / Isilon Storage Division"
2016-04-20 20:48:54 +00:00
Enji Cooper
4dd13092b5 Fix coverity issues with contrib/netbsd-tests/lib/libc/sys/t_connect.c
- Ensure socket(2) calls succeed
- Don't leak slist allocated by earlier socket(2) call

MFC after: 2 weeks
CID: 976773, 1251405
Reported by: Coverity
Sponsored by: EMC / Isilon Storage Division
2016-04-20 20:43:05 +00:00
Ed Maste
e5c4075f6b elfcopy: map all !alnum characters to '_' in binary input symbol names
This matches bfd and gold.

Obtained from:	ELF Tool Chain r3445
Sponsored by:	The FreeBSD Foundation
2016-04-20 19:13:00 +00:00
Wojciech Macek
d4015ddc57 Fix KGDB backtrace on ARM
Modify trapframe decoding to properly analyze trapframe.

Provide method for fixup_pc. It happens, that in some kernel
functions, the GDB stack frame decoder cannot determine both
func name and frame size. This is because these functions
either contain invalid instruction, or their format does
not match standard schema. Detect that scenarios and move
PC accordingly to jump into known function schema, which
GDB is able to parse.

Obtained from:         Semihalf
Sponsored by:          Juniper Networks
Reviewed by:           kib, zbb
Differential Revision: https://reviews.freebsd.org/D5976
2016-04-20 17:58:13 +00:00
Xin LI
3e41d09d08 MFV r298178:
Update file to 5.26.

MFC after:	2 weeks
Relnotes:	yes
2016-04-18 07:36:24 +00:00
Baptiste Daroussin
d9f0ce3190 Import libucl 0.8.0 2016-04-17 21:30:40 +00:00
Baptiste Daroussin
d915215ec6 Import sqlite3 3.12.1 2016-04-17 21:23:14 +00:00
Dimitry Andric
0a2e997d7b Until it has been properly fixed upstream, apply a temporary workaround
for LLVM PR 26999 (in some cases, -save-temps can cause an assertion
failure in clang's -cc1as stage).
2016-04-17 15:48:19 +00:00
Glen Barber
8276572f42 Remove the RCSID line from ntp_control.c, and set the fbsd:nokeywords
property.  This should have been done a while back (certainly before
mergeing projects/release-pkg to head), but I fixed the merge conflicts
and forgot to correct the real problem afterward.

Noticed by:	peter
Sponsored by:	The FreeBSD Foundation
2016-04-16 18:10:11 +00:00
Glen Barber
0edd2576c0 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-16 02:32:12 +00:00
Ed Maste
d938d64e55 elfcopy: fix symbol table handling when sections come after symtab/strtab
Fix a symbol table handling bug in elfcopy: elfcopy puts .symtab,
  .strtab and .shstrtab sections in the end of the output object.  If
  the input objects have more sections after any of these 3 sections,
  the section table will be reordered, and in that case the section
  symbols should be regenerated for relocations.

  The bug is triggered since newer clang puts .strtab section in the
  beginning of the object produced.

   Ticket: #525

Reported by:	royger
Obtained from:	ELF Tool Chain r3443
2016-04-15 19:06:36 +00:00
Phil Shafer
42ff34c310 Import to 0.6.1
0.5.0:
    document "trim" modifier
    add xo_emit_field functions
    Add xo_set_file{,_h} functions
    Fix LIBXO_* variables; add -L and -I as needed
    add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url'
    fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it
    flush after transitions; fix flush call in xo_do_emit
    mkdir the version-specific packaging dir
    use "XO_" instead of LIBXO_

  0.6.0:
    Add --with-retain-size to set the size (in bits) of the retain hash buckets
    Add The Argument Modifier ({a:})
    Add retain and no-retain to --libxo
    autoconf: Add test for monitor.h
    Document quote heuristic
    go deep with nroff backslashes
    Use "ULL" for 32 bit check
    add xo_retain_clear and xo_retain_clear_all
    docs: combine two 'handles' section; move command line argument section
    handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD)
    make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use.
    new xo_emit_f functions
    nuke some unused UNUSEDs
    test code: path must be static
    update test cases

  0.6.1:
    fix version number (missed a commit during new-release)

Reviewed by:	sjg
Approved by:	sjg (mentor)
2016-04-15 18:46:15 +00:00
Phil Shafer
a321cc5dc9 import libxo-0.4.7
Fix bug w/ {e:} in html, where no default encoding format was built
    docs: "t" == "trim" (typo) (cf svn commit: r290445 - head/contrib/libxo/libxo)

Reviewed by:	sjg
Approved by:	sjg (mentor)
2016-04-15 15:50:13 +00:00
Cy Schubert
4bb37cd3af Static pointers need not be initialized.
MFC after:	4 weeks
2016-04-15 03:45:09 +00:00
Cy Schubert
ff34412a50 Use NULL instead of 0 for pointer comparison.
MFC after:	4 weeks
2016-04-15 03:43:16 +00:00
Pedro F. Giffuni
ab341f7afd libpcap: fix for simple NULL pointer dereference.
Found with devel/coccinelle.
2016-04-14 18:31:45 +00:00
Glen Barber
9c831bbd69 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-13 02:04:09 +00:00
Phil Shafer
90d30dd1a9 Merge libxo 0.4.6
Reviewed by: sjg
Approved by: sjg (mentor)
2016-04-12 23:30:56 +00:00
Glen Barber
876d357fa7 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-11 15:24:59 +00:00
Enji Cooper
fa2201def5 Disable the NetBSD-specific EFAULT requirements test in gettimeofday_err
FreeBSD doesn't specifically list this as a supported error, and in some
configurations/versions of FreeBSD, this test will segfault as the memory
address might be evaluated in userspace, instead of in kernel space like
in NetBSD.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-04-07 06:21:33 +00:00
Glen Barber
d60840138f MFH
Sponsored by:	The FreeBSD Foundation
2016-04-04 23:55:32 +00:00
Dimitry Andric
faaf0c6eaa Pull in r255683 from upstream libc++ trunk (by Eric Fiselier):
[libcxx] Enable noexcept for GCC 4.6 and greater

  Summary:
  This patch allows GCC 4.6 and above to use `noexcept` as opposed to
  `throw()`.

  Is it an ABI safe change to suddenly switch on `noexcept`? I imagine
  it must be because it's disabled in w/ clang in C++03 but not C++11.

  Reviewers: danalbert, jroelofs, mclow.lists

  Subscribers: cfe-commits

  Differential Revision: http://reviews.llvm.org/D15516

This should fix errors from gcc 4.6 and higher when compiling llvm-cov
and/or other llvm tools.

Reported by:	bdrewery
2016-03-27 21:20:43 +00:00
Dimitry Andric
35b9ea3d09 Compile libcxxrt as C++11, since it is only really used in combination
with libc++, which is also C++11.  Also change one _Static_assert (which
is really C11) back into static_assert, like upstream.

This should help when compiling libcxxrt with newer versions of gcc,
which refuse to recognize any form of static assertions, if not
compiling for C++11 or higher.

While here, add -nostdinc++ to CFLAGS, to prevent picking up any C++
headers outside the source tree.
2016-03-27 00:37:54 +00:00
Dimitry Andric
c2145983aa Pull in r264465 from upstream llvm trunk (by David Majnemer):
[X86] Emit a proper ADJCALLSTACKDOWN in EmitLoweredTLSAddr

  We forgot to add the second machine operand to our ADJCALLSTACKDOWN,
  resulting in crashes in PEI.

  This fixes PR27071.

This should fix an assertion failure during buildworld, when using -Os,
and targeting either i386 directly, or building the 32-bit libraries on
amd64.

Reported by:	Eric Camachat <eric.camachat@gmail.com>
2016-03-26 17:38:15 +00:00
Jung-uk Kim
20afc491bb Merge byacc 20160324. 2016-03-25 22:32:26 +00:00
Bryan Drewery
e7e6b1ebc8 Make GCC happy by removing empty #elif.
Sponsored by:	EMC / Isilon Storage Division
2016-03-25 04:16:04 +00:00
Bryan Drewery
8bca825d5d Fix off-by-one found by GCC 5.3.2.
This was fixed during refactoring in the upstream infiniband-diags 1.5.3.

Sponsored by:	EMC / Isilon Storage Division
2016-03-24 21:48:16 +00:00
Dimitry Andric
1d640d3b42 Pull in r264335 from upstream llvm trunk:
Add <atomic> to ThreadPool.h, since std::atomic is used

  Summary:
  Apparently, when compiling with gcc 5.3.2 for powerpc64, the order of
  headers is such that it gets an error about std::atomic<> use in
  ThreadPool.h, since this header is not included explicitly.  See also:

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

  Fix this by including <atomic>.  Patch by Bryan Drewery.

  Reviewers: chandlerc, joker.eph

  Subscribers: bdrewery, llvm-commits

  Differential Revision: http://reviews.llvm.org/D18460
2016-03-24 20:55:23 +00:00
Ed Maste
676e25ab0f elfcopy: overhaul of LMA handling
Merge ELF Tool Chain r3434:

    Previously, elfcopy defines:

    VMA:  section virtual address
    LMA:  PHDR(p_vaddr)

    While binutils(libbfd) defines:

    VMA:  section virtual address and PHDR(p_vaddr).
    LMA:  PHDR(p_paddr)

    For elfcopy, p_paddr is considered not meaningful and is always set
    to the same value as p_vaddr.

    elfcopy was implemented that way because I thought p_paddr is not
    used/meaningful according to the ELF ABI. However it turned out
    p_paddr is at least used in some ELF files, e.g. the FreeBSD kernel.

    This change made elfcopy treat p_paddr as LMA, same as libbfd.

    (However, some VMA/LMA related command line option still need tweaking
    to make them compatible with binutils objcopy. This will be improved
    later)

    Ticket: #524

And typo fixes in r3435 and r3436.

This fixes the Xen kernel build.

Submitted by:	kaiw
Tested by:	royger
2016-03-24 20:13:17 +00:00
Navdeep Parhar
8d814a458c iw_cxgbe/libcxgb4: Pull in many applicable fixes from the upstream Linux
iWARP driver and userspace library to the FreeBSD iw_cxgbe and libcxgb4.

This commit includes internal changesets 6785 8111 8149 8478 8617 8648
8650 9110 9143 9440 9511 9894 10164 10261 10450 10980 10981 10982 11730
11792 12218 12220 12222 12223 12225 12226 12227 12228 12229 12654.

Submitted by:	Krishnamraju Eraparaju @ Chelsio
Sponsored by:	Chelsio Communications
2016-03-21 00:29:45 +00:00
Simon J. Gerraty
3bebe7293b Update to bmake-20160315
Archive member handling works again
meta mode, treat missing reads as for writes.

Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.
2016-03-18 20:03:09 +00:00
David E. O'Brien
d20ec2e52b Bring down 0.4.5 vendor files and other catchups with the distribution tarball.
Reviewed by:	phil
2016-03-16 23:59:29 +00:00
Phil Shafer
0263a1a1bc Move generated file from contrib to build directory.
Reviewed by:	obrien
Approved by:	sjg
2016-03-16 23:50:41 +00:00
Gleb Smirnoff
bf840a1707 Redo r294869. The array of counters for TCP states doesn't belong to
struct tcpstat, because the structure can be zeroed out by netstat(1) -z,
and of course running connection counts shouldn't be touched.

Place running connection counts into separate array, and provide
separate read-only sysctl oid for it.
2016-03-15 00:15:10 +00:00
Glen Barber
538354481e MFH
Sponsored by:	The FreeBSD Foundation
2016-03-14 18:54:29 +00:00
Enji Cooper
45dc13f1ea Better handle filesystems mounted with -o noexec
ftruncate/11, open/20, and truncate/11 copy sleep(1) to a temporary file on the
target filesystem, execute the binary, then expect a result. This doesn't work
with scenarios where the target binary cannot be executed, e.g. the filesystem
was mounted with -o noexec.

Ensure the filesystem hasn't been mounted with -o noexec for the testcases
before executing them.

Differential Revision: https://reviews.freebsd.org/D5622
MFC after: 1 week
Reviewed by: markj
Sponsored by: EMC / Isilon Storage Division
2016-03-12 19:41:38 +00:00
Dimitry Andric
9132599001 Pull in r250279 from upstream libc++ trunk (by Eric Fiselier):
Fix GCC atomic implementation in C++03

Pull in r250802 from upstream libc++ trunk (by Eric Fiselier):

  Detect relaxed constexpr rules for gcc versions

Pull in r255585 from upstream libc++ trunk (by Eric Fiselier):

  Fix various GCC mis-configurations for newer versions.

  This patch goes through and enables C++11 and C++14 features for newer GCC's.
  The main changes are:

  1. Turn on variable templates. (Uses __cpp_variable_templates)
  2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
  3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
  4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.

Together, these should fix building clang 3.8.0 as part of building
world with recent versions of gcc (e.g. the devel/*-xtoolchain-gcc
ports).
2016-03-11 22:56:16 +00:00
Ed Maste
a87342e849 libelf: correct byte count in cross-endian note translation
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-11 22:37:12 +00:00
Dimitry Andric
163c8ab66f Pull in r246280 from upstream libc++ trunk (by Eric Fiselier):
Fix most GCC warnings during build. Only -Wattribute left.

This helps to fix a number of -Werror warnings when building world with
recent versions of gcc (e.g. the devel/*-xtoolchain-gcc ports).
2016-03-11 20:30:06 +00:00
Ed Maste
1e248b8346 libdwarf: fix SHT_REL relocation processing
Relocation of type SHT_REL must use the current value as addend.

PR:		204084
Obtained from:	NetBSD libdwarf_elf_init.c v1.4
2016-03-11 16:24:39 +00:00
Dag-Erling Smørgrav
a2d0006e29 Apply upstream r3651: the IPv6 address of the L root has changed. 2016-03-11 14:57:40 +00:00
Simon J. Gerraty
be19d90b61 Merge bmake-20160307 2016-03-11 01:35:39 +00:00
Glen Barber
7d536dc855 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-10 21:16:01 +00:00
Bryan Drewery
30924962f4 Fix and connect setjmp test.
Sponsored by:	EMC / Isilon Storage Division
2016-03-09 22:45:04 +00:00
Glen Barber
b655ec9752 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-06 04:13:17 +00:00
Dimitry Andric
1dcfcfee2a Convert two llvm source files to native line ending, which was also done
upstream.  Merging doesn't automatically do this, unfortunately.
2016-03-05 21:10:34 +00:00
Dimitry Andric
e74e149f78 Upgrade our copies of clang, llvm, lldb and compiler-rt to 3.8.0
release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

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

Thanks to Ed Maste, Roman Divacky, Davide Italiano and Antoine Brodin
for their help.

Relnotes:	yes
2016-03-05 20:24:31 +00:00
Dag-Erling Smørgrav
f61ef7f679 Upgrade to Unbound 1.5.8. 2016-03-05 19:29:18 +00:00
Dag-Erling Smørgrav
5bcd892e61 import unbound 1.5.8 2016-03-05 19:18:07 +00:00
Dimitry Andric
a36b180a7f Merge ^/head r296369 through r296409. 2016-03-05 15:34:54 +00:00
Bryan Drewery
be50838f9a DIRDEPS_BUILD: Connect ofed.
Sponsored by:	EMC / Isilon Storage Division
2016-03-04 22:37:44 +00:00
Bryan Drewery
fc064a5e78 Update libsdp to the latest 1.1.108-0.17.ga6958ef.
The only relevant change here is the support for IPv6 in the config
file.  The previous version of this supported IPv6 but not in the
config.  The change for that ended up removing __sdp_sockaddr_to_sdp
which the IPV4 config code required; the IPv6 fix resolved the lack of
that symbol.

Note that the ChangeLog was lacking entries for which we already had the
changes for, which itself was an upstream bug.

Obtained from:	https://www.openfabrics.org/downloads/libsdp/libsdp-1.1.108-0.17.ga6958ef.tar.gz
Sponsored by:	EMC / Isilon Storage Division
2016-03-04 22:37:31 +00:00
Bryan Drewery
1465ae5d7f Fix missing symbol program_invocation_short_name.
This fixes runtime when logging is enabled.

Sponsored by:	EMC / Isilon Storage Division
2016-03-04 22:37:25 +00:00
Bryan Drewery
400b94bbeb Fix over/under-linking in contrib/ofed.
Sponsored by:	EMC / Isilon Storage Division
2016-03-04 22:37:09 +00:00
Ed Maste
f5e9c916af elfcopy: fail if debug link target is empty
An empty debug link target previously returned a confusing and incorrect
error like "objcopy: fread failed: No error: 0". Now, return an explicit
error.

GNU objcopy allows an empty file as the debug link target. However,
that case is nonsensical so diverging from GNU behaviour is fine.

Reviewed by:	bdrewery
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5541
2016-03-04 18:28:19 +00:00
Dimitry Andric
82aa34e6fa Merge ^/head r296007 through r296368. 2016-03-03 23:15:46 +00:00
Dimitry Andric
1b9b7a135c Update llvm and clang to 3.8.0 release. 2016-03-03 22:50:52 +00:00
Pedro F. Giffuni
316e599449 MFV r296350:
Split each domain again after striping any trailing dot.

Reported by:	 dumbbell
Obtained from:	openresolv (53416cf1b4)
2016-03-03 15:36:00 +00:00
Jason Evans
cbc3697dda Restore support for decay time of -1 (no decay). 2016-03-03 01:43:36 +00:00
Jason Evans
cb2ababcfd Add a cast to prevent a compiler warning. 2016-03-03 01:30:28 +00:00
Glen Barber
52259a98ad MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
Ruslan Bukin
ac8f9de31a Restore configuration for RISC-V. 2016-03-01 17:43:06 +00:00
Jung-uk Kim
0f86d14e9e Merge byacc 20150711. 2016-02-29 21:39:00 +00:00
Jason Evans
df0d881d94 Update jemalloc to 4.1.0.
Add missing Symbol.map entry for __aligned_alloc.

Add weak-->strong symbol binding for
{malloc_stats_print,mallctl,mallctlnametomib,mallctlbymib} -->
{__malloc_stats_print,__mallctl,__mallctlnametomib,__mallctlbymib}.  These
bindings complete the set necessary to allow applications to replace all
malloc-related symbols.
2016-02-29 19:10:32 +00:00
Edward Tomasz Napierala
bb487d2b79 Mark amd(8) and all related utilities as obsolete.
Reviewed by:	wblock@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5443
2016-02-29 16:45:10 +00:00
Pedro F. Giffuni
c364f33426 MFV r296164:
Update openresolve to version 3.7.3 including:

 *  Save the initial working directory and change to it just before
     running any scripts.
     This avoids scripts putting files accidently where they shouldn't.
 *  Strip trailing dot from search and domain names.
 *  man page improvements.

Relnotes:	yes
2016-02-29 14:46:39 +00:00
Mariusz Zaborski
c501d73c7e Convert casperd(8) daemon to the libcasper.
After calling the cap_init(3) function Casper will fork from it's original
process, using pdfork(2). Forking from a process has a lot of advantages:
1. We have the same cwd as the original process.
2. The same uid, gid and groups.
3. The same MAC labels.
4. The same descriptor table.
5. The same routing table.
6. The same umask.
7. The same cpuset(1).
From now services are also in form of libraries.
We also removed libcapsicum at all and converts existing program using Casper
to new architecture.

Discussed with:		pjd, jonathan, ed, drysdale@google.com, emaste
Partially reviewed by:	drysdale@google.com, bdrewery
Approved by:		pjd (mentor)
Differential Revision:	https://reviews.freebsd.org/D4277
2016-02-25 18:23:40 +00:00
Dimitry Andric
09a17a1e45 Update llvm and clang to release_38 branch r261684. 2016-02-24 22:07:56 +00:00
Dimitry Andric
ada6aca3cc Undo r295543, since the shrink wrapping bug was fixed upstream by Davide
Italiano and Quentin Colombet.
2016-02-24 21:41:28 +00:00
Dimitry Andric
14e9c9161c Merge ^/head r295902 through r296006. 2016-02-24 21:38:51 +00:00
Glen Barber
86b234d2f5 MFH
Sponsored by:	The FreeBSD Foundation
2016-02-23 16:01:34 +00:00
Xin LI
876964d12a MFV r295913:
Partially apply upstream changeset 6e06b1c8 (kientzle).

Limit filter recursion level to 25 (instead of infinite).  This fixes a
potential crash issue discovered by Alexander Cherepanov.

PR:		207362
Reported by:	Robert Clausecker
Obtained from:	libarchive github project
2016-02-23 07:13:22 +00:00
Dimitry Andric
76f3831738 Merge ^/head r295845 through r295901. 2016-02-22 22:21:53 +00:00
Dimitry Andric
72e8ce06c0 Fix a problem in ld, causing it to sometimes print messages similar to
"invalid string offset 65521 >= 27261 for section `.strtab'". for object
files produced by recent versions of clang.

In BFD's elf_create_symbuf() function, the size of the symbol buffer
('ssymbuf') is not calculated correctly, and the initial value for the
'ssym' variable is off by one, since 'ssymbuf' has shndx_count + 1
members.

MFC after:	1 week
2016-02-22 22:16:32 +00:00
Glen Barber
317cec3c43 MFH
Sponsored by:	The FreeBSD Foundation
2016-02-22 12:28:23 +00:00
Dimitry Andric
ac1ec6334e Update compiler-rt to release_38 branch r261369. 2016-02-21 16:27:55 +00:00
Dimitry Andric
ce479d84f4 Update llvm and clang to release_38 branch r261369. 2016-02-21 16:23:44 +00:00
Ian Lepore
e1ba387e11 Unconditionally set e_ident[OSABI]=ELFOSABI_FREEBSD in arm binary headers.
When the armv6 support was imported from a project branch, this complex
conditional logic and related #define'd values came along, but it's really
not clear what the intent of it all was.  The effect, however, was that
OSABI was always set to zero, which is "UNIX System V ABI".  Having the wrong
value there causes pkg(8) to avoid looking inside arm elf binaries to
determine shared-lib required/provides info for packaging.
2016-02-21 14:59:24 +00:00
Dimitry Andric
9893f787ec Merge ^/head r295601 through r295844. 2016-02-21 13:49:26 +00:00
Glen Barber
72c3aa02dc MFH
Sponsored by:	The FreeBSD Foundation
2016-02-18 00:37:58 +00:00
Ed Maste
3884d6f8bd Allow elfcopy to convert between two non-ELF formats
If the output object is not an ELF file, choose an arbitrary ELF format
for the intermediate file. srec, ihex and binary formats are independent
of class, endianness and machine type so these choices do not affect the
output.

ELF Tool Chain ticket #517

Reviewed by:	kai
Obtained from:	ELF Tool Chain r3411
2016-02-16 14:03:25 +00:00
Glen Barber
0fe0fe112f MFH
Sponsored by:	The FreeBSD Foundation
2016-02-15 21:58:52 +00:00
Dimitry Andric
90a4726375 Merge ^/head r295544 through r295600. 2016-02-13 16:02:12 +00:00
Dimitry Andric
a8bcc4d878 Update llvm, clang and lldb to release_38 branch r260756. 2016-02-13 15:58:51 +00:00
Ed Maste
839529caa9 Update ELF Tool Chain to upstream rev 3400
Some notable improvements include:

readelf:
- Add AArch64 relocation definitions.
- Report value of unknown relocation types.

elfcopy:
- Consider symbols with STB_GNU_UNIQUE binding as global symbols.
- Fixed support for VMA adjustment for loadable sections found
  in relocatable objects.
- Handle nameless global symbols.
- Improve wildcard matching for !-prefixed symbols.
- Add PE/COFF support.

elfdump:
- Improve section type reporting.
- Add MIPS-specific section types.

This update also includes a significant number of bug fixes.

PR:		207091 [exp-run]
Sponsored by:	The FreeBSD Foundation
2016-02-12 20:54:02 +00:00
Dimitry Andric
4156ce4fed Merge ^/head r295351 through r295543. 2016-02-11 20:07:09 +00:00
Dimitry Andric
5529affd65 For now, disable shrink-wrapping (a new optimization pass that computes
the safe point to insert the prologue and epilogue of the function) on
X86.  This prevents problems with some functions using TLS, such as in
jemalloc, and which was the cause for Address Sanitizer crashes.  The
correct fix is still being discussed upstream.
2016-02-11 20:00:22 +00:00
Dag-Erling Smørgrav
0de4f1bf64 Use the new insecure-lan-zones option instead of listing each AS112 zone
separately.

MFC after:	3 days
2016-02-11 17:37:02 +00:00
Glen Barber
bbb51924bb MFH
Sponsored by:	The FreeBSD Foundation
2016-02-08 12:16:01 +00:00
Dimitry Andric
a49d8b6ecc Merge ^/head r294961 through r295350. 2016-02-06 14:07:17 +00:00
Dimitry Andric
f8ca070d3a Merge compiler-rt release_38 branch r258968.
Note that there is still a problem on amd64, causing SIGBUS in the early
startup of Address Sanitizer.  This is being investigated.
2016-02-06 13:39:20 +00:00
Ed Maste
baed4bab22 readelf: decode AArch64 TLS descriptor relocations
From ELF for the ARM(R) 64-bit Architecture, table 4-19.

Obtained from:	ELF Tool Chain r3386
Sponsored by:	The FreeBSD Foundation
2016-02-05 20:57:21 +00:00
Ed Maste
03a5ea47c0 readelf: report value of unknown relocation types
Obtained from:	ELF Tool Chain r3387
Sponsored by:	The FreeBSD Foundation
2016-02-05 20:56:11 +00:00
Ed Maste
23541160bb readelf: avoid accidental fallthrough in RISC-V relocations
This would have printed an unknown RISC-V relocation type as a SPARC
relocation.

CID:		1331398
Obtained from:	ELF Tool Chain r3283
Sponsored by:	The FreeBSD Foundation
2016-02-05 20:54:51 +00:00
Bjoern A. Zeeb
ce42ce038e Try to fix a bug introduced in r228623. We started to copy the ifa_msghdr
as otherwise platforms with strict alignment would break.  It's unclear
to me if there's also a problem with access to the address list following
the structure.  However we never copied the address list after the structure
and thus are pointing at random memory.  For now just use a pointer to the
original memory for accessing the address list making it at least work on
platforms with weak memory access.

PR:			195445
Reported by:		wolfgang lyxys.ka.sub.org
Tested by:		wolfgang lyxys.ka.sub.org (x86)
MFC after:		3 days
2016-02-03 11:03:44 +00:00
Glen Barber
221b349912 MFH
Sponsored by:	The FreeBSD Foundation
2016-02-02 22:27:48 +00:00
Pedro F. Giffuni
2d004dd5bc MFV r295109:
Update openresolve to version 3.7.2

Relnotes:	yes
2016-02-02 21:10:43 +00:00
Maxim Sobolev
1d854f3d3e Root out files that don't really belong here and could in fact screw
you over if you happen to use git for FreeBSD development, as it is
the case with the unbound/.gitignore, which lits files that are
actually required for the buildworld.

MFC after:	1 day
2016-02-02 19:04:40 +00:00
Hans Petter Selasky
b340491939 Use LIBADD instead of LDADD.
Sponsored by:	Mellanox Technologies
2016-02-02 11:36:58 +00:00
Enji Cooper
833525a88a Add #include <string.h> to mute warning from clang/gcc about implicitly
declaring strcmp(3)

MFC after: 1 month
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division
2016-02-01 07:09:08 +00:00
Glen Barber
c8296cbb96 MFH
Sponsored by:	The FreeBSD Foundation
2016-01-29 14:52:54 +00:00
Dimitry Andric
752d00608c Merge ^/head r294777 through r294960. 2016-01-27 22:52:20 +00:00
Dimitry Andric
21cf1fd41c Update llvm, clang and lldb to release_38 branch r258968. 2016-01-27 22:48:52 +00:00
Alan Somers
eaae77f810 Fix grep_test:recurse with ZFS and TMPFS tmpdirs
contrib/netbsd-tests/usr.bin/grep/t_grep.sh
	Fix grep_test:recurse when /tmp is either zfs or tmpfs. The test was
	relying on an implicit ordering of directory recursion which happens
	to be true when using UFS. grep's specification requires no such
	ordering. The solution is to ignore the order of grep's results.

Reviewed by:	ngie
MFC after:	32 days
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D4925
2016-01-27 16:13:10 +00:00
Glen Barber
0e186c0aab MFH
Sponsored by:	The FreeBSD Foundation
2016-01-27 14:16:13 +00:00
Enji Cooper
6144b07f9b Add debug output via ATF_REQUIRE_MSG when the first call to
mlock(2) fails

This helps identify the problem with running this test on my VM
hosts (ENOMEM)

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2016-01-27 07:06:49 +00:00
Enji Cooper
8e62f8414e Adjust vm.max_wired in order to avoid hitting EAGAIN artificially
Set vm.max_wired to INT_MAX in :mlock_err, :mlock_mmap, and :mlock_nested to
avoid hitting EAGAIN artificially on the system when running the tests

Require root privileges in order to set the sysctl

Add allow_sysctl_side_effects to require.config as this test is now adjusting
sysctls that can affect the global system state

Unlike the version submitted by cem in OneFS, this version uses a scratch file
to save/restore the previous value of the sysctl. I _really_, _really_ wish
there were better hooks in atf/kyua for per test suite setup/teardown -- using
a file is kludgy, but it's the best I can do to avoid situations where (for
instance), sysctl(3) may fail and drop a core outside the kyua sandbox.

Based on a patch submitted by cem, but modified to take business logic out of
ATF_TP_ADD_TCS(3).

Differential Revision: https://reviews.freebsd.org/D4779
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
2016-01-27 06:24:19 +00:00
Gleb Smirnoff
a781766836 Grab value for LEAF_tcpCurrEstab from net.inet.tcp.stats instead of
net.inet.tcp.pcblist, which is much cheaper.
2016-01-27 00:50:27 +00:00
Dimitry Andric
14d5c08ba8 Merge ^/head r294599 through r294776. 2016-01-26 07:49:11 +00:00
Navdeep Parhar
361e428888 Use LIBADD instead of LDADD in rping's Makefile and add libcxgb4 (the
userspace iWARP library for cxgbe) to the list of libraries.

rping using the libcxgb4 + iw_cxgbe combo was tested with T5 hardware.

Obtained from:	Chelsio Communications
2016-01-26 01:02:19 +00:00
Glen Barber
f9421853ad MFH
Sponsored by:	The FreeBSD Foundation
2016-01-25 14:13:28 +00:00
Ruslan Bukin
4f0a4502a1 Add config for RISC-V ISA.
Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5046
2016-01-24 15:12:49 +00:00
Ruslan Bukin
a3e762571c Add a minimal gcc config for RISC-V.
This is required to build csu.

Reviewed by:	andrew
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5039
2016-01-23 15:33:11 +00:00
Dimitry Andric
8c24ff90c4 Update llvm and clang to release_38 branch r258549. 2016-01-22 21:50:08 +00:00
Dimitry Andric
d9b9dae1a9 Merge ^/head r294169 through r294598. 2016-01-22 20:41:56 +00:00
Ruslan Bukin
e79b31967d Add support for RISC-V ISA.
Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5021
2016-01-22 16:59:06 +00:00
Ruslan Bukin
bdffadedf5 Add stubs for RISC-V ISA so libunwind can be compiled.
Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5035
2016-01-22 16:42:06 +00:00
Ruslan Bukin
47f9f6eb3a Add configuration for RISC-V ISA.
Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5020
2016-01-22 16:37:26 +00:00
Bjoern A. Zeeb
54902c0a6a Change the variable to a #define in order to make gcc happy which
otherwise will complain about "variably modified 'alias' at file scope".
Unbreaks the build on gcc platforms.
2016-01-22 15:03:22 +00:00
Xin LI
68ba7e87e7 MFV r294491: ntp 4.2.8p6.
Security:	CVE-2015-7973, CVE-2015-7974, CVE-2015-7975
Security:	CVE-2015-7976, CVE-2015-7977, CVE-2015-7978
Security:	CVE-2015-7979, CVE-2015-8138, CVE-2015-8139
Security:	CVE-2015-8140, CVE-2015-8158
With hat:	so
2016-01-22 07:32:39 +00:00
Hartmut Brandt
5edd0d3a4d Fill the ifAlias leaf of the ifXTable with the interface description
if there is one available and it fits into the maximum size (64 characters).
2016-01-21 16:11:20 +00:00
Glen Barber
59d43d11fe MFH
Sponsored by:	The FreeBSD Foundation
2016-01-20 09:50:54 +00:00
Dimitry Andric
5e23bfeb2d Pull in r258110 from upstream clang trunk, by Faisal Vali:
Fix PR26134: When substituting into default template arguments, keep
  CurContext unchanged.

  Or, do not set Sema's CurContext to the template declaration's when
  substituting into default template arguments of said template
  declaration.
  If we do push the template declaration context on to Sema, and the
  template declaration is at namespace scope, Sema can get confused and
  try and do odr analysis when substituting into default template
  arguments, even though the substitution could be occurring within a
  dependent context.
  I'm not sure why this was being done, perhaps there was concern that
  if a default template argument referred to a previous template
  parameter, it might not be found during substitution - but all
  regression tests pass, and I can't craft a test that would cause it
  to fails (if some one does, please inform me, and i'll craft a
  different fix for the PR).

  This patch removes a single line of code, but unfortunately adds more
  than it removes, because of the tests.  Some day I still hope to
  commit a patch that removes far more lines than it adds, while
  leaving clang better for it ;)

  Sorry that r253590 ("Change the expression evaluation context from
  Unevaluated to ConstantEvaluated while substituting into non-type
  template argument defaults") caused the PR!

This fix will be merged to the upstream release_38 branch soon, but we
need it now, to fix a failure in the databases/sfcgal port.
2016-01-19 18:57:37 +00:00
Xin LI
9123584634 MFV r294260:
Fix a wrong assertion in mandoc by applying OpenBSD
main.c,v 1.170 (florian):

Unbreak reading from stdin after recent parse() restructuring.
OK schwarze@
2016-01-18 08:52:09 +00:00
Dimitry Andric
47d45e347a Pull in r257977 from upstream llvm trunk, by Keno Fischer:
[DwarfDebug] Move MergeValues to .cpp, NFC

Pull in r257979 from upstream llvm trunk, by Keno Fischer:

  [DwarfDebug] Don't merge DebugLocEntries if their pieces overlap

  Summary:
  Later in DWARF emission we check that DebugLocEntries have
  non-overlapping pieces, so we should create any such entries
  by merging here.

  Fixes PR26163.

  Reviewers: aprantl
  Differential Revision: http://reviews.llvm.org/D16249

Again, these will be merged to the official release_38 branch soon, but
we need them ASAP.
2016-01-16 18:04:22 +00:00
Dimitry Andric
cdd9644c82 Pull in r257902 from upstream llvm trunk, by James Y Knight (this will
be merged to the official release_38 branch soon, but we need it ASAP):

  Stop increasing alignment of externally-visible globals on ELF
  platforms.

  With ELF, the alignment of a global variable in a shared library will
  get copied into an executables linked against it, if the executable even
  accesss the variable. So, it's not possible to implicitly increase
  alignment based on access patterns, or you'll break existing binaries.

  This happened to affect libc++'s std::cout symbol, for example. See
  thread: http://thread.gmane.org/gmane.comp.compilers.clang.devel/45311

  (This is a re-commit of r257719, without the bug reported in
  PR26144. I've tweaked the code to not assert-fail in
  enforceKnownAlignment when computeKnownBits doesn't recurse far enough
  to find the underlying Alloca/GlobalObject value.)

  Differential Revision: http://reviews.llvm.org/D16145
2016-01-16 18:00:58 +00:00
Dimitry Andric
5673a0f918 Undo r289072, which reverted upstream llvm trunk r240144. This is going
to be fixed for real by importing upstream llvm trunk r257902.
2016-01-16 17:57:54 +00:00
Dimitry Andric
98665a5875 Update llvm, clang and lldb to release_38 branch r257836. 2016-01-16 17:48:57 +00:00
Dimitry Andric
7aa11cde7e Merge ^head r294090 through r294168. 2016-01-16 17:33:09 +00:00
Baptiste Daroussin
2b774394cc Update mandoc to 20160116 2016-01-15 23:28:12 +00:00
Dimitry Andric
444ed5c5eb Update llvm, clang and lldb to trunk r257626, and update build glue. 2016-01-14 17:42:46 +00:00
Glen Barber
e60680024a MFH
Sponsored by:	The FreeBSD Foundation
2016-01-12 01:23:45 +00:00
Dimitry Andric
89d3f0ea4e Merge ^/head r293430 through r293685. 2016-01-11 19:36:44 +00:00
Dimitry Andric
c5f07d2cb6 After upstream llvm trunk r252903 and clang trunk r252904, -mcpu=xscale
was not recognized anymore for arm targets.  Fix this by adding the
correct sub-arch to the xscale definition in ARMTargetParser.def.  This
fix (from Andrew Turner) has also been submitted upstream.
2016-01-11 19:29:12 +00:00
Sepherosa Ziehau
868a59a7e2 hyperv/kvp_daemon: Make poll(2) block indefinitely
Submitted by:	Jun Su <junsu microsoft com>
Reviewed by:	Dexuan Cui <decui microsoft com>, me, adrain
Approved by:	adrian
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D4762
2016-01-11 03:30:16 +00:00
Dimitry Andric
8d93ab88a9 Reduce diffs between upstream lldb and ours. 2016-01-09 17:33:13 +00:00
Dimitry Andric
58df0addff Remove a few files missed in the last lldb import. 2016-01-09 17:31:16 +00:00
Dimitry Andric
b229c1a0b0 Merge ^/head r293280 through r293429. 2016-01-08 17:42:14 +00:00
Dimitry Andric
fdd1590a42 As submitted upstream in a review, avoid using undefined behavior in
llvm's LinkAllPasses.h.  This caused some of the calls not to be
emitted, if the optimization level was -O2 or higher.

Conversely, if you used -O1 or lower, calls to e.g.  RunningOnValgrind()
would be emitted, leading to link failures, because we did not include
Valgrind.cpp into libllvmsupport.  Therefore, add it unconditionally.

Noticed by:	ian
2016-01-08 17:32:42 +00:00
Xin LI
3311ff84ea MFV r293415:
ntp 4.2.8p5

Reviewed by:	cy, roberto
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D4828
2016-01-08 15:53:48 +00:00
Dimitry Andric
7d04351452 As a quick fix, import r257103 from upstream llvm trunk, and r257104
from upstream clang trunk, which sets the default debug tuning back to
gdb.  The lldb debug tuning is not yet grokked completely by our ELF
manipulation tools.
2016-01-07 22:47:27 +00:00
Glen Barber
0c9da521fa MFH
Sponsored by:	The FreeBSD Foundation
2016-01-07 17:23:43 +00:00
Dimitry Andric
a1bd240c5d Update lldb to trunk r256945. 2016-01-06 22:02:08 +00:00
Dimitry Andric
5dc6cc42f4 Merge ^/head r293175 through r293279. 2016-01-06 21:31:07 +00:00
Dimitry Andric
ea942507b1 Update clang to trunk r256945. 2016-01-06 20:20:48 +00:00
Dimitry Andric
4d0b32cd7f Update llvm to trunk r256945. 2016-01-06 20:19:13 +00:00
Ed Maste
0d7911c03b libunwind: Include header for dl_unwind_find_exidx for ARM EHABI 2016-01-06 19:41:06 +00:00
Glen Barber
e2e86de153 Fix another mis-merge.
Sponsored by:	The FreeBSD Foundation
2016-01-05 16:23:43 +00:00
Glen Barber
582727cc63 MFH
Sponsored by:	The FreeBSD Foundation
2016-01-05 14:21:02 +00:00
Xin LI
a15691bf11 MFV r293125: less v481.
MFC after:	1 month
Relnotes:	yes
2016-01-05 05:25:16 +00:00
Ed Maste
b8c23099c6 Merge LLVM libunwind revision 256779 2016-01-04 21:41:02 +00:00
Glen Barber
b626f5a73a MFH r289384-r293170
Sponsored by:	The FreeBSD Foundation
2016-01-04 19:19:48 +00:00
Ed Maste
9f2f44ceeb Merge LLDB 3.8
As with previous imports a number of plugins not immediately relevant
to FreeBSD have been excluded:

ABIMacOSX_i386
ABIMacOSX_arm
ABIMacOSX_arm64
ABISysV_hexagon
AppleObjCRuntimeV2
AppleObjCRuntimeV1
SystemRuntimeMacOSX
RenderScriptRuntime
GoLanguageRuntime
GoLanguage
ObjCLanguage
ObjCPlusPlusLanguage
ObjectFilePECOFF
DynamicLoaderWindowsDYLD
platform_linux
platform_netbsd
PlatformWindows
PlatformKalimba
platform_android
DynamicLoaderMacOSXDYLD
ObjectContainerUniversalMachO
PlatformRemoteiOS
PlatformMacOSX
OperatingSystemGo
2016-01-04 01:16:32 +00:00
Dimitry Andric
8c49098554 Merge ^/head r292951 through r293015. 2015-12-31 22:55:02 +00:00
Dimitry Andric
89d224ab48 Merge r293013 from clang380-import branch:
Fix a clang 3.8.0 warning in pflogd.c:

contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
			if (!if_exists(interface) == -1) {
			    ^                     ~~

The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check.  Just ditch the == -1 instead.

Obtained from:	OpenBSD's pflogd.c 1.49
MFC after:	3 days
2015-12-31 22:52:11 +00:00
Dimitry Andric
f7862a87d0 Fix a clang 3.8.0 warning in pflogd.c:
contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
                        if (!if_exists(interface) == -1) {
                            ^                     ~~

The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check.  Just ditch the == -1 instead.

Obtained from:	OpenBSD's pflogd.c 1.49
MFC after:	3 days
2015-12-31 22:45:00 +00:00
Ian Lepore
dfd3a89ff0 Add the MOVT/MOVW types to the list of relocs which do not generate .plt
entries.  This fixes the segfaults in arm userland code compiled with
-march= or -mcpu= values that allow the compiler to generate movw/movt
sequences to load 32-bit constants.
2015-12-30 23:04:08 +00:00
Dimitry Andric
a27deaebb2 Drop the clang patch which added a custom vendor suffix to the version
printed with -v.  We have historically put a date stamp there (roughly
corresponding to the date of import), but this has never been used for
anything, and the patch has also never been upstreamed, so let's get rid
of it now.
2015-12-30 16:42:09 +00:00
Dimitry Andric
6a0fcfa92a Merge ^/head r292936 through r292950. 2015-12-30 16:20:24 +00:00
Dimitry Andric
28db8b1226 Drop the clang patch which adds recognition of 'CC' suffixes as aliases
for --driver-mode=g++, since this was never upstreamed.  For backwards
compatibility, add a wrapper shell script.

MFC after:	1 week
2015-12-30 16:14:30 +00:00
Dimitry Andric
9e2dc66723 Using trunk for now, instead of 3.7.1. 2015-12-30 14:06:01 +00:00
Dimitry Andric
b9695a57f6 Drop patches which are certain to be obsolete now. 2015-12-30 14:05:33 +00:00
Dimitry Andric
0623d7483d Update clang to trunk r256633. 2015-12-30 13:34:49 +00:00
Dimitry Andric
7d523365ff Update llvm to trunk r256633. 2015-12-30 13:13:10 +00:00
Ian Lepore
5dbfbb1512 Correct the code for sign-extending a 16 bit value. As near as I can tell
this is effectively a no-op -- the addend term in MOVT/MOVW relocations
always seems to be zero.  But this is correct and the old code wasn't.
2015-12-29 15:23:03 +00:00
Enji Cooper
8cd5a258fb Staticize several variables that are used exclusively in bsnmpd/main.c and
bsnmpd/trap.c

This fixes several -Wmissing-variable-declaration warnings noted by clang

Differential Revision: https://reviews.freebsd.org/D4718
MFC after: 1 week
Reported by: Jenkins
Reviewed by: araujo
Sponsored by: EMC / Isilon Storage Division
2015-12-28 01:51:20 +00:00
Dimitry Andric
9a4b31181f Upgrade our copies of clang and llvm to 3.7.1 release. This is a
bugfix-only release, with no new features.

Please note that from 3.5.0 onwards, clang and llvm require C++11
support to build; see UPDATING for more information.
2015-12-25 21:39:45 +00:00
Simon J. Gerraty
6e05054094 Merge bmake-20151220
Fixed clearing suffixes impact on null suffix
2015-12-25 16:19:21 +00:00
Enji Cooper
30dfa264d0 Remove unused function act_getkernstring
This fixes a clang -Wunused warning

Differential Revision: https://reviews.freebsd.org/D4697
MFC after: 1 week
Reported by: Jenkins
Reviewed by: araujo, bapt
Sponsored by: EMC / Isilon Storage Division
2015-12-24 22:22:02 +00:00
Baptiste Daroussin
d8eb75b418 backtrace.3: Fix prototype of backtrace_symbols_fd_fmt().
While here, fix a typo

Submitted by:	Sascha Wildner <saw@online.de>
Obtained from:	DragonflyBSD
2015-12-22 22:40:42 +00:00
Andreas Tobler
77a561088f Silence a boring warning. 2015-12-22 21:26:50 +00:00
Andrew Turner
b1eb23b26b Don't adjust the program counter to an invalid address after reaching a
breakpoint. The value doesn't need to be adjusted as it is already
correctly returned from the kernel.

This allows lldb to set breakpoints, and stop on them, however more work
is needed, for example single stepping fails to stop.

Discussed with:	emaste
2015-12-22 17:18:40 +00:00
Enji Cooper
1115e598dd Use stable output to a test file instead of depending on the OS name being
grep'able in /bin/sh

This fixes the situation where the OS has been rebranded to something other
than `FreeBSD`

MFC after: 1 week
Obtained from: Isilon OneFS (^/onefs/head@r511419)
Reviewed by: cem, Daniel O'Connor <darius@dons.net.au>
Sponsored by: EMC / Isilon Storage Division
2015-12-22 01:21:27 +00:00
Enji Cooper
8eb42fb2a8 Don't dump core files with lib/libc/ssp/ssp_test and lib/libc/gen/assert_test
The default `sysctl kern.corefile` value is compatible with `kyua test` (FreeBSD
will dump to the current directory). If it's set to an absolute path however,
`kyua test` will not be able to clean up the corefiles after the fact

The corefiles have little value when testing the behavior of feature behavior,
so just disable corefile generation

MFC after: 1 week
Obtained from: Isilon OneFS (^/onefs/head@r511419)
Sponsored by: EMC / Isilon Storage Division
2015-12-22 00:43:22 +00:00
Ian Lepore
69ba629255 Avoid unaligned memory accesses when encoding netbios names in libsmb.
The current code for encoding a netbios name converts each byte to a 16-bit
value and stores the result by casting a char* to u_short*, resulting in
alignment faults on strict-alignment platforms.

This change reimplements the encoding routine using only byte accesses to
memory. There is no particular reason to work with 16-bit values just
because the encoding process creates two bytes of output for every byte of
input. Working a byte at at time also avoids endian problems for big-endian
platforms.

PR:		180438
PR:		189415
Differential Revision:	https://reviews.freebsd.org/D4622
2015-12-21 17:17:00 +00:00
Christian Brueffer
2d95d1393a Regenerate config.h for OpenBSM 1.2 alpha 4.
MFC after:	2 weeks
2015-12-18 09:49:11 +00:00
Christian Brueffer
b6a05070fa Merge OpenBSM 1.2 alpha 4.
MFC after:	2 weeks
Relnotes:	yes
2015-12-18 09:48:01 +00:00
Ed Maste
ef3c018198 lldb(1): Document core file option -c / -core 2015-12-16 03:59:54 +00:00
Christian Brueffer
290bb03c0c Assorted grammar, spelling and punctuation fixes.
PR:		203336, 203339
Submitted by:	espeyb@rpi.edu, themesta@gmail.com
MFC after:	1 week
2015-12-15 13:04:44 +00:00
Christian Brueffer
46b9aa2766 Add entry for lib80211; fix a typo in libsysdecode. 2015-12-15 10:26:47 +00:00
John Baldwin
d6fb489498 Start on a new library (libsysdecode) that provides routines for decoding
system call information such as system call arguments.  Initially this
will consist of pulling duplicated code out of truss and kdump though it
may prove useful for other utilities in the future.

This commit moves the shared utrace(2) record parser out of kdump into
the library and updates kdump and truss to use it.  One difference from
the previous version is that the library version treats unknown events
that start with the "RTLD" signature as unknown events.  This simplifies
the interface and allows the consumer to decide how to handle all
non-recognized events.  Instead, this function only generates a string
description for known malloc() and RTLD records.

Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D4537
2015-12-15 00:05:07 +00:00
Dag-Erling Smørgrav
05ab290102 Upgrade to Unbound 1.5.7. 2015-12-14 13:01:51 +00:00
Kai Wang
8f32e46db7 Fixed uninitialized variable warnings. 2015-12-13 08:27:14 +00:00
Dag-Erling Smørgrav
c0096f20d0 Ask make(1) which compiler to use rather than rely on whatever is in $PATH. 2015-12-12 22:54:12 +00:00
Dag-Erling Smørgrav
a7af7146c9 import unbound 1.5.7 2015-12-12 22:18:57 +00:00
Ed Maste
95fd7f2615 Update to ELF Tool Chain r3272
Highlights (not already in the FreeBSD tree):
 - addr2line: Speed up and support searching inlined functions
 - addr2line: Support -i, -a, -p options
 - readelf: Add some ARM relocation types
 - readelf, libelf: Avoid reading beyond end of buffer/file

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2015-12-11 20:28:27 +00:00
Ed Maste
1ce1c68952 elfcopy: include extension but replace . when converting from binary
The change in r291958 was not consistent with GNU objcopy. The start,
end and size symbols created for ELF objects converted from binary need
to include the full filename including the extension, but with the
periods replaced with underscores.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4474
2015-12-11 18:47:41 +00:00
Kurt Lidl
db792209dd Fixup include protections for building on mips64 with clang
Reviewed by:	sbruno, imp
Approved by:	rpaulo (mentor)
Differential Revision:	https://reviews.freebsd.org/D4457
2015-12-11 15:12:01 +00:00
Bryan Drewery
de1f9ee234 Convert contrib/ofed libraries to LIBADD.
Sponsored by:	EMC / Isilon Storage Division
2015-12-10 00:07:11 +00:00
Simon J. Gerraty
ac3446e962 Merge bmake-20151201 2015-12-08 01:29:07 +00:00
Ed Maste
fc7284da06 elfcopy: exclude extension when converting from binary
When converting from binary to ELF, elfcopy creates symbols
_binary_<filename>_start_, _binary_<filename>_end, and
_binary_<filename>_size. For compatibility with GNU objcopy (and to
produce sensible symbol names) the extension must be stripped off.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4238
2015-12-07 20:21:12 +00:00
Dimitry Andric
df5b54dee1 Add clang patch corresponding to r291701. 2015-12-04 17:23:19 +00:00
Bryan Drewery
eacae6dc66 Fix LDADD/DPADD that should be LIBADD.
Sponsored by:	EMC / Isilon Storage Division
2015-12-04 03:17:47 +00:00
Dimitry Andric
bde2a921d4 In assembler mode, clang defaulted to DWARF3, if only -g was specified.
Change this to DWARF2, in the simplest way possible.  (Upstream, this
was fixed in clang trunk r250173, but this was done along with a lot of
shuffling around of debug option handling, so it cannot be applied
as-is.)

Noticed by:	des
MFC after:	3 days
2015-12-03 15:41:10 +00:00
Ed Maste
895f86f15f readelf: add Xen ELF notes
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4356
2015-12-03 12:21:18 +00:00
Craig Rodrigues
26144b6164 Hack test so that it works on FreeBSD. 2015-12-01 21:22:29 +00:00
Adrian Chadd
ce276fe26d [wpa] use IFM_IEEE80211_ADHOC for now on FreeBSD for IBSS operation.
PR:		bin/203086
Submitted by:	avos
2015-11-26 17:28:40 +00:00
Adrian Chadd
7424f50fa8 [wpa] bring up interface in ap_mode=2
This is required for WPA-NONE operation.

PR:		bin/203086
Submitted by:	avos@
2015-11-26 17:26:28 +00:00
Adrian Chadd
e1f2d1f39f [wpa] handle IBSS mediatype.
same as the previous commit to ifconfig - handle a mediatype of IBSS
without failing/complaining.

Internally inside wpa_s things treat IBSS/ADHOC as equivalent.
2015-11-26 02:00:37 +00:00
Simon J. Gerraty
fe90c77aae ParseTrackInput: do not access beyond end of buffer.
Reviewed by:	dim
2015-11-26 00:26:23 +00:00
Bryan Drewery
6a270e17f3 Remove unneeded libutil dependency for sendmail.
It included libutil.h for setproctitle(3), which was moved from libutil to libc
in r65353 in 2000.

Reviewed by:	gshapiro [sendmail change]
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D4261
2015-11-24 04:19:55 +00:00
Xin LI
fe50a38eb0 MFV r291123:
xz 5.2.2.

MFC after:	1 month
Relnotes:	yes
2015-11-21 09:09:25 +00:00