]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoopenssh: connect libressl-api-compat.c and regen config.h
Ed Maste [Wed, 3 Oct 2018 16:38:36 +0000 (16:38 +0000)]
openssh: connect libressl-api-compat.c and regen config.h

Differential Revision: https://reviews.freebsd.org/D17390

5 years agoopenssh: add openbsd-compat/libressl-api-compat.c
Ed Maste [Wed, 3 Oct 2018 16:06:17 +0000 (16:06 +0000)]
openssh: add openbsd-compat/libressl-api-compat.c

Missed in migrating changeset from git to svn for r338811

Reported by: jhb

5 years agoUpdate obsolete files list for OpenSSL 1.1.1.
John Baldwin [Tue, 2 Oct 2018 21:40:57 +0000 (21:40 +0000)]
Update obsolete files list for OpenSSL 1.1.1.

This will need a real date once this is merged to head.

One weird thing to note: the 32-bit engines get dumped into /usr/lib32
rather than /usr/lib32/engines, and I bet the 32-bit libcrypto.so i
looking for the .so files in the wrong place.  We should probably fix
both of those at some point.

Reviewed by: emaste, jkim
Differential Revision: https://reviews.freebsd.org/D17384

5 years agoMake sendmail work with OpenSSL 1.1 API. Taken from the ports tree.
Jung-uk Kim [Mon, 1 Oct 2018 20:55:01 +0000 (20:55 +0000)]
Make sendmail work with OpenSSL 1.1 API.  Taken from the ports tree.

https://svnweb.freebsd.org/ports/head/mail/sendmail/files/patch-tls.c?revision=466240

Requested by: gshapiro

5 years agoRevert r338773. A patch from the ports tree will be committed.
Jung-uk Kim [Mon, 1 Oct 2018 20:51:26 +0000 (20:51 +0000)]
Revert r338773.  A patch from the ports tree will be committed.

Requested by: gshapiro

5 years agoDrop pre-AVX toolchain for amd64 and i386 to simplify the makefile.
Jung-uk Kim [Mon, 1 Oct 2018 18:16:36 +0000 (18:16 +0000)]
Drop pre-AVX toolchain for amd64 and i386 to simplify the makefile.

Especially, head does not support old toolchains because of ifunc support.

5 years agoRemove MD dirdeps from Makefile.depend.
Jung-uk Kim [Tue, 25 Sep 2018 22:21:36 +0000 (22:21 +0000)]
Remove MD dirdeps from Makefile.depend.

It can't be right. :-(

5 years agoMake it more meta mode friendly.
Jung-uk Kim [Tue, 25 Sep 2018 22:15:47 +0000 (22:15 +0000)]
Make it more meta mode friendly.

5 years agoFix CLEANFILES.
Jung-uk Kim [Tue, 25 Sep 2018 22:14:52 +0000 (22:14 +0000)]
Fix CLEANFILES.

5 years agoRegen Makefile.depend.
Jung-uk Kim [Tue, 25 Sep 2018 21:12:36 +0000 (21:12 +0000)]
Regen Makefile.depend.

5 years agolibevent: eliminate in-tree usage of arc4random_addrandom
Ed Maste [Tue, 25 Sep 2018 17:41:48 +0000 (17:41 +0000)]
libevent: eliminate in-tree usage of arc4random_addrandom

Apply r338059 to newly-added libevent 2.1.18.

Sponsored by: The FreeBSD Foundation

5 years agoSwitch ntp's embedded libevent to 2.1.18
Ed Maste [Mon, 24 Sep 2018 17:51:56 +0000 (17:51 +0000)]
Switch ntp's embedded libevent to 2.1.18

For OpenSSL 1.1.1 compatibility.

Sponsored by: The FreeBSD Foundation.

5 years agoCopy libevent sources to contrib
Ed Maste [Mon, 24 Sep 2018 16:48:54 +0000 (16:48 +0000)]
Copy libevent sources to contrib

To replace the libevent embedded in ntp, for OpenSSL 1.1.1 compat.

5 years agoImport libevent 2.1.18
Ed Maste [Mon, 24 Sep 2018 16:32:10 +0000 (16:32 +0000)]
Import libevent 2.1.18

This will be used to replace the embedded libevent in ntp, for
OpenSSL 1.1.1 compatibility.

Sponsored by: The FreeBSD Foundation

5 years agoAdd a hack to build on ARMv4 and ARMv5.
Jung-uk Kim [Sun, 23 Sep 2018 02:51:54 +0000 (02:51 +0000)]
Add a hack to build on ARMv4 and ARMv5.

5 years agoConnect an assembly file for aarch64 to build.
Jung-uk Kim [Sat, 22 Sep 2018 23:02:45 +0000 (23:02 +0000)]
Connect an assembly file for aarch64 to build.

5 years agoAdd missing ACFLAGS for aarch64.
Jung-uk Kim [Sat, 22 Sep 2018 06:50:56 +0000 (06:50 +0000)]
Add missing ACFLAGS for aarch64.

5 years agoFix typos in the previous commit.
Jung-uk Kim [Sat, 22 Sep 2018 05:59:43 +0000 (05:59 +0000)]
Fix typos in the previous commit.

5 years agoAdd a missing source file for SHA.
Jung-uk Kim [Sat, 22 Sep 2018 05:30:55 +0000 (05:30 +0000)]
Add a missing source file for SHA.

5 years agoAdd CFLAGS for aarch64/arm assembly files.
Jung-uk Kim [Sat, 22 Sep 2018 05:16:06 +0000 (05:16 +0000)]
Add CFLAGS for aarch64/arm assembly files.

5 years agoAdd another include directory for aarch64 and arm.
Jung-uk Kim [Sat, 22 Sep 2018 04:32:44 +0000 (04:32 +0000)]
Add another include directory for aarch64 and arm.

5 years agoRegen cpuid assembly files for aarch64 and arm.
Jung-uk Kim [Sat, 22 Sep 2018 03:54:40 +0000 (03:54 +0000)]
Regen cpuid assembly files for aarch64 and arm.

5 years agoConnect assembly files for arm to build.
Jung-uk Kim [Sat, 22 Sep 2018 02:43:24 +0000 (02:43 +0000)]
Connect assembly files for arm to build.

5 years agoRegen assembly files for arm.
Jung-uk Kim [Sat, 22 Sep 2018 02:42:51 +0000 (02:42 +0000)]
Regen assembly files for arm.

5 years agoConnect assembly files for aarch64 to build.
Jung-uk Kim [Sat, 22 Sep 2018 02:23:42 +0000 (02:23 +0000)]
Connect assembly files for aarch64 to build.

5 years agoRegen assemply files for aarch64.
Jung-uk Kim [Sat, 22 Sep 2018 02:23:03 +0000 (02:23 +0000)]
Regen assemply files for aarch64.

5 years agoUnify opensslconf.h templates.
Jung-uk Kim [Fri, 21 Sep 2018 22:26:00 +0000 (22:26 +0000)]
Unify opensslconf.h templates.

There is no MD macro in this file any more.

5 years agoRemove pthread from LIBADD for openssl(1).
Jung-uk Kim [Thu, 20 Sep 2018 23:06:59 +0000 (23:06 +0000)]
Remove pthread from LIBADD for openssl(1).

libcrypto is linked with pthread since r338816.

5 years agoRegen assembly files for i386 after r338846.
Jung-uk Kim [Thu, 20 Sep 2018 22:48:34 +0000 (22:48 +0000)]
Regen assembly files for i386 after r338846.

5 years agoAdd CFLAGS for i386 assembly files.
Jung-uk Kim [Thu, 20 Sep 2018 22:47:55 +0000 (22:47 +0000)]
Add CFLAGS for i386 assembly files.

5 years agoSort assembly source files for i386.
Jung-uk Kim [Thu, 20 Sep 2018 22:45:42 +0000 (22:45 +0000)]
Sort assembly source files for i386.

5 years agoConnect engines to the build.
Jung-uk Kim [Thu, 20 Sep 2018 21:59:47 +0000 (21:59 +0000)]
Connect engines to the build.

5 years agoConnect i386 assembly files to build.
Jung-uk Kim [Thu, 20 Sep 2018 21:36:52 +0000 (21:36 +0000)]
Connect i386 assembly files to build.

5 years agoRegen assembly files for i386.
Jung-uk Kim [Thu, 20 Sep 2018 21:34:05 +0000 (21:34 +0000)]
Regen assembly files for i386.

5 years agoLink libcrypto with pthread.
Jung-uk Kim [Thu, 20 Sep 2018 00:20:04 +0000 (00:20 +0000)]
Link libcrypto with pthread.

5 years agoRemove an obsolete compiler option.
Jung-uk Kim [Thu, 20 Sep 2018 00:17:41 +0000 (00:17 +0000)]
Remove an obsolete compiler option.

5 years agoopenssh: cherry-pick OpenSSL 1.1.1 compatibility
Ed Maste [Wed, 19 Sep 2018 21:18:44 +0000 (21:18 +0000)]
openssh: cherry-pick OpenSSL 1.1.1 compatibility

Upstream commits:
482d23bcac upstream: hold our collective noses and use the openssl-1.1.x
48f54b9d12 adapt -portable to OpenSSL 1.1x API
86e0a9f3d2 upstream: use only openssl-1.1.x API here too
a3fd8074e2 upstream: missed a bit of openssl-1.0.x API in this unittest
cce8cbe0ed Fix openssl-1.1 fallout for --without-openssl.

Trivial conflicts in sshkey.c and test_sshkey.c were resolved.

Sponsored by: The FreeBSD Foundation

5 years agoopenssh: rename local macro to avoid OpenSSL 1.1.1 conflict
Ed Maste [Wed, 19 Sep 2018 19:13:29 +0000 (19:13 +0000)]
openssh: rename local macro to avoid OpenSSL 1.1.1 conflict

Local changes introduced an OPENSSH_VERSION macro, but this conflicts
with a macro of the same name introduced with OpenSSL 1.1.1.

5 years agoMake uefisign(8) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:10:28 +0000 (07:10 +0000)]
Make uefisign(8) buildable.

5 years agoMake ppp(8) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:09:55 +0000 (07:09 +0000)]
Make ppp(8) buildable.

5 years agoMake factor(6) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:09:09 +0000 (07:09 +0000)]
Make factor(6) buildable.

5 years agoMake dc(1) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:08:27 +0000 (07:08 +0000)]
Make dc(1) buildable.

5 years agoMake geli(8) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:08:04 +0000 (07:08 +0000)]
Make geli(8) buildable.

5 years agoMake decryptcore(8) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:07:03 +0000 (07:07 +0000)]
Make decryptcore(8) buildable.

5 years agoMake libradius(3) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:06:20 +0000 (07:06 +0000)]
Make libradius(3) buildable.

5 years agoMake libmp(3) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:05:31 +0000 (07:05 +0000)]
Make libmp(3) buildable.

5 years agoMake libfetch buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:04:15 +0000 (07:04 +0000)]
Make libfetch buildable.

5 years agoMake unbound buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:03:28 +0000 (07:03 +0000)]
Make unbound buildable.

5 years agoMake telnet(1) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 07:01:22 +0000 (07:01 +0000)]
Make telnet(1) buildable.

5 years agoUpdate Apache Serf to 1.9.3 to support OpenSSL 1.1.1.
Jung-uk Kim [Wed, 19 Sep 2018 06:59:28 +0000 (06:59 +0000)]
Update Apache Serf to 1.9.3 to support OpenSSL 1.1.1.

5 years agoRevert r338774. Unrelated changes were committed with Apache Serf.
Jung-uk Kim [Wed, 19 Sep 2018 06:56:37 +0000 (06:56 +0000)]
Revert r338774.  Unrelated changes were committed with Apache Serf.

5 years agoUpdate Apache Serf to 1.3.9 to make it buildable with OpenSSL 1.1.1.
Jung-uk Kim [Wed, 19 Sep 2018 06:49:55 +0000 (06:49 +0000)]
Update Apache Serf to 1.3.9 to make it buildable with OpenSSL 1.1.1.

5 years agoMake sendmail(8) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 06:48:45 +0000 (06:48 +0000)]
Make sendmail(8) buildable.

5 years agoMake auditdistd(8) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 06:45:13 +0000 (06:45 +0000)]
Make auditdistd(8) buildable.

5 years agoMake libldns buildable.
Jung-uk Kim [Wed, 19 Sep 2018 06:44:31 +0000 (06:44 +0000)]
Make libldns buildable.

5 years agoMake dma(8) buildable.
Jung-uk Kim [Wed, 19 Sep 2018 06:42:05 +0000 (06:42 +0000)]
Make dma(8) buildable.

5 years agoMake libbsnmp buildable.
Jung-uk Kim [Wed, 19 Sep 2018 06:39:10 +0000 (06:39 +0000)]
Make libbsnmp buildable.

5 years agoBuild openssl(1).
Jung-uk Kim [Wed, 19 Sep 2018 06:29:06 +0000 (06:29 +0000)]
Build openssl(1).

5 years agoAdd generated header file for openssl(1).
Jung-uk Kim [Wed, 19 Sep 2018 00:32:48 +0000 (00:32 +0000)]
Add generated header file for openssl(1).

5 years agoBuild libssl for amd64.
Jung-uk Kim [Wed, 19 Sep 2018 00:24:00 +0000 (00:24 +0000)]
Build libssl for amd64.

5 years agoAdd generated header files for FreeBSD.
Jung-uk Kim [Wed, 19 Sep 2018 00:08:27 +0000 (00:08 +0000)]
Add generated header files for FreeBSD.

5 years agoBuild libcrypto for amd64.
Jung-uk Kim [Wed, 19 Sep 2018 00:07:09 +0000 (00:07 +0000)]
Build libcrypto for amd64.

5 years agoDo not build engines for now.
Jung-uk Kim [Wed, 19 Sep 2018 00:06:48 +0000 (00:06 +0000)]
Do not build engines for now.

5 years agoDo not generate unused AVX2 and AVX-512 assembly files for amd64.
Jung-uk Kim [Tue, 18 Sep 2018 01:51:28 +0000 (01:51 +0000)]
Do not generate unused AVX2 and AVX-512 assembly files for amd64.

5 years agoRemove unused AVX2 and AVX-512 assembly files for amd64.
Jung-uk Kim [Tue, 18 Sep 2018 01:47:01 +0000 (01:47 +0000)]
Remove unused AVX2 and AVX-512 assembly files for amd64.

5 years agoUpdate SHLIB_VERSION_NUMBER to 9.
Jung-uk Kim [Fri, 14 Sep 2018 14:40:09 +0000 (14:40 +0000)]
Update SHLIB_VERSION_NUMBER to 9.

Prodded by: avg

5 years agoAdd OpenSSL symbol version maps.
Jung-uk Kim [Thu, 13 Sep 2018 23:51:54 +0000 (23:51 +0000)]
Add OpenSSL symbol version maps.

Note the files are not automatically generated for now.

5 years agoCatch up with manual page removal from secure/lib/libssl.
Jung-uk Kim [Thu, 13 Sep 2018 23:46:27 +0000 (23:46 +0000)]
Catch up with manual page removal from secure/lib/libssl.

5 years agoUpdate initial opensslconf.h for amd64.
Jung-uk Kim [Thu, 13 Sep 2018 23:31:56 +0000 (23:31 +0000)]
Update initial opensslconf.h for amd64.

5 years agoRegen manual pages.
Jung-uk Kim [Thu, 13 Sep 2018 23:14:57 +0000 (23:14 +0000)]
Regen manual pages.

Note the manual pages are not automatically generated for now.

5 years agoRegen amd64 assembly files for OpenSSL 1.1.1.
Jung-uk Kim [Thu, 13 Sep 2018 21:07:09 +0000 (21:07 +0000)]
Regen amd64 assembly files for OpenSSL 1.1.1.

5 years agoUpdate shlib version to 9.
Jung-uk Kim [Thu, 13 Sep 2018 20:53:51 +0000 (20:53 +0000)]
Update shlib version to 9.

5 years agoUpdate OpenSSL version number.
Jung-uk Kim [Thu, 13 Sep 2018 20:51:19 +0000 (20:51 +0000)]
Update OpenSSL version number.

5 years agoUpdate OpenSSL to 1.1.1.
Jung-uk Kim [Thu, 13 Sep 2018 20:40:51 +0000 (20:40 +0000)]
Update OpenSSL to 1.1.1.

Note it does not update build infrastructure.

5 years agoImport OpenSSL 1.1.1.
Jung-uk Kim [Thu, 13 Sep 2018 19:18:07 +0000 (19:18 +0000)]
Import OpenSSL 1.1.1.

5 years agoSet zfs_arc_meta_strategy to metadata only
Eric van Gyzen [Thu, 13 Sep 2018 17:56:48 +0000 (17:56 +0000)]
Set zfs_arc_meta_strategy to metadata only

The previous default of "balanced" appears to have caused pathological
behavior, including very poor performance and 100% CPU load in the
arc_reclaim_thread.

The symptoms appeared when the daily periodic run started.
With this change, the system--and the ARC in particular--behaved
normally during a manual daily periodic run.

From Mark Johnston:  The port of the balanced strategy is incomplete,
since arc_prune_async() is a no-op on FreeBSD.  (This also seems
to imply that r337653 is a no-op.)  After 12 is branched we can
port the remaining bits and consider changing the default back.

Submitted by: markj (essentially)
Reviewed by: markj
Approved by: re (gjb)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D17156

5 years ago[ig4] Update list of supported hardware
Oleksandr Tymoshenko [Thu, 13 Sep 2018 17:39:08 +0000 (17:39 +0000)]
[ig4] Update list of supported hardware

Reflect the fact that ig4(4) is not an Intel-specific device but
a driver for Synopsys DesignWare I2C controller that now ships in
AMD systems too.

Approved by: re (kib), rpokala

5 years ago[ig4] Add PCI IDs for I2C controller on Intel Kaby Lake systems
Oleksandr Tymoshenko [Thu, 13 Sep 2018 17:36:55 +0000 (17:36 +0000)]
[ig4] Add PCI IDs for I2C controller on Intel Kaby Lake systems

PR: 221777
Approved by: re (kib)
Submitted by: marc.priggemeyer@gmail.com

5 years agoRemove __DATE__ and __TIME__ from ibdiag_common.c, replacing with
Glen Barber [Thu, 13 Sep 2018 16:41:15 +0000 (16:41 +0000)]
Remove __DATE__ and __TIME__ from ibdiag_common.c, replacing with
the hard-coded string "not available" to ensure reproducible builds.

Discussed with: emaste
Approved by: re (rgrimes)
Sponsored by: The FreeBSD Foundation

5 years agocxgbe/iw_cxgbe: Fix reported build breakage when the kernel
Navdeep Parhar [Thu, 13 Sep 2018 16:27:21 +0000 (16:27 +0000)]
cxgbe/iw_cxgbe: Fix reported build breakage when the kernel
configuration has "device cxgbe' but no VIMAGE.

Reported by: mav@
Approved by: re@ (kib@)

5 years agoReally fix pam install. Don't commit late at night or you make simple mistakes.
Brad Davis [Thu, 13 Sep 2018 16:14:33 +0000 (16:14 +0000)]
Really fix pam install.  Don't commit late at night or you make simple mistakes.

Reported by: dumbbell
Approved by: re (gjb), will (mentor)

5 years agoIf a user skips the pre-world mergemaster, an installworld check
Ian Lepore [Thu, 13 Sep 2018 15:16:05 +0000 (15:16 +0000)]
If a user skips the pre-world mergemaster, an installworld check
notices the missing ntpd user and refers to UPDATING. This change makes
it more clear which aspect of UPDATING is important for the ntpd change.

PR: 231334
Approved by: re (gjb)

5 years agoregenerate src.conf.5 after r338642 and r338643
Ed Maste [Thu, 13 Sep 2018 14:54:52 +0000 (14:54 +0000)]
regenerate src.conf.5 after r338642 and r338643

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

5 years agodd(1): Correct padding in status=progress
Kyle Evans [Thu, 13 Sep 2018 14:54:46 +0000 (14:54 +0000)]
dd(1): Correct padding in status=progress

Output padding is specified via outlen, which is set using the return value
of fprintf. Because it's printing that padding plus a trailing byte, it
grows by one each iteration rather than reflecting actual length.

Additionally, iec was sized improperly for scaling up similarly to si.
Fixing this revealed that the humanize_number(3) call to populate persec
was using the wrong width.

Submitted by: Thomas Hurst <tom@hur.st>
Reviewed by: imp
Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D16960

5 years agoamd64: implement ERMS-based memmove, memcpy and memset
Mateusz Guzik [Thu, 13 Sep 2018 14:53:51 +0000 (14:53 +0000)]
amd64: implement ERMS-based memmove, memcpy and memset

Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17124

5 years agoAdd WITHOUT_REPRODUCIBLE_BUILD description
Ed Maste [Thu, 13 Sep 2018 14:53:42 +0000 (14:53 +0000)]
Add WITHOUT_REPRODUCIBLE_BUILD description

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

5 years agoEnable reproducible builds in advance of 12.0-REL
Ed Maste [Thu, 13 Sep 2018 14:52:59 +0000 (14:52 +0000)]
Enable reproducible builds in advance of 12.0-REL

r338642 toggled the REPRODUCIBLE_BUILD knob but missed the
corresponding kern.opts.mk change.

We want to build the 12.0 release artifacts with reproducible builds
mode enabled. Switch it on in HEAD now to enable testing with upcoming
ALPHA builds. We can revisit the default setting for HEAD after the
branch is created.

This change eliminates the build metadata (user, hostname, timestamp,
etc.) from the kernel and loader.  If the src tree is a git, svn or p4
checkout with changes then the metadata is retained.

The WITHOUT_REPRODUCIBLE_BUILD src.conf(5) knob can be used to revert
to the previous behaviour.

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

5 years agoEnable reproducible builds in advance of 12.0-REL
Ed Maste [Thu, 13 Sep 2018 14:26:53 +0000 (14:26 +0000)]
Enable reproducible builds in advance of 12.0-REL

We want to build the 12.0 release artifacts with reproducible builds
mode enabled. Switch it on in HEAD now to enable testing with upcoming
ALPHA builds. We can revisit the default setting for HEAD after the
branch is created.

This change eliminates the build metadata (user, hostname, timestamp,
etc.) from the kernel and loader.  If the src tree is a git, svn or p4
checkout with changes then the metadata is retained.

The WITHOUT_REPRODUCIBLE_BUILD src.conf(5) knob can be used to revert
to the previous behaviour.

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

5 years agoarm64: Make aw_sid and aw_thermal depend on nvmem
Emmanuel Vadot [Thu, 13 Sep 2018 14:08:10 +0000 (14:08 +0000)]
arm64: Make aw_sid and aw_thermal depend on nvmem

Both drivers use this interface so add a dependancy on it.
Since awg uses aw_sid for generating the MAC address, make it
depend on both aw_sid and nmvem so when only removing nvmem from
kernel config it will not include this driver.

Reported by: sbruno
Approved by: re (gjb)

5 years agoAdd new option to the geom(8) utility, "-p". It makes it easy to look up
Edward Tomasz Napierala [Thu, 13 Sep 2018 14:06:01 +0000 (14:06 +0000)]
Add new option to the geom(8) utility, "-p".  It makes it easy to look up
the GEOM class instance from the provider name.

Reviewed by: oshogbo, 0mp
Approved by: re (kib)
MFC after: 2 weeks
Relnotes: yes
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17116

5 years agoumount: remove sync(2) call when used with -f
Mateusz Guzik [Thu, 13 Sep 2018 13:57:42 +0000 (13:57 +0000)]
umount: remove sync(2) call when used with -f

It completely unnecessarily iterates over all filesystems and happens
to be executed a lot e.g. by synth.

Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17143

5 years agoFix build after r338621 by avoiding LINKS and installing the link manually.
Brad Davis [Thu, 13 Sep 2018 07:48:49 +0000 (07:48 +0000)]
Fix build after r338621 by avoiding LINKS and installing the link manually.

Approved by: re (rgrimes), will (mentor)

5 years agoxen: temporary disable SMAP when forwarding hypercalls from user-space
Roger Pau Monné [Thu, 13 Sep 2018 07:15:02 +0000 (07:15 +0000)]
xen: temporary disable SMAP when forwarding hypercalls from user-space

The Xen page-table walker used to resolve the virtual addresses in the
hypercalls will refuse to access user-space pages when SMAP is enabled
unless the AC flag in EFLAGS is set (just like normal hardware with
SMAP support would do).

Since privcmd allows forwarding hypercalls (and buffers) from
user-space into Xen make sure SMAP is temporary disabled for the
duration of the hypercall from user-space.

Approved by: re (gjb)
Sponsored by: Citrix Systems R&D

5 years agoxen: legacy PVH fixes for the new interrupt count
Roger Pau Monné [Thu, 13 Sep 2018 07:14:11 +0000 (07:14 +0000)]
xen: legacy PVH fixes for the new interrupt count

Register interrupts using the PIC pic_register_sources method instead
of doing it in apic_setup_io. This is now required, since the internal
interrupt structures are not yet setup when calling apic_setup_io.

Approved by: re (gjb)
Sponsored by: Citrix Systems R&D

5 years agolapic: skip setting intrcnt if lapic is not present
Roger Pau Monné [Thu, 13 Sep 2018 07:13:13 +0000 (07:13 +0000)]
lapic: skip setting intrcnt if lapic is not present

Instead of panicking. Legacy PVH mode doesn't provide a lapic, and
since native_lapic_intrcnt is called unconditionally this would cause
the assert to trigger. Change the assert into a continue in order to
take into account the possibility of systems without a lapic.

Reviewed by: jhb
Approved by: re (gjb)
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D17015

5 years agoxen: fix setting legacy PVH vcpu id
Roger Pau Monné [Thu, 13 Sep 2018 07:12:16 +0000 (07:12 +0000)]
xen: fix setting legacy PVH vcpu id

The recommended way to obtain the vcpu id is using the cpuid
instruction with a specific leaf value. This leaf value must be
obtained at runtime, and it's done when populating the hypercall page.

Legacy PVH however will get the hypercall page populated by the
hypervisor itself before booting, so the cpuid leaf was not actually
set, thus preventing setting the vcpu id value from cpuid.

Fix this by making sure the cpuid leaf has been probed before
attempting to set the vcpu id.

Approved by: re (gjb)
Sponsored by: Citrix Systems R&D

5 years agoxen: limit the usage of PIRQs to a legacy PVH Dom0
Roger Pau Monné [Thu, 13 Sep 2018 07:11:11 +0000 (07:11 +0000)]
xen: limit the usage of PIRQs to a legacy PVH Dom0

That's the only mode in FreeBSD that requires the usage of PIRQs, so
there's no need to attach the PIRQ PIC when running in other modes.

Approved by: re (gjb)
Sponsored by: Citrix Systems R&D

5 years agoxen: fix initial kenv setup for legacy PVH
Roger Pau Monné [Thu, 13 Sep 2018 07:09:41 +0000 (07:09 +0000)]
xen: fix initial kenv setup for legacy PVH

When adding support for the new PVH mode the kenv handling was
switched to use a boot time allocated scratch space, however the
legacy PVH early boot code was not modified to allocate such space.

Approved by: re (gjb)
Sponsored by: Citrix Systems R&D

5 years ago xen: remove xenpv_set_ids
Roger Pau Monné [Thu, 13 Sep 2018 07:08:31 +0000 (07:08 +0000)]
 xen: remove xenpv_set_ids

The vcpu_id for legacy PVH mode can be set from the output of cpuid,
so there's no need to have a special function to set it.

Also note that xenpv_set_ids should have been executed only for PV
guests, but was executed for all guests types and vcpu_id was later
fixed up for HVM guests.

Reported by: cperciva
Approved by: re (gjb)
Sponsored by: Citrix Systems R&D

5 years agoxen: fix PV IPI setup
Roger Pau Monné [Thu, 13 Sep 2018 07:07:13 +0000 (07:07 +0000)]
xen: fix PV IPI setup

So that it's done when the vcpu_id has been set. For the BSP the
vcpu_id is set at SUB_INTR, while for the APs it's done in
init_secondary_tail that's called at SUB_SMP order FIRST.

Reported and tested by: cperciva
Approved by: re (gjb)
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D17013