Commit Graph

7040 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
b6924c9309 Add a toggle to display the approximate amount of swap used by each
process.  We don't *quite* pull that number out of our backside, as
the actual number is difficult to determine without modifying the VM
system to report it, but it's still useful to get an idea of what's
going on when a machine unexpectedly starts swapping.

MFC after:	1 week
2016-09-05 08:27:04 +00:00
Dimitry Andric
8795828371 Add _US_ACTION_MASK to libcxxrt's arm-specific unwind header. This
value is used in newer versions of compiler-rt.

MFC after:	3 days
2016-09-04 21:48:58 +00:00
Dag-Erling Smørgrav
e2d1500434 Upgrade to Unbound 1.5.9. 2016-09-04 12:17:57 +00:00
Andrey A. Chernov
cd3912b6be The bug:
$ echo x | awk '/[[:cntrl:]]/'
x

The NUL character in cntrl class truncates the pattern, and an empty
pattern matches anything. The patch skips NUL as a quick fix.

PR:     195792
Submitted by:   kdrakehp@zoho.com
Approved by:    bwk@cs.princeton.edu (the author)
MFC after:      3 days
2016-09-03 23:04:56 +00:00
Enji Cooper
637cce3a32 MFhead @ r305314 2016-09-03 00:50:18 +00:00
Enji Cooper
3560641a48 Don't dedupe signals less than SIGRTMIN
FreeBSD always delivers all signals sent with sigqueue, except when
dealing with low memory conditions according to kib (see
bug # 212173 comment # 5).

In collaboration with:	kib
PR:	212173
Sponsored by:	EMC / Isilon Storage Division
2016-09-03 00:47:54 +00:00
Enji Cooper
10f26e7d81 Don't expect :fmod to fail on FreeBSD
Sponsored by:	EMC / Isilon Storage Division
2016-09-02 06:55:32 +00:00
Dimitry Andric
1dc088ab69 Pull in r277331 from upstream llvm trunk (by Diana Picus):
[AArch64] Return the correct size for TLSDESC_CALLSEQ

  The branch relaxation pass is computing the wrong offsets because it assumes
  TLSDESC_CALLSEQ eats up 4 bytes, when in fact it is lowered to an instruction
  sequence taking up 16 bytes. This can become a problem in huge files with lots
  of TLS accesses, as it may slowly move branch targets out of the range computed
  by the branch relaxation pass.

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

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

This fixes "error in backend: fixup value out of range" when compiling
the misc/talkfilters port for AArch64.

Reported by:	sbruno
PR:		201762
MFC after:	3 days
2016-09-01 18:11:44 +00:00
Enji Cooper
f8fd1a95d9 MFhead @ r305170 2016-09-01 02:57:15 +00:00
Ed Maste
d0bd2dad6f readelf: silence GCC 4.2.1 uninitialized variable warning
Sponsored by:	The FreeBSD Foundation
2016-08-31 21:04:58 +00:00
Ed Maste
b6d812d2dd Update to ELF Tool Chain r3490
Improvements include:
 * readelf: report all relocation types in rel/rela for MIPS N64
 * readelf: add ELFOSABI_ARM_AEABI
 * elfdump: add ELFOSABI_ARM_AEABI and ELFOSABI_ARM
 * Add recent RISC-V relocations
 * elfcopy: use elftc_timestamp, to support SOURCE_DATE_EPOCH

Sponsored by:	The FreeBSD Foundation
2016-08-31 15:05:04 +00:00
Pedro F. Giffuni
1ca1e01360 MFV r302423:
Bring older verbatim version of cpuid.h

This file is used regularly in FreeBSD builds but we usually use the
similar file provided by clang.

By providing the older file introduced in GCC 4.3, we hope to mimic
better what is provided by an external toolchain.

Obtained from:	GCC-4_3-branch (SVN rev. 129548, pre GPLv3)
2016-08-30 21:51:53 +00:00
Dimitry Andric
866616de6e Fix warnings in telnet about invalid constant conversions, e.g.:
contrib/telnet/telnet/commands.c:2914:13: error: implicit conversion
from 'int' to 'char' changes value from 137 to -119
[-Werror,-Wconstant-conversion]
                *lsrp++ = IPOPT_SSRR;
                        ~ ^~~~~~~~~~
/usr/include/netinet/ip.h:152:21: note: expanded from macro 'IPOPT_SSRR'
#define IPOPT_SSRR              137             /* strict source route */
                                ^~~
contrib/telnet/telnet/commands.c:2916:13: error: implicit conversion
from 'int' to 'char' changes value from 131 to -125
[-Werror,-Wconstant-conversion]
                *lsrp++ = IPOPT_LSRR;
                        ~ ^~~~~~~~~~
/usr/include/netinet/ip.h:148:21: note: expanded from macro 'IPOPT_LSRR'
#define IPOPT_LSRR              131             /* loose source route */
                                ^~~

Use unsigned char buffers instead.

MFC after:	1 week
2016-08-30 20:27:22 +00:00
Dimitry Andric
deda53cd9b Fix warnings in tnftp about invalid constant conversions, e.g.:
contrib/tnftp/src/ftp.c:2067:11: error: implicit conversion from 'int'
to 'char' changes value from 255 to -1 [-Werror,-Wconstant-conversion]
        buf[0] = IAC;
               ~ ^~~
/usr/include/arpa/telnet.h:39:13: note: expanded from macro 'IAC'
#define IAC     255             /* interpret as command: */
                ^~~
contrib/tnftp/src/ftp.c:2068:11: error: implicit conversion from 'int'
to 'char' changes value from 244 to -12 [-Werror,-Wconstant-conversion]
        buf[1] = IP;
               ~ ^~
/usr/include/arpa/telnet.h:50:12: note: expanded from macro 'IP'
#define IP      244             /* interrupt process--permanently */
                ^~~

Use an unsigned char buffer instead.

MFC after:	1 week
2016-08-30 20:24:50 +00:00
Pedro F. Giffuni
66a5fa5d99 libcpp: Complete the __COUNTER__ support with upstream implementation.
We brought an original __COUNTER__ implementation in r228474, however, it
was missing documentation and it had a different behaviour for precompiled
headers with respect to the upstream version. Since the upstream version
is under the same license as GCC4.2, bring the missing pieces to reduce
differences against upstream.

Optained from:	GCC pre-4.3 (rev. 125041 ; GPLv2)
2016-08-30 19:39:33 +00:00
Dimitry Andric
c43262580d Squelch clang 3.9.0 warnings about BASE (which is 32768) being converted
to -32768 when it is used as an argument to mp_itom(), in both libtelnet
and newkey.  This code has been wrong since r26238 (!), so after almost
20 years it is rather useless to try to correct it.

MFC after:	1 week
2016-08-30 19:02:15 +00:00
Enji Cooper
cc85aca9cd Fix typo
atf_tc_expect_fail should have been atf_expect_fail per atf-sh-api(3)

PR:		212193
Pointyhat to:	ngie
Sponsored by:	EMC / Isilon Storage Division
2016-08-29 22:38:18 +00:00
Enji Cooper
9c73efe89c Fix typo
atf_tc_expect_fail should have been atf_expect_fail per atf-sh-api(3)

PR:		212193
Pointyhat to:	ngie
Sponsored by:	EMC / Isilon Storage Division
2016-08-29 22:34:31 +00:00
Enji Cooper
2f52412dee MFhead @ r305013 2016-08-29 18:53:36 +00:00
Enji Cooper
b5864e6de2 Expect :basic to fail due to recent output changes in dirname(3)
The dirname output change bug is actively being worked on, and this
commit will need to be reverted once it's fixed.

MFC after:	never
PR:		212193
Sponsored by:	EMC / Isilon Storage Division
2016-08-29 17:50:36 +00:00
Martin Matuska
cff8ef76a4 Redo MFV r304866:
Sync libarchive with vendor including security fixes

Vendor issues fixed:
Issue #731: Reject tar entries >= INT64_MAX
Issue #744 (part of Issue #743): Enforce sandbox with very long pathnames
Issue #748: Zip decompression failure with highly-compressed data
Issue #767: Buffer overflow printing a filename
Issue #770: Zip read: be more careful about extra_length

MFC after:	3 days
2016-08-29 06:54:38 +00:00
Martin Matuska
c438d38492 Revert r304869
This commit was incorrect and will be re-committed asap.
2016-08-29 06:50:45 +00:00
Dimitry Andric
338dc8086d Follow-up to r304953, in which I broke the build: apparently the SOLARIS
macro is defined in lots of different places in ipfilter, so replace all
of the nonportable definitions with portable ones.

Pointy hat to:	dim
X-MFC-With:	r304959, r304953
MFC after:	3 days
2016-08-28 19:35:29 +00:00
Dimitry Andric
8ebfbdbef8 In ncurses baudrate definitions, avoid warnings about implicit
conversions from int to short changing the values.  This applies to
B38400 and higher, since their values do not fit into a short.

However, since the wrapped values are still unique, and they only serve
as keys, there is no problem in adding a cast to silence the warnings.
This also avoids changing the ABI, which would happen if we changed
NCURSES_OSPEED to int.

Discussed with:	Thomas Dickey
MFC after:	1 week
2016-08-27 20:33:19 +00:00
Martin Matuska
c4676089b0 MFV r304866:
Sync libarchive with vendor including security fixes

Vendor issues fixed:
Issue #731: Reject tar entries >= INT64_MAX
Issue #744 (part of Issue #743): Enforce sandbox with very long pathnames
Issue #748: Zip decompression failure with highly-compressed data
Issue #767: Buffer overflow printing a filename
Issue #770: Zip read: be more careful about extra_length

MFC after:	3 days
2016-08-26 23:50:44 +00:00
Navdeep Parhar
7df135c055 cxgbe/iw_cxgbe: Various fixes to the iWARP driver.
- Return appropriate error code instead of ENOMEM when sosend() fails in
  send_mpa_req.
- Fix for problematic race during destroy_qp.
- Abortive close in the failure of send_mpa_reject() instead of normal close.
- Remove the unnecessary doorbell flowcontrol logic.

Submitted by:	Krishnamraju Eraparaju at Chelsio
MFC after:	1 month
Sponsored by:	Chelsio communications
2016-08-26 17:38:13 +00:00
Enji Cooper
6e122b9610 Add copious debugging to aid in determining why :sigqueue_rt is currently failing
For some odd reason SIGINT is only being delivered once, as opposed to multiple
times.

Disclaimer: this test was run on a kernel built on 08/14/2016. Need to build a
new kernel and rerun the test.
2016-08-26 04:31:19 +00:00
Enji Cooper
aaf3e744fd Detect virtual machines on FreeBSD using the kern.vm_guest sysctl
kern.vm_guest == none -> not a virtual machine

It's a bit of a misnomer with the function being named `isQEMU`... but FreeBSD's
support seems to be a bit more all-encompassing than NetBSD's is today.

Sponsored by: EMC / Isilon Storage Division
2016-08-26 03:46:43 +00:00
Enji Cooper
ed04e0c3dc MFhead @ r304815 2016-08-25 20:02:51 +00:00
Enji Cooper
1ffd722a80 Don't test size[i] % align[i] == 0 case on FreeBSD
Per jemalloc(3)/aligned_alloc(3), the behavior is undefined if the size
isn't an integral multiple of the alignment. Thus, this is a NetBSD-specific
test.

Sponsored by: EMC / Isilon Storage Division
2016-08-25 19:17:16 +00:00
Cy Schubert
affba8c71c MFV r304732.
Update from sqlite3-3.12.1 (3120100) to sqlite3-3.14.1 (3140100).

This commit addresses the tmpdir selection vulnerability fixed in
sqlite3-1.13.0.  See VuXML entry 546deeea-3fc6-11e6-a671-60a44ce6887b.

Security:	VuXML 546deeea-3fc6-11e6-a671-60a44ce6887b
Security:	CVE-2016-6153
2016-08-24 12:32:24 +00:00
Brooks Davis
f1f548d0e9 Spell MIPS more traditionally in "bfd_elf32_ntradbigmips_vec".
Sponsored by:	DAPRA, AFRL
2016-08-24 00:00:54 +00:00
Baptiste Daroussin
2382c29e5f Import Dragonfly Mail Agent snapshort from 20160806 aka v0.11+
Most important change being:
dma - Fix security hole (#46)

Affecting DragonFly 4.6 and earlier, Matt Dillon fixed this in base after
finding out from BSDNow Episode 152. Comments following were from his commit
which explains better than I. Just taking his change and putting it here as well.

* dma makes an age-old mistake of not properly checking whether a file
owned by a user is a symlink or not, a bug which the original mail.local
also had.

* Add O_NOFOLLOW to disallow symlinks.

Thanks-to: BSDNow Episode 152, made me dive dma to check when they talked
about the mail.local bug.

MFC After:	2 days
2016-08-20 16:36:05 +00:00
Dimitry Andric
6ca8079c85 Pull in r265122 from upstream llvm trunk (by James Molloy):
Fix for pr24346: arm asm label calculation error in sub

  Some ARM instructions encode 32-bit immediates as a 8-bit integer
  (0-255) and a 4-bit rotation (0-30, even) in its least significant 12
  bits. The original fixup, FK_Data_4, patches the instruction by the
  value bit-to-bit, regardless of the encoding. For example, assuming
  the label L1 and L2 are 0x0 and 0x104 respectively, the following
  instruction:

    add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260

  would be assembled to the following, which adds 1 to r0, instead of
  260:

    e2800104 add r0, r0, #4, 2 ; equivalently 1

  The new fixup kind fixup_arm_mod_imm takes care of the encoding:

    e2800f41 add r0, r0, #260

  Patch by Ting-Yuan Huang!

This fixes label calculation for ARM assembly, and is needed to enable
ARM assembly sources for OpenSSL.

Requested by:	jkim
MFC after:	3 days
2016-08-20 14:04:51 +00:00
Dimitry Andric
910b36f73f Pull in r262772 from upstream clang trunk (by Simon Pilgrim):
[X86] AMD Bobcat CPU (btver1) doesn't support XSAVE

  btver1 is a SSSE3/SSE4a only CPU - it doesn't have AVX and doesn't
  support XSAVE.

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

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

  [X86] AMD Bobcat CPU (btver1) doesn't support XSAVE

  btver1 is a SSSE3/SSE4a only CPU - it doesn't have AVX and doesn't
  support XSAVE.

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

This ensures clang does not emit AVX instructions for CPUTYPE=btver1.

Reported by:	Michel Depeige <demik+freebsd@lostwave.net>
PR:		211864
MFC after:	3 days
2016-08-17 21:57:11 +00:00
Enji Cooper
74f4c1cf51 Expect :mmap_truncate_signal to fail on FreeBSD
Additional investigation is being done as part of bug 211924

PR:	211924
Sponsored by:	EMC / Isilon Storage Division
2016-08-17 06:41:05 +00:00
Enji Cooper
532c3cde6a MFhead @ r304232 2016-08-16 18:32:01 +00:00
Ed Maste
d4a12237eb elfcopy: correct comment typo in r304151 2016-08-15 23:20:55 +00:00
Ed Schouten
576a9e496f Disable tests for non-standard behaviour of dirname(3)/basename(3).
The NetBSD ATF tests explicitly check that these functions do not modify
their input. These tests are NetBSD-specific. They test for something
that is not part of POSIX.

PR:		211873
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D7506
2016-08-15 19:05:41 +00:00
Ed Maste
e85c2b0b12 elfcopy: add elf64-littleaarch64 output target support
Sponsored by:	The FreeBSD Foundation
2016-08-15 14:28:08 +00:00
Ed Maste
07410fe461 elfcopy: silence GCC 5.3 unitialized variable warning
Although it's a false positive there is little cost to initializing it
always.

Submitted by:	adrian
2016-08-15 11:54:39 +00:00
Enji Cooper
6e4f4927ef MFhead @ r304091 2016-08-14 19:54:40 +00:00
Martin Matuska
cfa49a9b0b MFV r304060:
Sync libarchive with vendor including three security fixes

Vendor issues fixed:

Issue #744: Very long pathnames evade symlink checks
Issue #748: libarchive can compress, but cannot decompress zip some files
PR #750: ustar: fix out of bounds read on empty string ("") filename
PR #755: fix use of acl_get_flagset_np() on FreeBSD

MFC after:	3 days
2016-08-14 09:26:10 +00:00
Enji Cooper
66d08c7db2 Expect :raw to fail on FreeBSD
clnt_raw fails with `RPC_CANTDECODERES` today with the testcase
provided by NetBSD.

PR:		211804
Sponsored by:	EMC / Isilon Storage Division
2016-08-13 06:11:53 +00:00
Enji Cooper
6b7b162b9d Skip 64kB bucket testcases
This bucket size isn't supported on FreeBSD

Sponsored by:	EMC / Isilon Storage Division
2016-08-13 05:42:11 +00:00
Enji Cooper
82bc57c207 Expect :mutexattr2 to fail on FreeBSD
pthread_mutexattr_getprioceiling and pthread_mutexattr_setprioceiling
both return EINVAL if ->m_protocol != PTHREAD_PRIO_PROTECT. The
reasoning behind this decision isn't documented in neither the FreeBSD
nor the OpenGroup manpages.

Add printf's to add in debugging the issue

PR:		211802
Sponsored by:	EMC / Isilon Storage Division
2016-08-13 04:45:39 +00:00
Enji Cooper
640235e2c2 Checkpoint initial integration work
- Some of the lib/libc and lib/thr tests fail
- lib/msun/exp_test:exp2_values now passes with clang 3.8.0

The Makefiles in contrib/netbsd-tests were pruned as they have no value

Sponsored by: EMC / Isilon Storage Division
2016-08-12 08:50:05 +00:00
John Baldwin
f21e85a0ce Add timer_settime tests using SIGEV_THREAD.
Note that these tests should work fine on NetBSD and other systems as
SIGEV_THREAD is POSIX.

Differential Revision:	https://reviews.freebsd.org/D7121
2016-08-08 17:57:25 +00:00
Justin Hibbits
c12dee326f Check the first byte of the array for NUL, instead of the array as a NULL pointer
The partition_name field is an array, so can never be NULL itself.  Check only
the first byte instead.

This was found when test building with clang, but I'm not sure how it passes
gcc's warnings either.
2016-08-06 15:10:14 +00:00
Jung-uk Kim
9c46493e50 Fix a style(9) bug. 2016-08-03 20:21:58 +00:00
Jung-uk Kim
a4d10fa904 Support nanosecond time stamps for pcap_dispatch(3) and pcap_loop(3). 2016-08-03 20:08:39 +00:00
Ed Maste
20136ffc7b readelf: report ARM program and section header types
Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7390
2016-08-02 20:11:04 +00:00
Baptiste Daroussin
999c1fd64b Remove usage of _WITH_DPRINTF 2016-07-30 01:16:06 +00:00
Baptiste Daroussin
04f36dc654 Remove last traces of _WITH_GETLINE 2016-07-30 01:13:54 +00:00
Ed Maste
03f124f737 libunwind: correct return code in unwinding trace log message
Obtained from:	LLVM r277215
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2016-07-29 21:37:00 +00:00
Kurt Lidl
4e9ac06d0d libblacklist: Do not use %m for logging, use strerror(errno)
The blacklist library can accept a function to use for logging,
defaulting to vsyslog(), if no function is specified.  Make the
blacklist library use strerror(errno) explicitly, instead of %m,
so that the passed in function does not need to support the
syslog specific placeholder.

This matches a change already submitted and accepted upstream.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-07-29 21:11:32 +00:00
Ed Maste
0fe768778d libcxxrt: fix demangling of wchar_t
'wchar_t' is 7 characters long, not 6. r303297 fixed this in libelftc,
but not the second copy of this file that we have in libcxxrt.

PR:		208661
Submitted by:	Daniel McRobb
Obtained from:	ELF Tool Chain r3480
MFC after:	3 days
2016-07-27 17:18:08 +00:00
Ed Maste
ea3dc21b32 rename ARM's libunwind.S to to avoid conflict with llvm libunwind
llvm libunwind includes a libunwind.cpp, but on ARM libunwind.S is found
first in .PATH. Rename the latter one, since it is not going to be
updated again.

Reviewed by:	andrew
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7162
2016-07-27 16:34:19 +00:00
Xin LI
c08cbc64dc Change bsdiff to use divsufsort suffix sort library instead of qsufsort,
which is more efficient.

Note that for now we do not create a separate library for libdivsufsort
because it's not used anywhere else.

Obtained from:	Chromium
MFC after:	2 months
2016-07-25 03:58:19 +00:00
Ed Maste
4e359ce1a0 libelftc: fix demangling of wchar_t
"wchar_t" is 7 characters long, not 6.

PR:		208661
Submitted by:	Daniel McRobb
Obtained from:	ELF Tool Chain r3480
MFC after:	3 days
2016-07-24 23:40:33 +00:00
Baptiste Daroussin
93bbfc43c2 Update mandoc to 1.13.4 release 2016-07-23 11:55:15 +00:00
Ruslan Bukin
0efcacc58b Set real values for context/cursor sizes for RISC-V to prevent static
assertions.

Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
2016-07-22 14:57:26 +00:00
Ed Maste
3c4fd2463b libcxxrt: add padding in __cxa_allocate_* to fix alignment
The addition of the referenceCount to __cxa_allocate_exception put the
unwindHeader at offset 0x58 in __cxa_exception, but it requires 16-byte
alignment. In order to avoid changing the current __cxa_exception ABI
(and thus breaking its consumers), add explicit padding in the
allocation routines (and account for it when freeing).

This is intended as a lower-risk change for FreeBSD 11. A "more correct"
fix should be prepared for upstream and -CURRENT.

Reviewed by:	dim
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7271
2016-07-21 18:20:35 +00:00
Pedro F. Giffuni
717464d821 binutils: fix "Bad value" error in bfd for MIPS when using -Bsymbolic.
From OpenBSD's log:

Inspired by https://sourceware.org/ml/binutils/2010-08/msg00333.html,
but expressed differently so there are no GPLv3 issues.

Obtained from:	OpenBSD (CVS rev. 1.7)
MFC after:	1 month
2016-07-21 15:26:21 +00:00
Pedro F. Giffuni
3f2a60a137 MFV r298167, r300962, r303048:
openresolv: update to version 3.8.1.

Among the new features it attempts to support alternative init systems.

MFC after:	1 month
2016-07-20 03:52:04 +00:00
Ed Maste
49b33d144b libunwind: Properly align _Unwind_Exception.
_Unwind_Exception is required to be double word aligned.  GCC has
interpreted this to mean "use the maximum useful alignment for the
target" so follow that lead.

Obtained from:	LLVM review D22543
2016-07-20 03:13:02 +00:00
Ed Maste
4570581176 clang++: Always use --eh-frame-hdr on FreeBSD, even for -static
FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and we expect to
use it more widely in the future) and it requires the EH frame segment
in static binaries.

Reviewed by:	dim
Obtained from:	Clang commit r266123
MFC after:	3 days
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7250
2016-07-19 17:15:07 +00:00
Ed Maste
b1b8369114 llvm-libunwind: use conventional (non-Darwin) X86 register numbers
For historical reasons Darwin/i386 has ebp and esp swapped in the
eh_frame register numbering.  That is:

             Darwin      Other
    Reg #    eh_frame    eh_frame    DWARF
    =====    ========    ========    =====
      4        ebp         esp        esp
      5        esp         ebp        ebp

Although the UNW_X86_* constants are not supposed to be coupled to
DWARF / eh_frame numbering they are currently conflated in LLVM
libunwind, and thus we require the non-Darwin numbering.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2016-07-19 00:47:00 +00:00
Andrey A. Chernov
2fb2dbe8c0 Back out non-collating [a-z] ranges.
Instead of changing the whole course to another POSIX-permitted way
for consistency and uniformity I decide to completely ignore missing
regex fucntionality and focus on fixing bugs in what we have now,
too many small obstacles we have choicing other way, counting ports.
Corresponding libc changes are backed out in r302824.
2016-07-14 09:45:07 +00:00
Andrey A. Chernov
2219fc0f38 To mimic system glob, we definitely don't need manual upper/lower hack.
The author clearly disagree in the comment, so this patch will be not
submitted upstream.
2016-07-14 09:40:42 +00:00
Andrey A. Chernov
36302d21c9 Back out non-collating [a-z] ranges.
Instead of changing the whole course to another POSIX-permitted way
for consistency and uniformity I decide to completely ignore missing
regex fucntionality and focus on fixing bugs in what we have now,
too many small obstacles we have choicing other way, counting ports.
Corresponding libc changes are backed out in r302824.
2016-07-14 09:37:16 +00:00
Andrey A. Chernov
6c2a17d0b5 Back out non-collating [a-z] ranges.
Instead of changing the whole course to another POSIX-permitted way
for consistency and uniformity I decide to completely ignore missing
regex fucntionality and focus on fixing bugs in what we have now,
too many small obstacles we have choicing other way, counting ports.
Corresponding libc changes are backed out in r302824.
2016-07-14 09:31:52 +00:00
Enji Cooper
1c4f5adba9 Initialize first_serial to 0 in dozonetransfer(..) to fix -Wuninitialized
warning

MFC after: 3 days
X-MFC with: r302779
Pointyhat to: des
PR: 209177
Reported by: Jenkins (sparc64 job), gcc 4.2.1, gcc 5.3.0
Sponsored by: EMC / Isilon Storage Division
2016-07-14 06:10:16 +00:00
Andrey A. Chernov
f04b8af8fa After removing collation for [a-z] ranges in r302512, do it here too.
Instead of trying to expand whole range at regcomp() stage as we do,
GNU regex allocates separate ranges [start,end] set each character
is checked against, so collation is possible and turned on for ranges here.

When something like that will be implemented or our obsoleted regex code
will be replaced to something like TRE, and in case we decide to use
collation in [a-z] ranges, all changes related to r302512 can be backed out,
but now we need consistency.
2016-07-13 18:51:19 +00:00
Dag-Erling Smørgrav
f4dc9bf434 merge upstream hg 06347b1f76fe (fix IXFR)
PR:		209177
MFC after:	3 days
2016-07-13 18:26:05 +00:00
Andrey A. Chernov
ab1e39bc6b After removing collation for [a-z] ranges in r302512, mimic system
glob() here too.

I try to keep the change minimal to not touch contribed code much.
I'll send it upstream when it will be merged to the main branches,
but we need this change now here.
2016-07-13 16:49:48 +00:00
Andrey A. Chernov
1d148a7c3f After removing collation for [a-z] ranges in r302512, do it here too.
I'll try to keep the change very minimal to not touch contribed code much.
I'll send it upstream when it will be merged to main branches,
but we need the change right now here.
2016-07-13 10:01:31 +00:00
Ed Maste
c44b4795a9 libunwind: limit stack usage in unwind cursor
This may be reworked upstream but in the interim should address the
stack usage issue reported in the PR.

PR:		206384
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-07-09 00:35:20 +00:00
Ed Maste
1de4a1a95b libunwind: update to upstream snapshot r272680
The key improvement is that it may be built without cross-unwinding
support, which significantly reduces the stack space requirement.

MFC after:	1 week
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7123
2016-07-08 20:20:46 +00:00
Glen Barber
aa5755d30d Add freebsd12 to contrib/gcc/config.gcc.
Submitted by:	bdrewery
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 01:56:52 +00:00
Enji Cooper
066a2c8969 Update libxo to 0.6.3
This fixes the 02 testcases on i386 (at least), and may fix the testcases
in general on 32-bit platforms

Differential Revision: https://reviews.freebsd.org/D7052
Approved by: phil (maintainer)
Approved by: re (gjb)
Reported by: asomers
Reviewed by: phil
Submitted by: phil
Sponsored by: EMC / Isilon Storage Division
2016-07-03 01:35:27 +00:00
Xin LI
be8aff81c1 MFV r302260: expat 2.2.0
Approved by:	re (kib)
2016-07-01 05:48:45 +00:00
Cy Schubert
53362bdcc5 Remove dead code.
Approved by:	re@ (hrs@)
MFC after:	1 week
2016-06-30 14:53:46 +00:00
Martin Matuska
ae5876ea19 MFV r302264:
Sync libarchive with vendor, bugfixes for tests:
- fix tests on filesystems without birthtime support, e.g. UFS1 (1)
- vendor issue #729: avoid use of C99 for-scope declarations in
  test_write_format_gnutar_filenames.c

MFC after:	1 week
PR:		204157 (1)
Approved by:	re (hrs)
2016-06-30 08:51:50 +00:00
Bryan Drewery
eb39a64db8 Flush every line when using meta mode and no -j or with -B.
Otherwise the output is buffered and it appears that make is stuck on something
long-running.  This problem is not present with -j as it uses different
code that was already flushing.

Discussed with:	sjg
Approved by:	re (blanket, META_MODE)
Sponsored by:	EMC / Isilon Storage Division
2016-06-29 22:54:01 +00:00
Xin LI
282e23f07b MFV r302218: file 5.28.
Relnotes:	yes
MFC after:	2 weeks
Approved by:	re (gjb)
2016-06-27 01:29:17 +00:00
Martin Matuska
f061a2215f MFV r302003,r302037,r302038,r302056:
Update libarchive to 3.2.1 (bugfix and security fix release)

List of vendor fixes:
- fix exploitable heap overflow vulnerability in Rar decompression
  (vendor issue 719, CVE-2016-4302, TALOS-2016-0154)
- fix exploitable stack based buffer overflow vulnebarility in mtree
  parse_device functionality (vendor PR 715, CVE-2016-4301, TALOS-2016-0153)
- fix exploitable heap overflow vulnerability in 7-zip read_SubStreamsInfo
  (vendor issue 718, CVE-2016-4300, TALOS-2016-152)
- fix integer overflow when computing location of volume descriptor
  (vendor issue 717)
- fix buffer overflow when reading a crafred rar archive (vendor issue 521)
- fix possible buffer overflow when reading ISO9660 archives on machines
  where sizeof(int) < sizeof(size_t) (vendor issue 711)
- tar and cpio should fail if an input file named on the command line is
  missing (vendor issue 708)
- fix incorrect writing of gnutar filenames that are exactly 512 bytes
  long (vendor issue 682)
- allow tests to be run from paths that are equal or longer than 128
  characters (vendor issue 657)
- add memory allocation errors in archive_entry_xattr.c (vendor PR 603)
- remove dead code in archive_entry_xattr_add_entry() (vendor PR 716)
- fix broken decryption of ZIP files (vendor issue 553)
- manpage style, typo and description fixes

Post-3.2.1 vendor fixes:
- fix typo in cpio version reporting (Vendor PR 725, 726)
- fix argument range of ctype functions in libarchive_fe/passphrase.c
- fix ctype use and avoid empty loop bodies in WARC reader

MFC after:	1 week
Security:	CVE-2016-4300, CVE-2016-4301, CVE-2016-4302
Approved by:	re (kib)
2016-06-22 07:49:59 +00:00
Bryan Drewery
da64d1122d Import ClangFormat.cpp from ^/vendor/clang/clang-release_380-r262564
Discussed with:	dim
Approved by:	re (gjb)
2016-06-17 16:44:31 +00:00
Simon J. Gerraty
ad7fb14f52 meta_oodate: set needOODATE if oodate due to missing .meta file.
Reviewed by:	bdrewery
Approved by:	re
2016-06-14 23:52:32 +00:00
Kurt Lidl
74bc093c1c Add ipfilter support to blacklistd-helper
In addition to adding initial support for the ipfilter
packet filtering system, wrap a few long lines, perform
whitespace cleanup and sync with upstream changes made
in NetBSD.

Submitted by:	cy
Reviewed by:	cy
Approved by:	re (hrs)
Relnotes:	YES
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6823
2016-06-12 23:34:48 +00:00
Cy Schubert
ca94cc3b74 Clarify the wording to be more accurate.
Approved by:	re@ (gjb)
MFC after:	1 week
X-MFC with:	r301773
2016-06-10 01:10:48 +00:00
Cy Schubert
dbef02b209 Update the man ipf.8 man page to accurately reflect that the -6
option is a noop and only here for backward compatibility.

MFC after:	1 week
2016-06-10 00:06:58 +00:00
Dag-Erling Smørgrav
3f68b24e10 Update to latest upstream version
PR:		209177
Reported by:	Vitaly Magerya
MFC after:	1 week
2016-06-09 20:40:12 +00:00
Enji Cooper
86c9d9918f Fix up r274061
Detect /usr/share/dict/words the "right way" by using require.files instead of
the hacked up attempt in the dict(..) function, which didn't work properly on
systems where MK_DICT == no.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-06-09 19:12:51 +00:00
Enji Cooper
d44d3fbae9 Update goodResult after recent changes made to the PRNG in libc
The PRNG was changed in r300953/r300956, and subsequently, the numbers
generated have changed. This is expected ABI breakage per ache

X-MFC with: r300953, r300956
Tested with: amd64, i386
Sponsored by: EMC / Isilon Storage Division
2016-06-09 18:35:37 +00:00
Enji Cooper
54ab80ee61 Add debug output to aid in determining why goodResult != result
MFC after: 1 week
PR: 210619 (for diagnosis)
Sponsored by: EMC / Isilon Storage Division
2016-06-09 18:11:42 +00:00
Kurt Lidl
5cc0844d4b Add IPFW support to blacklistd-helper
Relnotes:	YES
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6753
2016-06-09 15:19:48 +00:00
Jason Evans
62b2691e48 Update jemalloc to 4.2.1. 2016-06-09 06:10:20 +00:00
Mariusz Zaborski
9f51f38916 The code responsible for opening and rotating pcap files is independent
of Capser and should use openat(2) unconditionally on FreeBSD.
openat(2) is mandatory when sandboxed with Capsicum, but still works
in the absence of Capsicum.

Reviewed by:	AllanJude
2016-06-08 23:22:59 +00:00
Mariusz Zaborski
e29a5e1bb9 Fix spelling of the casper introduced in the r296047.
PR:		210031
Reported by:	AllanJude, jmallett
2016-06-08 22:30:21 +00:00