Commit Graph

248816 Commits

Author SHA1 Message Date
John Baldwin
6d44e8e6b5 Rename TOE TLS stats from [rt]x_tls_* to [rt]x_toe_tls_*.
This more clearly differentiates TLS records encrypted and decrypted
in TOE connections from those encrypted via NIC TLS.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2020-02-28 00:42:27 +00:00
Brooks Davis
dfa4261db4 Remove trailing whitespace. 2020-02-27 23:06:40 +00:00
Jung-uk Kim
8c9735fbe0 Plug possible memory leaks in the previous patch.
Two DH_free() calls were accidentally removed.

Pointyhat to:	jkim
2020-02-27 23:06:12 +00:00
Jung-uk Kim
a5f8e6f658 Do not free p and g parameters after calling DH_set0_pqg(3).
It is specifically mentioned in the manual page.  Note it has no functional
change in reality because DH_set0_pqg() cannot fail when both p and g are
not NULL.
2020-02-27 22:36:16 +00:00
Jung-uk Kim
a33b334336 Fix style inconsistencies near our OpenSSL 1.1.x patch. 2020-02-27 22:02:00 +00:00
Jung-uk Kim
3ab9782ad3 Fix a white space. 2020-02-27 20:46:30 +00:00
Brooks Davis
dc30b290e1 riscv: Add a GENERIC-NODEBUG (copied from amd64)
Sponsored by:	DARPA
2020-02-27 20:26:37 +00:00
Brooks Davis
8582cd3101 Merge commit 7214f7a79 from llvm git (by Sam Elliott):
[RISCV] Lower llvm.trap and llvm.debugtrap

  Summary:
  Until this commit, these have lowered to a call to abort().

  `llvm.trap()` now lowers to `unimp`, which should trap on all systems.

  `llvm.debugtrap()` now lowers to `ebreak`, which is exactly what this
  instruction is for.

  Reviewers: asb, luismarques

  Reviewed By: asb

  Tags: #llvm

  Differential Revision: https://reviews.llvm.org/D69390

This fixes miscompilation resulting in linking failures with
INVARIANTS disabled.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D23857
2020-02-27 20:08:46 +00:00
Dimitry Andric
8af44ff889 Merge r358406 from the clang1000-import branch:
Fix the following -Werror warning from clang 10.0.0:

sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
                                if (val & CPUV7_CT_CTYPE_RA)
                                ^
sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here
                        if (val & CPUV7_CT_CTYPE_WB)
                        ^

This was due to an accidentally inserted tab before the if statement.

MFC after:	3 days
2020-02-27 19:59:17 +00:00
Dimitry Andric
a9e92640d0 Fix the following -Werror warning from clang 10.0.0:
sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
                                if (val & CPUV7_CT_CTYPE_RA)
                                ^
sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here
                        if (val & CPUV7_CT_CTYPE_WB)
                        ^

This was due to an accidentally inserted tab before the if statement.

MFC after:	3 days
2020-02-27 19:58:20 +00:00
Hiroki Sato
43092b7d08 Fix poor performance of ftp(1) due to small SO_SNDBUF and SO_RCVBUF.
ftp(1) from vendor/tnftp always tried the following for
every TCP connection:

1. Get the current buffer length of SO_SNDBUF and SO_RCVBUF
   by getsockopt(2).

2. Invoke setsockopt(2) to set them to the same values
   after checking if they are in a range between 8 KiB to 8 MiB.

This behavior broke dynamic buffer sizing enabled by
default (net.inet.tcp.{recv,send}buf_auto sysctls) and
led to a very poor transfer rate.  The fetch(1) utility
does not have this problem.

This change prevents SO_SNDBUF and SO_RCVBUF from configuring
when the buffer auto-sizing is enabled unless the buffer sizes are
explicitly specified.

PR:		240827
Spotted by:	Yuichiro NAITO
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D23732
2020-02-27 19:49:59 +00:00
Hiroki Sato
9b429e2192 Fix broken STARTTLS when SharedMemoryKey is enabled.
OpenSSL 1.1 API patch for sendmail had a bug which
prevented sm_RSA_generate_key() function from working.
This function is used to generate a temporary RSA key
for a shared memory region used for TLS processing.
Note that 12.0 and 12.1-RELEASE include this bug.

This affects only if SM_CONF_SHM compile-time
option (enabled by default) and SharedMemoryKey
run-time option (not enabled by default) in a .cf file are
specified.  The latter corresponds to confSHARED_MEMORY_KEY in
a .mc file.

PR:		242861
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D23734
2020-02-27 19:40:29 +00:00
Edward Tomasz Napierala
5d481ad8df Make linuxulator warn about unsupported getsockopt/setsockopt flags.
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D23791
2020-02-27 19:40:20 +00:00
Hiroki Sato
28180b6298 Add MODULE_PNP_INFO() to autoload the rtwn_pci(4) kernel module.
Reviewed by:	imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D23807
2020-02-27 19:35:17 +00:00
Dimitry Andric
75dfc66c1b Merge ^/head r358269 through r358399. 2020-02-27 19:07:10 +00:00
Jeff Roberson
561af25fa7 Simplify lazy advance with a 64bit atomic cmpset.
This provides the potential to force a lazy (tick based) SMR to advance
when there are blocking waiters by decoupling the wr_seq value from the
ticks value.

Add some missing compiler barriers.

Reviewed by:	rlibby
Differential Revision:	https://reviews.freebsd.org/D23825
2020-02-27 19:05:26 +00:00
Dimitry Andric
4739579419 Merge ^/vendor/llvm-project/release-10.x up to its last change (upstream
commit llvmorg-10.0.0-rc2-70-ge5cb70267e7), and bump versions.
2020-02-27 19:04:39 +00:00
Dimitry Andric
92d00d6a94 Vendor import of llvm-project branch release/10.x
llvmorg-10.0.0-rc2-70-ge5cb70267e7.
2020-02-27 18:58:42 +00:00
Dimitry Andric
21054a9b07 Merge commit 2e24219d3 from llvm git (by Hans Wennborg):
[MC][ARM] Resolve some pcrel fixups at assembly time (PR44929)

  MC currently does not emit these relocation types, and lld does not
  handle them. Add FKF_Constant as a work-around of some ARM code after
  D72197. Eventually we probably should implement these relocation
  types.

  By Fangrui Song!

  Differential revision: https://reviews.llvm.org/D72892

This re-enables using the arm 'adr' pseudo instruction on global symbols
again.  It was broken as a side-effect of upstream commit 2bfee35cb,
which lead to "error: unsupported relocation on symbol" when assembling
such constructs, which are used in e.g. sys/arm/arm/locore-v[46].S.

PR:		244251
2020-02-27 18:49:49 +00:00
Hiroki Sato
ff29a95213 Add workaround for models which do not follow the ACPI specification strictly.
Extra objects are now simply ignored instead of rejecting everything.
2020-02-27 17:13:57 +00:00
John Baldwin
98ee12e64e Use stream_read() to read all 12 bytes of the RFB client version.
read() can return a short read, whereas stream_read() waits until the
full version string is read.

Submitted by:	Ka Ho Ng <khng300_gmail.com>
Reviewed by:	grehan
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23591
2020-02-27 16:51:41 +00:00
Warner Losh
6b72948d73 Better check for floating point type.
Use __riscv_flen instead of __riscv_float_abi_soft. While the latter works for
userland (and one could argue it's more correct), it fails for the kernel. We
compile the kernel with -mabi=lp64 (eg soft float abi) to avoid floating point
instructions in the kernel. We also compile the kernel -march=rv64imafdc for
hard float kernels (eg those with options FPE), but with -march=rv64imac for
softfloat kernels (eg those with FPE). Since we do this, in the kernel (as in
userland) __riscv_flen will be defined for 'riscv64' and not for 'riscv64sf'.

This also removes the -DMACHINE_ARCH hack now that it's no longer needed.

Longer term, we should return the ABI from the sysctl hw.machine_arch like on
amd64 for i386 binaries.

Suggested by: mhorne@
Differential Revision: https://reviews.freebsd.org/D23813
2020-02-27 15:34:30 +00:00
Warner Losh
68a229849a _Static_assert is to be preferred to CTASSERT.
Document the existing prefernce that _Static_assert be used in preference to the
old CTASSERT we used to use for compile time assertions.
2020-02-27 15:30:13 +00:00
Warner Losh
e07d0aae4a Remove FreeBSD 4 support 2020-02-27 15:25:31 +00:00
Warner Losh
a9208e9862 Remove FreeBSD 7-9 support from oce
Use newer pci_find_cap API now that the need to remap the old API is gone.
2020-02-27 15:25:26 +00:00
Warner Losh
adc1d71c8b Remove support for FreeBSD 7 and 8
Also, unifdef -DSFXGE_HAVE_DESCRIBE_INTR since it's now always defined.
2020-02-27 15:25:21 +00:00
Hans Petter Selasky
77632fc70f Extend the range of the return value from nsecs_to_jiffies64() to support
Mesa's drm_syncobj usage, in the LinuxKPI.

While at it optimise the jiffies conversion functions to avoid repeated
and constant calculations.

Submitted by:	Greg V <greg@unrelenting.technology>
Differential Revision:	https://reviews.freebsd.org/D23846
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-02-27 15:21:05 +00:00
Andriy Gapon
40b1e0dc0e remove stray space symbol in r358380
MFC after:	1 week
X-MFC with:	r358380
2020-02-27 14:27:42 +00:00
Andriy Gapon
6d11243ae2 use ZFS_MAX_DATASET_NAME_LEN instead of MAXPATHLEN for dataset names
The change affects only FreeBSD specific code as the common code already
mostly uses the more idiomatic and correct ZFS_MAX_DATASET_NAME_LEN.

MFC after:	1 week
2020-02-27 14:21:01 +00:00
Andriy Gapon
6b47663df5 dsl_dataset_promote_sync: populate 'oldname' before using it
It's very unlikely that zfsvfs_update_fromname() and
zvol_rename_minors() ever did anything during the promote operation as
the old name was not initialized.

MFC after:	1 week
2020-02-27 14:12:43 +00:00
Pawel Biernacki
4312ebfe0b Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE.  All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT

Reviewed by:	cem
Approved by:	csprng, kib (mentor, blanket)
Differential Revision:	https://reviews.freebsd.org/D23841
2020-02-27 13:12:14 +00:00
Baptiste Daroussin
be24ad5aac Update pci_vendors to 2020.02.22
MFC after:	2 days
2020-02-27 11:23:44 +00:00
Jeff Roberson
fe835cbf5f A pair of performance improvements.
Swap buckets on free as well as alloc so that alloc is always the most
cache-hot data.

When selecting a zone domain for the round-robin bucket cache use the
local domain unless there is a severe imbalance.  This does not affinitize
memory, only locks and queues.

Reviewed by:	markj, rlibby
Differential Revision:	https://reviews.freebsd.org/D23824
2020-02-27 08:23:10 +00:00
Scott Long
ecca2aa545 Add a quirk for the WDC Green series of SSDs to disable NCQ TRIM, as this
avoids silent data corruption.

PR:		225666
Submitted by:	anders lundgren
MFC after:	3 days
2020-02-27 05:00:21 +00:00
Warner Losh
10b48d810f Remove now empty sparc64 directories (oh, and stand/sparc64 files) 2020-02-27 04:47:12 +00:00
Warner Losh
f33b14f02e Remove libthr, csu, libthread_db and testfloat sparc64 specific directories.
Submitted by:	kib@ (libthr)
2020-02-27 04:44:58 +00:00
Jeff Roberson
c49be4f1c6 Add unlocked grab* function variants that use lockless radix code to
lookup pages.  These variants will fall back to their locked counterparts
if the page is not present.

Discussed with:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D23449
2020-02-27 02:37:27 +00:00
Warner Losh
600ee699ed Remove sparc64 source files from rtld-elf
These were missed in the prior sweep.

Submitted by:	jhb@
2020-02-26 23:17:16 +00:00
Alexander Motin
a33a65ce22 MFZoL: Relax restriction on zfs_ioc_next_obj() iteration
Per the documentation for dnode_next_offset in dnode.c, the "txg"
parameter specifies a lower bound on which transaction the dnode can
be found in. We are interested in all dnodes that are removed between
the first and last transaction in the snapshot. It doesn't need to be
created in that snapshot to correspond to a removed file.

In fact, the behavior of zfs diff in the test case exactly matches
this: the transaction that created the data that was deleted in snapshot
"2" was produced before, in snapshot "1", definitely predating the first
transaction in snapshot "2".

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <Tim Chase <tim@onlight.com>
Closes #2081
zfsonlinux/zfs@7290cd3c4e

MFC after:	1 week
2020-02-26 20:38:48 +00:00
Cy Schubert
a0df113ce2 With the planned removal of GIANT (sysctl uses GIANT), make future-proof
ipfilter by making it sysctl locking mpsafe.

Reviewed by:	kaktus
Differential Revision:	https://reviews.freebsd.org/D23839
2020-02-26 20:18:38 +00:00
Ed Maste
acb8858f05 Return ENOTSUP for mmap/mprotect if prot not subset of prot_max
From POSIX,

[ENOTSUP]
    The implementation does not support the combination of accesses
    requested in the prot argument.

This fits the case that prot contains permissions which are not a subset
of prot_max.

Reviewed by:	brooks, cem
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23843
2020-02-26 20:03:43 +00:00
Warner Losh
2a12053589 Remove support for FreeBSD 4-7.
It's doubtful this driver would still work unchanged there.
Compile tested only because I no longer have ahc/ahd devices.
2020-02-26 19:39:59 +00:00
Warner Losh
4f8959b9f4 Remove support for FreeBSD 4.x and earlier from agp driver
Compile tested only, but do we still need this driver?
2020-02-26 19:39:52 +00:00
Sergio Carlavilla Delgado
757a04bf82 Add HISTORY sections to tree(3), stdarg(3) and sigevent(3)
Submitted by:	gbergling_gmail.com
Approved by:	bcr@(mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23832
2020-02-26 19:16:23 +00:00
Warner Losh
0d87f3c702 Remove support for all pre FreeBSD 11.0 versions from mpr and mps.
Remove a number of workarounds for older versions of FreeBSD. FreeBSD stable/10
was branched over 6 years ago. All of these changes date from about that time or
earlier. These workarounds are extensive and get in the way of understanding
the current flow in the driver.
2020-02-26 19:15:08 +00:00
Ed Maste
3352b550cd src.conf.5: regen after sparc64 removal 2020-02-26 19:12:36 +00:00
Ed Maste
593d80c4a0 src.opts.mk: drop MIPS special case for disabling BINUTILS_BOOTSTRAP
Binutils has already been reduced to installing ld only on powerpc32
and as only on amd64.  (Also objdump on every arch supported by binutils
2.17.50.)  Although BINUTILS_BOOTSTRAP serves no purpose on MIPS there
is no reason to have a special case for it.

Sponsored by:	The FreeBSD Foundation
2020-02-26 19:08:23 +00:00
Warner Losh
a5b6c2960d Remove sparc64 specific parts of libc.
Also update comments for which architectures use 128 bit long doubles,
as appropriate.

The softfloat specialization routines weren't updated since they
appear to be from an upstream source which we may want to update in
the future to get a more favorable license.

Reviewed by: emaste@
Differential Revision:  https://reviews.freebsd.org/D23658
2020-02-26 18:55:09 +00:00
Warner Losh
a8197ad3aa Remove sparc64 specific parts of libm and fix comments
Once upon a time, sparc64 was the only ld128 architecture. However,
both aarch64 and riscv are now such architectures. Many of the
comments about how slow multiplication was on old sparc64 processors
are now no longer true. However, since no evaluation has been done for
aarch64 yet, it's unclear if they are still relevant or not. If not,
the code should be changed. If so, the comments should remove the
uncertainty.

Reviewed by: emaste@
Differential Revision: https://reviews.freebsd.org/D23658
2020-02-26 18:55:03 +00:00
Warner Losh
8e0ff10d4b Remove sparc64 specific parts of rtld-elf. 2020-02-26 18:49:25 +00:00