]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMove hosts, hosts.equiv, networks, nsswitch.conf, protocols to lib/libc/net/
Brad Davis [Mon, 17 Sep 2018 18:56:47 +0000 (18:56 +0000)]
Move hosts, hosts.equiv, networks, nsswitch.conf, protocols to lib/libc/net/

This uses relative paths to make it more specific to avoid any potential
future problems with .PATH and leverages CONFS.

libc was picked as the destination location for these because of the syscalls
that use these files as the lowest level place they are referenced.

Approved by: re (gjb), will (mentor)
Differential Revision: https://reviews.freebsd.org/D17164

5 years agoFix a regression in r338360 when booting an x86 machine without APIC.
John Baldwin [Mon, 17 Sep 2018 17:18:54 +0000 (17:18 +0000)]
Fix a regression in r338360 when booting an x86 machine without APIC.

The atpic_register_sources callback tries to avoid registering interrupt
sources that would collide with an I/O APIC.  However, the previous
implementation was failing to register IRQs 8-15 since the slave PIC
saw valid IRQs from the master and assumed an I/O APIC was present.  To
fix, go back to registering all 8259A interrupt sources in one loop when
the master's register_sources method is invoked.

PR: 231291
Approved by: re (kib)
MFC after: 1 month

5 years agoFix an nvpair leak in vdev_geom_read_config().
Mark Johnston [Mon, 17 Sep 2018 16:16:57 +0000 (16:16 +0000)]
Fix an nvpair leak in vdev_geom_read_config().

Also change the behaviour slightly: instead of freeing "config" if the
last nvlist doesn't pass the tests, return the last config that did pass
those tests.  This matches the comment at the beginning of the function.

PR: 230704
Diagnosed by: avg
Reviewed by: asomers, avg
Tested by: Mark Martinec <Mark.Martinec@ijs.si>
Approved by: re (gjb)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D17202

5 years agoUse ifunc to resolve context switching mode on amd64.
Konstantin Belousov [Mon, 17 Sep 2018 15:52:19 +0000 (15:52 +0000)]
Use ifunc to resolve context switching mode on amd64.

Patch removes all checks for pti/pcid/invpcid from the context switch
path. I verified this by looking at the generated code, compiling with
the in-tree clang.  The invpcid_works1 trick required inline attribute
for pmap_activate_sw_pcid_pti() to work.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
Differential revision: https://reviews.freebsd.org/D17181

5 years agoamd64: tidy up kernel memmove, take 2
Mateusz Guzik [Mon, 17 Sep 2018 15:51:49 +0000 (15:51 +0000)]
amd64: tidy up kernel memmove, take 2

There is no need to use %rax for temporary values and avoiding doing
so shortens the func.
Handle the explicit 'check for tail' depessimisization for backwards copying.

This reduces the diff against userspace.

Tested with the glibc test suite.

Approved by: re (kib)

5 years agoamd64: depessimize userspace memcpy/memmove/bcopy
Mateusz Guzik [Mon, 17 Sep 2018 15:49:35 +0000 (15:49 +0000)]
amd64: depessimize userspace memcpy/memmove/bcopy

The change resembles what was done in r334537 for kernel routines.
While here take care of i386 variants. Note that primitives remain
suboptimal.

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

5 years agoCalculate PTI, PCID and INVPCID modes earlier, before ifuncs are resolved.
Konstantin Belousov [Mon, 17 Sep 2018 15:34:19 +0000 (15:34 +0000)]
Calculate PTI, PCID and INVPCID modes earlier, before ifuncs are resolved.

This will be used in following conversion of pmap_activate_sw().

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
Differential revision: https://reviews.freebsd.org/D17181

5 years agoMake the PTI violation check to follow style of the SMAP check.
Konstantin Belousov [Mon, 17 Sep 2018 14:59:05 +0000 (14:59 +0000)]
Make the PTI violation check to follow style of the SMAP check.
No functional changes.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (rgrimes)
Differential revision: https://reviews.freebsd.org/D17181

5 years agoRestore outbound packets capturing for if_gre(4). It was missed in r335048.
Andrey V. Elsukov [Mon, 17 Sep 2018 10:10:14 +0000 (10:10 +0000)]
Restore outbound packets capturing for if_gre(4). It was missed in r335048.
Also clear M_MCAST and M_BCAST flags for encapsulated datagram, since it
will have new IP header.

Approved by: re (kib)

5 years agoRevert amd64: tidy up kernel memmove
Mateusz Guzik [Sun, 16 Sep 2018 21:46:27 +0000 (21:46 +0000)]
Revert amd64: tidy up kernel memmove

There is a braino in the non-erms variant which breaks the
functionality.

Will be fixed at a later time with a different patch.

Reported by: Manfred Antar
Approved by: re (implicit)

5 years ago[ig4] Fix device description for Kaby Lake systems
Oleksandr Tymoshenko [Sun, 16 Sep 2018 21:44:36 +0000 (21:44 +0000)]
[ig4] Fix device description for Kaby Lake systems

Kaby Lake I2C controller is Intel Sunrise Point-H not Intel Sunrise Point-LP.

Submitted by: Dmitry Luhtionov
Approved by: re (kib)

5 years agoamd64: tidy up kernel memmove
Mateusz Guzik [Sun, 16 Sep 2018 19:28:27 +0000 (19:28 +0000)]
amd64: tidy up kernel memmove

There is no need to use %rax for temporary values and avoiding doing
so shortens the func.
Handle the explicit 'check for tail' depessimisization for backwards copying.

This reduces the diff against userspace.

Approved by: re (kib)

5 years agoRemove unneeded new line from the panic string.
Konstantin Belousov [Sun, 16 Sep 2018 18:36:42 +0000 (18:36 +0000)]
Remove unneeded new line from the panic string.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (rgrimes)
Differential revision: https://reviews.freebsd.org/D17181

5 years agoSignificantly improve pf purge cpu usage by only taking locks
John-Mark Gurney [Sun, 16 Sep 2018 00:44:23 +0000 (00:44 +0000)]
Significantly improve pf purge cpu usage by only taking locks
when there is work to do.  This reduces CPU consumption to one
third on systems.  This will help keep the thread CPU usage under
control now that the default hash size has increased.

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

5 years agoPull in r325478 from upstream clang trunk (by Ivan A. Kosarev):
Dimitry Andric [Sat, 15 Sep 2018 21:22:50 +0000 (21:22 +0000)]
Pull in r325478 from upstream clang trunk (by Ivan A. Kosarev):

  [CodeGen] Initialize large arrays by copying from a global

  Currently, clang compiles explicit initializers for array elements
  into series of store instructions. For large arrays of built-in types
  this results in bloated output code and significant amount of time
  spent on the instruction selection phase. This patch fixes the issue
  by initializing such arrays with global constants that store the
  binary image of the initializer.

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

This should fix a compiler hang (and excessive memory usage) while
building the science/rmg port.

Approved by: re (kib)
Reported by: yuri@tsoft.com
See also: https://bugs.llvm.org/show_bug.cgi?id=38798
MFC after: 3 days

5 years agoPull in r335365 from upstream llvm trunk (by Krzysztof Parzyszek):
Dimitry Andric [Fri, 14 Sep 2018 19:25:23 +0000 (19:25 +0000)]
Pull in r335365 from upstream llvm trunk (by Krzysztof Parzyszek):

  Initialize LiveRegs once in BranchFolder::mergeCommonTails

This should fix '(TRI && "LivePhysRegs is not initialized."' assertions
when building the lang/qt5-qml port in certain configurations.

Approved by: re (kib)
Reported by: Piotr Kubaj <pkubaj@anongoth.pl>
PR: 231355
MFC after: 3 days

5 years agoFix "fasthalt" to halt instead of reboot
Eric van Gyzen [Fri, 14 Sep 2018 18:12:30 +0000 (18:12 +0000)]
Fix "fasthalt" to halt instead of reboot

fasthalt has behaved like reboot, instead of like halt, since r228408
(2011, 10.0-RELEASE).  Fix it.  One wonders if anyone will notice.

Approved by: re (kib)
MFC after: 3 days
Sponsored by: Dell EMC Isilon

5 years agoLog a message after a successful boot-time microcode update.
Mark Johnston [Fri, 14 Sep 2018 17:04:36 +0000 (17:04 +0000)]
Log a message after a successful boot-time microcode update.

Reviewed by: kib
Approved by: re (delphij)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17135

5 years agoSet ident for GENERIC-MMCCAM to not announce itself as
Bjoern A. Zeeb [Fri, 14 Sep 2018 15:46:31 +0000 (15:46 +0000)]
Set ident for GENERIC-MMCCAM to not announce itself as
GENERIC anymore.

Reviewed by: andrew
Approved by: re (gjb)

5 years agoAdd the "-t" option to geom(8) utility, to display geoms hierarchy.
Edward Tomasz Napierala [Fri, 14 Sep 2018 15:29:45 +0000 (15:29 +0000)]
Add the "-t" option to geom(8) utility, to display geoms hierarchy.
Sample output:

% geom -t
Geom             Class      Provider
da0              DISK       da0
  da0            PART       da0s1
    da0s1        PART       da0s1a
      ffs.da0s1a VFS
      da0s1a     DEV
    da0s1        DEV
  da0            DEV
da1              DISK       da1
  swap           SWAP
  da1            DEV
cd0              DISK       cd0
  cd0            DEV

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

5 years agoamd64: implement pagezero_erms
Mateusz Guzik [Fri, 14 Sep 2018 15:29:35 +0000 (15:29 +0000)]
amd64: implement pagezero_erms

Intel docs claim such a memset (rep stosb + 4096 bytes) is
special-cased by microarchs. They also switched Linux to use
it for this purpose.

Approved by: re (gjb)

5 years agolld: add -z interpose support
Ed Maste [Fri, 14 Sep 2018 15:15:16 +0000 (15:15 +0000)]
lld: add -z interpose support

-z interpose sets the DF_1_INTERPOSE flag, marking the object as an
interposer.

Committed upstream as LLVM r342239.

PR: 230604
Reported by: jbeich
Reviewed by: markj
Approved by: re (kib)
MFC after: 1 week
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17172

5 years agoImprove LibUSB debugging by simultaneously allowing both function
Hans Petter Selasky [Fri, 14 Sep 2018 13:41:37 +0000 (13:41 +0000)]
Improve LibUSB debugging by simultaneously allowing both function
and transfer prints. Make sure the debug level comes from the
correct USB context.

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

5 years agohwpmc: set default rate if event description lacks one / filter rate against misuse
Matt Macy [Fri, 14 Sep 2018 01:30:05 +0000 (01:30 +0000)]
hwpmc: set default rate if event description lacks one / filter rate against misuse

Not all event descriptions have a sample rate (such as inst_retired.any)
this will restore the legacy behavior of using 65536 in that case. It also
prevents accidental API misuse that could lead to panic.

PR: 230985
Reported by: markj
Reviewed by: markj
Approved by: re (gjb)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D16958

5 years agore-enable pmcstat, pmccontrol, and pmcannotate for gcc4 builds
Matt Macy [Fri, 14 Sep 2018 01:11:10 +0000 (01:11 +0000)]
re-enable pmcstat, pmccontrol, and pmcannotate for gcc4 builds

I had disabled building of the aforementioned targets due to warnings breaking
tinderbox. This silences the warning and restores them to the build.

Reported by: jhibbits
Reviewed by: jhibbits
Approved by: re (gjb)

5 years agoUpdate head from ALPHA5 to ALPHA6 as part of the 12.0-RELEASE
Glen Barber [Thu, 13 Sep 2018 23:59:59 +0000 (23:59 +0000)]
Update head from ALPHA5 to ALPHA6 as part of the 12.0-RELEASE
cycle.

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

5 years agocxgbe(4): Use the correct number of parameters when querying the tid
Navdeep Parhar [Thu, 13 Sep 2018 22:58:13 +0000 (22:58 +0000)]
cxgbe(4): Use the correct number of parameters when querying the tid
range for hashfilters.

Approved by: re@ (gjb@)

5 years agoEnable Capsicum on armv6/armv7
Ed Maste [Thu, 13 Sep 2018 21:00:17 +0000 (21:00 +0000)]
Enable Capsicum on armv6/armv7

We ought to be consistent across our Tier-1 and nearly-Tier-1
architectures, so enable Capsicum for 32-bit armv6/armv7 by default.

PR: 204008
Reviewed by: ian, oshogbo
Approved by: re (gjb)
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17023

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

5 years agomsi: remove the check that interrupt sources have been added
Roger Pau Monné [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
Roger Pau Monné [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/
Brad Davis [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 -
Ed Maste [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
Hans Petter Selasky [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.
Michael 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.
Hans Petter Selasky [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.
Ruslan Bukin [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
Ruslan Bukin [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.
Ruslan Bukin [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 Tetlow [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
Mateusz Guzik [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.
Mark Johnston [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:
Martin Matuska [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
Ed Maste [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
Ed Maste [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
Eric Joyner [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
Ed Maste [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
Edward Tomasz Napierala [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).
Edward Tomasz Napierala [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
Edward Tomasz Napierala [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
Oleksandr Tymoshenko [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
Ed Maste [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
Dag-Erling Smørgrav [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.
Mark Johnston [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.
Mark Johnston [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.
Dag-Erling Smørgrav [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.
Dag-Erling Smørgrav [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 agoVendor import of Unbound 1.7.3.
Dag-Erling Smørgrav [Mon, 10 Sep 2018 16:31:49 +0000 (16:31 +0000)]
Vendor import of Unbound 1.7.3.

5 years agoVendor import of Unbound 1.7.2.
Dag-Erling Smørgrav [Mon, 10 Sep 2018 16:30:18 +0000 (16:30 +0000)]
Vendor import of Unbound 1.7.2.

5 years agoUpgrade to OpenSSH 7.8p1.
Dag-Erling Smørgrav [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
Emmanuel Vadot [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,
Warner Losh [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"
Ben Woods [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

5 years agoAllow dhclient and ping to build WITHOUT_DYNAMICROOT
Ed Maste [Sun, 9 Sep 2018 17:26:44 +0000 (17:26 +0000)]
Allow dhclient and ping to build WITHOUT_DYNAMICROOT

dhclient and ping normally use libcasper services.  These are not
available in statically-linked binaries, so when WITHOUT_DYNAMICROOT is
set disable libcasper use, as with rescue builds.  Also emit a warning
as it's undesirable to build this way.

Reported by: Michael Dexter
Reviewed by: rgrimes
Tested by: Michael Dexter
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17074

5 years agorandom(4): Squash non-error timeout codes from tsleep(9).
Xin LI [Sun, 9 Sep 2018 17:12:31 +0000 (17:12 +0000)]
random(4): Squash non-error timeout codes from tsleep(9).

In both scenarios a timeout (EWOULDBLOCK) is considered as a
normal condition and the error should not pop up to upper layers.

PR: 231181
Submitted by: cem
Reported by: lev
Reviewed by: vangyzen, markm, delphij
Approved by: re (kib)
Approved by: secteam (delphij)
Differential Revision: https://reviews.freebsd.org/D17049

5 years agoIntroduce and use sgid_index in CM requests in ibcore.
Hans Petter Selasky [Sun, 9 Sep 2018 07:20:15 +0000 (07:20 +0000)]
Introduce and use sgid_index in CM requests in ibcore.

For RoCE, when CM requests are received for RC and UD connections,
netdevice of the incoming request is unavailable. Because of that CM
requests are always forwarded to init_net namespace.

Now that we have the GID index available, introduce SGID index in
incoming CM requests and refer to the netdevice of it.

While at it fix some incorrect uses of init_net and make sure
the rdma_create_id() function stores the VNET it is passed.

Based on linux commit:
cee104334c98dd04e9dd4d9a4fa4784f7f6aada9

MFC after: 3 days
Approved by: re (gjb)
Sponsored by: Mellanox Technologies

5 years agolibsa: validate tftp_makereq() after we did reset the read
Toomas Soome [Sun, 9 Sep 2018 06:30:15 +0000 (06:30 +0000)]
libsa: validate tftp_makereq() after we did reset the read

The name check referred in the comment is not the only possible error source,
we need to validate the result.

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

5 years agoFix the 32-bit arm build.
Mark Johnston [Sat, 8 Sep 2018 23:39:26 +0000 (23:39 +0000)]
Fix the 32-bit arm build.

X-MFC with:     r338537
Approved by: re (rgrimes)
Sponsored by: The FreeBSD Foundation

5 years agoExclude the EFI framebuffer from phys_avail[] on arm64.
Mark Johnston [Sat, 8 Sep 2018 21:52:44 +0000 (21:52 +0000)]
Exclude the EFI framebuffer from phys_avail[] on arm64.

On the ThunderX the region occupied by the framebuffer is included in
the EFI map, so explicitly add it to the set of regions that aren't
managed by the physical memory allocator.

PR: 231064
Reviewed by: andrew
Approved by: re (gjb)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17073

5 years agoBump MAX_HWCNT and MAX_EXCNT.
Mark Johnston [Sat, 8 Sep 2018 21:51:47 +0000 (21:51 +0000)]
Bump MAX_HWCNT and MAX_EXCNT.

These limits are hit on the ThunderX.  Also make
arm_physmem_exclude_region() panic rather than fail silently if the
limit on excluded regions is reached.

PR: 231064
Reviewed by: andrew
Approved by: re (kib)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17073

5 years agoRelax an assertion in vm_pqbatch_process_page().
Mark Johnston [Sat, 8 Sep 2018 21:49:43 +0000 (21:49 +0000)]
Relax an assertion in vm_pqbatch_process_page().

While executing vm_pqbatch_process_page(m), m->queue may change to
PQ_NONE if the page daemon is concurrently freeing the page.  In this
case m's queue state flags must be clear, so vm_pqbatch_process_page()
will be a no-op, but the race could cause spurious assertion failures.
Correct the assertion which assumed that m->queue's value does not
change while the page queue lock is held.

Reviewed by: alc, kib
Reported and tested by: pho
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17027

5 years agolibsa: memory leak in tftp_open()
Toomas Soome [Sat, 8 Sep 2018 19:17:22 +0000 (19:17 +0000)]
libsa: memory leak in tftp_open()

tftpfile is allocated just above and needs to be freed.

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

5 years agointelspi: don't leak spibus children on detach.
Konstantin Belousov [Sat, 8 Sep 2018 18:57:29 +0000 (18:57 +0000)]
intelspi: don't leak spibus children on detach.

Submitted by: Yuri Pankov
MFC after: 1 week
Approved by: re (gjb)
Differential revision: https://reviews.freebsd.org/D17076

5 years agoImprove handling of the EFI map types[] array.
Konstantin Belousov [Sat, 8 Sep 2018 18:57:05 +0000 (18:57 +0000)]
Improve handling of the EFI map types[] array.

Use nitems(), do not assume EFI_MD_TYPE_ contiguous allocation, in
particular, switch to use designated array initializers.

Reviewed by: jhb (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (gjb)

5 years agoRemove strings from OptionalObsoleteFiles.inc
Ed Maste [Fri, 7 Sep 2018 23:12:17 +0000 (23:12 +0000)]
Remove strings from OptionalObsoleteFiles.inc

Since r326030 strings is installed unconditionally so should not be
removed when WITHOUT_TOOLCHAIN is set.

Reported by: Dan McGregor
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

5 years agoSpecify the correct resource type in teardown paths.
Mark Johnston [Fri, 7 Sep 2018 21:12:37 +0000 (21:12 +0000)]
Specify the correct resource type in teardown paths.

Submitted by: Yuri Pankov <yuripv@yuripv.net>
Approved by: re (kib)
MFC after: 1 week