Commit Graph

226612 Commits

Author SHA1 Message Date
Ed Maste
6e309d75d2 ANSIfy vm_kern.c
PR:		222673
Submitted by:	ota@j.email.ne.jp
MFC after:	1 week
2017-10-13 13:53:19 +00:00
Ed Maste
fe7f211c0e truss: mention 'H' in usage
r295930 introduced the 'H' option to display thread IDs, but did not add
the option to usage().

PR:		222837
Submitted by:	Oliver Kiddle <okiddle@yahoo.co.uk>
MFC after:	1 week
2017-10-13 13:47:55 +00:00
Andrey V. Elsukov
ff0a137952 Fix regression in handling O_FORWARD_IP opcode after r279948.
To properly handle 'fwd tablearg,port' opcode, copy sin_port value from
sockaddr_in structure stored in the opcode into corresponding hopstore
field.

PR:		222953
MFC after:	1 week
2017-10-13 11:11:53 +00:00
Andrey V. Elsukov
092f8ba32f Return 'errno' value from the table_do_modify_record(), it is expected
by table_modify_record().

This makes quiet operations with tables really quiet.

PR:		222953
MFC after:	1 week
2017-10-13 11:01:33 +00:00
Andriy Gapon
f92e3400bc remove process and jail directory machinations from dounmount
The manipulations done by mountcheckdirs() are not that useful during
the unmount, they can bring about unexpected security consequences.

Thic change effectively reverts the change in r73241.

The change also allows to simplify the handling of rootvnode global
variable.

Discussed with:	mckusick, mjg, kib
Reviewed by:	trasz
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D12366
2017-10-13 09:42:05 +00:00
Andriy Gapon
668f9cbec0 i2c(8): clean up and clarify read operation
The code went to a lot of trouble to issue either a start+stop condition
or a repeated start condition only to follow it with a stop condition
and a read(2) call that issues a new start condition.
So, fix the read in I2C_MODE_REPEATED_START mode by using I2CREAD ioctl
within the running transaction.  This obviously requires that the slave
address has the read bit set which was not required before.

Another problem was with width parameter of zero and
I2C_MODE_REPEATED_START mode.  In that case we issued a repeated start
without any preceding start.

While here, remove the redundant (unused) argument to I2CSTOP throughout
the program.
Also, clarify the meaning of -w option, especially "-w 0", in the manual
page.

Reviewed by:	no one
Differential Revision: https://reviews.freebsd.org/D12331
2017-10-13 09:21:41 +00:00
Adrian Chadd
79caf56e97 [net80211] don't try to follow a NULL rxs pointer down the sink.
It's smelly, and we already checked earlier whether we needed to.
2017-10-13 06:49:07 +00:00
Adrian Chadd
565312d184 [ath] Begin using the replacement EDCA functions.
As part of ath10k and other chipset support, the EDCA stuff has to be moved
to potentially be per-VAP.  For hardware that doesn't support it (ie,
everything that we currently support) it can just fetch the "current"
global EDCA parameters for the NIC.

This is one of those parameters that is linked to the currently active
channel context / VAP in Linux mac80211 parlance.

Tested:

* ath(4), STA and AP modes
2017-10-12 21:58:51 +00:00
Adrian Chadd
48f95a360e [net80211] begin handling multiple hardware decap'ed A-MSDU in the RX path.
The duplicate detection code currently expects A-MSDU frames to be encaped -
they're decap'ed /after/ duplicate detection.

However for ath10k (and iwm hardware later on) the firmware supports
doing A-MSDU decap in hardware - which shows up as multiple frames with
the same sequence number and IV.

This is the first part of decap handling - if we see a stretch of A-MSDU
frames from the driver with the MORE bit set, then don't treat them
as duplicates.

This isn't 100% complete as crypto sequence number handling and "A-MSDU in
A-MPDU" needs handling, but it's a start.

This should be a glorified no-op for everyone.  Please tell me if it isn't.
2017-10-12 21:56:58 +00:00
Gleb Smirnoff
3b5aa97c10 Fix build after r324446. 2017-10-12 21:26:52 +00:00
Alan Somers
b49e9abcf4 Optimize zpool_read_all_labels with AIO
Read all labels in parallel instead of sequentially

MFC after:	3 weeks
X-MFC-With: 322854
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D12495
2017-10-12 21:25:11 +00:00
Glen Barber
977401bd3b Add arm/armv7 checks to env_check().
Sponsored by:	The FreeBSD Foundation
2017-10-12 20:31:10 +00:00
Bryan Drewery
9643739121 Fix shadowed variable hidden by WARNS changing to 3 in r313006.
Sponsored by:	Dell EMC Isilon
MFC after:	1 week
2017-10-12 19:58:21 +00:00
Ed Maste
cf62459c35 regen freebsd32_sysent.c after r324564 (freebsd32_posix_fallocate) 2017-10-12 18:31:28 +00:00
Ed Maste
bfb763bd24 allow posix_fallocate in 32-bit compat capability mode
Reported by:	kib
MFC after:	2 weeks
MFC with:	r324560
Sponsored by:	The FreeBSD Foundation
2017-10-12 18:30:54 +00:00
Emmanuel Vadot
449ed68efb a10_ehci: Remove the passby code
It doesn't seems to be needed anymore and this make ehci working again
on the Pine64.
Thanks to jmcneill@ for the help.

Tested on:	Pine64 (A64), OrangePi One (H3), BananapiM2 (A31s)
2017-10-12 18:00:29 +00:00
Bjoern A. Zeeb
8d94da2899 Add rev16 instruction to the disassembler.
Reviewed by:		andrew
Differential Revision:	https://reviews.freebsd.org/D12645
2017-10-12 15:53:54 +00:00
Ed Maste
05e47051a2 regen init_sysent.c r324560 2017-10-12 15:48:37 +00:00
Ed Maste
5532aa9bb4 allow posix_fallocate in capability mode
posix_fallocate is logically equivalent to writing zero blocks to the
desired file size and there is no reason to prevent calling it in
capability mode. posix_fallocate already checked for the CAP_WRITE
right, so we merely need to list it in capabilities.conf.

Reviewed by:	allanjude
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D12640
2017-10-12 15:45:53 +00:00
Warner Losh
042ea0aa16 Move panic back into libsa. It's documented in libstand(3) to belong
there.

Sponsored by: Netflix
2017-10-12 15:16:27 +00:00
Warner Losh
a37f4eb659 Define prototype for exit and ensure references
Define a prototype for exit in stand.h. Provide a reference to exit in
a few conf.c files to ensure that its definition gets pulled in early.
Since exit() is a MD routine, it isn't defined in libsa. However,
libsa tends to be listed last and will soon have panic() in it which
calls exit(). The reference to exit early ensures that the MD exit is
available to satisfy linking for static libraries.
2017-10-12 15:16:22 +00:00
Warner Losh
1461c26d38 Rename exit to efi_exit to avoid clashing with libsa exit definition
Rename exit to efi_exit. It doesn't have the proper signature and
conflicts with standard definition. Provide the standard definition as
well.

Sponsored by: Netflix
2017-10-12 15:16:16 +00:00
Warner Losh
9576e1ee54 Move ufsread.c
Move ufsread.c from sys/boot/common (which used to be all the common
files for /boot/loader, but grew to be all the common files for
sys/boot, but that's now sys/boot/libsa's job) to sys/boot/libsa.

Sponsored by: Netflix
2017-10-12 14:57:05 +00:00
Warner Losh
cd955ec800 Honor CFLAGS modifications in Makefile.inc by using += here. There's
no hyper-small space constraints, so there's no reason to tightly
control it.

Sponsored by: Netflix
2017-10-12 14:57:00 +00:00
Warner Losh
6f0970a4c6 Move crc32.c, util.c and gpt.c over to libsa.
Sponsored by: Netflix
2017-10-12 14:56:54 +00:00
Warner Losh
917587f435 Rename libstand.a to libsa.a and libstand32.a to libsa32.a
Sponsored by: Netflix
2017-10-12 14:56:48 +00:00
Warner Losh
3006b7c8a9 Kill the userboot copy of libstand.
It's not needed (it's now identical to libsa, and seems to have been
for some time).

Sponsored by: Netflix
2017-10-12 14:56:42 +00:00
Warner Losh
4eb1313ff2 Move lib/libstand to sys/boot/libsa
Move the sources to sys/boot. Make adjustments related to the
move. Kill LIBSTAND_SRC since it's no longer needed.

Sponsored by: Netflix
2017-10-12 14:56:28 +00:00
Warner Losh
93f4c41f28 Add $FreeBSD$ to ancient sources that it's missing from.
Sponsored by: Netflix
2017-10-12 14:53:25 +00:00
Bjoern A. Zeeb
14c25c2ac6 Previously there was a VIRT kernel to which I had added these options.
With that gone they need to go into GENERIC now.

Makes FreeBSD/arm usable on gem5 by default.

Reviewed by:		andrew
Differential Revision:	https://reviews.freebsd.org/D12566
2017-10-12 14:32:45 +00:00
Mateusz Guzik
92b25dcd61 xinstall: plug an infinite loop in directory creation
If stat continues to fail with ENOENT and mkdir with EEXIST the code wont
finish. In particular this can show up when the target path follows through
a symlink to a non-existent directory.

Reported by:	ae
MFC after:	1 week
2017-10-12 13:59:23 +00:00
Matt Joras
9aaf913e13 When unmounting a tmpfs, do not call free_unr.
tmpfs uses unr(9) to allocate inodes. Previously when unmounting it
would individually free the units when it freed each vnode. This is
unnecessary as we can use the newly-added unrhdr_clear function to clear
out the unr in onde go. This measurably reduces the time to unmount a
tmpfs with many files.

Reviewed by:	cem, lidl
Approved by:	rstone (mentor)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12591
2017-10-11 21:53:53 +00:00
Matt Joras
333dcaa498 Add clearing function for unr(9).
Previously before you could call unrhdr_delete you needed to
individually free every allocated unit. It is useful to be able to tear
down the unr without having to go through this process, as it is
significantly faster than freeing the individual units.

Reviewed by:	cem, lidl
Approved by:	rstone (mentor)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12591
2017-10-11 21:53:50 +00:00
Gleb Smirnoff
3bdf4c4274 Declare more TCP globals in tcp_var.h, so that alternative TCP stacks
can use them.  Gather all TCP tunables in tcp_var.h in one place and
alphabetically sort them, to ease maintainance of the list.

Don't copy and paste declarations in tcp_stacks/fastpath.c.
2017-10-11 20:36:09 +00:00
David C Somayajulu
ab142b3f49 Added support driver state capture/retrieval
MFC after:5 days
2017-10-11 20:22:01 +00:00
Conrad Meyer
d7d2f0d4d1 crypto(9): Print flags in more useful hex
Sponsored by:	Dell EMC Isilon
2017-10-11 20:04:30 +00:00
Ed Maste
2be6126d2a libunwind: use upstream patch to disable executable stacks
arm uses '@' as a comment character, and cannot use @progbits in the
.section directive. Apply the upstream noexec stach change which avoids
this issue.

Obtained from:	LLVM r277868
2017-10-11 19:26:39 +00:00
David C Somayajulu
c6acf96aac Add sanity checks in ql_hw_send() qla_send() to ensure that empty slots
in Tx Ring map to empty slot in Tx_buf array before Transmits. If the
checks fail further Transmission on that Tx Ring is prevented.

MFC after:5 days
2017-10-11 18:25:05 +00:00
Conrad Meyer
1356a2e6fa hwpmc(4): Actually use a sufficiently wide type
jhibbits@ points out that left shifting bits 8-11 24 bits won't fit in a 32-bit
integer either.

Corrects r324533.

Submitted by:	jhibbits
Sponsored by:	Dell EMC Isilon
2017-10-11 15:13:40 +00:00
Conrad Meyer
a7b8be82f0 hwpmc(4): Force sufficiently wide type for left shift
Ordinary input to this macro comes from pe_code, which is uint16_t.  Coverity
points out that shifting such a value discards the result of a 24 bit shift,
which is not what we want.

A follow-up to r324291.

CID:		1381676
Sponsored by:	Dell EMC Isilon
2017-10-11 14:59:04 +00:00
Baptiste Daroussin
578ec783ff Do not try to remove diff.7 optionaly has it is always removed
since GNU diff(1) has been replaced with BSD diff(1)
2017-10-11 14:41:11 +00:00
Ed Maste
00d78afd17 OptionalObsoleteFiles: remove diff from MK_GNU_DIFF=no block
diff (and man page) are not from GNU, as of r317209, and should not be
deleted if WITHOUT_GNU_DIFF is set. (WITHOUT_GNU_DIFF still controls
whether diff3 is built.)

Sponsored by:	The FreeBSD Foundation
2017-10-11 14:34:06 +00:00
Konstantin Belousov
70e3b262d1 The th_bintime, th_microtime and th_nanotime members of the timehand
all cache the last system time (uptime + boottime).  Only the format
differs.  Do not re-calculate the bintime and simply use the value
used to calculate the microtime and nanotime.

Group all the updates under the relevant comment.  Remove obsoleted
XXX part.

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after:	1 week
2017-10-11 11:03:11 +00:00
Sepherosa Ziehau
2832cbe7d2 rss: Remove never defined UDP_IPV4_EX
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D12455
2017-10-11 06:08:01 +00:00
Sepherosa Ziehau
9fed8bbef4 ixgbe: Remove never defined UDP_IPV4_EX
Reviewed by:	sbruno
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D12454
2017-10-11 05:55:52 +00:00
Sepherosa Ziehau
78e46963b6 hyperv/hn: Enable transparent VF by default.
MFC after:	3 days
Sponsored by:	Microsoft
2017-10-11 05:28:51 +00:00
Sepherosa Ziehau
6f12c42e8b hyperv/hn: Workaround erroneous hash type observed on WS2016 for VF.
The background was described in r324489.

MFC after:	3 days
Sponsored by:	Microsoft
2017-10-11 05:15:49 +00:00
Kurt Lidl
8e4db4e4a1 Don't use a non-zero argument for __builtin_frame_address
Mirror the change made for powerpc64 in r323687.  With this
change, gcc 6.4.0 can successfully compile and link a kernel
that runs on sparc64.

MFC after:	2 weeks
2017-10-11 03:50:44 +00:00
Justin Hibbits
7a174c3469 Do exception offset computations in 64 bits, not 32.
This fixes clang-built binaries on a gcc powerpc64 world.  Gets us one step
closer to a clang-built world.  The same change was made in later upstream
binutils.

Submitted by:	rdivacky
MFC after:	2 weeks
2017-10-11 02:39:20 +00:00
Ed Maste
e312709278 sysctl.9: document CTLFLAG_CAPRD and CTLFLAG_CAPWR
Reported by:	Shawn Webb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2017-10-10 23:54:25 +00:00