Commit Graph

249343 Commits

Author SHA1 Message Date
Kyle Evans
f5339b097a adduser: allow standard IFS characters in passwords
Notably, the default IFS contains space/tab, thus any leading/trailing
whitespace characters tend to be removed.

Set IFS= for just the read lines to mitigate this, allowing the user to be
less surprised when their leading/trailing spaces weren't actually captured
in the password as they are with other means of setting a user's password.

PR:		245342
Submitted by:	dereks_lifeofadishwasher.com
Reviewed by:	jilles
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D24292
2020-04-05 19:25:46 +00:00
Kristof Provost
dd00a42a6b bridge: Change lists to CK_LIST as a peparation for epochification
Prepare the ground for a rework of the bridge locking approach. We will
use an epoch-based approach in the datapath and making it safe to
iterate over the interface, span and rtnode lists without holding the
BRIDGE_LOCK. Replace the relevant lists by their ConcurrencyKit
equivalents.

No functional change in this commit.

Reviewed by:	emaste, ae, philip (previous version)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24249
2020-04-05 17:15:20 +00:00
Konstantin Belousov
2f06c66ad5 Make p_vaddr % p_align == p_offset % p_align for (some) TLS segments.
See https://sourceware.org/bugzilla/show_bug.cgi?id=24606 for the test case.
See https://reviews.llvm.org/D64930 for the background and more discussion.

Also this fixes another bug in malloc_aligned() where total size of
the allocated memory might be not enough to fit the aligned requested
block after the initial pointer is incremented by the pointer size.

Reviewed by:	bdragon
Tested by:	antoine (exp-run PR 244866), bdragon, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D21163
2020-04-04 22:37:50 +00:00
Christian Brueffer
ff595bc3cd Add a manpage for smbios(4).
Submitted by:	Gordon Bergling
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23714
2020-04-04 21:38:00 +00:00
Yoshihiro Takahashi
ba2c1f62af Remove extra spaces for the load average of machines that are down.
PR:		245296
Submitted by:	martin _at_ lispworks.com
MFC after:	1 week
2020-04-04 12:07:36 +00:00
Sergio Carlavilla Delgado
d2034aedc1 Fix typo 2020-04-04 07:43:47 +00:00
Jason A. Harmening
407a5b7953 mac_policy: Remove mac_policy_sx
This lock was made unnecessary by the addition of mac_policy_rms in r356120.

Reviewed by:	mjg, kib
Differential Revision:	https://reviews.freebsd.org/D24283
2020-04-04 04:03:10 +00:00
Kirk McKusick
33ceb489d3 Clean up global variable declarations in the dump and restore
utilities so that they will compile with -fno-common.

Started by:  Kyle Evans (kevans)
Reviewed by: Kyle Evans (kevans)
MFC after:   1 week
Differential Revision: https://reviews.freebsd.org/D24210
2020-04-04 00:56:56 +00:00
Ed Maste
2efe3be95e vt: avoid overrun when stride is not a multiple of bytes per pixel
The reporter is developing a frame buffer driver for hardware using
3 bytes per pixel, but a stride that's a multiple of 256.  Previously
this resulted in writing beyond the end of each stride.  On the last
row this attempted to write past the end of the frame buffer, triggering
the assertion in vt_fb_mem_wr1().

PR:		243533
MFC after:	2 weeks
Submitted by:	Thomas Skibo
2020-04-04 00:31:30 +00:00
Matt Macy
92b14858b4 Update x86 counters
MFC after:	1 week
2020-04-03 22:36:22 +00:00
Ed Maste
6e46e45f97 ANSIfy and KNF function arg definitions in libmd/md4.c
Reported by:	bde, in 2017
2020-04-03 20:56:43 +00:00
Justin Hibbits
ccb1ebe01c powerpc/amigaone: Add CPLD driver for AmigaOne A1222 "Tabor"
Like the X5000, the main CPLD on the A1222 is the communication medium
between the CPU and the GPIO CPLD.  It provides a mailbox communication
feature, along with dual-port RAM accessible from both the CPU and GPIO
CPLD, and 3 fan speed reporting registers.
2020-04-03 20:45:16 +00:00
Kirk McKusick
2baca88584 When shrinking the size of a directory it is sometimes necessary to
sync it to disk before shrinking it. Complete the sync before getting
the buffer for the block to be updated to do the shrink to avoid
panicing with a recursive lock on one of the directory's buffers.

Reviewed by:  Chuck Silvers (chs)
MFC after:    3 days
Sponsored by: Netflix
2020-04-03 20:43:25 +00:00
Kirk McKusick
aedb9cc662 Convert DOINGSOFTDEP, MOUNTEDSOFTDEP, DOINGSUJ, and MOUNTEDSUJ to being
boolean expressions so that their values are not lost when assigned to
`bool' or `int' variables.

Reviewed by:  Chuck Silvers (chs)
MFC after:    3 days
Sponsored by: Netflix
2020-04-03 20:30:45 +00:00
Ed Maste
233c4ed93a elf.5: remove commented out leftovers 2020-04-03 19:42:16 +00:00
Ed Maste
bf38482033 elf.5: expand on NT_FREEBSD_FEATURE_CTL bit definitions
Based on suggestions from kib in review D23982.

Sponsored by:	The FreeBSD Foundation
2020-04-03 17:17:17 +00:00
Ed Maste
652a974885 lldb: build and enable lua script bindings
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24266
2020-04-03 16:54:13 +00:00
Brooks Davis
e40fa28f1a Pass the real value of MK_TESTS_SUPPORT to distribution.
This allows kyua's config file to actually be installed.

Reported by:	arichardson
Reviewed by:	arichardson
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24268
2020-04-03 16:19:07 +00:00
Brooks Davis
415a606e17 pmc: diable position-independent builds, they fail to link on amd64
PR:		245189
Reported by:	Gordon Bergling
Sponsored by:	DARPA
2020-04-03 16:10:42 +00:00
Ed Maste
31c5c437cc lldb: commit generated LLDBWrapLua.cpp 2020-04-03 15:55:58 +00:00
Ed Maste
f0d060f91b lldb: add rule to generate LLDBWrapLua.cpp
Building lldb's lua/python bindings requires swig, but we do not want to
include it in the FreeBSD base system (as a build tool) because it has
non-trivial dependencies.  As a workaround, add a make rule to generate
LLDBWrapLua.cpp, and we will commit the generated file.

Requires the swig30 package.

Reviewed by:	brooks
Discussed with:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24265
2020-04-03 15:52:44 +00:00
Brooks Davis
317111316d Install a kyua.conf based on the one in devel/kyua.
The kyua.conf from examples doesn't match the expected config and
contains a lot of undesirable entries such as setting the architecture
to amd64 explicitly.

Reported by:	arichardson (missing config)
Reviewed by:	emaste
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D24267
2020-04-03 15:47:15 +00:00
Mark Johnston
fb979f0db2 Fix up r359594: -m takes an argument.
PR:		244153
Reported by:	0mp
MFC with:	r359594
2020-04-03 14:47:40 +00:00
Mark Johnston
ab82560638 xargs: Fix exit status expression when a child process fails to exec.
PR:		244327
Submitted by:	thomas.duffy.99@alumni.brown.edu
MFC after:	1 week
2020-04-03 14:03:58 +00:00
Mark Johnston
c205ac921b geom_journal: Only stop the switcher process if one was started.
PR:		243196
MFC after:	1 week
2020-04-03 13:57:41 +00:00
Mark Johnston
3035d538a4 Fix the description of the -m flag in top.1.
PR:		244153
Submitted by:	fehmi noyan isi <fnoyanisi@yahoo.com>
MFC after:	3 days
2020-04-03 13:35:44 +00:00
Mateusz Piotrowski
b75ab02f57 Bump date after recent changes and lint 2020-04-03 13:05:26 +00:00
Oleksandr Tymoshenko
838f5ac1f9 Remove hardcoded US Election Day from calendar.usholiday
calendar(1) syntax is not capable of representing the rules for the
US Election Day. The hardcoded date was set in r15066 in 1996 and
hasn't changed since then.

PR:		173389
Reported by:	Steve Ames <steve@energistic.com>
MFC after:	1 week
2020-04-03 02:39:46 +00:00
Oleksandr Tymoshenko
c01c8cccf5 Fix calculation of the recurring weekdays
Both the result of the first_dayofweek_of_year and the target
weekday are zero-based (0 fo sunday) while the target month-day
or year-day is 1-based. Adjust logic accordingly.

Also add testcase for this PR to the kyua test suite

PR:		201062
Submitted by:	Richard Narron <comet.berkeley@gmail.com>
MFC after:	1 week
2020-04-03 01:17:43 +00:00
Ed Maste
2b99119f6d lldb: use lua as the default script language
In the FreeBSD base system we do not have Python support in lldb, but
will have Lua support.  Make Lua the default.

This needs to be made into a configure-time option; that is being
discussed upstream and will appear in a future lldb import.  For now
carry this change as a tiny patch to our copy of lldb.
2020-04-02 21:08:28 +00:00
Conrad Meyer
1e9ee2b596 ddb(4): show lockchain: Don't dereference LK_KERNPROC
Also, print a little more information for otherwise unhandled inhibited states.

Finally, improve the grammar of some prints.  Some of the print statements
missing verb.

Sponsored by:	Dell EMC Isilon
2020-04-02 20:47:51 +00:00
Alexander V. Chernikov
66bc03d415 Use interface fib for proxyarp checks.
Before the change, proxyarp checks for src and dst addresses
 were performed using default fib, breaking multi-fib scenario.

PR:		245181
Submitted by:	Scott Aitken (original version)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24244
2020-04-02 20:06:37 +00:00
Alexander V. Chernikov
272bd6985f Add routing tests verifying basic RTM_CHANGE functionality.
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24239
2020-04-02 20:02:33 +00:00
Dimitry Andric
130d950caf Merge once more from ^/vendor/llvm-project/release-10.x, to get the
lldb/bindings directory, which will be used to provide lua bindings for
lldb.

Requested by:	emaste
MFC after:	6 weeks
X-MFC-With:	358851
2020-04-02 19:56:43 +00:00
Dimitry Andric
4c8711804d Add lldb/bindings to vendor area, since emaste is going to add support
for lldb's lua bindings.
2020-04-02 19:52:43 +00:00
Ian Lepore
78c1387f4c Add the Cadence GEM ethernet driver to NOTES so that it gets built with
LINT kernels.  Move the config for it from files.<arch> files into the
main config (conf/files), because it works on multiple platforms now.
2020-04-02 19:06:05 +00:00
Ian Lepore
f674004f5d Cadence GEM ethernet driver style clean-up, no functional changes.
This is mostly indentation whitespace, and reflowing a few multiline
comments.  This gets a bunch of minor stuff out of the way so that the diffs
for style don't clutter up the diffs for some upcoming functional changes.

Submitted by:	Thomas Skibo
Differential Revision:	https://reviews.freebsd.org/D24226
2020-04-02 17:57:40 +00:00
John Baldwin
1b96435a65 Avoid checking pointers that are never NULL.
Coverity noted that cod pointer is always non-NULL at the end of
cryptodev_aead().  While here, fix cryptodev_op() to match by making
one earlier failure case before cod and crp are allocated just return
directly.

CID:		1422185
Reported by:	Coverity
2020-04-02 17:22:16 +00:00
John Baldwin
54ae1f3308 Remove duplicate conditional.
CID:		1422192
Reported by:	Coverity
2020-04-02 16:55:28 +00:00
Poul-Henning Kamp
9546e08e7b Add two options to recoverdisk(1) inspired by a recent
data-archæology project:

-u pattern

    Fill unread parts of the output with pattern.
    Default pattern is "_UNREAD_", empty pattern disables.

-v

    Fancy status reporting using ANSI escapes and UTF-8
2020-04-02 15:17:53 +00:00
David Bright
6995fb5eb7 Fix various Coverity-detected errors in nvmecontrol
This fixes several Coverity-detected errors in nvmecontrol. While in
here, a couple additional errors with shift/mask confusion that were
not diagnosed by Coverity are also fixed.

CIDs addressed: 1040299, 1040300, 1403972, 1403973, 1403985, 1403988,
1403990, 1404374, 1404427, 1404469, 1404510, 1404534, 1418118

CID 1403657 (resource leak of shared library handle) was marked
"intentional" in the Coverity scan database.

Reviewed by:	vangyzen, robert.herndon_dell.com
Reviewed by:	daniel.william.ryan_gmail.com (earlier version)
Reviewed by:	rramsden_isilon.com (earlier version), imp
MFC after:	5 days
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D24203
2020-04-02 13:52:54 +00:00
Sevan Janiyan
3b8de63481 Add NetBSD 8.2 2020-04-02 11:08:19 +00:00
Takanori Watanabe
3cba89e6f8 Fix mbuf handling in le advertize packet processing.
Submitted by: Marc Veldman <marc at bumblingdork.com>
2020-04-02 09:15:31 +00:00
Ed Maste
2338bd4714 elf.5: correct and expand NT_FREEBSD_NOINIT_TAG description
Reported by:	kib
2020-04-02 01:03:27 +00:00
Nick O'Brien
96d3575edc riscv/sifive: add FE310 Always-on driver
This driver supports SiFive's FE310 Always-on (AON) peripheral's
Real-time clock (RTC) and Watchdog timer (WDT). AON has other
functionality that this driver could support such as the power
management unit (PMU) but that functionality hasn't been implemented.

Reviewed by:	philip (mentor), kp (mentor)
Approved by:	philip (mentor)
Sponsored by:	Axiado
Differential Revision:	https://reviews.freebsd.org/D24170
2020-04-02 00:33:15 +00:00
Ed Maste
ae62900618 elf.5: minor update to FreeBSD ELF note descriptions 2020-04-01 23:36:16 +00:00
Warner Losh
5310132318 Note some functions that appeared in First Edition Unix
These functions first appeared in the First Edition of Unix (or earlier in the
pdp-7 version). Just claim 1st Edition for all this. The pdp-7 code is too
fragmented at this point to extend history that far back.
2020-04-01 22:50:41 +00:00
John Baldwin
59838c1a19 Retire procfs-based process debugging.
Modern debuggers and process tracers use ptrace() rather than procfs
for debugging.  ptrace() has a supserset of functionality available
via procfs and new debugging features are only added to ptrace().
While the two debugging services share some fields in struct proc,
they each use dedicated fields and separate code.  This results in
extra complexity to support a feature that hasn't been enabled in the
default install for several years.

PR:		244939 (exp-run)
Reviewed by:	kib, mjg (earlier version)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D23837
2020-04-01 19:22:09 +00:00
John Baldwin
02cb5b4be8 Set crp_ilen for crypto requests.
Assertions in crypto_dispatch() depend on this value being set to
verify that payload and AAD regions are in bounds.  Also, requests
that use a single kernel buffer rely on this to know how long the
buffer is for bus_dma, etc.

Reported by:	kp
2020-04-01 17:09:21 +00:00
Ed Maste
72f8500f39 Remove redundant development tag from include Makefile
Headers are placed in the -development package via install args in rules
in share/mk/bsd.incs.mk; there is no need to explicitly modify TAGS in
include/Makefile.  (Mentioned in review D24139.)

Discussed with:	manu
2020-04-01 16:38:45 +00:00