Commit Graph

228901 Commits

Author SHA1 Message Date
Alan Somers
f397a004de geli: convert most tests from TAP to ATF
I'm leaving readonly_test and nokey_test alone for now. In a future commit
they should be broken up into several smaller test cases and distributed
between multiple files.

Reviewed by:	ngie
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D13717
2018-01-07 00:44:22 +00:00
Emmanuel Vadot
98b306dcfd arm64: Remove old clock driver for Allwinner 64bit SoC
All the clocks are now handled by the clkng driver.

Tested On: Pine64-LTS (A64)
Tested On: OrangePi PC2 (H5)
2018-01-06 20:32:14 +00:00
Konstantin Belousov
f3c588e171 Document kern.smp.disabled tunable.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2018-01-06 16:29:00 +00:00
Eitan Adler
90daf40223 morse(6): update documentation
- bump Dd
- use 'r' instead of 'D' from the original submission
2018-01-06 15:52:28 +00:00
Kyle Evans
e7cfe78afe Move syscon_generic to attach much later
It still needs to be before if_awg at least in order to be available for
other operations, but it should not be attaching before interrupt
controllers at the very least.

This should make errors involving syscon register space colliding with other
devices a little more innocent, but these conflicts should really be tracked
down and resolved. One such conflict is with the Raspberry Pi 3 local
interrupt controller, noticed by tuexen@

Reported by:	tuexen
2018-01-06 14:21:32 +00:00
Warner Losh
90ceddb160 The source strings are from the password database which guarantees
that the data going into it is sane.  Out of an abundance of caution,
limit the string copies to prevent an overflow.

CID: 1019035
2018-01-06 12:46:04 +00:00
Warner Losh
ca23e64eb4 Sanity check sysconf return value to ensure it's positive before we
use it. Use proper cast to convert long to size_t (instead of
blksize_t) to preclude sign extension issues.

CID: 1193754
2018-01-06 12:45:59 +00:00
Warner Losh
1723a6e523 Sanity check media size and sector counts to ensure that we don't
produce negative sector numbers in the testing algorithm.

CID: 1198994
2018-01-06 12:34:03 +00:00
Li-Wen Hsu
917fa2a3e9 Unbreak build after r327614
Approved by:	mjg (on IRC)
Differential Revision:	https://reviews.freebsd.org/D13782
2018-01-06 09:48:04 +00:00
Eitan Adler
10988193d3 morse(6): minor nits
- Use copyright comment header
- Make it easier to compile on !FreeBSD
- Diff reduction against DragonFlyBSD
2018-01-06 07:48:17 +00:00
Eitan Adler
d213312147 morse(6): implement support for decoding morse code
- Use `-r` for "reverse" mode and to match DragonFlyBSD.
- Move defines around to clear up logic
- use `errx` instead of `fprintf` and `exit`

PR:		35109
Submitted By:	philipp.mergenthaler@stud.uni-karlsruhe.de
Submitted on:	2002-02-19
Reviewed by:	kevans
2018-01-06 07:02:24 +00:00
Warner Losh
388199e5bb Invent new #defines for the biospci_{read,write}_config function to
specify the width and use them everywhere.

Sponsored by: Netflix
2018-01-06 06:00:45 +00:00
Warner Losh
cac7bbe16a There's no need / benefit from deleting the variable before we set it.
Sponsored by: Netflix
2018-01-06 06:00:40 +00:00
Warner Losh
af9d0c273f Fix usage strings. -d and -p were removed before this was committed to
FreeBSD, but the strings weren't updated.

Sponsored by: Netflix
2018-01-06 06:00:34 +00:00
Jung-uk Kim
6c30ff135c Fix a header inclusion missed in the previous commit.
Reported by:	Michael Butler (imb at protected-networks dot net)
2018-01-06 03:41:35 +00:00
Sean Bruno
cb1103025d Handle misconfigured/nonexistent pcidev for comconsole instead of BTX panic.
PR:		203319
Reviewed by:	imp jhb
MFC after:	2 weeks
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D13776
2018-01-05 23:50:50 +00:00
Jung-uk Kim
32ac401671 Merge ACPICA 20180105. 2018-01-05 23:21:47 +00:00
Jung-uk Kim
30321a234a Import ACPICA 20180105. 2018-01-05 23:02:12 +00:00
Jung-uk Kim
7feabc2f65 Revert r327599. I missed a new file.
Pointyhat to:	jkim
2018-01-05 22:59:03 +00:00
Jung-uk Kim
c664ff8a84 Import ACPICA 20180105. 2018-01-05 22:51:18 +00:00
John Baldwin
596ab011ac Remove LINK_MAX.
After recent changes to change filesystems to use filesystem-specific
limits, LINK_MAX is no longer used in the base system.  Applications
should in theory be able to cope with a lack of LINK_MAX by using
pathconf().

PR:		224628 (exp-run)
Approved by:	imp, kib
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D13658
2018-01-05 22:26:23 +00:00
Konstantin Belousov
0530a9360f Make it possible to re-evaluate cpu_features.
Add cpuctl(4) ioctl CPUCTL_EVAL_CPU_FEATURES which forces re-read of
cpu_features, cpu_features2, cpu_stdext_features, and
std_stdext_features2.

The intent is to allow the kernel to see the changes in the CPU
features after micocode update.  Of course, the update is not atomic
across variables and not synchronized with readers.  See the man page
warning as well.

Reviewed by:	imp (previous version), jilles
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D13770
2018-01-05 21:06:19 +00:00
Gleb Smirnoff
b4f55763ce In sendfile_iodone() both pru_abort and sorele need to be executed
with proper VNET context set.

Reported by:	sbruno
MFC after:	2 weeks
2018-01-05 20:21:46 +00:00
Andriy Gapon
5f3c7d6580 Fix a couple of comments in AMD Virtual Machine Control Block structure
MFC after:	1 week
2018-01-05 19:15:24 +00:00
John Baldwin
9ae9a3d462 Correct comment. procfs_doprocfile implements 'file', not 'self'. 2018-01-05 18:32:46 +00:00
Fedor Uporov
3acd9182a1 Add 64bit feature support.
Reviewed by:    kevlo, pfg (mentor)
Approved by:    pfg (mentor)
MFC after:      6 months

Differential Revision:    https://reviews.freebsd.org/D11530
2018-01-05 10:04:01 +00:00
Mariusz Zaborski
e1c30f7a07 Build service tests with Casper support. 2018-01-05 09:31:41 +00:00
Li-Wen Hsu
be5f9a5a5d Fix typo & build
Approved by:	kevlo
2018-01-05 08:29:32 +00:00
Warner Losh
e96d5d7bb3 Remove dead code (comma is either 0 or 1 for sure, no need to test).
Close /dev/pci when we're done with it.

CID: 1007450, 1007449, 1008615, 1008614
2018-01-05 07:29:02 +00:00
Warner Losh
65273b4808 bits is never null when we call ot. Add an assert to that effect and
remove test for NULL.

CID: 270774
2018-01-05 07:28:58 +00:00
Warner Losh
6dc0176690 Tag 'a' case as one we're intentionally falling through to
the 'F' case.

CID: 1008176
2018-01-05 07:28:48 +00:00
Eitan Adler
21dc7ae75b units(1): add missing ':' for two short arguments
PR:		209850
MFC After:	3 days
2018-01-05 07:24:43 +00:00
Eitan Adler
d734a3dfcd cam/da: QUIRK: Add 4K quirks for WD Red and Black MHDDs
PR:		188685
Submitted by:	Jeremy Chadwick <jdc@koitsu.org>
Reported by:	Martin Birgmeier <d8zNeCFG@aon.at>
2018-01-05 07:14:39 +00:00
Warner Losh
5066eaeb75 Add a number of sanity checks to the data that we're handling from the
CIS. Coverity has tagged it as tainted. While this data is more
trusted than your average data, we still need to do some basic
validation on it. Check ioctl return value to ensure we switch memory
targets between common and attribute as well as the lseek.

CID: 1210464, 1006640, 1006868, 1007292, 1009091, 1009822, 1009824
2018-01-05 07:09:40 +00:00
Warner Losh
670a4056e2 Need to convert '/' back to '\' when creating a path. Ideally, this
would be filesystem type dependent, but that's difficult to accomplish
and it's unclear how the UEFI firmware will cope. Be conservative and
make boot loaders cope instead.

Sponsored by: Netflix
2018-01-05 07:09:29 +00:00
Warner Losh
167b7a41ff Set dp to NULL when we free it, and tree a NULL dp as an error
condition. This should prevent a double free. In addition, prevent a
leak by freeing dp each loop and when we're done.

CID: 1383577
Sponsored by: Netflix
2018-01-05 07:09:24 +00:00
Warner Losh
63b5669494 Free options before setting them. This will prevent us from leaking
memory when we have multiple copies of the same option from being
specified.

Sponsored by: Netflix
2018-01-05 07:09:19 +00:00
Warner Losh
da15338df8 Ensure that we have a description string. When unspecified, default to "".
Sponsored by: Netflix
2018-01-05 07:09:09 +00:00
Warner Losh
53584cf69c Don't close fd twice. This line should have been deleted in r327279.
CID: 1384015
2018-01-05 05:34:20 +00:00
Warner Losh
783d8ed04e Only call close if fd and fd1 are not -1.
CID: 1384018, 1384017
2018-01-05 05:34:14 +00:00
Warner Losh
b98c751962 Fix cut and paste error from devinfo.8 origin of this file
Noticed by: kevans@
2018-01-05 05:02:09 +00:00
Kyle Evans
df7b0169fa hexdump(1): Speed up -s flag on devices
Using the -s flag on devices is extraordinarily slow due to using fseek(3) a
little too conservatively. Address this by using fseek on character/block
devices as well, falling back to getchar(3) only if we fail to seek or we're
operating on tape drives, where fseek may succeed while not actually being
supported.

PR:		86485
Submitted by:	arundel (originally; modified since then)
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10939
2018-01-05 01:46:41 +00:00
Nathan Whitehorn
09f07b0017 Revert r327360, which can cause boot problems on high-CPU-count (>60)
POWER8 and POWER9 systems, pending further analysis.

PR:		224841
2018-01-04 23:07:51 +00:00
Jilles Tjoelker
39afde0dcc find: Speed up tests by using touch -d instead of sleep for timestamps
I have verified that the tests still detect the absence of the r327362 fix.
2018-01-04 22:59:24 +00:00
Kyle Evans
2defb358ea if_awg: Use syscon prop if it exists
The emac bindings that are landing in Linux 4.15 specify a syscon property
on the emac node that point to /soc/syscon. Use this property if it's
specified, but maintain backwards compatibility with the old method.

The older method is still used for boards that we get .dtb from u-boot, such
as pine64, that did not yet have stable emac bindings.

Tested on:	Banana Pi-M3 (a83t)
Tested on:	Pine64 (a64)
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D13296
2018-01-04 22:37:15 +00:00
John Baldwin
2da93c21ec Always use atomic_fetchadd() when updating per-user accounting values.
This avoids re-reading a variable after it has been updated via an
atomic op.  It is just a cosmetic cleanup as the read value was only
used to control a diagnostic printf that should rarely occur (if ever).

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D13768
2018-01-04 22:07:58 +00:00
John Baldwin
3160862437 Report offset relative to the backing object for kinfo_vmentry structures.
For the pathname reported in kinfo_vmentry structures (kve_path), the
sysctl handlers walk the object chain to find the bottom-most VM object.
This permits a COW mapping of a file with dirty pages to report the
pathname of the originally mapped file.  Do the same for the object
offset (kve_offset) computing a cumulative offset during the same object
walk so that the reported offset is relative to the reported pathname.

Note that ptrace(PT_VM_ENTRY) already returns a cumulative offset
rather than the raw offset of the VM map entry.

Note also that this does not affect procstat -v output (even structured
output) since that output does not include the kve_offset field.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D13767
2018-01-04 21:59:34 +00:00
Ed Schouten
8e04fe5af3 Allow timed waits with relative timeouts on locks and condvars.
Even though pthreads doesn't support this, there are various alternative
APIs that use this. For example, uv_cond_timedwait() accepts a relative
timeout. So does Rust's std::sync::Condvar::wait_timeout().

Though I personally think that relative timeouts are bad (due to
imprecision for repeated operations), it does seem that people want
this. Extend the existing futex functions to keep track of whether an
absolute timeout is used in a boolean flag.

MFC after:	1 month
2018-01-04 21:57:37 +00:00
Steven Hartland
fd3bb7aa46 Disabled the use of flowid for lagg by default
Disabled the use of RSS hash from the network card aka flowid for
lagg(4) interfaces by default as it's currently incompatible with
the lacp and loadbalance protocols.

The incompatibility is due to the fact that the flowid isn't know
for the first packet of a new outbound stream which can result in
the hash calculation method changing and hence a stream being
incorrectly split across multiple interfaces during normal
operation.

This can be re-enabled by setting the following in loader.conf:
net.link.lagg.default_use_flowid="1"

Discussed with: kmacy
Sponsored by:	Multiplay
2018-01-04 20:05:47 +00:00
Landon J. Fuller
07a0a243ec bhnd(4): Add missing BCM4312 backplane clock speed entry.
The default 80MHz clock speed returned by bhnd_pmu_si_clock() was already
correct; this just prevents the "No backplane clock specified" warning
printf from being emitted when querying backplane clock speed.

Sponsored by:	The FreeBSD Foundation
2018-01-04 19:47:01 +00:00