Commit Graph

252849 Commits

Author SHA1 Message Date
Mateusz Guzik
4eb2ed072b vmware: clean up empty lines in .c and .h files 2020-09-01 21:30:01 +00:00
Mateusz Guzik
d63738087e syscons: clean up empty lines in .c and .h files 2020-09-01 21:29:44 +00:00
Mateusz Guzik
bed0229648 twa: clean up empty lines in .c and .h files 2020-09-01 21:29:23 +00:00
Mateusz Guzik
b138e49c66 sfxge: clean up empty lines in .c and .h files 2020-09-01 21:29:01 +00:00
Mateusz Guzik
378503af2e sound: clean up empty lines in .c and .h files 2020-09-01 21:27:34 +00:00
Mateusz Guzik
9dd3156e54 usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
Mateusz Guzik
e5ecee7440 security: clean up empty lines in .c and .h files 2020-09-01 21:26:00 +00:00
Mateusz Guzik
7c8e2a57dd nfs: clean up empty lines in .c and .h files 2020-09-01 21:25:39 +00:00
Mateusz Guzik
1060326fb6 libkern: clean up empty lines in .c and .h files 2020-09-01 21:25:23 +00:00
Mateusz Guzik
1a18003240 compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
Mateusz Guzik
ab6c81a218 x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
Mateusz Guzik
d90f2c3617 ufs: clean up empty lines in .c and .h files 2020-09-01 21:23:00 +00:00
Mateusz Guzik
59958e948c xen: clean up empty lines in .c and .h files 2020-09-01 21:21:55 +00:00
Mateusz Guzik
f1ffd05af1 mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
Mateusz Guzik
e91d4ae878 riscv: clean up empty lines in .c and .h files 2020-09-01 21:21:03 +00:00
Mateusz Guzik
c3aa3bf97c vm: clean up empty lines in .c and .h files 2020-09-01 21:20:45 +00:00
Mateusz Guzik
b64b31338f powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
Mateusz Guzik
ed83a56181 i386: clean up empty lines in .c and .h files 2020-09-01 21:19:39 +00:00
Mateusz Guzik
662c13053f net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
Mateusz Guzik
586ee69f09 fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
Mateusz Guzik
50cedfede3 arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +00:00
Mateusz Guzik
654548838b arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
Mateusz Guzik
543769bf83 amd64: clean up empty lines in .c and .h files 2020-09-01 21:16:54 +00:00
John-Mark Gurney
df94ce0f90 add Xr to device_get_sysctl(9) to make this easier to find 2020-09-01 20:42:48 +00:00
Vincenzo Maffione
35d8a463e8 iflib: leave only 1 receive descriptor unused
The pidx argument of isc_rxd_flush() indicates which is the last valid
receive descriptor to be used by the NIC. However, current code has
multiple issues:
  - Intel drivers write pidx to their RDT register, which means that
    NICs will only use the descriptors up to pidx-1 (modulo ring size N),
    and won't actually use the one pointed by pidx. This does not break
    reception, but it is anyway confusing and suboptimal (the NIC will
    actually see only N-2 descriptors as available, rather than N-1).
    Other drivers (if_vmx, if_bnxt, if_mgb) adhere to this semantic).
  - The semantic used by Intel (RDT is one descriptor past the last
     valid one) is used by most (if not all) NICs, and it is also used
     on the TX side (also in iflib). Since iflib is not currently
     using this semantic for RX, it must decrement fl->ifl_pidx
     (modulo N) before calling isc_rxd_flush(), and then the
     per-driver callback implementation must increment the index
     again (to match the real semantic). This is confusing and suboptimal.
  -  The iflib refill function is also called at initialization.
     However, in case the ring size is smaller than 128 (e.g. if_mgb),
     the refill function will actually prepare all the receive
     descriptors (N), without leaving one unused, as most of NICs assume
     (e.g. to avoid RDT to overrun RDH). I can speculate that the code
     looks like this right now because this issue showed up during
     testing (e.g. with if_mgb), and it was easy to workaround by
     decrementing pidx before isc_rxd_flush().

The goal of this change is to simplify the code (removing a bunch
of instructions from the RX fast path), and to make the semantic of
isc_rxd_flush() consistent across drivers. To achieve this, we:
  - change the semantics of the pidx argument to the usual one (that
    is the index one past the last valid one), so that both iflib and
    drivers avoid the decrement/increment dance.
  - fix the initialization code to prepare at most N-1 descriptors.

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D26191
2020-09-01 20:41:47 +00:00
Mark Johnston
f7eec6b204 qlxgb: Initialize if_mtu before setting max_frame_size.
Previously we were relying on ether_ifattach() to set if_mtu, but
max_frame_size is initialized earlier.  This fixes a regression
introduced by r250375.

PR:		249050
Submitted by:	Christian Vallières <novacrash_@hotmail.com>
MFC after:	3 days
2020-09-01 20:13:50 +00:00
Ian Lepore
e439fa62ef Document the fact that you must set an i2c slave address as well as the
upstream iicbus to configure this device using hints.
2020-09-01 19:06:08 +00:00
Ryan Moeller
0667273959 Ensure zstreamdump subdir can be visited
Reported by:	Thomas Laus
Sponsored by:	iXsystems, Inc.
2020-09-01 19:02:07 +00:00
Chuck Silvers
e83370448f Move all of the error prints in readsb() from stderr to stdout.
The only output from fsck that should go to stderr is the usage message.
if setup() fails then exit with EEXIT rather than 0.

Reviewed by:	mckusick
Sponsored by:	Netflix
2020-09-01 18:50:26 +00:00
John Baldwin
ff38047b0c Fix a buffer overrun.
getln() returns 'len' valid characters.  line[len] is out of bounds.

Reported by:	CHERI
Reviewed by:	brooks
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D26197
2020-09-01 16:20:42 +00:00
Marcin Wojtas
2b33ffde2e Introduce the SDHCI driver for NXP QorIQ Layerscape SoCs
Implement support for an eSDHC controller found in NXP QorIQ Layerscape SoCs.

This driver has been tested with NXP LS1046A and LX2160A (Honeycomb board),
which is incompatible with the existing sdhci_fsl driver (aiming at older
chips from this family). As such, it is not intended as replacement for
the old driver, but rather serves as an improved alternative for SoCs that
support it.
It comes with support for both PIO and Single DMA modes and samples the
clock from the extres clk API.

Submitted by: Artur Rojek <ar@semihalf.com>
Reviewed by: manu, mmel, kibab
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D26153
2020-09-01 16:17:21 +00:00
Warner Losh
44a3c7a3f8 Bump date for r365052 2020-09-01 16:13:09 +00:00
Warner Losh
f9177b6c91 Have script accept and ignore -e for Linux compat
In the util-linux version of script, it will always exit with succes.
Except when run with -e, in which case it will have the exit value of
the child. BSD Script already uses the child's exit value for its exit
value. Some config and other helper scripts depend on being able to
specify -e. Accept it for compatibility since we'll already to the
right thing, but otherwise we ignore it.
2020-09-01 16:11:23 +00:00
Eric van Gyzen
2e47aedf86 pmc: Fix freed internal location read
Coverity detected this error.  The fix duplicates the assignment on line 171.

Submitted by:	bret_ketchum@dell.com
Reported by:	Coverity
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D26227
2020-09-01 15:52:18 +00:00
Takanori Watanabe
e26b9046a0 Add Cannon Point PCH Thermal Controller Device ID.
PR:	249047
Reported by: Dries Michiels <driesm.michiels at gmail.com>
2020-09-01 15:33:57 +00:00
Ed Maste
55c9a224e2 release.7: update for current context
It's no longer unusual to be able to build a release with a single
command, so drop "actually" that hints at a surprise.  Also just use
"network install directory" instead of referencing FTP; it's more
likely to be HTTP now.

Reviewed by:	gjb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D26260
2020-09-01 15:30:40 +00:00
Mark Johnston
fcc0db1734 Tighten frame pointer checking in DTrace's amd64 stack unwinder.
Avoid assuming that the kernel was compiled with
-fno-omit-frame-pointer.

MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
2020-09-01 15:15:44 +00:00
Mark Johnston
8d4b1e3b76 Correct the D definition for EINTEGRITY.
MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
2020-09-01 15:15:22 +00:00
Mark Johnston
645c2851e2 pw: Handle errors from ftell() when removing records from /etc/opiekeys.
Reported by:	Coverity
MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
2020-09-01 15:15:09 +00:00
Mark Johnston
7a82cf511d pw: Fix a resource leak.
Reported by:	Coverity
MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
2020-09-01 15:14:51 +00:00
Mark Johnston
45bfd3158c pw: Remove unnecessary errp checks.
The caller-supplied pointer is unconditionally dereferenced at the
beginning of the function, so there is no point in comparing it with
NULL thereafter.

Reported by:	Coverity
MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
2020-09-01 15:14:26 +00:00
Mark Johnston
79c8ad8368 pw: Fix terminal handling when setting a group password.
Reported by:	Coverity
MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
2020-09-01 15:14:13 +00:00
Edward Tomasz Napierala
e352957180 Make sure not to pass NULL to strtoul(3). The values come
from the kernel, but let's try to be on the safe side.

Reviewed by:	mav
MFC after:	2 weeks
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D26246
2020-09-01 14:58:57 +00:00
Baptiste Daroussin
fb0d1c6980 diff: always properly kill pr(1)
When diff is invoked with -l it will spawn the pr(1) program.
In some circumpstances the pr(1) was not properly killed when diff program
exits.

Submitted by:	Bret Ketchum
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D26232
2020-09-01 14:52:39 +00:00
Edward Tomasz Napierala
5d9b05ac30 Fix string overflow that could occur during redirection due to passing
the wrong length to strlcpy(3). It looks like it could overflow into
the next field, isc_user, which is properly long to accomodate for it;
I don't think it could cause any harm other than breaking the connection.

Reviewed by:	mav
MFC after:	2 weeks
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D26247
2020-09-01 14:52:35 +00:00
Andrew Turner
a48cf24742 Ensure the tlbi has completed before setting SCTLR
When enabling the MMU on arm64 we need to ensure the tlb invalidation has
completed before setting the enable bit in the SCTLR register.

Reported by:	alc
Sponsored by:	Innovate UK
2020-09-01 14:50:43 +00:00
Jilles Tjoelker
ccd0a51fda sh: Write absolute path in command -vV and type
POSIX is pretty clear that command -v, command -V and type shall write
absolute pathnames. Therefore, we need to prepend the current directory's
name to relative pathnames.

This can happen either when PATH contains a relative pathname or when the
operand contains a slash but is not an absolute pathname.
2020-09-01 13:19:15 +00:00
Hans Petter Selasky
78ae1e6e15 Make hardware TLS send tag allocation synchronous in mlx5en(4).
Previously the send tag was setup in the background, and all packets for
the given send tag were dropped until ready. Change this to be blocking
behaviour so that once the setsocketopt() for enabling TLS completes,
the socket is ready to send packets. Do this by simply flushing the
work request which does the needed firmware programming during send
tag allocation.

MFC after:	1 week
Sponsored by:	Mellanox Technologies // Nvidia
2020-09-01 12:21:17 +00:00
Leandro Lupori
51488825f1 [PowerPC] Fix PMCLOG address width
PMCLOG macros were always using 32-bit addresses, even on PPC64.
This resulted in truncated addresses in logs, when running on 64-bit PPC
machines.

Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D26112
2020-09-01 11:34:05 +00:00
Leandro Lupori
9b23e3845b [PowerPC] Move pmc_hook out of critical section
Calling pmc_hook inside a critical section may result in a panic.

This happens when the user callchain is fetched, because it uses
pmap_map_user_ptr, that tries to get the (sleepable) pmap lock when the
needed vsid is not found.

Judging by the implementation in other platforms, intr_irq_handler in
kern/subr_intr.c and what pmc_hook do, it seems safe to move pmc_hook
outside the critical section.

Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D26111
2020-09-01 11:30:39 +00:00