Commit Graph

241538 Commits

Author SHA1 Message Date
Brooks Davis
05aa6e583b FCP-101: Remove ed(4).
Relnotes:	yes
FCP:		https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by:	jhb, imp
Differential Revision:	https://reviews.freebsd.org/D20230
2019-05-17 15:23:02 +00:00
Brooks Davis
08ac01a92c FCP-101: Remove de(4).
Relnotes:	yes
FCP:		https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by:	jhb, imp
Differential Revision:	https://reviews.freebsd.org/D20230
2019-05-17 15:22:54 +00:00
Brooks Davis
e1edf1240b FCP-101: Remove cs(4).
Relnotes:	yes
FCP:		https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by:	jhb, imp
Differential Revision:	https://reviews.freebsd.org/D20230
2019-05-17 15:22:45 +00:00
Brooks Davis
9e774e5340 FCP-101: Remove bm(4).
Relnotes:	yes
FCP:		https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by:	jhb, imp
Differential Revision:	https://reviews.freebsd.org/D20230
2019-05-17 15:20:51 +00:00
Brooks Davis
ebcf740a32 FCP-101: remove obsolete 10 and 10/100 Ethernet drivers.
Initial commit adding comment to ObsoleteFiles.  Each driver will be
removed in a seperate commit to allow later reverts if required.

FCP:		https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by:	jhb, imp
Differential Revision:	https://reviews.freebsd.org/D20230
2019-05-17 15:19:12 +00:00
Tycho Nightingale
2acae6bf7f Remove unused define.
Sponsored by:	Dell EMC Isilon
2019-05-17 13:08:12 +00:00
Tycho Nightingale
344f8c0062 Fix integer overflow in r346386.
Sponsored by:	Dell EMC Isilon
2019-05-16 22:27:38 +00:00
Konstantin Belousov
7c5a46a1bc Remove resolver_qual from DEFINE_IFUNC/DEFINE_UIFUNC macros.
In all practical situations, the resolver visibility is static.

Requested by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Approved by:	so (emaste)
Differential revision:	https://reviews.freebsd.org/D20281
2019-05-16 22:20:54 +00:00
Brad Davis
11f8f36fb9 Fix mergemaster after r347638 and the master.passwd / group move.
Check the legacy directory and use it instead if present.

Install these first if using beinstall.

UPDATING entry to follow.

Approved by:	allanjude (mentor, in person)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D20279
2019-05-16 21:50:12 +00:00
Johannes Lundberg
6a65ca35dd LinuxKPI: Finalize import of seq_file.
seq_file.h and linux_seq_file.c was imported form ports earlier but
linux_seq_file.c was never compiled in with the module. With this
commit base seq_file will replace ports seq_file and it required a
few modifications to not break functionality and build.

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-16 21:17:18 +00:00
Johannes Lundberg
6da2681fbc LinuxKPI: Add in_task macro.
This patch is part of D19565

Reviewed by:	hps, bwidawsk
Approved by:	imp (mentor), hps
Obtained from:	bwidawsk
MFC after:	1 week
2019-05-16 21:07:37 +00:00
Tycho Nightingale
e86fa024ac reinstate 4GB DMA boundary workarounds for bge and aac
Reviewed by:	kib
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20277
2019-05-16 20:41:28 +00:00
Johannes Lundberg
39881afcba LinuxKPI: Fix build on powerpc/sparc.
Use cmpset instead of testandset in tasklet lock code.

Reviewed by:	hps
Approved by:	imp (mentor), hps
Obtained from:	hps
MFC after:	1 week
2019-05-16 19:32:11 +00:00
Conrad Meyer
fa3ac573a2 mips: Implement basic pmap_kenter_device, pmap_kremove_device
Unbreak mips.BERI_DE4_SDROOT build, which uses device xdma. Device xdma
depends on the pmap_kenter_device APIs.

Reported by:	tinderbox (local)
Sponsored by:	Dell EMC Isilon
2019-05-16 19:10:48 +00:00
Hiroki Sato
7460ef5d7a Fix hostname to be returned in an ICMPv6 NI Reply message defined
in RFC 4620, ICMPv6 Node Information Queries.  A vnet jail with an
IPv6 address sent a hostname of the host environment, not the
jail, even if another hostname was set to the jail.

This change can be tested by the following commands:

 # ifconfig epair0 create
 # jail -c -n j1 vnet host.hostname=vnetjail path=/ persist
 # ifconfig epair0b vnet j1
 # ifconfig epair0a inet6 -ifdisabled auto_linklocal up
 # jexec j1 ifconfig epair0b inet6 -ifdisabled auto_linklocal up
 # ping6 -w ff02::1%epair0a

Differential Revision:	https://reviews.freebsd.org/D20207
MFC after:	1 week
2019-05-16 19:09:41 +00:00
Ollivier Robert
48149a5a50 Announce OpenBSD 6.5. 2019-05-16 18:54:20 +00:00
Johannes Lundberg
480995dcf0 LinuxKPI: Updates to tasklets for Linux 5.0.
DRM drivers expect tasklets to have a counter for enable/disable calls.
Also, add a few more tasklet locking functions.

This patch is part of D19565

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-16 18:03:08 +00:00
Johannes Lundberg
07e0a3ca50 LinuxKPI: Add group_leader member to struct task_struct.
Assign self as group leader at creation to act as the only member of a
new process group.
This patch is part of D19565

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-16 17:53:36 +00:00
Johannes Lundberg
47e2723ad7 LinuxKPI: Update access_ok macro for v5.0.
Check LINUXKPI_VERSION macro for backwards compatibility.
It's recommended to update any drivers that depend on the older KPI
so we can deprecate < 5.0 code as we update to newer Linux version.
This patch is part of D19565

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-16 17:44:17 +00:00
Tycho Nightingale
b961c0f244 Allow loading the same DMA address multiple times without any prior
unload for the LinuxKPI.

Reviewed by:	kib, zeising
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20181
2019-05-16 17:41:16 +00:00
Conrad Meyer
f4ab98c597 xdma(4): Fix invalid pointer use (breaks arm.SOCFPGA build)
In xdma_handle_mem_node(), vmem_size_t and vmem_addr_t pointers were passed to
an FDT API that emits u_long values to the output parameter pointer.  This
broke on systems with both xdma and 32-bit vmem size/addr types (SOCFPGA).

Reported by:	tinderbox
Sponsored by:	Dell EMC Isilon
2019-05-16 17:34:36 +00:00
Justin Hibbits
2471860668 arm64: Add the rename interpreter path for compat32 ld-elf
Let arm64 and arm32 dynamic binaries coexist.  Match all other compat32
archs.

Reviewed by:	manu
Sponsored by:	Juniper Networks, Inc
2019-05-16 17:04:29 +00:00
Brooks Davis
7eceffae90 FCP-101: ae(4) is sufficently popular to be moved to the keep list. 2019-05-16 15:22:17 +00:00
Konstantin Belousov
07d7e24cf7 amd64 pmap: sysctl vm.pmap.pcid_save_cnt should be read-only.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2019-05-16 14:33:32 +00:00
Konstantin Belousov
5b2c83cb59 amd64 pmap: Add tunable vm.pmap.di_locked to set DI mode.
This is done mostly for debugging in field.  Also added the sysctl of
the same name to report used mode.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
2019-05-16 14:29:09 +00:00
Konstantin Belousov
1febb0b0ae amd64 pmap: Rename DI functions.
pmap_delayed_invl_started -> pmap_delayed_invl_start
pmap_delayed_invl_finished -> pmap_delayed_invl_finish

Requested by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
2019-05-16 13:40:54 +00:00
Konstantin Belousov
4d3b28bcdc amd64 pmap: rework delayed invalidation, removing global mutex.
For machines having cmpxcgh16b instruction, i.e. everything but very
early Athlons, provide lockless implementation of delayed
invalidation.

The implementation maintains lock-less single-linked list with the
trick from the T.L. Harris article about volatile mark of the elements
being removed. Double-CAS is used to atomically update both link and
generation.  New thread starting DI appends itself to the end of the
queue, setting the generation to the generation of the last element
+1.  On DI finish, thread donates its generation to the previous
element.  The generation of the fake head of the list is the last
passed DI generation.  Basically, the implementation is a queued
spinlock but without spinlock.

Many thanks both to Peter Holm and Mark Johnson for keeping with me
while I produced intermediate versions of the patch.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
MFC note:	td_md.md_invl_gen should go to the end of struct thread
Differential revision:	https://reviews.freebsd.org/D19630
2019-05-16 13:28:48 +00:00
Konstantin Belousov
a9fd669b4a subr_turnstile: Extract some common code to a helper.
Code walks the list of contested turnstiles to calculate the priority
to unlend.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2019-05-16 13:17:57 +00:00
Konstantin Belousov
3cac4083ef rtld_malloc.c: cleanup morepages().
Use roundup2() and rounddown2() instead of inlining them.
Get rid of the fd local variable, use literal -1 for the mmap argument.
Use MAP_FAILED as mmap(2) failure indicator.
After that, apply some style.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2019-05-16 13:13:33 +00:00
Konstantin Belousov
37f0b7f1d7 Remove more dead definitions from rtld_malloc.c after r347019.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2019-05-16 13:07:26 +00:00
Mark Johnston
f00876fb60 Revert r347582 for now.
The inp lock still needs to be dropped when calling into the driver ioctl
handler, as some drivers expect to be able to sleep.

Reported by:	kib
2019-05-16 13:04:26 +00:00
Konstantin Belousov
0ddfdc60f8 imgact_elf.c: Add comment explaining the malloc/VOP_UNLOCK() dance
from r347148.

Requested by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2019-05-16 13:03:54 +00:00
Konstantin Belousov
98fc918f41 arm64: bzero buffer for ucontext in freebsd32_swapcontext().
This change is the same as r340994 for amd64.

PR:	237922
Submitted by:	Young <yangx92@hotmail.com>
MFC after:	3 days
2019-05-16 13:00:35 +00:00
Edward Tomasz Napierala
f41ad4eaa7 The "apropos ''" command no longer works; change development(7)
to suggest "apropos ." instead.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2019-05-16 09:49:19 +00:00
Ryan Libby
64e0efab39 db show thread: avoid overflow in tick conversion
The previous calculations for displaying the time since last switch
easily overflowed, after less than 36 min for hz=1000.  Now overflow
takes 2000 times longer (as long as ticks takes to wrap).

Reviewed by:	cem, markj
Sponsored by:	Dell EMC Isilon
Differential revision:	https://reviews.freebsd.org/D20273
2019-05-16 05:29:54 +00:00
Ryan Libby
244081120e iommu static analysis cleanup
A static analyzer complained about a couple instances of checking a
variable against NULL after already having dereferenced it.
 - dmar_gas_alloc_region: remove the tautological NULL checks
 - dmar_release_resources / dmar_fini_fault_log: don't deref unit->regs
   unless initialized.

And while here, fix an inverted initialization check in dmar_fini_qi.

Reviewed by:	kib
Sponsored by:	Dell EMC Isilon
Differential revision:	https://reviews.freebsd.org/D20263
2019-05-16 04:24:08 +00:00
Cy Schubert
e1c50020af The driver list prints "(null)" for the NDIS driver when -h (help) or
an unknown switch is passed outputting the command usage. This is
because the NDIS driver is uninitialized when usage help is printed.
To resolve this we initialize the driver prior to the possibility of
printing the usage help message.

Obtained from:	The wpa_supplicant port
MFC after:	1 week
2019-05-16 02:41:25 +00:00
Kristof Provost
b685454a11 ipsec tests: Skip if ipsec.ko is not loaded
As of r347410 IPSec is no longer built into GENERIC. The ipsec.ko module must
be loaded before we can execute the IPSec tests.

Check this, and skip the tests if IPSec is not available.
2019-05-16 02:18:57 +00:00
Kyle Evans
88a950762a libbe(3): Descend into children of datasets w/ mountpoint=none
These datasets will generally be canmount=noauto,mountpoint=none (e.g.
zroot/var) but have children that may need to be mounted. Instead of
skipping that segment for no good reason, descend.

Submitted by:	Wes Maag
Reported by:	Wes Maag
MFC after:	3 days
2019-05-16 02:11:33 +00:00
Conrad Meyer
e7e3d5223f x86: Correctly identify bhyve hypervisor
Spotted after a similar report by Olivier Cochard-Labbé.

Sponsored by:	Dell EMC Isilon
2019-05-16 01:32:54 +00:00
Brad Davis
871b6b10ce Move master.passwd and group to lib/libc/gen/
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:	will (mentor), rgrimes, manu
Differential Revision:	https://reviews.freebsd.org/D16728
2019-05-16 01:09:13 +00:00
Ryan Libby
d375016d8d x86: spell vpxor %zmm0 as vpxord
Fix gcc/gas amd64 & i386 build after r347566.

Reviewed by:	kib
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20264
2019-05-15 18:13:43 +00:00
Johannes Lundberg
c4e0746e7d LinuxKPI: Add helper macros IS_ALIGNED and DIV_ROUND_DOWN_ULL.
This patch is part of D19565

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-15 17:57:06 +00:00
Konstantin Belousov
b55d4ebe5f Properly announce MD_CLEAR.
Submitted by:	Petr Lampa <lampa@fit.vutbr.cz>
MFC after:	3 days
2019-05-15 17:55:41 +00:00
Johannes Lundberg
0bb30b3a19 LinuxKPI: Move {lower|upper}_32_bits macros from port to base.
This patch is part of D19565

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-15 17:48:11 +00:00
Johannes Lundberg
8264104401 LinuxKPI: Include asm/atomic-long.h from atomic.h.
This patch is part of D19565

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-15 17:44:25 +00:00
Johannes Lundberg
d109700cf0 LinuxKPI: Add get_random_u32 function.
This patch is part of D19565

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-15 17:32:00 +00:00
Johannes Lundberg
3137d2d4ec LinuxKPI: Update user_access_begin for Linux v5.0.
Check the new LINUXKPI_VERSION macro for backwards compatibility.
This patch is part of D19565

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-15 17:04:12 +00:00
Johannes Lundberg
a4a9f2267e LinuxKPI: Expand ktime functionality.
Also, make ktime_get_raw call getnanouptime instead of getnanotime
to match (the correct) ktime_get_raw_ns.
This patch is part of D19565

Reviewed by:	hps
Approved by:	imp (mentor), hps
MFC after:	1 week
2019-05-15 16:59:04 +00:00
Adrian Chadd
8771e6389b [ar71xx_gpio] Add AR9341/AR9342 to the list of chips for programming function/output enable.
This is reqired to use the gpiofunc behaviour for configuring GPIO
pins at boot time.

Submitted by:	<yamori813@yahoo.co.jp>
Differential Revision:	https://reviews.freebsd.org/D20170
2019-05-15 16:51:08 +00:00