Commit Graph

20545 Commits

Author SHA1 Message Date
John Baldwin
b662204f54 Sync target triple generation with the version in Makefile.inc1.
Reviewed by:	dim
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D22333
2019-11-12 21:35:05 +00:00
Jason Evans
f2cb29075f Revert r354605: Update jemalloc to version 5.2.1.
Compilation fails for non-llvm-based platforms.
2019-11-11 05:06:49 +00:00
Jason Evans
e1c167d019 Update jemalloc to version 5.2.1. 2019-11-11 03:27:14 +00:00
Xin LI
48c779cdec MFV r354582: file 5.37.
MFC after:	3 days
2019-11-10 17:00:23 +00:00
Rick Macklem
51e069ac10 Update the copy_file_range man page to reflect the semantic change
done by r354574.

This is a content change.
2019-11-10 01:13:41 +00:00
Bjoern A. Zeeb
1802a6b5b8 libipsec: correct a typo
Correct a typo in the ipsec_errlist and replicated in a comment.
No functional changes.

MFC after:	3 weeks
2019-11-09 21:59:29 +00:00
Rick Macklem
fef163e117 Update the copy_file_range.2 man page to reflect the semantic change
implemented by r354564.

This is a content change.
2019-11-08 23:49:27 +00:00
Emmanuel Vadot
f3dbece807 libpmc: Forgot regex.h
Reported by:	ci
MFC after:	1 week
X-MFC-With:	r354549
2019-11-08 17:27:20 +00:00
Emmanuel Vadot
a0ac5706af libpmc: Match on the cpuid with a regex
The CPUID is, or can be, a regex to be matched.
Use regex from libc instead of strcmp

Tested-by:	gallatin
MFC after:	1 week
2019-11-08 16:56:48 +00:00
Ed Maste
9dc7ed6253 kvm: fix types for cross-debugging
As with other libkvm interfaces use maximum-sized types to support
cross-debugging (e.g. a 64-bit vmcore on a 32-bit host).  See
https://lists.freebsd.org/pipermail/svn-src-all/2019-February/176051.html
for further discussion.

This is an API-breaking change, but there are few consumers of this
interface today.

Reviewed by:	will
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21945
2019-11-08 14:51:09 +00:00
Kyle Evans
20cb0deaa2 csu: Fix dynamiclib/init_test:jcr_test on !HAVE_CTORS archs
.jcr still needs a 0-entry added in crtend, even on !HAVE_CTORS archs, as
we're still getting .jcr sections added -- presumably due to the reference
in crtbegin. Without this terminal, the .jcr section (without data) overlaps
with the next section and register_classes in crtbegin will be examining the
wrong item.

PR:		241439
Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D22132
2019-11-08 14:28:39 +00:00
Li-Wen Hsu
12c4ab4377 Get the fix in back by reverting the part accidentally included in r354491.
This brings back r354467.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-11-07 23:57:48 +00:00
Brooks Davis
a4330302f2 libcompat: build 32-bit rtld and ldd as part of "everything"
Alter bsd.compat.mk to set MACHINE and MACHINE_ARCH when included
directly so MD paths in Makefiles work. In the process centralize
setting them in LIBCOMPATWMAKEENV.

Alter .PATH and CFLAGS settings in work when the Makefile is included.

While here only support LIB32 on supported platforms rather than always
enabling it and requiring users of MK_LIB32 to filter based
TARGET/MACHINE_ARCH.

The net effect of this change is to make Makefile.libcompat only build
compatability libraries.

Changes relative to r354449:

Correct detection of the compiler type when bsd.compat.mk is used
outside Makefile.libcompat.  Previously it always matched the clang
case.

Set LDFLAGS including the linker emulation for mips where -m32 seems to
be insufficent.

Reviewed by:	imp, kib (origional version in r354449)
Obtained from:	CheriBSD (conceptually)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D22251
2019-11-07 22:58:10 +00:00
Brooks Davis
271d2989ba Fix declaration of S1 by swapping misplaced ',' and ';'.
Reported by:	kargl
Obtained from:	OpenBSD (tb@openbsd.org)
MFC after:	1 week
2019-11-07 19:31:56 +00:00
Brooks Davis
1edbf0e9ba Revert change accidentally included in r354465.
Will recommit with a proper commit message shortly.
2019-11-07 19:28:03 +00:00
Brooks Davis
ccad77fe1e Revert r354449: libcompat: build 32-bit rtld and ldd as part of "everything"
Additional testing is required..
2019-11-07 19:22:51 +00:00
Phil Shafer
67322d1642 Import libxo-1.3.1:
- handle argv[0] without '/'
- add test case for argv[0] without '/'
2019-11-07 18:06:44 +00:00
Phil Shafer
90fdd56876 Back out encoder compilation to unbreak HEAD. 2019-11-07 07:09:28 +00:00
Phil Shafer
76afb20c58 Import libxo-1.3.0:
- move from "oxtradoc" to RST/Sphinx documentation
- new "csv" encoder, which allows path and leaf lists
- address warnings from PVS-Stdio tool
- add "xolint" detected errors to the documentation
2019-11-07 03:57:04 +00:00
Conrad Meyer
c8b5e3de39 Fix llvm-libunwind userspace build on ARM
GCC's libgcc exports a few ARM-specific symbols for ARM EABI, AEABI, or
EHABI or whatever it's called.  Export the same ones from LLVM-libunwind's
libgcc_s, on ARM.  As part of this, convert libgcc_s from a direct
Version.map to one constructed from component Symbol.map files.  This allows
the ARM-specific Symbol.map to be included only on ARM.

Fix ARM-only oddities in struct name/aliases in LLVM-libunwind to match
non-ARM definitions and ARM-specific expectations in libcxxrt /
libcompiler_rt.

No functional change intended for non-ARM architectures.

This commit does not actually flip the switch for ARM defaults from libgcc
to llvm-libunwind, but makes it possible (to compile, anyway).
2019-11-05 03:20:40 +00:00
Ed Maste
6a2a926d5f libpmc: jevents: handle empty descriptoin
PR:		241258
Reported by:	sigsys @ gmail.com
Obtained from:	github.com/andikleen/pmu-tools commit bb3c77ed61
MFC after:	3 days
2019-11-04 22:52:02 +00:00
Dimitry Andric
f68ff1ac1c Add __isnan()/__isnanf() aliases for compatibility with glibc and CUDA
Even though clang comes with a number of internal CUDA wrapper headers,
compiling sample CUDA programs will result in errors similar to:

In file included from <built-in>:1:
In file included from /usr/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:204:
/usr/home/arr/cuda/var/cuda-repo-10-0-local-10.0.130-410.48/usr/local/cuda-10.0//include/crt/math_functions.hpp:2910:7: error: no matching function for call to '__isnan'
  if (__isnan(a)) {
      ^~~~~~~
/usr/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function
__DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
               ^

CUDA expects __isnan() and __isnanf() declarations to be available,
which are glibc specific extensions, equivalent to the regular isnan()
and isnanf().

To provide these, define __isnan() and __isnanf() as aliases of the
already existing static inline functions __inline_isnan() and
__inline_isnanf() from math.h.

Reported by:	arrowd
PR:		241550
MFC after:	1 week
2019-11-02 16:59:53 +00:00
Alan Somers
ca64a75eda geli: raise WARNS to 6
MFC after:	2 weeks
Sponsored by:	Axcient
2019-11-01 02:48:43 +00:00
Conrad Meyer
dd4c0b5a6c libexecinfo test: Don't strip installed test
It turns out that a test of backtrace symbol resolution and formatting
requires symbols.  Another option mightt be building with -rdynamic instead,
but this works for now.

Re-enabled skipped CI test, as it should now pass.

PR:		241562
Submitted by:	lwhsu
Reported by:	lwhsu
X-MFC-With:	r354126, r354135, r354144
2019-10-29 18:24:36 +00:00
Conrad Meyer
43e9023f2d libexecinfo: Integrate NetBSD test into FreeBSD 2019-10-27 05:32:08 +00:00
Alan Somers
cefbdf3eaa Commit missing file from r354116
Pointy-hat-to:	Me
Reported by:	Dan Mack
MFC after:	2 weeks
MFC-With:	354116
2019-10-26 19:20:59 +00:00
Conrad Meyer
499fe48de8 Sync up with NetBSD libexecinfo changes 2014-2019
Drop portions that are unlit or redundant with llvm-libunwind: builtin.c,
unwind.h, and unwind_arm_ehabi_stub.c.

This code should now work with -fPIE binaries, should we choose to build any
that way.

When backtrace() array is full, signal an error so the underlying
Itanium-style C++ exception handling library (llvm-libunwind) knows to stop
tracing instead of continuing.  (It should stop on its own when it finishes
unwinding, so this is mostly an extra seatbelt against an infinite loop bug
in the unwinder.)
2019-10-26 06:59:59 +00:00
Simon J. Gerraty
18e2fbc0d8 Initialize verbosity and debug level from env
For EFI at least, we can seed the environment
with VE_VERBOSE etc.

Reviewed by:	stevek imp
Sponsored by:	Juniper Networks
MFC after:	1 week
Differential Revision:  https://reviews.freebsd.org/D22135
2019-10-24 19:50:18 +00:00
Conrad Meyer
5ffc069a3a libthr: Add missing END() directive for umtx_op_err (amd64)
Like r353929, related to D22122.  No functional change.

Reviewed by:	emaste, kib (earlier version both)
2019-10-23 18:27:30 +00:00
Conrad Meyer
168f19a57b libm: Add missing END() directives for amd64 routines
No functional change.  Related to D22122.

Reviewed by:	emaste, kib (earlier version both)
2019-10-23 16:05:52 +00:00
Kyle Evans
b3bec79d36 cap_sysctl: correct typo from r347534-ish
operation & ~limit where limit is a bool is clearly not what was intended,
given the line prior. Correct it to use the calculated mask for validation.

The cap_sysctl tests should now be functional again.
2019-10-23 03:23:14 +00:00
Kyle Evans
e735aa5a74 libcasper/services: include <src.opts.mk> to hook tests to build
Note that the cap_sysctl tests are currently failing and need some
attention.
2019-10-23 01:50:41 +00:00
Mitchell Horne
869fe6d515 Fix build of LLVM RISC-V backend
Reviewed by:	dim
MFC with:	r353358
Differential Revision:	https://reviews.freebsd.org/D21963
2019-10-18 01:46:38 +00:00
Brooks Davis
a1d5358777 Remove obsolete, non-use of CLANG_NO_IAS.
CLANG_NO_IAS was removed in r351661.
2019-10-18 00:00:17 +00:00
Kyle Evans
1dc8556358 libbe(3): Fix destroy of imported BE w/ AUTOORIGIN
Imported BE, much like the activated BE, will not have an origin that we can
fetch/examine for destruction. be_destroy should not return BE_ERR_NOORIGIN
for failure to get the origin property for BE_DESTROY_AUTOORIGIN, because
we don't really know going into it that there's even an origin to be
destroyed.

BE_DESTROY_NEEDORIGIN has been renamed to BE_DESTROY_WANTORIGIN because only
a subset of it *needs* the origin, so 'need' is too strong of verbiage.

This was caught by jenkins and the bectl tests, but kevans failed to run the
bectl tests prior to commit.

Reported by:	lwhsu
2019-10-16 18:33:31 +00:00
Kyle Evans
455d8009b4 libbe(3): add needed bits for be_destroy to auto-destroy some origins
New BEs can be created from either an existing snapshot or an existing BE.
If an existing BE is chosen (either implicitly via 'bectl create' or
explicitly via 'bectl create -e foo bar', for instance), then bectl will
create a snapshot of the current BE or "foo" with be_snapshot, with a name
formatted like: strftime("%F-%T") and a serial added to it.

This commit adds the needed bits for libbe or consumers to determine if a
snapshot names matches one of these auto-created snapshots (with some light
validation of the date/time/serial), and also a be_destroy flag to specify
that the origin should be automatically destroyed if possible.

A future commit to bectl will specify BE_DESTROY_AUTOORIGIN by default so we
clean up the origin in the most common case, non-user-managed snapshots.
2019-10-16 14:43:05 +00:00
Justin Hibbits
6b672ba642 [PowerPC] force applications linked with lib CSU to have .got
Summary:
This forces applications linked with lib CSU to have a .got, fixing binaries
linked with LLD9 after secure-plt was enabled on FreeBSD.

Submitted by:	Alfredo Dal'Ava Junior (alfredo.junior_eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D21476
2019-10-12 20:53:40 +00:00
Ruslan Bukin
8694561d5d Install the libopencsd version header (other headers now depend on it).
Sponsored by:	DARPA, AFRL
2019-10-11 09:18:45 +00:00
Ruslan Bukin
fc5020859f Update ARM CoreSight trace decoder library.
Its latest version merged from:
^/vendor/opencsd/a1961c91b02a92f3c6ed8b145c636ac4c5565aca

Sponsored by:	DARPA, AFRL
2019-10-10 13:30:13 +00:00
Ruslan Bukin
85f87cf491 Update Intel Processor Trace decoder library.
Its latest version merged from:
^/vendor/processor-trace/892e12c5a27bda5806d1e63269986bb4171b5a8b

Sponsored by:	DARPA, AFRL
2019-10-10 12:46:34 +00:00
Dimitry Andric
9122aeeaa6 Merge ^/head r353316 through r353350. 2019-10-09 16:40:22 +00:00
Glen Barber
013f1782dd Connect the libucl(3) manual page to the build.
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (Netgate)
2019-10-09 15:35:22 +00:00
Mitchell Horne
68b6aaa70d RISC-V: Fix an alignment warning in libthr
Compiling with clang gives a loss-of-alignment error due the cast to
uint8_t *. Since the TLS is always tcb aligned and TP_OFFSET is defined
as sizeof(struct tcb) we can guarantee there is no misalignment. Silence
the error by moving the offset into the inline assembly.

Reviewed by:	br
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D21926
2019-10-09 02:02:22 +00:00
Brooks Davis
e593620997 msun: Silence new harmless -Wimplicit-int-float-conversion warnings
Clang from trunk recently added a warning for when implicit int-to-float
conversions cause a loss of precision. The code in question is designed
to be able to handle that, so add explicit casts to silence this.

Submitted by:	James Clarke <jrtc27@jrtc27.com>
Reviewed by:	dim
Obtained from:	CheriBSD
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D21913
2019-10-08 21:39:51 +00:00
Brooks Davis
f189761366 Fix various -Wpointer-compare warnings
This warning (comparing a pointer against a zero character literal
rather than NULL) has existed since GCC 7.1.0, and was recently added to
Clang trunk.

Almost all of these are harmless, except for fwcontrol's str2node, which
needs to both guard against dereferencing a NULL pointer (though in
practice it appears none of the callers will ever pass one in), as well
as ensure it doesn't parse the empty string as node 0 due to strtol's
awkward interface.

Submitted by:	James Clarke <jtrc27@jrtc27.com>
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D21914
2019-10-08 21:14:09 +00:00
Dimitry Andric
063e3a6dcc Prepare for merging back to head:
* Set tentative merge date
* Add UPDATING entry
* Bump __FreeBSD_version
* Bump FREEBSD_CC_VERSION
* Bump LLD_REVISION
2019-10-08 18:21:33 +00:00
Dimitry Andric
8b3bc70a2b Merge ^/head r352764 through r353315. 2019-10-08 18:17:02 +00:00
Edward Tomasz Napierala
1a13f2e6b4 Introduce stats(3), a flexible statistics gathering API.
This provides a framework to define a template describing
a set of "variables of interest" and the intended way for
the framework to maintain them (for example the maximum, sum,
t-digest, or a combination thereof).  Afterwards the user
code feeds in the raw data, and the framework maintains
these variables inside a user-provided, opaque stats blobs.
The framework also provides a way to selectively extract the
stats from the blobs.  The stats(3) framework can be used in
both userspace and the kernel.

See the stats(3) manual page for details.

This will be used by the upcoming TCP statistics gathering code,
https://reviews.freebsd.org/D20655.

The stats(3) framework is disabled by default for now, except
in the NOTES kernel (for QA); it is expected to be enabled
in amd64 GENERIC after a cool down period.

Reviewed by:	sef (earlier version)
Obtained from:	Netflix
Relnotes:	yes
Sponsored by:	Klara Inc, Netflix
Differential Revision:	https://reviews.freebsd.org/D20477
2019-10-07 19:05:05 +00:00
Kyle Evans
036d2e814b Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it around
Diff partially stolen from CheriBSD; these bits need -Wl,-z,notext in order
to build in an LLVM world. They are needed for all flavors/sizes of MIPS.
This will eventually get fixed in LLVM, but it's unclear when.

Reported by:	arichardson, emaste
Differential Revision:	https://reviews.freebsd.org/D21696
2019-10-06 04:19:49 +00:00
Kyle Evans
8495fa081b libusb: LIBUSB_DEBUG environment variable override of libusb_set_debug
The debug level generally just controls verbosity of libusb for debugging
libusb devices/usage. We allow the environment to set the debug level
independent of the application, but the application will always override
this if it explicitly sets the debug level.

Changing the environment is easy, but patching the software to change the
debug level isn't necessarily easy or possible. Further, there's this
write-only debug_fixed variable that would seem to imply that the debug
level should be fixed, but it isn't currently used. Change the logic to use
strtol() so we can detect real 0 vs. conversion failure, then honor
debug_fixed in libusb_set_debug.

Reviewed by:	hselasky
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D21877
2019-10-02 15:19:39 +00:00