Commit Graph

236280 Commits

Author SHA1 Message Date
Michael Tuexen
ba4704a278 Remove unused code.
Approved by:	re (kib@)
MFC after:	1 week
2018-09-18 10:53:07 +00:00
Brad Davis
b6af74d289 Move mac.conf to lib/libc/posix1e/
This leverages CONFS to handle the install of the config file.

Approved by:	re (blanket, pkgbase), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17162
2018-09-18 01:40:37 +00:00
Brad Davis
34da9e3802 Fix CONFS to append the value in this case.
Approved by:	re (blanket, pkgbase), will (mentor)
2018-09-18 01:38:44 +00:00
Mateusz Guzik
2554f86a8d vm: stop taking proc lock in mmap to satisfy racct if it is disabled
Limits can be safely obtained with lim_cur from the thread. racct is compiled
in but disabled by default. Note that racct enablement is a boot-only tunable.

This eliminates second most common place of taking the lock while pkg building.

While here don't take the lock in mlockall either.

Reviewed by:	kib
Approved by:	re (gjb)
Differential Revision:	https://reviews.freebsd.org/D17210
2018-09-18 01:24:30 +00:00
Brad Davis
af734c7746 Move amd.map to usr.sbin/amd/amd/
This leverages CONFS to handle the install of the config file.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17159
2018-09-18 00:32:10 +00:00
Brad Davis
9a537769d6 Move libmap.conf to libexec/rtld-elf/
This leverages CONFS to handle the config file install.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17161
2018-09-18 00:25:00 +00:00
Brad Davis
62e23a4781 Move dhclient.conf to sbin/dhclient/.
This also leverages CONFS for handling config files.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17160
2018-09-18 00:11:45 +00:00
Brad Davis
9f1e4c08ce Remove dhclient.conf from here in prep for the move of it from etc/.
This is being done a separate step to ease importing into other VCSes.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17160
2018-09-18 00:10:29 +00:00
Bryan Drewery
4be52feeca DIRS: Rework how duplicated dirs are installed.
- Warn if multiple DIRS have conflicting metadata
- This fixes META_MODE writing to a very long .meta file that contained
  the full DESTDIR path.

Reported by:	sjg, jonathan
Sponsored by:	Dell EMC
Approved by:	re (gjb)
2018-09-17 22:15:12 +00:00
Bryan Drewery
ebd2a66265 installdirs can be a recursive/standalone target.
Sponsored by:	Dell EMC
Approved by:	re (gjb)
2018-09-17 22:15:09 +00:00
Bryan Drewery
c86ac3193f PROGS: Don't redundantly process DIRS.
Sponsored by:	Dell EMC
Approved by:	re (gjb)
2018-09-17 22:15:06 +00:00
Bryan Drewery
c655284641 DIRS: installdirs should also be .PHONY
Sponsored by:	Dell EMC
Approved by:	re (gjb, kib)
2018-09-17 22:14:53 +00:00
David C Somayajulu
9d50798c61 Fixed isses:
State check before enqueuing transmit task in bxe_link_attn() routine.
 State check before invoking bxe_nic_unload in bxe_shutdown().

Submitted by:Vaishali.Kulkarni@cavium.com
Approved by:re(gjb)
2018-09-17 20:15:18 +00:00
Konstantin Belousov
a408841593 Do not upgrade the vnode lock to call getinoquota().
Doing so can deadlock when the thread already owns another vnode lock,
e.g. during a rename, as was demonstrated by the reporter.  In fact,
there seems to be no need to force the call to getinoquota() always,
because vn_open() locks vnode exclusively, and this is the most
important case.  To add to the point, directories where the dirent is
added or removed, are locked exclusively as well.

Reported by:	bwidawsk
Tested by:	bwidawsk, pho (as part of the larger patch)
Sponsored by:	The FreeBSD Foundation
Approved by:	re (gjb)
MFC after:	1 week
2018-09-17 19:38:43 +00:00
Brad Davis
77e4a39103 Move rpc and netconfig to lib/libc/rpc/
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/D17163
2018-09-17 19:20:50 +00:00
Brad Davis
03452a498c 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
2018-09-17 18:56:47 +00:00
John Baldwin
87bdca8290 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
2018-09-17 17:18:54 +00:00
Mark Johnston
6368b4e471 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
2018-09-17 16:16:57 +00:00
Konstantin Belousov
3c022be2ca 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
2018-09-17 15:52:19 +00:00
Mateusz Guzik
d6943c5804 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)
2018-09-17 15:51:49 +00:00
Mateusz Guzik
23ec0d58bf 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
2018-09-17 15:49:35 +00:00
Konstantin Belousov
09a6ada991 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
2018-09-17 15:34:19 +00:00
Konstantin Belousov
76ed0c542f 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
2018-09-17 14:59:05 +00:00
Andrey V. Elsukov
c6851ad04c 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)
2018-09-17 10:10:14 +00:00
Mateusz Guzik
9d1b868da0 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)
2018-09-16 21:46:27 +00:00
Oleksandr Tymoshenko
234afdb9cc [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)
2018-09-16 21:44:36 +00:00
Mateusz Guzik
17f67f63b9 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)
2018-09-16 19:28:27 +00:00
Konstantin Belousov
bd6c14afa7 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
2018-09-16 18:36:42 +00:00
John-Mark Gurney
032d3aaa96 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
2018-09-16 00:44:23 +00:00
Dimitry Andric
f5450581eb 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
2018-09-15 21:22:50 +00:00
Dimitry Andric
df57b3139f 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
2018-09-14 19:25:23 +00:00
Eric van Gyzen
6760585add 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
2018-09-14 18:12:30 +00:00
Mark Johnston
d5089b3aed 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
2018-09-14 17:04:36 +00:00
Bjoern A. Zeeb
6bfb487b6e Set ident for GENERIC-MMCCAM to not announce itself as
GENERIC anymore.

Reviewed by:	andrew
Approved by:	re (gjb)
2018-09-14 15:46:31 +00:00
Edward Tomasz Napierala
6a02738229 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
2018-09-14 15:29:45 +00:00
Mateusz Guzik
c51b7ab9e3 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)
2018-09-14 15:29:35 +00:00
Ed Maste
1ae9615a9a 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
2018-09-14 15:15:16 +00:00
Hans Petter Selasky
5b21ba5c5d 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
2018-09-14 13:41:37 +00:00
Matt Macy
0204d85a62 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
2018-09-14 01:30:05 +00:00
Matt Macy
3b9156971f 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)
2018-09-14 01:11:10 +00:00
Glen Barber
b79672bb08 Update head from ALPHA5 to ALPHA6 as part of the 12.0-RELEASE
cycle.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-09-13 23:59:59 +00:00
Navdeep Parhar
4bb64e96e4 cxgbe(4): Use the correct number of parameters when querying the tid
range for hashfilters.

Approved by:	re@ (gjb@)
2018-09-13 22:58:13 +00:00
Ed Maste
f2990e6c19 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
2018-09-13 21:00:17 +00:00
Eric van Gyzen
73511c241b 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
2018-09-13 17:56:48 +00:00
Oleksandr Tymoshenko
23679408ce [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
2018-09-13 17:39:08 +00:00
Oleksandr Tymoshenko
6fb3c89473 [ig4] Add PCI IDs for I2C controller on Intel Kaby Lake systems
PR:	221777
Approved by:	re (kib)
Submitted by:	marc.priggemeyer@gmail.com
2018-09-13 17:36:55 +00:00
Glen Barber
fa8050170a 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
2018-09-13 16:41:15 +00:00
Navdeep Parhar
6f3a49c317 cxgbe/iw_cxgbe: Fix reported build breakage when the kernel
configuration has "device cxgbe' but no VIMAGE.

Reported by:	mav@
Approved by:	re@ (kib@)
2018-09-13 16:27:21 +00:00
Brad Davis
becaaa9be9 Really fix pam install. Don't commit late at night or you make simple mistakes.
Reported by:	dumbbell
Approved by:	re (gjb), will (mentor)
2018-09-13 16:14:33 +00:00
Ian Lepore
0d77d170af 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)
2018-09-13 15:16:05 +00:00