emaste [Fri, 14 Feb 2020 19:06:59 +0000 (19:06 +0000)]
Upgrade to OpenSSH 7.9p1.
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
emaste [Fri, 14 Feb 2020 18:59:50 +0000 (18:59 +0000)]
sshd: add upgrade process note about TCP wrappers
We need to add user-facing deprecation notices for TCP wrappers; start
with a note in the upgrade process docmentation.
Sponsored by: The FreeBSD Foundation
kevans [Fri, 14 Feb 2020 18:50:03 +0000 (18:50 +0000)]
dtc: re-apply r353961, r354115
I missed in final review of r357923's diff that these ones hadn't yet been
sent upstream and inadvertently reverted them. =-( Re-apply now.
kevans [Fri, 14 Feb 2020 18:46:34 +0000 (18:46 +0000)]
Pull in latest fixes from dtc, up to 0060471
This includes a small battery of /memreserve/ fixes to make sure dtc is
properly writing these regions into the output file and reading them back
out.
As of this update, dtc will now also assume common defaults for -I/-O if
only one is specified; namely, dts for one implies dtb for the other and
vice versa (Requested by: jhibbits, preserves GPL dtc behavior too).
MFC after: 1 week
emaste [Fri, 14 Feb 2020 17:05:35 +0000 (17:05 +0000)]
openssh: add a note about libwrap in config.h
LIBWRAP is defined by the Makefile based on MK_TCP_WRAPPERS and should
not be defined in config.h.
PR: 210141
Sponsored by: The FreeBSD Foundation
kaktus [Fri, 14 Feb 2020 16:56:59 +0000 (16:56 +0000)]
sysctl(9): properly use xor in ENFORCE_FLAGS macro
Assert on not specifying any of the (soon to be) required flags as well
as specifying both of them.
Pointed out by: cem, hselasky
Reviewed by: hselasky, kib
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D23678
mav [Fri, 14 Feb 2020 15:04:56 +0000 (15:04 +0000)]
Add support for Hygon NTB PCI device in ntb_hw_amd driver.
Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23565
mav [Fri, 14 Feb 2020 14:55:40 +0000 (14:55 +0000)]
Add Hygon PCI ID and description for AHCI SATA controller.
Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23556
kevans [Fri, 14 Feb 2020 14:03:44 +0000 (14:03 +0000)]
committers-ports: add koobs@ information, somewhat belatedly
mjg [Fri, 14 Feb 2020 13:14:19 +0000 (13:14 +0000)]
amd64: only check for error != 0 in the inlined part of l1d flush check
this replaces the following near the syscall exit:
cmp $0x39,%rax
ja 0xffffffff8108f82c
movabs $0x200001800060005,%rcx
bt %rax,%rcx
jae 0xffffffff8108f82c
with:
test %edi,%edi
jne 0xffffffff8091a49c
mjg [Fri, 14 Feb 2020 13:09:41 +0000 (13:09 +0000)]
Merge audit and systrace checks
This further shortens the syscall routine by not having to re-check after
the system call.
mjg [Fri, 14 Feb 2020 13:08:46 +0000 (13:08 +0000)]
Annotate branches in the syscall path
This in particular significantly shortens amd64_syscall, which otherwise
keeps jumping forward over 2KB of code in total.
Note some of these branches should be either eliminated altogether or
coalesced.
kib [Fri, 14 Feb 2020 12:59:27 +0000 (12:59 +0000)]
r357895: fix typo in the relocation name for i386 IRELATIVE.
Reported by: antoine
Sponsored by: The FreeBSD Foundation
MFC after: 6 days
mjg [Fri, 14 Feb 2020 11:56:50 +0000 (11:56 +0000)]
lockmgr: add a change missed in r357907
mjg [Fri, 14 Feb 2020 11:22:12 +0000 (11:22 +0000)]
fd: annotate finstall with prediction branches
mjg [Fri, 14 Feb 2020 11:21:28 +0000 (11:21 +0000)]
lockmgr: rename lock_fast_path to lock_flags
The routine is not much of a fast path and the flags name better describes
its purpose.
mjg [Fri, 14 Feb 2020 11:20:25 +0000 (11:20 +0000)]
lockmgr: retire the unused lockmgr_unlock_fast_path routine
melifaro [Fri, 14 Feb 2020 09:36:35 +0000 (09:36 +0000)]
Add basic IPDIVERT tests.
Reviewed by: lwhsu,kp
Differential Revision: https://reviews.freebsd.org/D23316
lwhsu [Fri, 14 Feb 2020 09:25:29 +0000 (09:25 +0000)]
Properly fix GCC build in r357867
Submitted by: kib
Sponsored by: The FreeBSD Foundation
kevans [Fri, 14 Feb 2020 04:16:22 +0000 (04:16 +0000)]
ncurses: correct check for gcc >= 5.0
The hack in question is intended to workaround seemingly bogus #line markers
in cpp output. As far as I can tell, llvm cpp doesn't do this by default, so
there's no reason to add -P.
In our /bin/sh, the main incantation should be placed in a sub-shell in
order to properly pipe the output to fgrep.
The main motivation for this change is admittedly to stop emitting the noise
about clang not being gcc in make -s buildworld
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D22952
kevans [Fri, 14 Feb 2020 02:22:08 +0000 (02:22 +0000)]
u_char -> vm_prot_t in a couple of places, NFC
The latter is a typedef of the former; the typedef exists and these bits are
representing vmprot values, so use the correct type.
Submitted by: sigsys@gmail.com
MFC after: 3 days
hselasky [Fri, 14 Feb 2020 00:29:21 +0000 (00:29 +0000)]
Exclude modifier keys from keyboard repeat logic.
This restores USB keyboard driver behaviour prior to r357861.
Requested by: jkim@
MFC after: 1 week
Sponsored by: Mellanox Technologies
imp [Fri, 14 Feb 2020 00:13:23 +0000 (00:13 +0000)]
Add a KASSERT that there's no outstanding CCBs when we call camperiphfree. We
know that if there are any outstanding CCBs, then when they dereference the path
that's freed at the bottom of camperiphfree there will be some flavor of
panic. This moves that eventual panic to a traceback of when we free the last
reference on the device, which is earlier but may not be early enough.
imp [Fri, 14 Feb 2020 00:12:59 +0000 (00:12 +0000)]
xpt_release_simq_timeout is unused. Remove it.
kib [Thu, 13 Feb 2020 23:42:09 +0000 (23:42 +0000)]
Handle non-plt IRELATIVE relocations, at least for x86.
lld 10.0 seems to generate this relocation for rdtsc_mb() ifunc in our libc.
Reported, reviewed, and tested by: dim (amd64, previous version)
Discussed with: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23652
kib [Thu, 13 Feb 2020 23:22:12 +0000 (23:22 +0000)]
Return success, instead of ESRCH, from pthread_cancel(3) applied to the
exited but not yet joined thread.
Before, if the thread exited but was not yet joined, we returned
ESRCH.
According to IEEE Std 1003.1™-2017 recommendation in the
description of pthread_cancel(3):
If an implementation detects use of a thread ID after the end of its
lifetime, it is recommended that the function should fail and report
an [ESRCH] error.
So it seems desirable to not return ESRCH until the lifetime of the
thread ID ends. According to the section 2.9.2 Thread IDs,
The lifetime of a thread ID ends after the thread terminates if it
was created with the detachstate attribute set to
PTHREAD_CREATE_DETACHED or if pthread_detach() or pthread_join()
has been called for that thread.
In other words, lifetime for thread ID of exited but not yet joined thread
did not ended yet.
Prompted by: cperciva
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
markj [Thu, 13 Feb 2020 23:18:35 +0000 (23:18 +0000)]
Fix handling of WAITFAIL in vm_page_grab() and vm_page_grab_pages().
After sleeping through a memory shortage, we must return NULL rather
than retry.
Discussed with: jeff
Reported by: pho
Sponsored by: The FreeBSD Foundation
markj [Thu, 13 Feb 2020 23:15:21 +0000 (23:15 +0000)]
Update the zone-global count of cached items in bucket_cache_reclaim().
This was missed in r351673. The count is used to enfore cache limits,
which are rarely used.
Discussed with: jeff
Sponsored by: The FreeBSD Foundation
jhb [Thu, 13 Feb 2020 23:04:11 +0000 (23:04 +0000)]
Don't check the auth algorithm for GCM.
The upstream OpenSSL changes only set the cipher for GCM since the
authentication is redundant, and changes to OCF will soon remove the
GCM authentication algorithm constants entirely for the same reason.
In addition, ktls_create_session() already validates these fields and
wouldn't pass down an invalid auth_algorithm value to any drivers or
ktls backends.
Reviewed by: hselasky
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D23671
jhb [Thu, 13 Feb 2020 22:55:45 +0000 (22:55 +0000)]
Remove the per-TXQ tls_wrs stat.
It duplicated the kern_tls_records stat and was not conditional on NIC
TLS being enabled.
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D23670
mjg [Thu, 13 Feb 2020 22:22:55 +0000 (22:22 +0000)]
vfs: use mac fastpath for lookup, open, read, write, mmap
mjg [Thu, 13 Feb 2020 22:22:15 +0000 (22:22 +0000)]
Partially decompose priv_check by adding priv_check_cred_vfs_generation
During buildkernel there are very frequent calls to priv_check and they
all are for PRIV_VFS_GENERATION (coming from stat/fstat).
This results in branching on several potential privileges checking if
perhaps that's the one which has to be evaluated.
Instead of the kitchen-sink approach provide a way to have commonly used
privs directly evaluated.
mjg [Thu, 13 Feb 2020 22:19:17 +0000 (22:19 +0000)]
mac: implement fast path for checks
All checking routines walk a linked list of all modules in order to determine
if given hook is installed. This became a significant problem after mac_ntpd
started being loaded by default.
Implement a way perform checks for select hooks by testing a boolean.
Use it for priv_check and priv_grant, which are constantly called from priv_check.
The real fix would use hotpatching, but the above provides a way to know when
to do it.
mjg [Thu, 13 Feb 2020 22:16:30 +0000 (22:16 +0000)]
Inline jailed().
It is constantly called from priv_check.
mjg [Thu, 13 Feb 2020 22:16:02 +0000 (22:16 +0000)]
Annotate suser_enabled as __read_mostly
It is read a lot in priv code.
jeff [Thu, 13 Feb 2020 21:10:17 +0000 (21:10 +0000)]
Since r357804 pcpu zones are required to use zalloc_pcpu(). Prior to this
it was only required if you were zeroing. Switch to these interfaces.
Reviewed by: mjg
jeff [Thu, 13 Feb 2020 20:58:51 +0000 (20:58 +0000)]
Fix a case where ub_seq would fail to be set if the cross bucket was
flushed due to memory pressure.
Reviewed by: markj
Differential Revision: http://reviews.freebsd.org/D23614
jeff [Thu, 13 Feb 2020 20:50:21 +0000 (20:50 +0000)]
Add more precise SMR entry asserts.
kevans [Thu, 13 Feb 2020 20:23:55 +0000 (20:23 +0000)]
diff: fix segfault with --tabsize and no/malformed argument
--tabsize was previously listed as optional_argument, but didn't account for
the optionality of it in the argument handling. This is irrelevant -- the
manpage doesn't indicate that the argument is optional, and indeed there's
no clear interpretation of omitting the argument because there's no other
side effect of --tabsize.
The "malformed" argument part of the header on this message is simply
referring to usage like this:
% diff --tabsize 4 A B
With an optional_argument, the argument must be attached to the parameter
directly (e.g. --tabsize=4), so the argument is effectively NULL with the
above invocation as if no argument had been passed.
PR: 243974
Submitted by: fehmi noyan isi <fnoyanisi yahoo com> (diff.c portion)
MFC after: 3 days
dim [Thu, 13 Feb 2020 19:29:57 +0000 (19:29 +0000)]
Merge r357872 from the clang1000-import branch:
Disable new clang 10.0.0 warnings about misleading indentation in ce(4)
and cp(4).
These are false positives, since some of the driver source has been
deliberately obfuscated.
MFC after: 3 days
dim [Thu, 13 Feb 2020 19:28:30 +0000 (19:28 +0000)]
Merge r357864 from the clang1000-import branch:
Fix the following -Werror warning from clang 10.0.0 in sconfig:
sbin/sconfig/sconfig.c:909:5: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
exit (-1);
^
sbin/sconfig/sconfig.c:907:6: note: previous statement is here
} else
^
The intent was to group the exit() call with the previous fprintf()
call.
MFC after: 3 days
kib [Thu, 13 Feb 2020 19:12:07 +0000 (19:12 +0000)]
hyperv: Add Hygon Dhyana support.
Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23563
kib [Thu, 13 Feb 2020 19:10:51 +0000 (19:10 +0000)]
ecc_inject: Add Hygon Dhyana support.
Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23561
kib [Thu, 13 Feb 2020 19:09:24 +0000 (19:09 +0000)]
amdsbwd, intpm: Add Hygon Dhyana support.
Initialize the FCH SMBus controller for Hygon Dhyana CPU.
Set the vendor of the FCH description via the exact CPU vendor.
Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23558
kib [Thu, 13 Feb 2020 19:07:42 +0000 (19:07 +0000)]
amdpm: Add Hygon Dhyana support.
Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23557
lwhsu [Thu, 13 Feb 2020 19:05:19 +0000 (19:05 +0000)]
Fix GCC build.
Sponsored by: The FreeBSD Foundation
kib [Thu, 13 Feb 2020 19:05:14 +0000 (19:05 +0000)]
bhyve, bhyvectl: Add Hygon Dhyana support.
Submitted by: Pu Wen <puwen@hygon.cn>
Reviewed by: jhb
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23554
kib [Thu, 13 Feb 2020 19:03:12 +0000 (19:03 +0000)]
vmm: Add Hygon Dhyana support.
Submitted by: Pu Wen <puwen@hygon.cn>
Discussed with: grehan
Reviewed by: jhb (previous version)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23553
emaste [Thu, 13 Feb 2020 16:17:05 +0000 (16:17 +0000)]
addr2line: use stdbool.h header for bool
Presumably a bool definition is obtained via header contamination on
FreeBSD-CURRENT. Found while trying to upstream FreeBSD addr2line
changes - the FreeBSD 11.2 CI build failed there.
Reported by: Cirrus-CI, upstream ELF Tool Chain
MFC with: r357844
Sponsored by: The FreeBSD Foundation
hselasky [Thu, 13 Feb 2020 16:03:12 +0000 (16:03 +0000)]
Improve USB gaming keyboard support.
Add support for decoding pressed keys as a bitmap. The keys in the
bitmap are described in the interface specific HID descriptor. Some
keyboards even have multiple input interfaces, only using the bitmap
method when the event array is full. That typically means when more
than seven keys are pressed simultaneously.
The internals of the USB keyboard driver have been slightly reworked
to keep track of all keys in a single bitmap having 256 bits. This
bitmap is then divided into blocks of 64-bits as an optimisation.
Simplify automatic key repeat logic, because only the last key pressed
can be repeated.
PR: 224592
PR: 233884
Tested by: Alex V. Petrov <alexvpetrov@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
pfg [Thu, 13 Feb 2020 15:42:14 +0000 (15:42 +0000)]
Revert r357343:
services: Add PROFInet and EtherCAT.
Both are admitedly very niche features and no known users exist currently.
I am doing a further review/update of the services file (see D23621) and
both of these are not likely to be considered.
asomers [Thu, 13 Feb 2020 15:28:56 +0000 (15:28 +0000)]
sesutil: fix Coverity CIDs
* 1411604: file descriptor leak
* 1411586: memory leaks, null dereference on ENOMEM
Reported by: Coverity Scan
Coverity CIDs: 1411604, 1411586
Reviewed by: trasz
MFC after: 2 weeks
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D23651
tuexen [Thu, 13 Feb 2020 15:14:46 +0000 (15:14 +0000)]
sack_newdata and snd_recover hold the same value. Therefore, use only
a single instance: use snd_recover also where sack_newdata was used.
Submitted by: Richard Scheffenegger
Differential Revision: https://reviews.freebsd.org/D18811
kp [Thu, 13 Feb 2020 14:09:09 +0000 (14:09 +0000)]
tests: Enable net tests
We have a number of tests in the net subdirectory that were not executed. List
the net directory so we run those tests.
tuexen [Thu, 13 Feb 2020 13:58:34 +0000 (13:58 +0000)]
Whitespace cleanup. No functional change.
Sponsored by: Netflix, Inc.
dim [Thu, 13 Feb 2020 11:00:20 +0000 (11:00 +0000)]
Cleanup gsched tool and geom_sched.so library after r356185.
imp [Thu, 13 Feb 2020 03:37:11 +0000 (03:37 +0000)]
Use INT instead of string for the ints. Because the string "I" was right, the
old code appeared to work. This was a cut and paste error.
Noticed by: rpokala@
freqlabs [Thu, 13 Feb 2020 01:42:13 +0000 (01:42 +0000)]
Add myself (freqlabs) as a src committer
Approved by: mav (mentor)
MFC after: 3 days
imp [Thu, 13 Feb 2020 01:23:44 +0000 (01:23 +0000)]
Convert rotating and unmapped_io to a DA flag
Rotating and unmapped_io are really da flags. Convert them to a flag so it will
be reported with the other flags for the device. Deprecate the .rotating and
.unmapped_io sysctls in FreeBSD 14 and remove the softc ints.
Differential Revision: https://reviews.freebsd.org/D23417
imp [Thu, 13 Feb 2020 01:23:32 +0000 (01:23 +0000)]
Export the current da flags as bitfield
Export the current flags. They can be useful to other programs wanting to do
special thigns for removable or similar devices.
Differential Revision: https://reviews.freebsd.org/D23417
dim [Wed, 12 Feb 2020 23:54:38 +0000 (23:54 +0000)]
Fix typo introduced with r347534 (cap_sysctl additions).
This ensures the old libcap_sysctl.so.1 gets cleaned up when running
"make delete-old-libs".
vmaffione [Wed, 12 Feb 2020 22:44:18 +0000 (22:44 +0000)]
bhyve: move virtio-net header processing to pci_virtio_net
This patch cleans up the API between the net frontends (e1000,
virtio-net) and the net backends (tap and netmap).
We move the virtio-net header stripping/prepending to the
virtio-net code, where this functionality belongs.
In this way, the netbe_send() and netbe_recv() signatures
can have const struct iov * rather than struct iov *.
Reviewed by: grehan, bcr, aleksandr.fedorov@itglobal.com
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23342
kevans [Wed, 12 Feb 2020 22:29:08 +0000 (22:29 +0000)]
efiloader: don't execute hooks when setting currdev/loaddev
We still need to set the hooks to prevent improper manipulations thereafter
at the loader prompt, but as it is we're actively preventing loaddev from
being set correctly in some circumstances (ZFS in particular) and doing more
work than needed with currdev -- that hook in particular validates it as a
correct device, which we can assume isn't needed in this context.
Reviewed by: imp, sigsys@gmail.com
Submitted/Diagnosed by: sigsys@gmail.com
Differential Revision: https://reviews.freebsd.org/D23390
emaste [Wed, 12 Feb 2020 21:52:10 +0000 (21:52 +0000)]
addr2line: Handle DW_AT_ranges in compile units
Based on original submission by Marat Radchenko in ELF Tool Chain
ticket #545, rebased and updated by Tiger Gao.
PR: 217736
Submitted by: Marat Radchenko <marat@slonopotamus.org>
Submitted by: Tiger Gao <tig@freebsdfoundation.org>
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23501
melifaro [Wed, 12 Feb 2020 21:16:30 +0000 (21:16 +0000)]
* Fix flaking lle tests by filtering out non-relevant rtsock messages.
* Consistently use RTM_DECLARE_ROOT_TEST() macro.
* Temporarily remove iftype validation from IPv6 lle notifications.
Reported by: kp
mjg [Wed, 12 Feb 2020 20:18:29 +0000 (20:18 +0000)]
netipsec: fix a mismatched uma_zfree -> uma_zfree_pcpu
PR: 244077
Reported by: lwhsu
Fixes: r357805 ("amd64: store per-cpu allocations subtracted by __pcpu")
0mp [Wed, 12 Feb 2020 20:06:41 +0000 (20:06 +0000)]
diff.1: Fix style & document -y as extension to POSIX
- Long options must be stylized with the Fl macro as well.
Reviewed by: bapt
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D23642
kevans [Wed, 12 Feb 2020 19:06:34 +0000 (19:06 +0000)]
sys/kern sysent: re-add dependency on capabilities.conf
r356868 inadvertently removed this, so changes to capabilities.conf were no
longer considered for being outdated.
emaste [Wed, 12 Feb 2020 19:05:10 +0000 (19:05 +0000)]
regen sysent after r357831, r357838
Capability mode changes allowing fdatasync and getloginclass.
Sponsored by: The FreeBSD Foundation
emaste [Wed, 12 Feb 2020 18:59:00 +0000 (18:59 +0000)]
Allow getloginclass in capability mode
As with e.g. getgroups and getlogin it allows querying current process
credential state.
Reported by: sigsys@gmail.com via kevans
Sponsored by: The FreeBSD Foundation
asomers [Wed, 12 Feb 2020 18:11:07 +0000 (18:11 +0000)]
fusefs: fix some memory leaks in the tests.
Oddly, most of these were not detected by Coverity.
Reported by: Coverity (one of them, anyway)
Coverity CID: 1404490
MFC after: 2 weeks
brooks [Wed, 12 Feb 2020 18:09:20 +0000 (18:09 +0000)]
Make the warning for deprecated NO_ variables an error.
Support for NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE,
and NO_WARNS as deprecated in 2014 with a warning added for each one
found. Turn these into error in preperation for removal of compatability
support before FreeBSD 13.
This was previously committed in r354909 and reverted in r355011 due to
unforseen impacts on ports. I've since corrected all amd64 and i386
ports reported in prior runs as well as instance of these variables I
found via grep.
emaste [Wed, 12 Feb 2020 17:37:32 +0000 (17:37 +0000)]
Tag pjdfstest symlink with pkgbase package
As with the rest of pjdfstest, tag the symlink with package=tests.
The tests -> . symlink seems a little strange but that's independent
of pkgbase.
Sponsored by: The FreeBSD Foundation
emaste [Wed, 12 Feb 2020 17:30:09 +0000 (17:30 +0000)]
tag /etc/rmt symlink with pkgbase package
For historical reasons the "remote magtape protocol module" rmt gets
invoked as /etc/rmt, which is a symlink to /usr/sbin/rmt. Put it in the
utilities package, as /usr/sbin/rmt is.
Sponsored by: The FreeBSD Foundation
emaste [Wed, 12 Feb 2020 17:12:26 +0000 (17:12 +0000)]
Allow fdatasync in capability mode
fdatasync is essentially a subset of fsync (and may be exactly fsync,
depending on filesystem and development effort) and operates only on
a provided fd.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
tuexen [Wed, 12 Feb 2020 17:05:10 +0000 (17:05 +0000)]
Don't panic under INVARIANTS when we can't allocate memory for storing
a vtag in time wait.
This issue was found by running syzkaller.
MFC after: 1 week
tuexen [Wed, 12 Feb 2020 17:02:15 +0000 (17:02 +0000)]
Mark the socket as disconnected when freeing the association the first
time.
This issue was found by running syzkaller.
MFC after: 1 week
kevans [Wed, 12 Feb 2020 16:10:00 +0000 (16:10 +0000)]
interp_lua: fix bogus indentation, NFC
kevans [Wed, 12 Feb 2020 16:09:01 +0000 (16:09 +0000)]
lualoader: disable autoboot on high-level interpreter errors
If we hit an error at this level, we are almost certainly not in any kind
of sane state where autoboot can do the right thing. Instead of letting it
try and probably failing, disable autoboot so they immediately get kicked
into a loader prompt for manual remediation/diagnosis.
Reviewed by: tsoome
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D23611
emaste [Wed, 12 Feb 2020 15:59:59 +0000 (15:59 +0000)]
elfcopy: set ELF OS/ABI field when converting from binary
PR: 228934
Submitted by: Tiger Gao <tig@freebsdfoundation.org>
Reviewed by: markj, jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23504
rrs [Wed, 12 Feb 2020 15:26:56 +0000 (15:26 +0000)]
Lets get the real correct version.. gessh. I need
more coffee evidently.
Sponsored by: Netflix
mhorne [Wed, 12 Feb 2020 14:06:02 +0000 (14:06 +0000)]
Implement vm.pmap.kernel_maps for RISC-V
This is taken from the arm64 version, with the following simplifications:
- Our current pmap implementation uses a 3-level paging scheme
- The "mode" field has been omitted since RISC-V PTEs don't encode
typical mode attributes
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D23594
mhorne [Wed, 12 Feb 2020 13:58:37 +0000 (13:58 +0000)]
RISC-V: un-ifdef vm.kvm_size and vm.kvm_free
Fix formatting and add CTLFLAG_MPSAFE.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D23522
rrs [Wed, 12 Feb 2020 13:37:53 +0000 (13:37 +0000)]
Opps committed the wrong ratelimit version in the
whitespace cleanup.. Restore it to the proper version.
Sponsored by: Netfilx Inc.
rrs [Wed, 12 Feb 2020 13:31:36 +0000 (13:31 +0000)]
White space cleanup -- remove trailing tab's or spaces
from any line.
Sponsored by: Netflix Inc.
rrs [Wed, 12 Feb 2020 13:07:09 +0000 (13:07 +0000)]
Whitespace, remove from three files trailing white
space (leftover presents from emacs).
Sponsored by: Netflix Inc.
rrs [Wed, 12 Feb 2020 13:04:19 +0000 (13:04 +0000)]
This small fix makes it so we properly follow
the RFC and only enable ECN when both the
CWR and ECT bits our set within the SYN packet.
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D23645
rrs [Wed, 12 Feb 2020 12:40:06 +0000 (12:40 +0000)]
Remove all trailing white space from the BBR/Rack fold. Bits
left around by emacs (thanks emacs).
rrs [Wed, 12 Feb 2020 12:36:55 +0000 (12:36 +0000)]
Now that all of the stats framework is
in FreeBSD the bits that disabled stats
when netflix-stats is not defined is no longer
needed. Lets remove these bits so that we
will properly use stats per its definition
in BBR and Rack.
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D23088
kib [Wed, 12 Feb 2020 12:23:46 +0000 (12:23 +0000)]
Fix indent.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
mjg [Wed, 12 Feb 2020 11:19:07 +0000 (11:19 +0000)]
vfs: refactor vputx and add more comment
Reviewed by: jeff (previous version)
Tested by: pho (previous version)
Differential Revision: https://reviews.freebsd.org/D23530
mjg [Wed, 12 Feb 2020 11:18:12 +0000 (11:18 +0000)]
vfs: drop remaining zpcpu casts
mjg [Wed, 12 Feb 2020 11:17:45 +0000 (11:17 +0000)]
vfs: switch to smp_rendezvous_cpus_retry for vfs_op_thread_enter/exit
In particular on amd64 this eliminates an atomic op in the common case,
trading it for IPIs in the uncommon case of catching CPUs executing the
code while the filesystem is getting suspended or unmounted.
mjg [Wed, 12 Feb 2020 11:17:18 +0000 (11:17 +0000)]
rms: use smp_rendezvous_cpus_retry instead of a hand-rolled variant
mjg [Wed, 12 Feb 2020 11:16:55 +0000 (11:16 +0000)]
Add smp_rendezvous_cpus_retry
This is a wrapper around smp_rendezvous_cpus which enables use of IPI
handlers which can fail and require retrying.
wait_func argument is added to to provide a routine which can be used to
poll CPU of interest for when the IPI can be retried.
Handlers which succeed must call smp_rendezvous_cpus_done to denote that
fact.
Discussed with: jeff
Differential Revision: https://reviews.freebsd.org/D23582
mjg [Wed, 12 Feb 2020 11:15:33 +0000 (11:15 +0000)]
amd64: provide custom zpcpu set/add/sub routines
Note that clobbers are highly overzealous, can be cleaned up later.
mjg [Wed, 12 Feb 2020 11:14:23 +0000 (11:14 +0000)]
Dedup zpcpu assertions into one macro and guard the rest with #ifndef
Sponsored by: The FreeBSD Foundation
mjg [Wed, 12 Feb 2020 11:12:13 +0000 (11:12 +0000)]
amd64: store per-cpu allocations subtracted by __pcpu
This eliminates a runtime subtraction from counter_u64_add.
before:
mov 0x4f00ed(%rip),%rax # 0xffffffff80c01788 <numfullpathfail4>
sub 0x808ff6(%rip),%rax # 0xffffffff80f1a698 <__pcpu>
addq $0x1,%gs:(%rax)
after:
mov 0x4f02fd(%rip),%rax # 0xffffffff80c01788 <numfullpathfail4>
addq $0x1,%gs:(%rax)
Reviewed by: jeff
Differential Revision: https://reviews.freebsd.org/D23570
mjg [Wed, 12 Feb 2020 11:11:22 +0000 (11:11 +0000)]
Store offset into zpcpu allocations in the per-cpu area.
This shorten zpcpu_get and allows more optimizations.
Reviewed by: jeff
Differential Revision: https://reviews.freebsd.org/D23570
mjg [Wed, 12 Feb 2020 11:10:10 +0000 (11:10 +0000)]
epoch: convert zpcpu_get_cpua(.., curcpu) to zpcpu_get