]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoConnect i386 assembly files to build.
jkim [Thu, 20 Sep 2018 21:36:52 +0000 (21:36 +0000)]
Connect i386 assembly files to build.

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

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

5 years agoRemove an obsolete compiler option.
jkim [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
emaste [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
emaste [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.
jkim [Wed, 19 Sep 2018 07:10:28 +0000 (07:10 +0000)]
Make uefisign(8) buildable.

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

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

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

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

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

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

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

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

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

5 years agoMake telnet(1) buildable.
jkim [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.
jkim [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.
jkim [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.
jkim [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.
jkim [Wed, 19 Sep 2018 06:48:45 +0000 (06:48 +0000)]
Make sendmail(8) buildable.

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

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

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

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

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

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

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

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

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

5 years agoDo not build engines for now.
jkim [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.
jkim [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.
jkim [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.
jkim [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.
jkim [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.
jkim [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.
jkim [Thu, 13 Sep 2018 23:31:56 +0000 (23:31 +0000)]
Update initial opensslconf.h for amd64.

5 years agoRegen manual pages.
jkim [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.
jkim [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.
jkim [Thu, 13 Sep 2018 20:53:51 +0000 (20:53 +0000)]
Update shlib version to 9.

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

5 years agoUpdate OpenSSL to 1.1.1.
jkim [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.
jkim [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
vangyzen [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
gonzo [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
gonzo [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
gjb [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
np [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.
brd [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 [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
emaste [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
kevans [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
mjg [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
emaste [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
emaste [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
emaste [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
manu [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
trasz [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
mjg [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.
brd [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
royger [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
royger [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
royger [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
royger [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
royger [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
royger [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
royger [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
royger [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

5 years agomsi: remove the check that interrupt sources have been added
royger [Thu, 13 Sep 2018 07:05:51 +0000 (07:05 +0000)]
msi: remove the check that interrupt sources have been added

When running as a specific type of Xen guest the hypervisor won't
provide any emulated IO-APICs or legacy PICs at all, thus hitting the
following assert in the MSI code:

panic: Assertion num_io_irqs > 0 failed at /usr/src/sys/x86/x86/msi.c:334
cpuid = 0
time = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff826ffa70
vpanic() at vpanic+0x1a3/frame 0xffffffff826ffad0
panic() at panic+0x43/frame 0xffffffff826ffb30
msi_init() at msi_init+0xed/frame 0xffffffff826ffb40
apic_setup_io() at apic_setup_io+0x72/frame 0xffffffff826ffb50
mi_startup() at mi_startup+0x118/frame 0xffffffff826ffb70
start_kernel() at start_kernel+0x10

Fix this by removing the assert in the MSI code, since it's possible
to get to the MSI initialization without having registered any other
interrupt sources.

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

5 years agox86bios: use M_NOWAIT with mallocs
royger [Thu, 13 Sep 2018 07:04:00 +0000 (07:04 +0000)]
x86bios: use M_NOWAIT with mallocs

Or else it triggers the following bug:

APIC: CPU 6 has ACPI ID 6
APIC: CPU 7 has ACPI ID 7
panic: vm_wait in early boot
cpuid = 0
time = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff826ff8d0
vpanic() at vpanic+0x1a3/frame 0xffffffff826ff930
panic() at panic+0x43/frame 0xffffffff826ff990
vm_wait_domain() at vm_wait_domain+0xf9/frame 0xffffffff826ff9c0
kmem_alloc_contig_domain() at kmem_alloc_contig_domain+0x252/frame 0xffffffff826ffa50
kmem_alloc_contig() at kmem_alloc_contig+0x6c/frame 0xffffffff826ffad0
contigmalloc() at contigmalloc+0x2e/frame 0xffffffff826ffb00
x86bios_modevent() at x86bios_modevent+0x225/frame 0xffffffff826ffb20
module_register_init() at module_register_init+0xc0/frame 0xffffffff826ffb50
mi_startup() at mi_startup+0x118/frame 0xffffffff826ffb70
start_kernel() at start_kernel+0x10

While there also make x86bios_unmap_mem idempotent.

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

5 years agoMove all pam related config to lib/libpam/
brd [Thu, 13 Sep 2018 04:08:48 +0000 (04:08 +0000)]
Move all pam related config to lib/libpam/

Approved by: re (rgrimes), will (mentor), des
Differential Revision: https://reviews.freebsd.org/D17122

5 years agoFix unlink(1) for files starting with -
emaste [Wed, 12 Sep 2018 19:41:16 +0000 (19:41 +0000)]
Fix unlink(1) for files starting with -

Restore the original behavior of unlink(1), passing the provided filename
directly to unlink(2), handling the first argument being "--" correctly.

This fixes "unlink -foo", broken in r97533.

PR: 228448
Submitted by: Brennan Vincent <brennan@umanwizard.com> (original version)
Submitted by: Yuri Pankov
Reported by: Brennan Vincent <brennan@umanwizard.com>
Reviewed by: emaste, kevans, vangyzen, 0mp
Approved by: re (delphij)
Differential Revision: https://reviews.freebsd.org/D17132

5 years agoFix issues about cancelling USB transfers in LibUSB when the USB device has
hselasky [Wed, 12 Sep 2018 15:06:30 +0000 (15:06 +0000)]
Fix issues about cancelling USB transfers in LibUSB when the USB device has
been detached. When a USB device has been detached the kernel file handle
stops responding to commands. USB applications which continue to run after
the USB device has been detached, depend on LibUSB generated events to tear
down its pending USB transfers. Add code to handle the needed cleanup when
processing the USB transfer(s) fails and prevent new USB transfer(s) from
being submitted.

Found by: Ludovic Rousseau <ludovic.rousseau+freebsd@gmail.com>
PR: 231076
MFC after: 1 week
Approved by: re (gjb)
Sponsored by: Mellanox Technologies

5 years agoFix TCP Fast Open for the TCP RACK stack.
tuexen [Wed, 12 Sep 2018 10:27:58 +0000 (10:27 +0000)]
Fix TCP Fast Open for the TCP RACK stack.

* Fix a bug where the SYN handling during established state was
  applied to a front state.
* Move a check for retransmission after the timer handling.
  This was suppressing timer based retransmissions.
* Fix an off-by one byte in the sequence number of retransmissions.
* Apply fixes corresponding to
  https://svnweb.freebsd.org/changeset/base/336934

Reviewed by: rrs@
Approved by: re (kib@)
MFC after: 1 month
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16912

5 years agoFix for backends which doesn't support capsicum.
hselasky [Wed, 12 Sep 2018 10:09:59 +0000 (10:09 +0000)]
Fix for backends which doesn't support capsicum.

Not all libpcap backends use the BPF compatible set
of IOCTLs. For example the mlx5 backend uses libibverbs
which is currently not capsicum compatible.

Disable sandboxing for such backends.

MFC after: 3 days
Discussed with: emaste@
Approved by: re (kib)
Sponsored by: Mellanox Technologies

5 years agoEnable VIMAGE support for RISC-V.
br [Wed, 12 Sep 2018 08:13:54 +0000 (08:13 +0000)]
Enable VIMAGE support for RISC-V.

Approved by: re (gjb)
Sponsored by: DARPA, AFRL

5 years agoUse elf_relocaddr() to find the address for R_RISCV_RELATIVE
br [Wed, 12 Sep 2018 08:12:34 +0000 (08:12 +0000)]
Use elf_relocaddr() to find the address for R_RISCV_RELATIVE
relocation.

elf_relocaddr() has a hook to handle VIMAGE data addresses.

This fixes VIMAGE support for RISC-V when built as a module.

Approved by: re (gjb)
Sponsored by: DARPA, AFRL

5 years agoDon't mark module data as static on RISC-V.
br [Wed, 12 Sep 2018 08:05:33 +0000 (08:05 +0000)]
Don't mark module data as static on RISC-V.

Similar to arm64, riscv compiler uses PC-relative loads/stores,
and with static data compiler does not emit relocations.
In result, kernel module linker has nothing to fix and data accessed
from the wrong location.

Approved by: re (gjb)
Sponsored by: DARPA, AFRL

5 years agoCorrect ELF header parsing code to prevent invalid ELF sections from
gordon [Wed, 12 Sep 2018 04:57:34 +0000 (04:57 +0000)]
Correct ELF header parsing code to prevent invalid ELF sections from
disclosing memory.

Submitted by: markj
Reported by: Thomas Barabosch, Fraunhofer FKIE
Approved by: re (implicit)
Approved by: so
Security: FreeBSD-SA-18:12.elf
Security: CVE-2018-6924
Sponsored by: The FreeBSD Foundation

5 years agoamd64: enable options NUMA in GENERIC and MINIMAL
mjg [Tue, 11 Sep 2018 23:54:31 +0000 (23:54 +0000)]
amd64: enable options NUMA in GENERIC and MINIMAL

Reviewed by: gallatin, cem, scottl
Approved by: re (kib)
Relnotes: yes
Sponsored by: Dell EMC Isilon, Netflix
Differential Revision: https://reviews.freebsd.org/D17059

5 years agoAdd a couple of basic regression tests for SO_REUSEPORT_LB.
markj [Tue, 11 Sep 2018 21:14:07 +0000 (21:14 +0000)]
Add a couple of basic regression tests for SO_REUSEPORT_LB.

Reviewed by: asomers
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D17110

5 years agoMFV r338519:
mm [Tue, 11 Sep 2018 20:51:34 +0000 (20:51 +0000)]
MFV r338519:
Update libarchive to 3.3.3

As all important changes have already been merged from libarchive git
this is just version number bump, documentation update and some
polishing for cpio tests. Other source code changes are not relevant to
FreeBSD.

Approved by: re (gjb)
MFC after: 1 week

5 years agoremove doubled name in objcopy manpage
emaste [Tue, 11 Sep 2018 20:32:57 +0000 (20:32 +0000)]
remove doubled name in objcopy manpage

We generate the installed objcopy man page from ELF Tool Chain's
elfcopy, but the sed expresion used for this ended up producing
"objcopy, objcopy - copy and translate object files".

Instead of replacing the first "elfcopy" with objcopy, just remove it.

Approved by: re (gjb)

5 years agoSwitch reproducible builds to unmodified src tree mode
emaste [Tue, 11 Sep 2018 19:19:07 +0000 (19:19 +0000)]
Switch reproducible builds to unmodified src tree mode

newvers.sh supports two modes for reproducible builds:

 -r    Reproducible build.  Do not embed directory names, user
       names, time stamps or other dynamic information into
       the output file.  This is intended to allow two builds
       done at different times and even by different people on
       different hosts to produce identical output.

 -R    Reproducible build if the tree represents an unmodified
       checkout from a version control system.  Metadata is
       included if the tree is modified.

Switch to the second mode when reproducible builds are enabled.
The value of a reproducible build is much less when building from an
uncontrolled, modified src tree, and -R likely provides the best
compromise in allowing the REPRODUCIBLE_BUILD knob to be enabled by
default for the release.

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

5 years agoix(4), ixv(4): VLAN tag stripping fixes for Amazon EC2 Enhanced Networking
erj [Tue, 11 Sep 2018 18:33:43 +0000 (18:33 +0000)]
ix(4), ixv(4): VLAN tag stripping fixes for Amazon EC2 Enhanced Networking

From Piotr:

ix(4), ixv(4): Add VLAN tag strip check when receiving packets
ixv(4): Fix support for VLAN_HWTAGGING and VLAN_HWFILTER flags

This change will prevent driver from passing VLAN tags when
interface configuration is not expecting them. VF driver will
check for VLAN_HWTAGGING and VLAN_HWFILTER flags and act adequately.

This patch resolves problem occuring on EC2 platforms.

Submitted by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reported by: cperciva@
Reviewed by: cperciva@, Intel Networking
Approved by: re
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D17061

5 years agocpucontrol: correct typo
emaste [Tue, 11 Sep 2018 17:09:16 +0000 (17:09 +0000)]
cpucontrol: correct typo

There should be no 't' in processort_rev_id.

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

5 years agoAdd u3g ppp.conf entry. It provides some starting point to making
trasz [Tue, 11 Sep 2018 17:05:26 +0000 (17:05 +0000)]
Add u3g ppp.conf entry. It provides some starting point to making
use of u3g(4) dongles, and in many cases can work out of the box.

Reviewed by: hselasky
Approved by: re (gjb)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16974

5 years agoMinor usability improvements to geom(8).
trasz [Tue, 11 Sep 2018 16:46:28 +0000 (16:46 +0000)]
Minor usability improvements to geom(8).

Approved by: re (kib)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL

5 years agoMake the wait in cfiscsi_offline() interruptible. This is the second half
trasz [Tue, 11 Sep 2018 11:39:59 +0000 (11:39 +0000)]
Make the wait in cfiscsi_offline() interruptible.  This is the second half
of the fix/workaround for the "ctld hanging on reload" problem.

PR: 220175
Reported by: Eugene M. Zheganin <emz at norma.perm.ru>
Tested by: Eugene M. Zheganin <emz at norma.perm.ru>
Approved by: re (kib)
MFC after: 2 weeks
Sponsored by: playkey.net

5 years ago[bcm283x_pwm] Add documentation for the second PWM channel
gonzo [Mon, 10 Sep 2018 22:48:26 +0000 (22:48 +0000)]
[bcm283x_pwm] Add documentation for the second PWM channel

Document sysctls for the second PWM channel added in r335855
Also fix some minor style issues and a typo.

Approved by: re (gjb)
Submitted by: bobf@mrp3.com
Reviewed by: 0mp
Differential Revision: https://reviews.freebsd.org/D17084

5 years agoAdd vt(4) INDEX.fonts
emaste [Mon, 10 Sep 2018 20:46:17 +0000 (20:46 +0000)]
Add vt(4) INDEX.fonts

PR: 231237
Submitted by: Martin <martin.jakob@gmx.com> (original version)
Approved by: re (gjb, kib)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

5 years agoThrough a combination of insufficient variable initialization and
des [Mon, 10 Sep 2018 19:39:20 +0000 (19:39 +0000)]
Through a combination of insufficient variable initialization and
imprudent reuse of static buffers, the end-of-transfer statistics
displayed when stdout is not a tty always ended up as 0 B / 0 Bps.
Reorganize the code to use caller-provided buffers, tweak the ETA
display a bit, and reduce the visual differences between the tty and
non-tty end-of-transfer displays.

PR: 202424
Approved by: re (gjb@)

5 years agoFix synchronization of LB group access.
markj [Mon, 10 Sep 2018 19:00:29 +0000 (19:00 +0000)]
Fix synchronization of LB group access.

Lookups are protected by an epoch section, so the LB group linkage must
be a CK_LIST rather than a plain LIST.  Furthermore, we were not
deferring LB group frees, so in_pcbremlbgrouphash() could race with
readers and cause a use-after-free.

Reviewed by: sbruno, Johannes Lundberg <johalun0@gmail.com>
Tested by: gallatin
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17031

5 years agoSplit some checks in vm_page_activate() to make it easier to read.
markj [Mon, 10 Sep 2018 18:59:23 +0000 (18:59 +0000)]
Split some checks in vm_page_activate() to make it easier to read.

No functional change intended.

Reviewed by: alc, kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17028

5 years agoUpgrade Unbound to 1.7.3. More to follow.
des [Mon, 10 Sep 2018 17:37:34 +0000 (17:37 +0000)]
Upgrade Unbound to 1.7.3.  More to follow.

Approved by: re (kib@)

5 years agoUpgrade Unbound to 1.7.2. More to follow.
des [Mon, 10 Sep 2018 16:56:44 +0000 (16:56 +0000)]
Upgrade Unbound to 1.7.2.  More to follow.

Approved by: re (kib@)

5 years agoUpgrade to OpenSSH 7.8p1.
des [Mon, 10 Sep 2018 16:20:12 +0000 (16:20 +0000)]
Upgrade to OpenSSH 7.8p1.

Approved by: re (kib@)

5 years agoAdd myself to committers-ports.dot
manu [Mon, 10 Sep 2018 15:59:37 +0000 (15:59 +0000)]
Add myself to committers-ports.dot

Approved by: re (gjb), bapt (mentor)

5 years agoCorrect directions for building pxeboot. One needs to cd to src/stand,
imp [Mon, 10 Sep 2018 15:16:33 +0000 (15:16 +0000)]
Correct directions for building pxeboot. One needs to cd to src/stand,
not src/stand/i386 as the directions say.

PR: 231284
Approved by: re@ (gjb)

5 years agogeli init with multiple providers - fix init and fix -B "none"
woodsb02 [Mon, 10 Sep 2018 14:50:34 +0000 (14:50 +0000)]
geli init with multiple providers - fix init and fix -B "none"

Apply some fixes post rS336659, which allowed multiple provders to be
initialized in a single command.
- Fix issue where second and subsequent providers would fail init.
  This was due to the metadata struct being zeroed after the first
  provider init was completed, despite containing common data required
  for subsequent providers.
- Fix issue where -B "none" would still result in the metadata being
  backed-up if multiple providers had been specified. This was due to
  the backupfile of "none" being incorrectly made unique for each
  provider by appending "-<prov>".

Approved by: asomers
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17096