Commit Graph

7040 Commits

Author SHA1 Message Date
Shteryana Shopova
1108712cb5 Fix a regression introduced in SVN r256678 that breaks USM header parsing
Reviewed by:	bz@
2016-10-24 21:05:23 +00:00
Martin Matuska
98b53e14eb MFV r307859:
Update libarchive to 3.2.2
2016-10-24 14:08:05 +00:00
Ed Maste
d2972ce0cb elfcopy: select mode by the end of the program name
The mode of operation (elfcopy, mcs, or strip) is chosen based on the
program name.  Broaden this to allow a substring match at the end of the
name to allow prefixes - for example, bsdstrip or aarch64-freebsd-strip.

This improves use of these tools as drop-in replacements for GNU objcopy
and strip, which are often built with a limited set of supported targets
and installed with a target prefix for cross tools.

Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D1663
2016-10-22 23:49:06 +00:00
Baptiste Daroussin
36d97c2655 Import tzdata 2016h
MFC after:	2 days
2016-10-22 19:24:46 +00:00
Justin Hibbits
dc9b124d66 Create a new MACHINE_ARCH for Freescale PowerPC e500v2
Summary:
The Freescale e500v2 PowerPC core does not use a standard FPU.
Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor
unit, which doubles as a FPU.  The PowerPC SPE ABI is incompatible with the
stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.
Additionaly, the SPE opcodes overlap with Altivec, so these are mutually
exclusive.  Taking advantage of this fact, a new file, powerpc/booke/spe.c, was
created with the same function set as in powerpc/powerpc/altivec.c, so it
becomes effectively a drop-in replacement.  setjmp/longjmp were modified to save
the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by
the SPE).

Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not
support double-precision floating point.

Also, without a new MACHINE_ARCH it would be impossible to provide binary
packages which utilize the SPE.

Additionally, no work has been done to support ports, work is needed for this.
This also means no newer gcc can yet be used.  However, gcc's powerpc support
has been refactored which would make adding a powerpcspe-freebsd target very
easy.

Test Plan:
This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222
(P1022-based) board, compiled against the new ABI.  Base system utilities
(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot
multiuser.

Reviewed By:	bdrewery, imp
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5683
2016-10-22 01:57:15 +00:00
Enji Cooper
def7fe87e9 Expect tests/sys/fs/tmpfs/link_test:kqueue to fail
It fails with: "dir/b did not receive NOTE_LINK"

Also, add needed cleanup logic to cleanup the mountpoint after the fact

MFC after:	2 weeks
PR:		213662
Sponsored by:	Dell EMC Isilon
2016-10-21 05:21:20 +00:00
Ruslan Bukin
21e609c4aa Skip test on FreeBSD only. So test can be upstreamed to NetBSD.
Requested by:	ngie
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-10-18 22:53:58 +00:00
Ed Maste
4c5fff6d49 makewhatis: avoid skipping another page after one with no mlinks
Submitted by:	Ingo Schwarze
MFC after:	3 weeks
MFC with:	r307003
2016-10-18 13:37:59 +00:00
Ruslan Bukin
bf7d7eae01 Skip test on MIPS as it modifies TLS pointer in set_mcontext().
Discussed with:	kib
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-10-18 10:13:54 +00:00
Martin Matuska
2a21e8bd77 MFV r307214:
Sync libarchive with vendor. Style and tests fixes.

Important vendor bugfixes (relevant to FreeBSD):
#801: FreeBSD Coverity report: resource leak in libarchive/tar/test/main.c

MFC after:	1 week
2016-10-13 11:40:34 +00:00
Enji Cooper
3e5c48d95f Change atf_skip call to atf_expect_fail to make it clear that a failure is
expected

MFC after:	2 weeks
PR:		212861
Suggested by:	jmmv
Sponsored by:	Dell EMC Isilon
2016-10-13 08:35:08 +00:00
Enji Cooper
ac3628603c Expect :large to fail on FreeBSD
FreeBSD doesn't appear to validate large -o size values like
NetBSD does

MFC after:	2 weeks
PR:		212862
Sponsored by:	Dell EMC Isilon
2016-10-13 08:27:19 +00:00
Enji Cooper
12be646525 Port contrib/netbsd-tests/fs/tmpfs/h_tools.c to FreeBSD
- Add inttypes.h #include for PRId64 macro
- Use FreeBSD's copy of getfh(2), which doesn't include a `fh_size` parameter.
  Use sizeof(fhandle_t) instead as the size of fhp is always fixed as
  fhandle_t, unlike NetBSD's copy of fhp, which is void*.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-10-13 07:32:25 +00:00
Enji Cooper
d01498defb Skip :uchg on FreeBSD
Unfortunately removing files with uchg set always succeeds with root on
FreeBSD. Unfortunately running the test as an unprivileged user isn't doable
because mounting tmpfs requires root

PR:		212861
Sponsored by:	Dell EMC Isilon
2016-10-13 07:02:54 +00:00
Ed Maste
b422efa4c1 makewhatis: make output reproducible
The mandoc search database generation uses each page's inode number as
a hash key to index hard linked pages only once.  However, it also
processed the pages ordered by hash key resulting in effectively non-
deterministic output.

Instead:

1) provide fts_open() with a comparison function to process directories
   and files in a deterministic order
2) in addition to the existing hash, insert pages into a linked list
   which will be sorted (by virtue of 1)
3) iterate over pages by the list in 2, instead of hash order

I will work on upstreaming this change.

Reviewed by:	bapt
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8213
2016-10-10 19:09:35 +00:00
Baptiste Daroussin
8fdf57218f Import tzdata 2016g
MFC after:	3 days
2016-10-08 17:46:59 +00:00
Baptiste Daroussin
a35c698d87 Incorporate a change from OpenBSD by millert@OpenBSD.org
Don't warn about valid time zone abbreviations.  POSIX
through 2000 says that an abbreviation cannot start with ':', and
cannot contain ',', '-', '+', NUL, or a digit.  POSIX from 2001
on changes this rule to say that an abbreviation can contain only
'-', '+', and alphanumeric characters from the portable character
set in the current locale.  To be portable to both sets of rules,
an abbreviation must therefore use only ASCII letters."  Adapted
from tzcode2015f.

This is needed to be able to update tzdata to a newer version

MFC after:	3 days
2016-10-08 17:46:29 +00:00
Ed Maste
fbf2d5a99b Add test for a musl libc memmem bug
With a short needle (aka little) musl's memmem could read past the end
of the haystack (aka big). This was fixed in musl commit c718f9f.

Reviewed by:	ed
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8137
2016-10-06 20:27:40 +00:00
Baptiste Daroussin
c7edf4fd0b localedef: Fix ctype dump (fixed wide spread errors)
This commit is from John Marino in dragonfly with the following commit log:

====
This was a CTYPE encoding error involving consecutive points of the same
ctype.  It was reported by myself to Illumos over a year ago but I was
unsure if it was only happening on BSD.  Given the cause, the bug is also
present on Illumos.

Basically, if consecutive points were of the exact same ctype, they would
be defined as a range regardless.  For example, all of these would be
considered equivalent:

  <A> ... <C>, <H>  (converts to <A> .. <H>)
  <A>, <B>, <H>     (converts to <A> .. <H>)
  <A>, <J> ... <H>  (converts to <A> .. <H>)

So all the points that shouldn't have been defined got "bridged" by the
extreme points.

The effects were recently reported to FreeBSD on PR 213013.  There are
countless places were the ctype flags are misdefined, so this is a major
fix that has to be MFC'd.
====

This reveals a bad change I did on the testsuite: while 0x07FF is a valid
unicode it is not used yet (reserved for future use)

PR:		213013
Submitted by:	marino@
Reported by:	Kurtis Rader <krader@skepticism.us>
Obtained from:	Dragonfly
MFC after:	1 month
2016-10-06 19:46:43 +00:00
Kurt Lidl
30f7128157 Make blacklist-helper commands emit a message when successful
The blacklistd daemon expects to see a message on stdout, instead
of just relying on the exit value from any invoked programs.

Change the pf filtering to create multiple filters, attached under
a the "blacklist/*" anchor point.  This prevents the filtering for
each port's filtering rule from overwriting the previously installed
filtering rule.  Check for an existing filtering rule for each port,
so the installation of a given filtering rule only happens once.
Reinstalling the same rule resets the counters for the pf rule, and
we don't want that.

Reported by:	David Horn (dhorn2000 at gmail.com)
Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8081
2016-10-04 23:10:43 +00:00
Jung-uk Kim
c5b5d71ad3 MFV: r306687
Merge byacc 20160606.
2016-10-04 22:22:32 +00:00
Martin Matuska
f3e9b21a7a MFV r306669:
Sync libarchive with vendor including security fixes.

Important vendor bugfixes (relevant to FreeBSD):
#747: Out of bounds read in mtree parser
#761: heap-based buffer overflow in read_Header (7-zip)
#784: Invalid file on bsdtar command line results in internal errors (1)

PR:		213092 (1)
MFC after:	1 week
2016-10-04 11:56:46 +00:00
Baptiste Daroussin
273c26a3c3 Import libucl 20160812 2016-10-01 00:14:01 +00:00
Baptiste Daroussin
b72aa29052 Import dma 20160929
MFC after:	1 week
2016-09-30 23:38:26 +00:00
Kurt Lidl
63ecbc6b55 Fix blacklistd's state restoral at startup
The blacklistd daemon attempted to restore the filtering rules
before the database of blocked addresses was opened, so no rules
were being reloaded.  Now the rules are properly recreated when the
daemon is started with '-r'.

This bug was fixed locally, and then sent upstream to NetBSD.
This changeset is the import the NetBSD version of the change,
which added debugging output to alert about a null database.

Reviewed by:	emaste
Obtained from:	NetBSD
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-09-30 16:35:30 +00:00
Kurt Lidl
0a1942cc0a Update blacklistd.8 with changes from NetBSD
Obtained from:	NetBSD
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8079
2016-09-30 16:31:12 +00:00
Dag-Erling Smørgrav
b5663de9eb Upgrade to Unbound 1.5.10. 2016-09-29 18:24:29 +00:00
Ruslan Bukin
c5072d5c94 Fix conversion from C++ std::string into C const char *.
This fixes operation on MIPS64EB with GCC 4.2.1.

Reviewed by:	jmmv
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D7952
2016-09-29 09:16:02 +00:00
Ruslan Bukin
de1a9339ea Use right piece of code for FreeBSD.
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-09-28 08:45:42 +00:00
Dag-Erling Smørgrav
27c2fff0f2 import unbound 1.5.10 2016-09-27 21:11:07 +00:00
Ruslan Bukin
615216628b Allow up to 6 arguments only on MIPS.
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-09-27 13:46:00 +00:00
Marcel Moolenaar
84b809fd65 When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same target
files (case-insensitivity speaking).  This is the case for object
files compiled with -fpic and shared libraries. The former uses
an extension of ".So", and the latter an extension ".so".  Rename
shared object files from *.So to *.pico to match what NetBSD does.

Missed in r306297

MFC after:	1 month
Sponsored by:	Bracket Computing
Differential Revision:	https://reviews.freebsd.org/D7906
2016-09-24 17:50:11 +00:00
Enji Cooper
43f24e2096 Port vnd_test to FreeBSD
Use mdmfs/mdconfig instead of vndconfig/newfs. vndconfig doesn't exist on FreeBSD.

TODO: need to parameterize out the md(4) device as it's currently hardcoded to "3"
(in both the FreeBSD and NetBSD cases).

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:40:15 +00:00
Enji Cooper
534501a247 Port to mknod_test and readdir_test to FreeBSD
The `mknod <file> p` command doesn't exist on FreeBSD, like on NetBSD. Use
mkfifo instead to create named pipes (FIFOs).

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:37:02 +00:00
Enji Cooper
548f948a56 Port sizes_test and statvfs_test to FreeBSD
Similar to r306030, use a simpler method for getting the value of
`hw.pagesize`, i.e. `sysctl -n hw.pagesize`. The awk filtering method doesn't
work on FreeBSD

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:31:57 +00:00
Enji Cooper
61e13648e7 Port contrib/netbsd-tests/fs/h_funcs.subr to FreeBSD
Use kldstat -m to determine whether or not a filesystem is loaded. This works
well with tmpfs, ufs, and zfs

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:28:57 +00:00
Enji Cooper
d3de062383 Port vnode_leak_test:main to FreeBSD
Use a simpler way of dumping kern.maxvnodes, i.e. `sysctl -n kern.maxvnodes`

The awk filtering method employed in NetBSD doesn't work on FreeBSD

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2016-09-20 16:27:34 +00:00
Ed Maste
397ff3b872 auditdistd: update for sys/capability.h rename in r263232 2016-09-20 12:58:28 +00:00
Mark Johnston
feba6b4163 libdwarf: Add definitions for Apple's DWARF extension attributes.
Reviewed by:	emaste
MFC after:	1 week
2016-09-20 00:22:35 +00:00
Ed Maste
568415f29d tcpdump: remove sys/capability.h #include
sys/capability.h is just a backwards compatibility wrapper around
sys/capsicum.h, which is already #included.
2016-09-19 17:51:56 +00:00
Andrew Turner
27044e1770 Fix the asm on the memchr and strchr functions.
Add an alias from index to strchr as is done in the libc C implementation.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-09-19 14:36:16 +00:00
Andrew Turner
09a53ad8f1 Import the Linaro Cortex Strings library into contrib.
Sponsored by:	The FreeBSD Foundation
2016-09-19 13:12:09 +00:00
Enji Cooper
97bb4528d9 Remove expected failure for :basic (effectively reverting r305007, r305031)
This no longer fails as of r305952

PR:		212193
Sponsored by:	Dell EMC Isilon
2016-09-19 06:39:08 +00:00
Martin Matuska
24113d8c17 MFV r305816:
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged in r304989.

MFC after:	1 week
Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f
2016-09-14 21:15:01 +00:00
Simon J. Gerraty
95e3ed2cdb Update to bmake-20170818
This version has some new knobs for dealing with troublesome targets
in meta mode.
2016-09-09 01:09:39 +00:00
Enji Cooper
3d1eb084e9 Fix tests/sys/kqueue NetBSD tests on 32-bit platforms by using proper
format specifier for pointers when printing them out with printf(3)

MFC after:	57 days
Pointyhat to:	ngie
Reported by:	bz, cy, Jenkins (i386 job)
Submitted by:	cy
Sponsored by:	EMC / Isilon Storage Division
2016-09-06 17:22:25 +00:00
Enji Cooper
8f2b5a5469 Port contrib/netbsd-tests/kernel/kqueue/... as tests/sys/kqueue/...
proc2_test must be skipped because the invariant tested
(`ke.fflags & NOTE_TRACKERR`) doesn't pass.

MFC after:	58 days
Submitted by:	kib (earlier form)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6172
2016-09-06 08:50:21 +00:00
Enji Cooper
7be8de4271 Fix lib/libc/rpc test assumptions added in r305358
- Require root in the tcp/udp subtests (it's needed on FreeBSD when
  registering services).
- Skip the tests if service registration fails.

MFC after:	59 days
X-MFC with:	r305358
Reported by:	Jenkins, rodrigc
Sponsored by:	EMC / Isilon Storage Division
2016-09-06 01:07:12 +00:00
Dimitry Andric
18c0121132 Define libcpp's HAVE_DESIGNATED_INITIALIZERS in a defined and portable
way.

MFC after:	3 days
2016-09-05 18:02:37 +00:00
Martin Matuska
47af42f8e7 MFV r305420:
Sync libarchive with vendor

Vendor issues fixed:
PR #777: Multiple bugfixes for setup_acls()

This includes a bugfix for a bug that caused ACLs not to be read properly
for files and directories inside subdirectories and as a result not being
stored or being incorrectly stored in tar archives.

MFC after:	3 days
2016-09-05 15:40:41 +00:00