Commit Graph

214667 Commits

Author SHA1 Message Date
Conrad Meyer
af326ace9d devfs: Move most ioctl logic down to vnode layer
Devfs' file layer ioctl is now just a thin shim around the vnode layer.

Reviewed by:	kib
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D7286
2016-07-25 16:28:02 +00:00
Andrew Turner
1af4207389 Remove an unused variable.
Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-07-25 16:18:20 +00:00
Andrew Turner
0f0b7aa289 Fix a typo in a string in a KASSERT to sanity check the CPU IDs.
Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-07-25 15:59:31 +00:00
Andrew Turner
8ec2b5df73 Rework how we number CPUs on arm64 to try and keep clusters together.
Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-07-25 15:57:13 +00:00
Andrew Turner
abf5bdb441 Enable the generic OHCI driver on arm64
Obtained from:	ABT Systems Ltd
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2016-07-25 14:49:15 +00:00
Xin LI
2c8d04d022 Fix bspatch heap overflow vulnerability.
Obtained from:	Chromium
Reported by:	Lu Tung-Pin
Security:	FreeBSD-SA-16:25.bspatch
2016-07-25 14:45:48 +00:00
Dag-Erling Smørgrav
ae1b731b5d Rewrite the GPT and MBR examples. For GPT, ensure that the boot partition
is large enough for gptzfsboot, which has doubled in size since 10.

PR:		211361
MFC after:	3 days
2016-07-25 11:25:33 +00:00
Andrey V. Elsukov
1f353a2315 Do not invoke resize method if geom is being withered.
PR:		211028
MFC after:	2 weeks
2016-07-25 09:12:08 +00:00
Julian Elischer
591d7b63ca Split MAKE_SYSENT into two parts so that the initializer part can be
used separately if one wants to embed the sysent into a larger structure.

MFC after:	1 week
2016-07-25 08:13:50 +00:00
Xin LI
c08cbc64dc Change bsdiff to use divsufsort suffix sort library instead of qsufsort,
which is more efficient.

Note that for now we do not create a separate library for libdivsufsort
because it's not used anywhere else.

Obtained from:	Chromium
MFC after:	2 months
2016-07-25 03:58:19 +00:00
Sepherosa Ziehau
afffab7e8b hyperv/vmbus: Move bufring info definition to vmbus_brvar.h
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7282
2016-07-25 03:30:26 +00:00
Sepherosa Ziehau
7dd8881ca6 hyperv/vmbus: Rename hv_vmbus_priv.h to vmbus_brvar.h
It only contains bufring related bits for a while.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7281
2016-07-25 03:12:40 +00:00
Ed Maste
8485a1f677 avoid building otusfw when WITHOUT_SOURCELESS_UCODE set
PR:		204748
Submitted by:	Fabian Keil
Obtained from:	ElectroBSD
MFC after:	1 week
2016-07-25 00:49:27 +00:00
Ed Maste
4e359ce1a0 libelftc: fix demangling of wchar_t
"wchar_t" is 7 characters long, not 6.

PR:		208661
Submitted by:	Daniel McRobb
Obtained from:	ELF Tool Chain r3480
MFC after:	3 days
2016-07-24 23:40:33 +00:00
Gleb Smirnoff
3aa8d4a5ed Fix failures of scripted conversion.
Noticed by:	ache
Pointy hat to:	glebius
2016-07-24 20:47:57 +00:00
Xin LI
7db3f07863 Vendor import of libdivsufsort, a software library that implements
a lightweight suffix array construction algorithm.

Obtained from:	https://github.com/y-256/libdivsufsort
2016-07-24 20:39:43 +00:00
Bryan Drewery
7337126677 Don't disable binutils/elftoolchain bootstrapping with external compiler.
This was a regression from r300349.

Setting MK_CROSS_COMPILER=no forces the compiler bootstraping *and* the
binutils/elftoolchain bootstrapping to be disabled in share/mk/src.opts.mk.
The only intent with using an external compiler is to disable bootstrapping of
the compiler.  The binutils/elftoolchain bootstrapping must still occur unless
XAS is set.  This did not affect WITH_SYSTEM_COMPILER.

Now that setting an external compiler sets both MK_CLANG_BOOTSTRAP and
MK_GCC_BOOTSTRAP to no, and MK_CROSS_COMPILER does the same via
share/mk/src/opts.mk, remove redundant logic that checks for
MK_CROSS_COMPILER.  It will not always be true now that MK_CROSS_COMPILER==no
when an external compiler is used and --sysroot/-target is needed.

Reported by:	sbruno
Pointyhat to:	bdrewery
MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2016-07-24 18:50:11 +00:00
Bryan Drewery
a92545878a Fix empty WANT_COMPILER_TYPE when neither compiler is bootstrapped.
Bug in r303272.

MFC after:	3 days
X-MFC-With:	r303272
Sponsored by:	EMC / Isilon Storage Division
2016-07-24 18:28:14 +00:00
Bryan Drewery
b17f5b2261 SYSTEM_COMPILER: Rework the logic to allow a 'make test-system-compiler'.
1. Always calculate what the expected values are.
2. Add 'make test-system-compiler' to show all of the computed values
   vs the wanted values.
3. Extend the .info line to buildkernel/kernel-toolchain/toolchain/_cross-tools.
4. Consolidate all of the logic to one condition.

MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2016-07-24 18:05:05 +00:00
Ruslan Bukin
8500b15f9f Fix style. 2016-07-24 18:04:12 +00:00
Alexander Motin
c072301617 Postpone ntb_get_msix_info() till we need to negotiate MSIX.
Calling it earlier increases the window when MSIX info may change.
This change does not solve the problem completely, but seems logical.
Complete solution should probably include link reset in case of MSIX
remap to trigger new negotiation, but we have no way to get notified
about that now.
2016-07-24 14:42:11 +00:00
Baptiste Daroussin
b6b79081e8 Remove reference cpp(1) which is not used anymore 2016-07-24 11:05:23 +00:00
Gleb Smirnoff
7c96fe19a9 The date format for ru_RU.UTF-8 locale has changed some time ago, adjust
the ru_RU.UTF-8 calendar files.
2016-07-24 10:35:44 +00:00
Gleb Smirnoff
32e0ade6c4 Partially revert r257696/r257713, which have an issue with writing to user
controlled address. Restore the old code that emulated OSIOCGIFCONF in if.c.

Noticed by:	C Turt
2016-07-24 10:10:09 +00:00
Alexander Motin
fb112f72a8 Add more UEFI/e820 memory types from latest specifications.
This is only cosmetics.

MFC after:	2 weeks
2016-07-24 09:15:11 +00:00
Andrew Turner
07ef31f240 Remove now unused functions from the FDT uart cpu driver.
Obtained from:	ABT Systems Ltd
MFC after:	1 month
X-MFC with:	r303100
Sponsored by:	The FreeBSD Foundation
2016-07-24 08:52:49 +00:00
Michael Zhilin
334453c5a9 [nvram2env] split implementation into generic & MIPS-based code
Split implementation of nvram2env to generic (MI) & MIPS-based code:

 - removed includes like "*siba*", because they are unused
 - added nvram2env_mips.c file with MIPS-specific code, code moved from nvram2env.c
 - added header file to shared defines/structures/function prototypes between MI and MIPS code

Also this fix allows to implement own nvram2env drivers.

Reviewed by:    ray, adrian (mentor)
Approved by:    adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6513
2016-07-24 08:35:45 +00:00
Luiz Otavio O Souza
285e3c3ea9 Allow the use of micphy on am335x devices.
The Micrel PHYs reads the optional external delays from DTB.

Tested and used by uBMC and uFW.

Sponsored by:	Rubicon Communications (Netgate)
2016-07-24 01:31:41 +00:00
Mark Johnston
44be0a8ea5 Correct a comment - each page queue has its own lock.
Reviewed by:	alc
MFC after:	3 days
2016-07-23 21:03:25 +00:00
Mark Johnston
efe1ff4cf0 Update a comment in vm_page_advise() to match behaviour after r290529.
Reviewed by:	alc
MFC after:	3 days
2016-07-23 21:02:36 +00:00
Luiz Otavio O Souza
67a48226b7 Add support for the Microchip/Micrel KSZ9031 Gigabit Ethernet PHY.
Tested on uBMC and uFW.

Sponsored by:	Rubicon Communications (Netgate)
2016-07-23 18:16:40 +00:00
Luiz Otavio O Souza
522f50c5a0 Remove unused USB ethernet driver from BEAGLEBONE/AM335x kernel. 2016-07-23 17:36:17 +00:00
Navdeep Parhar
3e560c5393 Fix kernel builds with "device cxgbe". 2016-07-23 15:12:03 +00:00
John Baldwin
ab59c4d9f1 Use MTX_SYSINIT for the VESA lock.
vesa_init_done isn't a reliable guard for the mutex init.  If
vesa_configure() doesn't find valid VESA info it will not set
vesa_init_done, but the lock will remain initialized.  Revert r303076
and use MTX_SYSINIT to deterministically init the lock.

Reviewed by:	royger
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D7290
2016-07-23 14:38:09 +00:00
Baptiste Daroussin
b3033826a6 Recode the new dependency on converters/p5-Text-Iconv 2016-07-23 12:34:32 +00:00
Baptiste Daroussin
93bbfc43c2 Update mandoc to 1.13.4 release 2016-07-23 11:55:15 +00:00
Baptiste Daroussin
05798824d2 Update to mdocml 1.13.4 2016-07-23 11:45:42 +00:00
Baptiste Daroussin
594bf2d865 Add weekday to the date format of more locales
MFC after:	1 day
2016-07-23 11:25:34 +00:00
Baptiste Daroussin
c61bec5792 Add another hack to add weekday to date format to more locales
While here only initialize the iconv converter when needed
2016-07-23 11:24:05 +00:00
Baptiste Daroussin
1d981d8ef5 Do not try to delete the home of the user if is is not a directory for example
"/dev/null"

PR:		211195
Submitted by:	rday <ryan@ryanday.net>
Reported by:	eniorm <eniorm@gmail.com>
MFC after:	1 day
2016-07-23 10:19:10 +00:00
Konstantin Belousov
81fc45fc23 Addm missed required call to xo_finish() when only header is printed.
Reported by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-07-23 06:30:00 +00:00
Bryan Drewery
bd4dcc3e5f Move chown tests to proper path
Sponsored by:	EMC / Isilon Storage Division
2016-07-23 05:49:18 +00:00
Konstantin Belousov
90b581f2cc Implement mtx_trylock_spin(9).
Discussed with:	bde
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D7192
2016-07-23 05:30:55 +00:00
Andrey A. Chernov
a5ab035dd7 1) POSIX defines well when GLOB_NOMATCH or original pattern
(instead) should be returned, so we can't return GLOB_NOMATCH blindly
just because we dislike something in the pattern.

2) Remove extra condition.
2016-07-23 03:49:02 +00:00
Justin Hibbits
d071aa6df2 Use label math instead of hard-coding offsets for return addresses.
Though the chances of the code in these sections changing are low, future-proof
the sections and use label math.

Renumber the surrounding areas to avoid duplicate label numbers.
2016-07-23 02:27:42 +00:00
Andrey A. Chernov
09264d7448 1) We need the original pattern (in the next round of changes) not only in
case it fully constructed, but for half-constructed too, so have no
other choice to pass original pattern from glob() down to globextend()
instead of attempt to reconstruct I implement previously.

2) Instead of copy&paste the same big enough code, make function for it:
globfinal().
2016-07-23 01:21:58 +00:00
John Baldwin
f91fca5ba7 Add a driver to create VF devices on Chelsio T4/T5 NICs.
Chelsio NICs are a bit unique compared to some other NICs in that they
expose different functionality on different physical functions.  In
particular, PF4 is used to manage the NIC interfaces ('t4nex' and 't5nex').
However, PF4 is not able to create VF devices.  Instead, VFs are only
supported by physical functions 0 through 3.  This commit adds 't4iov'
and 't5iov' drivers that attach to PF0-3.

One extra wrinkle is that the iov devices cannot enable SR-IOV until the
firwmare has been initialized by the main PF4 driver.  To handle this
case, a new t4_if kobj interface has been added to permit cross-calls
between the PF drivers.  The PF4 driver notifies sibling drivers when it
is fully attached.  It also requests sibling drivers to detach before it
detaches.  Sibling drivers query the PF4 driver during their attach
routine to see if it is attached.  If not, the sibling drivers defer
their attach actions until the PF4 driver informs them it is attached.

VF devices are associated with a single port on the NIC.  VF devices
created from PF0 are associated with the first port on the NIC, VFs
from PF1 are associated with the second port, etc.  VF devices can
only be created from a PF device that has an associated port.  Thus,
on a 2-port card, VFs are only supported on PF0 and PF1.

Reviewed by:	np (earlier versions)
MFC after:	1 month
Sponsored by:	Chelsio Communications
2016-07-22 22:46:41 +00:00
John Baldwin
069af0eb14 Install a handler for firmware work request error messages.
If a driver sends an malformed or disallowed work request, the firmware
responds with a work request error.  Previously the driver treated this is
as an unexpected message and panicked.  Now it decodes the error message
to aid in debugging.

Reviewed by:	np (older version)
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D6950
2016-07-22 21:52:07 +00:00
Michael Zhilin
879e0b3e70 [new-committer:mizhka] add committer into graph
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D7288
2016-07-22 21:49:41 +00:00
John Baldwin
0d378d6b92 Update after r303154 to note that operations on local files are safe. 2016-07-22 20:52:40 +00:00