Commit Graph

249154 Commits

Author SHA1 Message Date
Brandon Bergren
ded22b4527 Now that there are no remaining users of ld.bfd, remove the ld subdir. 2020-03-27 01:12:11 +00:00
Brandon Bergren
12d3a32659 Bump for powerpc/powerpcspe switch to lld. 2020-03-27 01:03:48 +00:00
Brandon Bergren
a04ec978b3 [PowerPC] Switch powerpc and powerpcspe to lld
Now that LLD 10 is out, and required patches have landed, we are now ready
to finally switch away from the ancient in-tree ld.bfd.

Special thanks to Fangrui Song for many hours of work on getting the
32-bit powerpc lld ready for prime-time.

Reviewed by:	emaste (earlier revision), jhibbits
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D24111
2020-03-27 01:00:03 +00:00
Jung-uk Kim
3ee58df503 Merge ACPICA 20200326. 2020-03-27 00:29:33 +00:00
Jung-uk Kim
a117a0a6c8 Import ACPICA 20200326. 2020-03-26 21:13:14 +00:00
Alfredo Dal'Ava Junior
f1343c7f67 msun: swap words order instead of bits order on BIG ENDIAN
The "for" loop on big endian was inverting all the bits instead of
just the words

Issue reported by TestSuite (msun lib nan_test case)

Submitted by:	Renato Riolino <renato.riolino@eldorado.org.br>
Submitted by:	Fernando Valle <fernando.valle@eldorado.org.br>
Reviewed by:	pfg, alfredo
Approved by:	jhibbits (mentor)
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D23926
2020-03-26 18:50:54 +00:00
Mateusz Piotrowski
68fbe6f0b3 Do not use macros in -width
They do not expand.

MFC after:	1 day
2020-03-26 17:58:52 +00:00
Dimitry Andric
aec4c088fd Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.0-0-gd32170dbd5b (aka 10.0.0 release).

PR:		244251
MFC after:	6 weeks
X-MFC-With:	358851
2020-03-26 17:46:32 +00:00
Dimitry Andric
eb4ff84dc5 Vendor import of llvm-project tag llvmorg-10.0.0-0-gd32170dbd5b (aka
10.0.0 release).
2020-03-26 17:40:50 +00:00
Brooks Davis
daa006f84b Install expected kyua docs.
The "kyua about" command assumes these files exist causing tests
supplied devel/kyua to fail.

Fix a bug defining the default KYUA_DOCDIR so the installed files can be
found.

Reported by:	jenkins tests
Reviewed by:	lwhsu
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24187
2020-03-26 17:34:17 +00:00
Dimitry Andric
6dce2be1c7 Merge commit 459e8e948 from llvm git (by Justin Hibbits):
[PowerPC]: Don't allow r0 as a target for LD_GOT_TPREL_L/32

  Summary:
  The linker is free to relax this (relocation R_PPC_GOT_TPREL16)
  against R_PPC_TLS, if it sees fit (initial exec to local exec). If r0
  is used, this can generate execution-invalid code (converts to 'addi
  %rX, %r0, FOO, which translates in PPC-lingo to li %rX, FOO). Forbid
  this instead.

  This fixes static binaries using locales on FreeBSD/powerpc (tested
  on FreeBSD/powerpcspe).

  Reviewed By: nemanjai
  Differential Revision: https://reviews.llvm.org/D76662

Requested by:	jhibbits
MFC after:	6 weeks
X-MFC-With:	358851
2020-03-26 17:28:54 +00:00
Dimitry Andric
5b5f869e87 Merge commit f0990e104 from llvm git (by Justin Hibbits):
[PowerPC]: e500 target can't use lwsync, use msync instead

  The e500 core has a silicon bug that triggers an illegal instruction
  program trap on any sync other than msync. Other cores will typically
  ignore illegal sync types, and the documentation even implies that
  the 'illegal' bits are ignored.

  Address this hardware deficiency by only using msync, like the PPC440.

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

Requested by:	jhibbits
MFC after:	6 weeks
X-MFC-With:	358851
2020-03-26 17:27:41 +00:00
Mark Johnston
4596ac234e compat/linux/linux.h depends on queue.h since r353725.
Sponsored by:	The FreeBSD Foundation
2020-03-26 17:12:55 +00:00
Mark Johnston
355b3b7fd7 Simplify td_ucred handling in newnfs_connect().
No functional change intended.

MFC after:	1 week
2020-03-26 15:02:56 +00:00
Mark Johnston
b7e3a3b6e1 Remove unused SYSINIT macros for capability rights.
Static rights are initialized in cap_rights_sysinit().

MFC after:	1 week
2020-03-26 15:02:37 +00:00
Leandro Lupori
f6f325c837 [PowerPC64] Fix OPAL IPMI driver
This change fixes a couple of issues with OPAL IPMI driver and
implements a mechanism to detect timeouts and discard old messages left
in receive queue, to avoid old messages from being confused with the
reply of new ones.

Reviewed by:	jhibbits
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D24185
2020-03-26 12:17:49 +00:00
Andrey V. Elsukov
ccf8b02c94 Fix typo.
MFC after:	2 weeks
2020-03-26 12:00:26 +00:00
Andrey V. Elsukov
7d367c51c8 Add property-based filters for syslogd.
Property-based filters allow substring and regular expressions
(see re_format(7)) matching against various message attributes.
Filter specification starts with '#:' or ':' followed by three
comma-separated fields property, operator, "value". Value must be
double-quoted. A double quote and backslash must be escaped by a
blackslash.

Following properties are supported as test value:
o msg - body of the message received;
o programname - program name sent the message;
o hostname - hostname of message's originator;
o source - an alias for hostname.

Supported operators:
o contains - true if filter value is found as a substring of property;
o isequal - true if filter value is equal to property;
o startswith - true if property starts with filter value;
o regex - true if property matches basic regular expression defined
    in filter value;
o ereregex - true if property matches extended regular expression
    defined in filter value;

Operator may be prefixed by '!' to invert compare logic or by
'icase_' to make comparison function case insensitive.

Submitted by:	Boris N. Lytochkin <lytboris at gmail com>
MFC after:	2 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D23468
2020-03-26 11:54:25 +00:00
Sergio Carlavilla Delgado
8e76d7909d Add HISTORY sections to log(3) man page
PR:		240265
Submitted by:	gbergling@gmail.com
Approved by:	bcr@(mentor), imp@
MFC after:	1 day
Differential Revision:	https://reviews.freebsd.org/D24148
2020-03-26 11:24:43 +00:00
Alexander Leidinger
95d32ad641 Remove deprecated options. 2020-03-26 09:23:16 +00:00
Emmanuel Vadot
eb61f7bdf2 Stop building libl and liby
Those libs aren't needed anymore so stop building them for the bootstrap tools
or the compat libs.

Reviewed by:	bapt, emaste
X-Differential Revision:	D24171
2020-03-26 08:23:09 +00:00
Hans Petter Selasky
a0be362828 Be more intelligent when classifying USB audio terminal types, so that we
don't end up using SOUND_MIXER_VOLUME for all undefined types.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-03-26 07:52:04 +00:00
Hans Petter Selasky
91feacd19e Make mute controls available for USB audio mixers.
Submitted by:	Horse Ma <Shichun.Ma@dell.com>
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-03-26 07:46:16 +00:00
Hans Petter Selasky
edabe1ee6d Factor out USB audio mixer value range check.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-03-26 07:42:36 +00:00
Hans Petter Selasky
7e88777b24 Avoid scaling USB audio mixer values twice.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-03-26 07:37:00 +00:00
Conrad Meyer
ca0ec73c11 Expand generic subword atomic primitives
The goal of this change is to make the atomic_load_acq_{8,16},
atomic_testandset{,_acq}_long, and atomic_testandclear_long primitives
available in MI-namespace.

The second goal is to get this draft out of my local tree, as anything that
requires a full tinderbox is a big burden out of tree.  MD specifics can be
refined individually afterwards.

The generic implementations may not be ideal for your architecture; feel
free to implement better versions.  If no subword_atomic definitions are
needed, the include can be removed from your arch's machine/atomic.h.
Generic definitions are guarded by defined macros of the same name.  To
avoid picking up conflicting generic definitions, some macro defines are
added to various MD machine/atomic.h to register an existing implementation.

Include _atomic_subword.h in arm and arm64 machine/atomic.h.

For some odd reason, KCSAN only generates some versions of primitives.
Generate the _acq variants of atomic_load.*_8, atomic_load.*_16, and
atomic_testandset.*_long.  There are other questionably disabled primitives,
but I didn't run into them, so I left them alone.  KCSAN is only built for
amd64 in tinderbox for now.

Add atomic_subword implementations of atomic_load_acq_{8,16} implemented
using masking and atomic_load_acq_32.

Add generic atomic_subword implementations of atomic_testandset_long(),
atomic_testandclear_long(), and atomic_testandset_acq_long(), using
atomic_fcmpset_long() and atomic_fcmpset_acq_long().

On x86, add atomic_testandset_acq_long as an alias for
atomic_testandset_long.

Reviewed by:	kevans, rlibby (previous versions both)
Differential Revision:	https://reviews.freebsd.org/D22963
2020-03-25 23:12:43 +00:00
Alfredo Dal'Ava Junior
9b2877353b so_reuseport_lb_test: correct setsockopt parameter size
Change type of variable used in setsocketopt so correct size of
option is passed.

Test failure was identified when running the test on PowerPC64,
and the following error message was seen:

	"bind () failed: Address already in use"

Submitted by:	Fernando Valle <fernando.valle@eldorado.org.br>
Reviewed by:	melifaro, adalava
Approved by:	jhibbits (mentor)
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D24164
2020-03-25 20:20:08 +00:00
Simon J. Gerraty
53f151f906 Fix pkgfs stat so it satisfies libsecureboot
We need a valid st_dev, st_ino and st_mtime
to correctly track which files have been verified
and to update our notion of time.

ve_utc_set(): ignore utc if it would jump our current time
by more than VE_UTC_MAX_JUMP (20 years).

Allow testing of install command via userboot.
Need to fix its stat implementation too.

bhyveload also needs stat fixed - due to change to userboot.h

Call ve_error_get() from vectx_close() when hash is wrong.

Track the names of files we have hashed into pcr

For the purposes of measured boot, it is important
to be able to reproduce the hash reflected in
loader.ve.pcr
so loader.ve.hashed provides a list of names in the order they
were added.

Reviewed by:	imp
MFC after:	1 week
Sponsored by:	Juniper Networks
Differential Revision:	https://reviews.freebsd.org//D24027
2020-03-25 19:12:19 +00:00
Michael Tuexen
7c63520c42 Remove an optimization, which was incorrect a couple of times and
therefore doesn't seem worth to be there.
In this case COOKIE where not retransmitted anymore, when the
socket was already closed.

MFC after:		1 week
2020-03-25 18:20:37 +00:00
Michael Tuexen
37686ccf08 Improve consistency in debug output.
MFC after:		1 week
2020-03-25 18:14:12 +00:00
Ryan Moeller
69534635ff MFOpenZFS: ZVOLs should not be allowed to have children
zfs create, receive and rename can bypass this hierarchy rule. Update
both userland and kernel module to prevent this issue and use pyzfs
unit tests to exercise the ioctls directly.

Note: this commit slightly changes zfs_ioc_create() ABI. This allow to
differentiate a generic error (EINVAL) from the specific case where we
tried to create a dataset below a ZVOL (ZFS_ERR_WRONG_PARENT).

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>

Approved by:	mav (mentor)
MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
openzfs/zfs@d8d418ff0c
2020-03-25 15:56:18 +00:00
Michael Tuexen
24187cfe72 Revert https://svnweb.freebsd.org/changeset/base/357829
This introduces a regression reported by koobs@ when running a pyhton
test suite on a loaded system.

This patch resulted in a failing accept() call, when the association
was setup and gracefully shutdown by the peer before accept was called.
So the following packetdrill script would fail:

+0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
+0.0 bind(3, ..., ...) = 0
+0.0 listen(3, 1) = 0
+0.0 < sctp: INIT[flgs=0, tag=1, a_rwnd=15000, os=1, is=1, tsn=1]
+0.0 > sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=..., os=..., is=..., tsn=1, ...]
+0.1 < sctp: COOKIE_ECHO[flgs=0, len=..., val=...]
+0.0 > sctp: COOKIE_ACK[flgs=0]
+0.0 < sctp: DATA[flgs=BE, len=116, tsn=1, sid=0, ssn=0, ppid=0]
+0.0 > sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=..., gaps=[], dups=[]]
+0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0]
+0.0 > sctp: SHUTDOWN_ACK[flgs=0]
+0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0]
+0.0 accept(3, ..., ...) = 4
+0.0 close(3) = 0
+0.0 recv(4, ..., 4096, 0) = 100
+0.0 recv(4, ..., 4096, 0) = 0
+0.0 close(4) = 0

Reported by:		koops@
2020-03-25 15:29:01 +00:00
Michael Tuexen
23e3c0880d Use consistent debug output.
MFC after:		1 week
2020-03-25 13:19:41 +00:00
Michael Tuexen
e056fafd92 Don't restore the vnet too early in error cases.
MFC after:		1 week
2020-03-25 13:18:37 +00:00
Mateusz Piotrowski
efc7180b5c Fix formatting
Previously, the whole "jail_* variables" string would be stylized
as a variable. This is incorrect.

MFC after:	3 days
2020-03-25 10:11:37 +00:00
Baptiste Daroussin
fdf46c24f0 Revert r359294 per manu's request
It breaks etcupdate

Reported by:	cy
2020-03-25 08:35:55 +00:00
Emmanuel Vadot
483955de74 libpmc: Always add the full include path for libpmcstat
Previously it was only added for aarch64, amd64 and i386
2020-03-25 02:28:47 +00:00
Emmanuel Vadot
77f0f1df8b pkgbase: Stop threating rc files as config files
rc scripts arent configuration files so use FILES instead of CONFS.
While here put rc scripts into related package (sendmail in the FreeBSD-sendmail
package, wpa_supplicant in the FreeBSD-wpa etc ...)

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D24177
2020-03-25 01:36:23 +00:00
Emmanuel Vadot
970d1bbf71 Re-apply r359267 now that tools are using the proper include path
Original commit message:
bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB

f we're building an internal lib do not bother including bsd.incs.mk so we
will not install the headers.
This also "solves" a problem with pkgbase where a libXXX-development package
is created and due to how packages are created we add a dependency to a
libXXX package that doesn't exists.
2020-03-25 01:35:13 +00:00
Emmanuel Vadot
ee55186dfd pmc: Add include path for libpmcstat as it is an internallib
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D24173
2020-03-25 01:32:16 +00:00
Emmanuel Vadot
e055e3367e wlandebug: Add include path for libifconfig as it is a internallib
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D24172
2020-03-25 01:31:26 +00:00
Mitchell Horne
52de22cae7 Makefile.inc1: override MACHINE for native-xtools
For the final step of the native-xtools target, "everything" is built
with TARGET and TARGET_ARCH set to the architecture we wish to
cross-build for. However, CROSSENV overwrites the values of MACHINE and
MACHINE_ARCH, setting them to be identical to TARGET and TARGET_ARCH.
For native-xtools this is undesirable since we are building binaries to
run on the host architecture, that can cross compile for the target
architecture.

When building native-xtools for RISC-V, this issue manifests as an invalid
argument for "-march". The compiler is invoked with the target triple of the
host architecture, but the CFLAGS inherited from bsd.cpu.mk are that of the
target architecture.

Reviewed by:	imp, bdrewery
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D23838
2020-03-24 23:25:54 +00:00
Michael Tuexen
7522682e5e Only call panic when building with INVARIANTS.
MFC after:		1 week
2020-03-24 23:04:07 +00:00
Michael Tuexen
a412576e36 Another cleanup of the timer code. Also be more pedantic about the
parameters of the timer start and stop routines. Several inconsistencies
have been fixed in earlier commits. Now they will be catched when running
an INVARIANTS system.

MFC after:	1 week
2020-03-24 22:44:36 +00:00
Ed Maste
f1af40b54b Makefile.inc1: remove old (2018) stale dependency hacks
We handle a number of stale dependency issues on an ad-hoc basis, in
order to support ongoing NO_CLEAN builds.  These hacks do not need to
be maintained indefinitely; now remove those for issues that are more
than a year old.

Sponsored by:	The FreeBSD Foundation
2020-03-24 21:37:34 +00:00
Justin Hibbits
77cb3b49b7 ichwd: Add Atom C3000 watchdog ID.
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc
2020-03-24 21:28:48 +00:00
Warner Losh
56c995d658 exec{l,v}{e,p} arrived in 7th Edition research Unix to support the Bourne Shell
which introduced environment variables. Document that here. Verified by
consulting the TUHS archive.
2020-03-24 19:33:21 +00:00
Conrad Meyer
704101dd3d Fix PNP matching for iflib NIC drivers
The previous descriptor string specified that all fields were significant for
match.  However, the only significant fields for in-tree drivers are
vendor:devid, and the fictitious zero values constructed by PVID() did not
match real subvendor, subdevice, revision, and/or class values, resulting in no
automatic probe.

If a future iflib driver needs to match on other criteria, the descriptor
string can be updated accordingly.  (E.g., "V32" and ~0 for unspecified values
in PVID().)

Reported by:	mav
Sponsored by:	Dell EMC Isilon
2020-03-24 19:20:10 +00:00
Sergio Carlavilla Delgado
cdb51c125a Correct path in EXAMPLES ypldap.conf.5
PR:		244743
Submitted by:	alex@i.org.ua
Patch by:	alex@i.org.ua
Approved by:	bcr@(mentor), 0mp
MFC after:	1 day
Differential Revision:	https://reviews.freebsd.org/D24144
2020-03-24 19:12:28 +00:00
Mark Johnston
8db2e8fd16 Remove the secondary_stacks array in arm64 and riscv kernels.
Instead, dynamically allocate a page for the boot stack of each AP when
starting them up, like we do on x86.  This shrinks the bss by
MAXCPU*KSTACK_PAGES pages, which corresponds to 4MB on arm64 and 256KB
on riscv.

Duplicate the logic used on x86 to free the bootstacks, by using a
sysinit to wait for each AP to switch to a thread before freeing its
stack.

While here, mark some static MD variables as such.

Reviewed by:	kib
MFC after:	1 month
Sponsored by:	Juniper Networks, Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D24158
2020-03-24 18:43:23 +00:00