Commit Graph

233762 Commits

Author SHA1 Message Date
Ed Maste
2f9cfbc6f3 objdump.1: manually apply r229046 to the rendered man page 2018-06-15 17:16:27 +00:00
Bryan Drewery
127b666cd1 libcompat: Only build libmagic build tool if MK_FILE is yes.
Sponsored by:	Dell EMC
2018-06-15 17:03:57 +00:00
Ed Maste
12899612dd Add deprecation notice to objdump man page
PR:		229046
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13881
2018-06-15 17:03:49 +00:00
Bryan Drewery
6f1f2b1931 Only build jevents if MK_PMC is yes and only for amd64 in libcompat.
Sponsored by:	Dell EMC
2018-06-15 16:48:09 +00:00
Alan Somers
ad2afa8c8b audit(4): Add a few tests for network-related syscalls
Add tests for socket(2), socketpair(2), and setsockopt(2)

Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D15803
2018-06-15 16:41:28 +00:00
Ed Maste
2f75f4134c Correct kern.pre.mk comment: objcopy, not objdump, copies objects.
PR:		229046
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-06-15 16:32:18 +00:00
Ed Maste
fd897a5340 ldd: reference readelf instead of objdump in warning message
We have an obsolete GNU objdump 2.17.50 in the base system, which will
be removed in the future.  Suggest readelf(1) for examining ELF files
instead; for most use cases it is the preferred tool anyhow.

PR:		229046
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-06-15 16:28:50 +00:00
Ed Maste
e2d98a24b4 src.conf.5: regen after r335210, *BINUTILS description updates
Sponsored by:	The FreeBSD Foundation
2018-06-15 16:25:36 +00:00
Ruslan Bukin
1147facec3 Make virtio queue re-initialization steps to be similar to
original initialization, so we don't miss few registers to
configure.

This fixes vtnet(4) operation with QEMU's virtio-net-device.

Tested in QEMU with FreeBSD/RISC-V.

Reviewed by:	bryanv
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15821
2018-06-15 16:19:10 +00:00
Ed Maste
d87ef77d0f Remove objcopy from BINUTILS option descriptions
As of r306649 objcopy is always ELF Tool Chain's elfcopy; binutils
objcopy is never used.

PR:		229046
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-06-15 16:18:39 +00:00
Ed Maste
c647e51f6a elf.5: add readelf cross-reference
objdump is sometimes used in cases where readelf is more appropriate,
but the obsolete GNU objdump we have in the base system will be removed
in the future.

.Xr readelf from elf.5 to improve the odds the more appropriate tool
will be found.

PR:		229046
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-06-15 16:14:42 +00:00
Alan Somers
52e29fd0cd audit(4): improve formatting in tests/sys/audit/open.c
[skip ci]

Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D15797
2018-06-15 15:36:10 +00:00
Alan Somers
2884521370 audit(4): add tests for access(2), chmod(2), and friends
access(2), eaccess(2), faccessat(2), chmod(2), fchmod(2), lchmod(2), and
fchmodat(2).

Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D15805
Differential Revision:	https://reviews.freebsd.org/D15808
2018-06-15 15:32:02 +00:00
Eric van Gyzen
79d4ee83de Fix markup in zfs(8); no content change
Sponsored by:	Dell EMC
2018-06-15 15:28:31 +00:00
Chuck Tuffli
d1fa346fac Add linprocfs support for min_free_kbytes
This adds linprocfs support for proc/sys/vm/min_free_kbytes which the
free program requires for correct operation. The approach mirrors the
approach used in illumos.

Reviewed by:	imp (mentor), emaste
Approved by:	imp (mentor)
Differential Revision: https://reviews.freebsd.org/D15563
2018-06-15 15:22:27 +00:00
Ed Maste
931e2a1a6e linuxulator: do not include legacy syscalls on arm64
Existing linuxulator platforms (i386, amd64) support legacy syscalls,
such as non-*at ones like open, but arm64 and other new platforms do
not.

Wrap these in #ifdef LINUX_LEGACY_SYSCALLS, #defined in the MD linux.h
files.  We may need finer grained control in the future but this is
sufficient for now.

Reviewed by:	andrew
Sponsored by:	Turing Robotic Industries
Differential Revision:	https://reviews.freebsd.org/D15237
2018-06-15 14:41:51 +00:00
Ed Maste
4b842782da Correct debug control for linuxulator faccessat
The Linuxulator provides per-syscall debug control via the
compat.linux.debug sysctl.  There's generally a 1:1 mapping between
sysctl setting and syscall, but faccessat was controlled by the access
setting, perhaps due to copy-paste.

Sponsored by:	Turing Robotic Industries
2018-06-15 14:29:41 +00:00
Konstantin Belousov
1f3bc15763 linprocfs: add TracerPid to /proc/pid/status.
Also fix the value of parent pid if the process is traced.

Submitted by:	Yanko Yankulov <yanko.yankulov@gmail.com>
MFC after:	1 week
2018-06-15 13:56:58 +00:00
Ed Maste
6a1d1e0ca3 Add stubbed arm64 linuxulator /proc/cpuinfo handler
Sponsored by:	Turing Robotic Industries
2018-06-15 13:53:37 +00:00
Kyle Evans
e5f97ff2cc Revert r335173 at request of mmel@
This was the wrong solution to the problem; regulator_shutdown invokes
regnode_stop. regulator_stop is not a refcounting method, but it invokes
regnode_enable, which is.

mmel@ has a proposed patch/solution to instead provide regnode_fixed_stop
behavior that properly takes shared GPIO pins into account.
2018-06-15 13:14:45 +00:00
Michael Tuexen
43b223f42e When retransmitting TCP SYN-ACK segments with the TCP timestamp option
enabled use an updated timestamp instead of reusing the one used in
the initial TCP SYN-ACK segment.

This patch ensures that an updated timestamp is used when sending the
SYN-ACK from the syncache code. It was already done if the
SYN-ACK was retransmitted from the generic code.

This makes the behaviour consistent and also conformant with
the TCP specification.

Reviewed by:		jtl@, Jason Eggleston
MFC after:		1 month
Sponsored by:		Neflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D15634
2018-06-15 12:28:43 +00:00
Rick Macklem
725f388bdc Add an entry into the Makefile for pnfsdskill.
pnfsdskill was added by r335192. This commit adds an entry for it to the
Makefile.
2018-06-15 11:54:55 +00:00
Rick Macklem
b3cd498b58 Add a command that disables a pNFS server mirrored DS.
This command can be used by a sysadmin to disable a malfunctioning pNFS server
mirrored DS. It is safe to use when a mirrored DS has already been disabled
via an I/O or network partitioning error.
2018-06-15 11:52:34 +00:00
Emmanuel Vadot
cfba8dec89 allwinner: ccung: Fully subclass the clock drivers
Each clock drivers if now fully subclassed, this have the advantage that
we can control the probe order.
Some clocks can have parents from other drivers, for example clocks in the
sun8i_r driver uses clocks from the main clock driver.
This worked before because the sun8i_r node is after the main ccu node in the
dtb and driver are probed in DTB order. This cannot work with the Display
Engine clocks as it is the first node in the DTB.

Tested on:    A83T, H5 A64
Tested on:    A20 (kevans)
2018-06-15 08:36:21 +00:00
Xin LI
0531ab7253 Added option to cluster-align the start of the root directory.
Obtained from:	Android
Obtained from:	052f275621
Obtained from:	8218b6aae9
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D15672
2018-06-15 06:03:40 +00:00
Kyle Evans
031f92f512 bsdgrep(1): Remove redundant initialization; unconditionally assigned later 2018-06-15 03:31:30 +00:00
Justin Hibbits
ec0646391d ofw_reg_to_paddr(): Fix minor typo in KASSERT message 2018-06-15 03:28:05 +00:00
Matt Macy
2e3f84e5b7 Quiet coretemp probe
Only the first device will print
coretemp0: <CPU On-Die Thermal Sensors> numa-domain 0 on cpu0
instead of all hyper threads

Submitted by:	kbowling
Reviewed by:	imp, sbruno
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D15727
2018-06-15 02:28:36 +00:00
Bryan Drewery
03bd1b693e proc0_post: Fix some locking issues
- Filter out PRS_NEW procs as rufetch() tries taking the thread lock
  which may not yet be initialized.
- Hold PROC_LOCK to ensure stability of iterating the threads.
- p_rux fields are protected by the process statlock as well.

MFC after:	2 weeks
Reviewed by:	kib
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D15809
2018-06-15 00:36:41 +00:00
Olivier Houchard
78bcf87e3e Use M_EXEC when calling malloc() to allocate the memory to store the module,
as it'll contain executable code.
2018-06-14 23:10:10 +00:00
John Baldwin
44a230cd92 Exit with an error if a linker hints file can't be found.
Continuing with a NULL hints variable just triggers a segfault later on.
The other error cases in this function all exit for an error rather than
warning.

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D15579
2018-06-14 22:31:30 +00:00
Gleb Smirnoff
9293873e83 TCPOUTFLAGS no longer exists since r334843. 2018-06-14 22:25:10 +00:00
Michael Tuexen
33ef123090 Provide the ip6_plen in network byte order when calling ip6_output().
This is not strictly required by ip6_output(), since it overrides it,
but it is needed for upcoming dtrace support.
2018-06-14 21:30:52 +00:00
Brooks Davis
7d87c005da Regen after 335177 (rename sys_obreak to sys_break). 2018-06-14 21:29:31 +00:00
Brooks Davis
9da5364ed9 Name the implementation of brk and sbrk sys_break().
The break() system call was renamed (several times) starting in v3
AT&T UNIX when C was invented and break was a language keyword. The
last vestage of a need for it to be called something else (eg obreak)
was removed in r225617 which consistantly prefixed all syscall
implementations.

Reviewed by:	emaste, kib (older version)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15638
2018-06-14 21:27:25 +00:00
Michael Tuexen
8d86bd564f Whitespace changes. 2018-06-14 21:22:14 +00:00
Rick Macklem
203c00b359 Add a new man page that briefly describes the pNFS variant of the NFSv4.1
protocol.

This is a content change.
2018-06-14 21:12:08 +00:00
Rick Macklem
4c176e18d3 Document the "-p" and "-m" options added to nfsd.c by r335172.
This is a content change.
2018-06-14 20:55:33 +00:00
Kyle Evans
cba506f2c1 extres/regulator: Properly refcount gpio regulators
regnode::enable_cnt is generally used to refcount regulator nodes. For
GPIOs, the refcount was done on the gpio_entry since more than one regulator
can share a GPIO.

GPIO regulators were not taking part in the node refcount, since they had
their own mechanism. This caused some fallout after manu started disabling
everybody's unused regulators in r331989.

Refcount it.

Glanced over by:	manu
2018-06-14 20:37:25 +00:00
Rick Macklem
61a835e403 Add the "-p" and "-m" options to nfsd.c for the pNFS service.
The "-p" option specifies that the nfsd should run a pNFS service instead
of a regular NFS service. The "-m" option is only meaningful when used with
"-p" to specify that mirroring on the DSs should be done and on how many of
them.
This change requires the kernel changes committed as r334930.
The man page update will be committed as a separate commit soon.
2018-06-14 20:36:55 +00:00
Konstantin Belousov
b7b8a09658 Handle the race between fork/vm_object_split() and faults.
If fault started before vmspace_fork() locked the map, and then during
fork, vm_map_copy_entry()->vm_object_split() is executed, it is
possible that the fault instantiate the page into the original object
when the page was already copied into the new object (see
vm_map_split() for the orig/new objects terminology). This can happen
if split found a busy page (e.g. from the fault) and slept dropping
the objects lock, which allows the swap pager to instantiate
read-behind pages for the fault.  Then the restart of the scan can see
a page in the scanned range, where it was already copied to the upper
object.

Fix it by instantiating the read-ahead pages before
swap_pager_getpages() method drops the lock to allocate pbuf.  The
object scan would see the whole range prefilled with the busy pages
and not proceed the range.

Note that vm_fault rechecks the map generation count after the object
unlock, so that it restarts the handling if raced with split, and
re-lookups the right page from the upper object.

In collaboration with:	alc
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2018-06-14 19:41:02 +00:00
Emmanuel Vadot
7de871aa81 mx25l: compat_data is only defined when FDT is
Reported by:	O. Hartmann <ohartmann@walstatt.org>
2018-06-14 19:01:40 +00:00
Kyle Evans
2ac5ef02d4 a10_ahci: Correct clock indices for new bindings
r329104 imported 4.15 DTS which brought CCU to a10/a20. In the process, they
swapped the ordering of 'clocks' for allwinner,sun4i-a10-ahci on both
sun4i-a10 and sun7i-a20 from PLL, Gate to Gate, PLL.

Swap it in the driver.
2018-06-14 18:34:02 +00:00
Kyle Evans
dcc1299f0b aw_ccung: Add a10/a20 support
Note: At this time, this has only been tested on a single board from one of
the supported SoCs. This is enough to boot the board from MMC and have
functional USB- which is still an improvement over where we were at just
before with no functional clocks.

Differential Revision:	https://reviews.freebsd.org/D15810
2018-06-14 17:50:29 +00:00
Kyle Evans
85f58288a7 aw_ccung: Support clock factors where factor=0, factor is effectively 1
This happens in two cases for a20 clocks:

pll_core for 'n' factor:
factor=0, val=1
factor=n, val=n

ahb divisor:
factor=0,val=/2
factor=n,val=/2^n

Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D15806
2018-06-14 17:36:02 +00:00
Emmanuel Vadot
aab8510031 arm timer: Use the default get_cntxct by default
Reported by:	kevans
2018-06-14 17:32:23 +00:00
Justin Hibbits
ebf95d96d9 Split the PowerISA 3.0 HPT implementation from historic
PowerISA 3.0 makes several changes to not only the format of the HPT but
also the behavior surrounding it.  For instance, TLBIE no longer requires
serialization.  Removing this lock cuts buildworld time in half on a
18-core/72-thread POWER9 system, demonstrating that this lock is highly
contended on such a system.

There was odd behavior observed trying to make this change in a
backwards-compatible manner in moea64_native.c, so the best option was to
fully split it, and largely revert the original changes adding POWER9
support to the original file.

Suggested by:	nwhitehorn
2018-06-14 17:23:51 +00:00
Emmanuel Vadot
50d3578f0b mx25l: Add pnp info 2018-06-14 17:21:09 +00:00
Emmanuel Vadot
64b507e5fe spi: Add SPIBUS_PNP_INFO macro
The PNP info string is the same as the SIMPLEBUS one but driver should
depend on spibus and not simplebus
2018-06-14 17:20:47 +00:00
Emmanuel Vadot
ba03ef5e21 aw_spi: Add pnp info 2018-06-14 17:19:44 +00:00