Commit graph

19520 commits

Author SHA1 Message Date
Ruslan Bukin 7d729cedcc Revert 335888 ("Ensure va_list is declared by including stdarg.h.")
The issue was caused by header pollution brought by GCC 8.1.

We now have to remove include-fixed headers in the GCC installation
directory.

Sponsored by:	DARPA, AFRL
Pointed out by:	jhb
2018-07-03 15:48:34 +00:00
Ruslan Bukin ab40f58ccf o Ensure va_list is declared by including stdarg.h.
o Also move printf.h to go after it since it does require declaration
  of va_list.

This fixes build with latest RISC-V GNU Toolchain with GCC 8.1

Sponsored by:	DARPA, AFRL
2018-07-03 13:53:54 +00:00
Hartmut Brandt 8e9b3e7071 Update bsnmp to version 1.13. This does not bring user-visible changes.
For developers gensnmptree can now generate functions for enums to convert
between enums and strings and to check the validity of a value.
The sources in FreeBSD are now in sync with the upstream which allows to
bring in IPv6 modifications.
2018-07-03 08:44:40 +00:00
Mariusz Zaborski 2da0fcde21 With r335636 C++ program use libcasper.h and capsicum_helpers.h.
Add __BEGIN_DECLS and __END_DECLS to those headers.
2018-07-01 18:58:53 +00:00
Dimitry Andric 55458465af More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths.  Sorry
about all the breakage.

Pointy hat to:	me
MFC after:	2 weeks
X-MFC-With:	r335799
2018-06-30 15:03:22 +00:00
Dimitry Andric fbfca78ed2 Follow-up to r335799 (llvm/clang 6.0.1 update), by regenerating various
headers with new version information defines.

MFC after:	2 weeks
X-MFC-With:	r335799
2018-06-30 10:04:44 +00:00
Dimitry Andric 6ccc06f6cb Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
6.0.1 release (upstream r335540).

Relnotes:	yes
MFC after:	2 weeks
2018-06-29 17:51:35 +00:00
Conrad Meyer e02d32f72e sigaction.2: Minor cleanups
Add vertical space between struct definition and function prototype.

Use "NULL" to describe zero pointers, instead of "zero."

Remove perhaps unclear "can not" and replace.  Tag struct member names used
with appropriate tags.
2018-06-28 18:17:20 +00:00
Bryan Drewery 96a0acc4ce Don't use CCACHE for linking.
MFC after:	2 weeks
Sponsored by:	Dell EMC
2018-06-27 19:29:15 +00:00
Dimitry Andric 70d5b95606 Vendor import of compiler-rt 6.0.1 release r335540:
https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_601/final@335540
2018-06-27 19:14:44 +00:00
Dimitry Andric 1f031ccac5 Vendor import of clang 6.0.1 release r335540:
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_601/final@335540
2018-06-27 19:14:32 +00:00
Dimitry Andric eb1edd4d59 Vendor import of llvm 6.0.1 release r335540:
https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_601/final@335540
2018-06-27 19:14:09 +00:00
Bryan Drewery f272627fcd Rework check for libclang_rt to see if the needed library exists.
Currently libclang_rt is not provided for cross-building and as such
is not connected to cross-tools.  For building clang once in universe
it is likely that libclang_rt won't exist for the universe toolchain
but even if it did it would not support anything but the native arch.
So explicitly check for support before enabling h_raw.

MFC after:	1 week
Reviewed by:	dim
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D16012
2018-06-27 16:56:46 +00:00
Mariusz Zaborski 00e9473388 [libcasper] Use explicit_bzero instead of memset to clear pwd struct
Submitted by:	David Carlier <devnexen@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D16015
2018-06-26 19:57:47 +00:00
Ben Woods 217df2da08 geli attach multiple providers
Allow attaching of multiple geli providers at once if they use same
passphrase and keyfiles.

This is helpful when the providers being attached are not used for boot,
and therefore the existing code to first try the cached password when
tasting the providers during boot does not apply.

Multiple providers with the same passphrase and keyfiles can be attached
at the same time during system start-up by adding the following to
rc.conf:
  geli_groups="storage backup"
  geli_storage_flags="-k /etc/geli/storage.keys"
  geli_storage_devices="ada0 ada1"
  geli_backup_flags="-j /etc/geli/backup.passfile -k /etc/geli/backup.keys"
  geli_backup_devices="ada2 ada3"

Reviewed by:	wblock, delphij, jilles
Approved by:	sobomax (src), bcr (doc)
Differential Revision:	https://reviews.freebsd.org/D12644
2018-06-26 18:07:16 +00:00
Hans Petter Selasky dfd30b26a9 Improve the userspace USB string reading function in LibUSB.
Some USB devices does not allow a partial descriptor readout.

Found by:		bz @
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2018-06-26 16:00:16 +00:00
Brad Davis 9ad8ab5438 Add a file missed in r335645.
Approved by:	brooks, allanjude (mentor)
Differential Revision:	https://reviews.freebsd.org/D15360
2018-06-25 21:54:39 +00:00
Brooks Davis e4b0a90e77 Normalize the g(eom,cache,part,...) build.
Rather then combining hardlink creation for the geom(8) binary with
shared library build, move libraries to src/lib/geom so they are
built and installed normally.  Create a common Makefile.classes
which is included by both lib/geom/Makefile and sbin/geom/Makefile
so the symlink and libraries stay in sync.

The relocation of libraries allows libraries to be build for 32-bit
compat.  This also reduces the number of non-standard builds in
the system.

This commit is not sufficent to run a 32-bit /sbin/geom on a 64-bit
system out of the box as it will look in the wrong place for libraries
unless GEOM_LIBRARY_PATH is set appropriatly in the environment.

Reviewed by:	bdrewery
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15360
2018-06-25 19:55:15 +00:00
Eitan Adler bec6dc30e1 users(1): Use capsicum helpers for users
In doing so also fix the libcasper.h header to work in C++.
2018-06-25 11:44:41 +00:00
Mariusz Zaborski 9324388b0a Document libcasper_service.
Reviewed by:	bcr@
Differential Revision:	https://reviews.freebsd.org/D15766
2018-06-23 20:12:30 +00:00
Bryan Drewery caf90252d5 Revert r335449 and add needed MK_LLD_BOOTSTRAP check for SRCS_MIW.
This effectively reverts r335449 and changes the previous MK_LLD_IS_LD
to a MK_LLD_BOOTSTRAP check.  If !TOOLS_PREFIX then these sources are
always built for llvm-objdump, lld, and llvm-cov.  When TOOLS_PREFIX
is set then they are only needed if lld is being bootstrapped.

Reported by:	dim
Pointyhat to:	bdrewery
Sponsored by:	Dell EMC
2018-06-22 17:58:56 +00:00
Dimitry Andric cbafd2630b Add support for selectively enabling LLVM targets
This makes it possible, through src.conf(5) settings, to select which
LLVM targets you want to build during buildworld.  The current list is:

* (WITH|WITHOUT)_LLVM_TARGET_AARCH64
* (WITH|WITHOUT)_LLVM_TARGET_ARM
* (WITH|WITHOUT)_LLVM_TARGET_MIPS
* (WITH|WITHOUT)_LLVM_TARGET_POWERPC
* (WITH|WITHOUT)_LLVM_TARGET_SPARC
* (WITH|WITHOUT)_LLVM_TARGET_X86

To not influence anything right now, all of these are on by default, in
situations where clang is enabled.

Selectively turning a few targets off manually should work.  Turning on
only one target should work too, even if that target does not correspond
to the build architecture.  (In that case, LLVM_NATIVE_ARCH will not be
defined, and you can only use the resulting clang executable for
cross-compiling.)

I performed a few measurements on one of the FreeBSD.org reference
machines, building clang from scratch, with all targets enabled, and
with only the x86 target enabled.  The latter was ~12% faster in real
time (on a 32-core box), and ~14% faster in user time.  For a full
buildworld the difference will probably be less pronounced, though.

Reviewed by:	bdrewery
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D11077
2018-06-22 15:00:00 +00:00
Ian Lepore 25b10ed4b7 Add some words clarifying that rename(2) does nothing when the 'from' and
'to' args are the same file.  Wording borrowed from POSIX.1-2017, but
the freebsd code to implement this behavior was added in 2002 (r103180).
2018-06-21 15:21:17 +00:00
Bryan Drewery a883ed8c1d Fix sources needed for lld.
lld always needs these DWARF sources, as well as other default and extra
tools. XDL seems to be the best fit list.

Remove MK_LLD_IS_LD check from SRCS_MIW which is now reduced to just a
few files for llvm-objdump.

Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D15915
2018-06-20 16:10:10 +00:00
Bryan Drewery 781872781e Rework WITHOUT_LLD/TOOLCHAIN fix from r327892 for cross-tools.
MK_LLD is for the installed lld while MK_LLD_BOOTSTRAP is for the build
tool.  For WITH_SYSTEM_LINKER it is necesarry to separate the logic of
these two.  When building libllvm TOOLS_PREFIX will be defined and
MK_LLD_BOOTSTRAP should be checked instead.

Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D15837
2018-06-20 16:10:07 +00:00
Stephen J. Kiernan b6b5dcf2d1 This library allows for user space applications to check file descriptors
or paths to see if they can be verified by MAC/veriexec.

Reviewed by:	jtl, wblock
Obtained from:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D8562
2018-06-20 00:55:18 +00:00
Mariusz Zaborski 68b2ec19e1 Fix typo. 2018-06-19 22:19:42 +00:00
Mariusz Zaborski 24881c060c libnv: Add nvlist_append_*_array() family of functions.
The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions
allows to dynamically extend array stored in the nvlist.

Submitted by:	Mindaugas Rasiukevicius <rmind@netbsd.org>
2018-06-18 22:57:32 +00:00
Mariusz Zaborski 8f2285b26d libnv: add regression test for r335344. 2018-06-18 22:22:06 +00:00
Mariusz Zaborski d82e41b6b8 libnv: Remove nvlist argument from cnvlist_{take,free}_* functions.
All information which are need for those operations is already stored in
the cookie.

We decided not to bump libnv version because this API is not used yet in the
base system.

Reviewed by:	pjd
2018-06-18 21:26:58 +00:00
Eitan Adler 8a3255c288 libcapsicum: adding missing man page links 2018-06-18 04:58:48 +00:00
Eitan Adler 250d25d535 liby: rewrite yyerror.h
In order to prevent confusion about copyright, rewrite from scratch
yyerror.h. See discussion on r335270 for details.
2018-06-17 18:05:27 +00:00
Eitan Adler 62a0731304 liby: build with WARNS=6
Tested with amd64, arm64, i386, mips
2018-06-16 23:50:34 +00:00
Devin Teske a0d7de3b11 Fix comparison between pointer and char literal
PR:		misc/204252
Reported by:	David Binderman <dcb314@hotmail.com>
MFC after:	3 days
X-MFC-to:	stable/11, stable/10
2018-06-16 20:00:41 +00:00
Konstantin Belousov b1bd4736a9 Remove unused file.
The thr_new(2) syscall is called through libc stub.  r154212 stopped
generating it for libthr but did not cleaned the unused remnants.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2018-06-16 17:11:23 +00:00
Konstantin Belousov f39bffc62c Rework ofed build.
Aligns the build with the FreeBSD traditional approach to not build in
contrib/, and to track inter-dependencies between libraries.

With help from:	bdrewery
Reviewed by:	bdrewery, hselasky
Sponsored by:	Mellanox Technologies
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D15648
2018-06-16 15:05:05 +00:00
Bryan Drewery b6b193e9d8 Put in temporary hacks for jevents.
- Handle 'make clean'
- Don't try building it locally, just fail instead.

jevents should really be merged into lib/libpmc/Makefile.
2018-06-15 19:19:36 +00:00
Marcelo Araujo 23fe789d78 Fix style(9) space vs tab.
Reviewed by:	jhb
MFC after:	3 weeks.
Sponsored by:	iXsystems Inc.
Differential Revision:	https://reviews.freebsd.org/D15774
2018-06-14 01:28:55 +00:00
Edward Tomasz Napierala 8f9c737173 Get rid of references to /usr/share/doc/ from ports(7) and getosreldate(3).
The handbooks are not installed there anymore. While here, improve the
URLs markup a bit.

Reviewed by:	allanjude@
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15793
2018-06-13 18:34:49 +00:00
Eitan Adler 9d70d354df atoi.3: bump .Dd
I touched the man page. Bump Dd by just over 15 years.
2018-06-13 09:07:24 +00:00
Eitan Adler b8c2a54728 libc: remove explicit cast NULL in atoi
There isn't any reason to cast NULL so just remove it. Noticed when
cleaning up top.

Reviewed by:	pstef
2018-06-13 08:52:17 +00:00
Ryan Libby 2ef5e36473 pmc gcc fixups
Fix the build of lib/libpmc and usr.sbin/pmc for gcc on amd64.

Reviewed by:    mmacy
Sponsored by:   Dell EMC Isilon
Differential Revision:  https://reviews.freebsd.org/D15723
2018-06-11 16:09:54 +00:00
Konstantin Belousov 6609261660 libc qsort(3): stop aliasing.
Qsort swap code aliases the sorted array elements to ints and longs in
order to do swap by machine words.  Unfortunately this breaks with the
full code optimization, e.g. LTO.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83201 which seems to
reference code directly copied from libc/stdlib/qsort.c.

PR:	228780
Reported by:	mliska@suse.cz
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D15714
2018-06-10 17:54:44 +00:00
John Baldwin 6387091e9a Use __SCSSID() for SCCS IDs.
While here, fix $FreeBSD$ ID in ftime.c to use __FBSDID instead of a static
array.
2018-06-10 02:34:41 +00:00
Matt Macy 456eeabebc pmc: fix logic in skipping riscv 2018-06-09 02:25:18 +00:00
Matt Macy 6159b91c1f pmc: don't build on riscv where there's no kmod support 2018-06-09 02:15:45 +00:00
Matt Macy a72a9036d3 libpmc: add missed (uintmax_t) casts 2018-06-07 03:19:21 +00:00
Matt Macy f992dd4b5c pmc: convert native to jsonl and track TSC value of samples
- add '-j' options to filter to enable converting native pmc
  log format to json lines format to enable the use of scripts
  and external tooling

% pmc filter -j pmc.log pmc.jsonl

- Record the tsc value in sampling interrupts as opposed to
  recording nanotime when the sample is copied to a global log
  in hardclock - potentially many milliseconds later.

- At initialize record the tsc_freq and the time of day to give
  us an offset for translating the tsc values in callchain records
2018-06-07 02:03:22 +00:00
Matt Macy 1b000b505b libpmc: simplify lookup by idx 2018-06-07 00:55:17 +00:00
Conrad Meyer 9316908f48 strdup.3: Document standardization in POSIX
Sponsored by:	Dell EMC Isilon
2018-06-06 21:32:49 +00:00