]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoobjdump.1: manually apply r229046 to the rendered man page
Ed Maste [Fri, 15 Jun 2018 17:16:27 +0000 (17:16 +0000)]
objdump.1: manually apply r229046 to the rendered man page

5 years agolibcompat: Only build libmagic build tool if MK_FILE is yes.
Bryan Drewery [Fri, 15 Jun 2018 17:03:57 +0000 (17:03 +0000)]
libcompat: Only build libmagic build tool if MK_FILE is yes.

Sponsored by: Dell EMC

5 years agoAdd deprecation notice to objdump man page
Ed Maste [Fri, 15 Jun 2018 17:03:49 +0000 (17:03 +0000)]
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

5 years agoOnly build jevents if MK_PMC is yes and only for amd64 in libcompat.
Bryan Drewery [Fri, 15 Jun 2018 16:48:09 +0000 (16:48 +0000)]
Only build jevents if MK_PMC is yes and only for amd64 in libcompat.

Sponsored by: Dell EMC

5 years agoaudit(4): Add a few tests for network-related syscalls
Alan Somers [Fri, 15 Jun 2018 16:41:28 +0000 (16:41 +0000)]
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

5 years agoCorrect kern.pre.mk comment: objcopy, not objdump, copies objects.
Ed Maste [Fri, 15 Jun 2018 16:32:18 +0000 (16:32 +0000)]
Correct kern.pre.mk comment: objcopy, not objdump, copies objects.

PR: 229046
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

5 years agoldd: reference readelf instead of objdump in warning message
Ed Maste [Fri, 15 Jun 2018 16:28:50 +0000 (16:28 +0000)]
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

5 years agosrc.conf.5: regen after r335210, *BINUTILS description updates
Ed Maste [Fri, 15 Jun 2018 16:25:36 +0000 (16:25 +0000)]
src.conf.5: regen after r335210, *BINUTILS description updates

Sponsored by: The FreeBSD Foundation

5 years agoMake virtio queue re-initialization steps to be similar to
Ruslan Bukin [Fri, 15 Jun 2018 16:19:10 +0000 (16:19 +0000)]
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

5 years agoRemove objcopy from BINUTILS option descriptions
Ed Maste [Fri, 15 Jun 2018 16:18:39 +0000 (16:18 +0000)]
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

5 years agoelf.5: add readelf cross-reference
Ed Maste [Fri, 15 Jun 2018 16:14:42 +0000 (16:14 +0000)]
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

5 years agoaudit(4): improve formatting in tests/sys/audit/open.c
Alan Somers [Fri, 15 Jun 2018 15:36:10 +0000 (15:36 +0000)]
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

5 years agoaudit(4): add tests for access(2), chmod(2), and friends
Alan Somers [Fri, 15 Jun 2018 15:32:02 +0000 (15:32 +0000)]
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

5 years agoFix markup in zfs(8); no content change
Eric van Gyzen [Fri, 15 Jun 2018 15:28:31 +0000 (15:28 +0000)]
Fix markup in zfs(8); no content change

Sponsored by: Dell EMC

5 years agoAdd linprocfs support for min_free_kbytes
Chuck Tuffli [Fri, 15 Jun 2018 15:22:27 +0000 (15:22 +0000)]
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

5 years agolinuxulator: do not include legacy syscalls on arm64
Ed Maste [Fri, 15 Jun 2018 14:41:51 +0000 (14:41 +0000)]
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

5 years agoCorrect debug control for linuxulator faccessat
Ed Maste [Fri, 15 Jun 2018 14:29:41 +0000 (14:29 +0000)]
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

5 years agolinprocfs: add TracerPid to /proc/pid/status.
Konstantin Belousov [Fri, 15 Jun 2018 13:56:58 +0000 (13:56 +0000)]
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

5 years agoAdd stubbed arm64 linuxulator /proc/cpuinfo handler
Ed Maste [Fri, 15 Jun 2018 13:53:37 +0000 (13:53 +0000)]
Add stubbed arm64 linuxulator /proc/cpuinfo handler

Sponsored by: Turing Robotic Industries

5 years agoRevert r335173 at request of mmel@
Kyle Evans [Fri, 15 Jun 2018 13:14:45 +0000 (13:14 +0000)]
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.

5 years agoWhen retransmitting TCP SYN-ACK segments with the TCP timestamp option
Michael Tuexen [Fri, 15 Jun 2018 12:28:43 +0000 (12:28 +0000)]
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

5 years agoAdd an entry into the Makefile for pnfsdskill.
Rick Macklem [Fri, 15 Jun 2018 11:54:55 +0000 (11:54 +0000)]
Add an entry into the Makefile for pnfsdskill.

pnfsdskill was added by r335192. This commit adds an entry for it to the
Makefile.

5 years agoAdd a command that disables a pNFS server mirrored DS.
Rick Macklem [Fri, 15 Jun 2018 11:52:34 +0000 (11:52 +0000)]
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.

5 years agoallwinner: ccung: Fully subclass the clock drivers
Emmanuel Vadot [Fri, 15 Jun 2018 08:36:21 +0000 (08:36 +0000)]
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)

5 years agoAdded option to cluster-align the start of the root directory.
Xin LI [Fri, 15 Jun 2018 06:03:40 +0000 (06:03 +0000)]
Added option to cluster-align the start of the root directory.

Obtained from: Android
Obtained from: https://android.googlesource.com/platform/system/core/+/052f27562154d175267999106bd6bf18fc8c363e
Obtained from: https://android.googlesource.com/platform/system/core/+/8218b6aae9cd4a19fa074a8a8203fe9275b35447
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D15672

5 years agobsdgrep(1): Remove redundant initialization; unconditionally assigned later
Kyle Evans [Fri, 15 Jun 2018 03:31:30 +0000 (03:31 +0000)]
bsdgrep(1): Remove redundant initialization; unconditionally assigned later

5 years agoofw_reg_to_paddr(): Fix minor typo in KASSERT message
Justin Hibbits [Fri, 15 Jun 2018 03:28:05 +0000 (03:28 +0000)]
ofw_reg_to_paddr(): Fix minor typo in KASSERT message

5 years agoQuiet coretemp probe
Matt Macy [Fri, 15 Jun 2018 02:28:36 +0000 (02:28 +0000)]
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

5 years agoproc0_post: Fix some locking issues
Bryan Drewery [Fri, 15 Jun 2018 00:36:41 +0000 (00:36 +0000)]
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

5 years agoUse M_EXEC when calling malloc() to allocate the memory to store the module,
Olivier Houchard [Thu, 14 Jun 2018 23:10:10 +0000 (23:10 +0000)]
Use M_EXEC when calling malloc() to allocate the memory to store the module,
as it'll contain executable code.

5 years agoExit with an error if a linker hints file can't be found.
John Baldwin [Thu, 14 Jun 2018 22:31:30 +0000 (22:31 +0000)]
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

5 years agoTCPOUTFLAGS no longer exists since r334843.
Gleb Smirnoff [Thu, 14 Jun 2018 22:25:10 +0000 (22:25 +0000)]
TCPOUTFLAGS no longer exists since r334843.

5 years agoProvide the ip6_plen in network byte order when calling ip6_output().
Michael Tuexen [Thu, 14 Jun 2018 21:30:52 +0000 (21:30 +0000)]
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.

5 years agoRegen after 335177 (rename sys_obreak to sys_break).
Brooks Davis [Thu, 14 Jun 2018 21:29:31 +0000 (21:29 +0000)]
Regen after 335177 (rename sys_obreak to sys_break).

5 years agoName the implementation of brk and sbrk sys_break().
Brooks Davis [Thu, 14 Jun 2018 21:27:25 +0000 (21:27 +0000)]
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

5 years agoWhitespace changes.
Michael Tuexen [Thu, 14 Jun 2018 21:22:14 +0000 (21:22 +0000)]
Whitespace changes.

5 years agoAdd a new man page that briefly describes the pNFS variant of the NFSv4.1
Rick Macklem [Thu, 14 Jun 2018 21:12:08 +0000 (21:12 +0000)]
Add a new man page that briefly describes the pNFS variant of the NFSv4.1
protocol.

This is a content change.

5 years agoDocument the "-p" and "-m" options added to nfsd.c by r335172.
Rick Macklem [Thu, 14 Jun 2018 20:55:33 +0000 (20:55 +0000)]
Document the "-p" and "-m" options added to nfsd.c by r335172.

This is a content change.

5 years agoextres/regulator: Properly refcount gpio regulators
Kyle Evans [Thu, 14 Jun 2018 20:37:25 +0000 (20:37 +0000)]
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

5 years agoAdd the "-p" and "-m" options to nfsd.c for the pNFS service.
Rick Macklem [Thu, 14 Jun 2018 20:36:55 +0000 (20:36 +0000)]
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.

5 years agoHandle the race between fork/vm_object_split() and faults.
Konstantin Belousov [Thu, 14 Jun 2018 19:41:02 +0000 (19:41 +0000)]
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

5 years agomx25l: compat_data is only defined when FDT is
Emmanuel Vadot [Thu, 14 Jun 2018 19:01:40 +0000 (19:01 +0000)]
mx25l: compat_data is only defined when FDT is

Reported by: O. Hartmann <ohartmann@walstatt.org>

5 years agoa10_ahci: Correct clock indices for new bindings
Kyle Evans [Thu, 14 Jun 2018 18:34:02 +0000 (18:34 +0000)]
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.

5 years agoaw_ccung: Add a10/a20 support
Kyle Evans [Thu, 14 Jun 2018 17:50:29 +0000 (17:50 +0000)]
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

5 years agoaw_ccung: Support clock factors where factor=0, factor is effectively 1
Kyle Evans [Thu, 14 Jun 2018 17:36:02 +0000 (17:36 +0000)]
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

5 years agoarm timer: Use the default get_cntxct by default
Emmanuel Vadot [Thu, 14 Jun 2018 17:32:23 +0000 (17:32 +0000)]
arm timer: Use the default get_cntxct by default

Reported by: kevans

5 years agoSplit the PowerISA 3.0 HPT implementation from historic
Justin Hibbits [Thu, 14 Jun 2018 17:23:51 +0000 (17:23 +0000)]
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

5 years agomx25l: Add pnp info
Emmanuel Vadot [Thu, 14 Jun 2018 17:21:09 +0000 (17:21 +0000)]
mx25l: Add pnp info

5 years agospi: Add SPIBUS_PNP_INFO macro
Emmanuel Vadot [Thu, 14 Jun 2018 17:20:47 +0000 (17:20 +0000)]
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

5 years agoaw_spi: Add pnp info
Emmanuel Vadot [Thu, 14 Jun 2018 17:19:44 +0000 (17:19 +0000)]
aw_spi: Add pnp info

5 years agoarm timer: Add workaround for Allwinner A64 timer
Emmanuel Vadot [Thu, 14 Jun 2018 17:18:15 +0000 (17:18 +0000)]
arm timer: Add workaround for Allwinner A64 timer

The timer present in allwinner A64 SoC is unstable, value can jump backward
or forward.
It was found that when bit 11 and upper roll over the low bits can sometimes
being read as all as 1 or all as 0.
Simply ignore the values for those cases.

5 years agoFix da(4) locking when probing SMR drives.
Kenneth D. Merry [Thu, 14 Jun 2018 17:08:44 +0000 (17:08 +0000)]
Fix da(4) locking when probing SMR drives.

Probing host aware and host managed SMR drives got broken in revision
330796.

The added cam_periph_lock() calls were in areas in dadone() where
the peripheral lock was already held.

Since then, dadone() has been split into separate functions that are
dedicated to each probe state.

The result is that when probing a host aware drive, I ran into a recursive
lock acquisition in dadone_probeatalogdir(). I would have run into the
same problem in dadone_probeataiddir(), and in dadone_probeatasup() and
dadone_probeatazone() in the error paths had the probe continued.

The solution is to take out all of the extra cam_periph_lock() calls. I
also added cam_periph_assert(periph, MA_OWNED) near the top of each of
the dadone_* calls. These make it clear to anyone coming along in the
the future that the lock is held in the probe done functions.

Also add a locking assert in daprobedone(), to make it clear that it must
be called with the periph lock held.

Sponsored by: Spectra Logic
Differential Revision: https://reviews.freebsd.org/D15764

5 years agolibsa: open() should use NULL instead of typecasted 0
Toomas Soome [Thu, 14 Jun 2018 16:11:50 +0000 (16:11 +0000)]
libsa: open() should use NULL instead of typecasted 0

5 years agodevmatch: Address some rc nits
Kyle Evans [Thu, 14 Jun 2018 16:09:29 +0000 (16:09 +0000)]
devmatch: Address some rc nits

- devmatch_enable in rc.conf(5) was not gating the start of devmatch

- Use quietstart in devd/devmatch to suppress dozens of 'Cannot start'
  messages and other spurious messages from rc.subr(8) that aren't
  necessarily helpful.

Discussed with: imp

5 years agoFix CTR formatting for moea64_native bootstrap
Justin Hibbits [Thu, 14 Jun 2018 16:01:11 +0000 (16:01 +0000)]
Fix CTR formatting for moea64_native bootstrap

On very large memory systems 'size' can become 2GB or larger, resulting in a
negative value being formatted.  Also, moea64_pteg_count is already a long, so
format it as such.

5 years agoaudit(4): add tests for fhopen, fhstat, and fhstatfs
Alan Somers [Thu, 14 Jun 2018 15:04:49 +0000 (15:04 +0000)]
audit(4): add tests for fhopen, fhstat, and fhstatfs

Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15798

5 years agoAdd missing BPF_MTAP2() for outbound packets.
Andrey V. Elsukov [Thu, 14 Jun 2018 15:04:30 +0000 (15:04 +0000)]
Add missing BPF_MTAP2() for outbound packets.

5 years agoConvert if_me(4) driver to use encap_lookup_t method and be lockless on
Andrey V. Elsukov [Thu, 14 Jun 2018 14:53:24 +0000 (14:53 +0000)]
Convert if_me(4) driver to use encap_lookup_t method and be lockless on
data path.

5 years agoaudit(4): fix typo from r335136
Alan Somers [Thu, 14 Jun 2018 14:53:01 +0000 (14:53 +0000)]
audit(4): fix typo from r335136

Typo in Makefile accidentally disabled some older tests

MFC after: 2 weeks
X-MFC-With: 335136

5 years agoaudit(4): add tests for flock, fcntl, and fsync
Alan Somers [Thu, 14 Jun 2018 13:42:58 +0000 (13:42 +0000)]
audit(4): add tests for flock, fcntl, and fsync

Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15795

5 years agolinuxolator/amd64: Don't mangle %r10 on return from syscall for EJUSTRETURN.
Konstantin Belousov [Thu, 14 Jun 2018 12:35:57 +0000 (12:35 +0000)]
linuxolator/amd64: Don't mangle %r10 on return from syscall for EJUSTRETURN.

This fixes the %r10 content for rt_sigreturn.

Submitted by: Yanko Yankulov <yanko.yankulov@gmail.com>
MFC after: 1 week

5 years agotop(1): remove myself from top.1
Eitan Adler [Thu, 14 Jun 2018 12:14:51 +0000 (12:14 +0000)]
top(1): remove myself from top.1

I wrote some, but not enough for the man page.

5 years agoIn m_megapullup() use m_getjcl() to allocate 9k or 16k mbuf when requested.
Andrey V. Elsukov [Thu, 14 Jun 2018 11:15:39 +0000 (11:15 +0000)]
In m_megapullup() use m_getjcl() to allocate 9k or 16k mbuf when requested.

It is better to try allocate a big mbuf, than just silently drop a big
packet. A better solution could be reworking of libalias modules to be
able use m_copydata()/m_copyback() instead of requiring the single
contiguous buffer.

PR: 229006
MFC after: 1 week

5 years agoReorganize code flow in fpudna()/npxdna() to highlight the critical
Konstantin Belousov [Thu, 14 Jun 2018 11:09:51 +0000 (11:09 +0000)]
Reorganize code flow in fpudna()/npxdna() to highlight the critical
section scope.  Sprinkle __predict_false() for conditions known to
never occur or occur only on rare platforms.

Sponsored by: The FreeBSD Foundation

5 years agoRemove printf() in #NM handler.
Konstantin Belousov [Thu, 14 Jun 2018 10:33:26 +0000 (10:33 +0000)]
Remove printf() in #NM handler.

Give up and remove the almost useless informational message reporting
that device not available exception occured while our state tracking
indicates the current CPU has FPU context loaded for the current
thread.

It seems that this is recurring bug with some VM monitors.

Sponsored by: The FreeBSD Foundation

5 years agoMove four functions in nfscl.ko to nfscommon.ko.
Rick Macklem [Thu, 14 Jun 2018 10:00:19 +0000 (10:00 +0000)]
Move four functions in nfscl.ko to nfscommon.ko.

Four functions nfscl_reqstart(), nfscl_fillsattr(), nfsm_stateidtom()
and nfsmnt_mdssession() are now called from within the nfsd.
As such, they needed to be moved from nfscl.ko to nfscommon.ko so that
nfsd.ko would load when nfscl.ko wasn't loaded.

Reported by: herbert@gojira.at

5 years agoAdd NULL check like the rest of code has.
Andrey V. Elsukov [Thu, 14 Jun 2018 09:36:25 +0000 (09:36 +0000)]
Add NULL check like the rest of code has.

It is possible that ifma_protospec becomes NULL in this function for
some entry, but it is still referenced and thus it will not unlinked
from the list. Then "restart" condition triggers and this entry with
NULL ifma_protospec will lead to page fault.

PR: 228982

5 years agoRemove stale comment. in6_ifdetach() can be called from places
Andrey V. Elsukov [Thu, 14 Jun 2018 09:29:39 +0000 (09:29 +0000)]
Remove stale comment.  in6_ifdetach() can be called from places
where addresses are not removed yet.

5 years agolibsa: remobe unneeded check before free()
Toomas Soome [Thu, 14 Jun 2018 09:10:34 +0000 (09:10 +0000)]
libsa: remobe unneeded check before free()

free() is checking for NULL, remove duplicate check.

5 years agolibsa: f_rabuf could be NULL
Toomas Soome [Thu, 14 Jun 2018 09:06:53 +0000 (09:06 +0000)]
libsa: f_rabuf could be NULL

It is possible that we will not get RA buffer from open(), therefore
we must validate RA.

5 years agolibsa: cstyle cleanup for open/close/read/write sources
Toomas Soome [Thu, 14 Jun 2018 08:58:10 +0000 (08:58 +0000)]
libsa: cstyle cleanup for open/close/read/write sources

5 years agork_i2c: Add manpage for this driver
Emmanuel Vadot [Thu, 14 Jun 2018 07:59:47 +0000 (07:59 +0000)]
rk_i2c: Add manpage for this driver

5 years agoRevert r335094 and properly fix OFED build after r335053.
Hans Petter Selasky [Thu, 14 Jun 2018 07:55:10 +0000 (07:55 +0000)]
Revert r335094 and properly fix OFED build after r335053.

MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agodts: Update our copy to Linux 4.17
Emmanuel Vadot [Thu, 14 Jun 2018 07:12:10 +0000 (07:12 +0000)]
dts: Update our copy to Linux 4.17

5 years agodts: Import files from Linux 4.17
Emmanuel Vadot [Thu, 14 Jun 2018 06:56:07 +0000 (06:56 +0000)]
dts: Import files from Linux 4.17

5 years agobootprog_info is generated in vers.c. Move it's definition to
Warner Losh [Thu, 14 Jun 2018 06:41:33 +0000 (06:41 +0000)]
bootprog_info is generated in vers.c. Move it's definition to
bootstrap.h and remove all the redundant copies.

Sponsored by: Netflix

5 years agoUse bool for vargood, since it's a boolean.
Warner Losh [Thu, 14 Jun 2018 06:41:22 +0000 (06:41 +0000)]
Use bool for vargood, since it's a boolean.

Sponsored by: Netflix

5 years agoAdd modules/rockchip
Emmanuel Vadot [Thu, 14 Jun 2018 06:40:59 +0000 (06:40 +0000)]
Add modules/rockchip

Build rockchip modules as part of buildkernel.
Add the i2c controller module.

5 years agork_i2c: Add driver for the I2C controller present in RockChip SoC
Emmanuel Vadot [Thu, 14 Jun 2018 06:39:33 +0000 (06:39 +0000)]
rk_i2c: Add driver for the I2C controller present in RockChip SoC

This controller have a special mode for RX to help with smbus-like transfer
when the controller will automatically send the slave address, register address
and read the data. Use it when possible.
The same mode for TX is describe is the datasheet but is broken and have been
since ~10 years of presence of this controller in RockChip SoCs.

Attach this driver early at we need it to communicate with the PMIC early in the
boot.
Do not hook it to the kernel build for now.

5 years agork3328: Add support for the i2c clocks
Emmanuel Vadot [Thu, 14 Jun 2018 06:34:27 +0000 (06:34 +0000)]
rk3328: Add support for the i2c clocks

5 years agoif_dwc_rk: Add DesignWare driver for RockChip SoCs.
Emmanuel Vadot [Thu, 14 Jun 2018 06:28:09 +0000 (06:28 +0000)]
if_dwc_rk: Add DesignWare driver for RockChip SoCs.

Add driver for the designware ethernet controller found in some RockChip SoCs.
The driver still rely on a lot of things setup by the bootloader like clocks
and phy mode.
But since netbooting is the only/easiest way to boot rockchip board at the
moment add the driver so other people can test/dev on thoses boards.

5 years agoRemove redundant defs.mk includes. They aren't needed.
Warner Losh [Thu, 14 Jun 2018 06:14:48 +0000 (06:14 +0000)]
Remove redundant defs.mk includes. They aren't needed.

5 years agork_armclk: Add the write mask to the register mux value
Emmanuel Vadot [Thu, 14 Jun 2018 05:46:57 +0000 (05:46 +0000)]
rk_armclk: Add the write mask to the register mux value

This was omitted in r334112 and r334996 which cause the PLL to not correctly
reparent, leaving the armclk to be derived from the APLL instead of the NPLL.
The arm core clock is now correctly set to 600Mhz via the assigned-clock present
in the DTB.

5 years agork_pll: Add support for mode
Emmanuel Vadot [Thu, 14 Jun 2018 05:43:45 +0000 (05:43 +0000)]
rk_pll: Add support for mode

RockChip PLL have two modes controlled by a register, a "slow mode" (the
default one) where the frequency is derived from the 24Mhz oscillator on the
board, and a "normal" one when the pll take it's input from the real PLL output.

Default the mode to normal for all the PLLs.

5 years agork_pinctrl: Only add gpio subnode
Emmanuel Vadot [Thu, 14 Jun 2018 05:41:16 +0000 (05:41 +0000)]
rk_pinctrl: Only add gpio subnode

This is the only node we are interested in so do not waste time to test
creating device that will be either unused or fail as most of the nodes
don't have a compatible string.

5 years agoThis fixes several bugs that Larry Rosenman helped me find in
Randall Stewart [Thu, 14 Jun 2018 03:27:42 +0000 (03:27 +0000)]
This fixes several bugs that Larry Rosenman helped me find in
Rack with respect to its handling of TCP Fast Open. Several
fixes all related to TFO are included in this commit:
1) Handling of non-TFO retransmissions
2) Building the proper send-map when we are doing TFO
3) Dealing with the ack that comes back that includes the
   SYN and data.

It appears that with this commit TFO now works :-)

Thanks Larry for all your help!!

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D15758

5 years agoaudit(4): add tests for statfs(2), fstatfs(2), and getfsstat(2)
Alan Somers [Thu, 14 Jun 2018 02:30:43 +0000 (02:30 +0000)]
audit(4): add tests for statfs(2), fstatfs(2), and getfsstat(2)

Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D15750

5 years agoFix style(9) space vs tab.
Marcelo Araujo [Thu, 14 Jun 2018 01:34:53 +0000 (01:34 +0000)]
Fix style(9) space vs tab.

Reviewed by: jhb
MFC after: 3 weeks.
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D15768

5 years agoFix style(9) space vs tab.
Marcelo Araujo [Thu, 14 Jun 2018 01:28:55 +0000 (01:28 +0000)]
Fix style(9) space vs tab.

Reviewed by: jhb
MFC after: 3 weeks.
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D15774

5 years agocxgbe(4): Catch up with recent changes in the kernel -- it no longer
Navdeep Parhar [Thu, 14 Jun 2018 01:27:35 +0000 (01:27 +0000)]
cxgbe(4): Catch up with recent changes in the kernel -- it no longer
holds non-sleepable locks around any of the driver ioctls.

Sponsored by: Chelsio Communications

5 years agoNVME support is only for x86 and powerpc64.
Warner Losh [Thu, 14 Jun 2018 01:15:19 +0000 (01:15 +0000)]
NVME support is only for x86 and powerpc64.

Implement MK_NVME now that the expression for where NVMe is
complicated. Default it to "yes" for x86 and powerpc64 and
no everywhere else. Use it in camcontrol to define WITH_NVME
for those platforms where we support nvme.

This should fix the newly introduced nvme files to camcontrol
which were building everywhere.

Pointy Hat To: imp
Sponsored by: Netflix

5 years agoFix top(1) support for displaying ZFS Compressed ARC statistics
Allan Jude [Thu, 14 Jun 2018 00:10:16 +0000 (00:10 +0000)]
Fix top(1) support for displaying ZFS Compressed ARC statistics

Broken in r334514

sysctlbyname("vfs.zfs.compressed_arc_enabled", ...) would return ENOMEM
while trying to read the sysctl (a boolean_t) into a bool, which is too small.

Reviewed by: jhb (on irc)
Sponsored by: Klara Systems

5 years agofix OFED build after r335053
Matt Macy [Wed, 13 Jun 2018 23:30:54 +0000 (23:30 +0000)]
fix OFED build after r335053

5 years agoFix PCBGROUPS build post CK conversion of pcbinfo
Matt Macy [Wed, 13 Jun 2018 23:19:54 +0000 (23:19 +0000)]
Fix PCBGROUPS build post CK conversion of pcbinfo

5 years agoMake camcontrol identify work with nda devices
Warner Losh [Wed, 13 Jun 2018 22:00:08 +0000 (22:00 +0000)]
Make camcontrol identify work with nda devices

Both ATA and NVME have an identify command. They are completely
different, but to the user they are the same. Leverage nvmecontrol's
print_controller code to provide that functionality to camcontrol
identify. Query the path to see what kind of protocol it supports, and
send the most appropriate command down. Refactor nvme_print_dev a
little to make it easy to get the nvme cdata.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D15371

5 years agoMake it possible to use print_controller from another program
Warner Losh [Wed, 13 Jun 2018 22:00:02 +0000 (22:00 +0000)]
Make it possible to use print_controller from another program

Rename print_controller to nvme_print_controller. Put it in its
own file for easy inclusion. Move util.c to be nc_util.c to not
conflict with camcontrol. add nvecontrol_ext.h to define shared
interfaces.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D15371

5 years agoEnable eager FPU context switch by default on i386 too, based on
Konstantin Belousov [Wed, 13 Jun 2018 21:10:23 +0000 (21:10 +0000)]
Enable eager FPU context switch by default on i386 too, based on
amd64 r335072.

Security: CVE-2018-3665
Sponsored by: The FreeBSD Foundation

5 years agoAdd PNP info to PCI attachment of ae driver
Warner Losh [Wed, 13 Jun 2018 20:25:36 +0000 (20:25 +0000)]
Add PNP info to PCI attachment of ae driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)

5 years agoAdd PNP info to PCI attachments of age driver
Warner Losh [Wed, 13 Jun 2018 20:25:32 +0000 (20:25 +0000)]
Add PNP info to PCI attachments of age driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)

5 years agoAdd PNP info to PCI attachment of amr driver
Warner Losh [Wed, 13 Jun 2018 20:25:27 +0000 (20:25 +0000)]
Add PNP info to PCI attachment of amr driver

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)