Commit Graph

231190 Commits

Author SHA1 Message Date
Kyle Evans
d96c11b860 Add /boot/overlays to ObsoleteFiles
It has been replaced by /boot/dtb/overlays. We haven't yet populated it with
any of our own overlays, so no further damage from here.

Reported by:	Oliver Pinter <oliver.pinter@hardenedbsd.org>
2018-03-20 01:33:04 +00:00
Justin Hibbits
a029f84189 Fix powerpc Book-E build post-331018/331048.
pagedaemon_wakeup() was moved from vm_pageout.h to vm_pagequeue.h.
2018-03-20 01:07:22 +00:00
Conrad Meyer
bf799c28ff blacklist: Fix minor memory leak in configuration parsing error case
Ordinarily, the continue clause of the for-loop would free 'line.'  In this
case we instead return early, missing the free.  Add an explicit free to
avoid the leak.

Reported by:	Coverity
Sponsored by:	Dell EMC Isilon
2018-03-20 00:16:24 +00:00
Oleksandr Tymoshenko
108117cc22 [ofw] fix errneous checks for OF_finddevice(9) return value
OF_finddevices returns ((phandle_t)-1) in case of failure. Some code
in existing drivers checked return value to be equal to 0 or
less/equal to 0 which is also wrong because phandle_t is unsigned
type. Most of these checks were for negative cases that were never
triggered so trhere was no impact on functionality.

Reviewed by:	nwhitehorn
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D14645
2018-03-20 00:03:49 +00:00
Alexander Motin
5f5baf0e96 Update mpr(4) driver from v15 to v18 from Broadcom site.
Version 16 is just a number bump, since we already had those changes.

Version 17 introduces new AdapterType value, that allows new user-space
tools from Broadcom to differentiate adapter generations 3 and 3.5.

Version 18 updates headers and adds SAS_DEVICE_DISCOVERY_ERROR reporting.

MFC after:	2 weeks
2018-03-19 23:21:45 +00:00
Matt Joras
d6160f6079 Fix initialization of eventhandler mutex.
mtx_init does not do a copy of the name string it is passed. The
eventhandler code incorrectly passed the parameter string directly to
mtx_init instead of using the copy it makes. This was an existing
problem with the code that I dutifully copied over in my changes in r325621.

Reported by:	Anton Rang <rang AT acm.org>
Reviewed by:	rstone, markj
Approved by:	rstone (mentor)
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D14764
2018-03-19 22:43:27 +00:00
Ed Maste
dc85846736 Rename linuxulator functions with linux_ prefix
It's preferable to have a consistent prefix.  This also reduces
differences between the three linux*_sysvec.c files.

Sponsored by:	Turing Robotic Industries Inc.
2018-03-19 21:26:32 +00:00
Kristof Provost
b4b8fa3387 pf: Fix memory leak in DIOCRADDTABLES
If a user attempts to add two tables with the same name the duplicate table
will not be added, but we forgot to free the duplicate table, leaking memory.
Ensure we free the duplicate table in the error path.

Reported by:	Coverity
CID:		1382111
MFC after:	3 weeks
2018-03-19 21:13:25 +00:00
Eric Joyner
7d48aa4c72 ixgbe(4): Update shared code, add support for X552 1G, fix bug
This patch will:

- Update ixgbe shared code
- Add support for Intel(R) Ethernet Connection X552 1000BASE-T
- Add error handling for link state check preventing VF from stopping traffic
  after changing PF's MTU value

Submitted by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed by: Intel Networking
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D13885
2018-03-19 20:55:05 +00:00
Kenneth D. Merry
0afdc47158 cam_periph_acquire() now returns an errno.
The ch(4) driver was missed in change 328918, which changed
cam_periph_acquire() to return an errno instead of cam_status.

As a result, ch(4) failed to attach.

Sponsored by:	Spectra Logic
2018-03-19 20:19:00 +00:00
Mark Johnston
df7165b88e Given hidden visibility to symbols referenced by the DOF section.
MFC after:	1 week
2018-03-19 19:32:05 +00:00
John Baldwin
7c13fd10c4 Revert r318180 and re-enable AIO tests on md(4) by default.
The 'physio' fast-path used by AIO requests on md(4) devices, is not
gated on the unsafe_aio knob.  Prior to r327755, some AIO requests could
fail the fast-path and fall back to the slow-path (requests for devices
not supporting unmapped I/O and requests which failed with EFAULT during
the fast-path).  However, those cases now return a suitable error rather
than using the slow-path.

PR:		217261
Reviewed by:	asomers
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D14742
2018-03-19 19:09:15 +00:00
Ruslan Bukin
74fe6c29fb Import Intel Processor Trace decoder library from
vendor/processor-trace/24982c1a6fce48f1e416461d42899805f74fbb26

Sponsored by:	DARPA, AFRL
2018-03-19 18:59:15 +00:00
Ruslan Bukin
766f5c51c3 Import Intel Processor Trace library.
Git ID 24982c1a6fce48f1e416461d42899805f74fbb26

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12815
2018-03-19 18:34:08 +00:00
John Baldwin
7af5f2acfb Fix a typo.
Reviewed by:	kib
2018-03-19 17:14:56 +00:00
Lawrence Stewart
370efe5ac8 Add support for the experimental Internet-Draft "TCP Alternative Backoff with
ECN (ABE)" proposal to the New Reno congestion control algorithm module.
ABE reduces the amount of congestion window reduction in response to
ECN-signalled congestion relative to the loss-inferred congestion response.

More details about ABE can be found in the Internet-Draft:
https://tools.ietf.org/html/draft-ietf-tcpm-alternativebackoff-ecn

The implementation introduces four new sysctls:

- net.inet.tcp.cc.abe defaults to 0 (disabled) and can be set to non-zero to
  enable ABE for ECN-enabled TCP connections.

- net.inet.tcp.cc.newreno.beta and net.inet.tcp.cc.newreno.beta_ecn set the
  multiplicative window decrease factor, specified as a percentage, applied to
  the congestion window in response to a loss-based or ECN-based congestion
  signal respectively. They default to the values specified in the draft i.e.
  beta=50 and beta_ecn=80.

- net.inet.tcp.cc.abe_frlossreduce defaults to 0 (disabled) and can be set to
  non-zero to enable the use of standard beta (50% by default) when repairing
  loss during an ECN-signalled congestion recovery episode. It enables a more
  conservative congestion response and is provided for the purposes of
  experimentation as a result of some discussion at IETF 100 in Singapore.

The values of beta and beta_ecn can also be set per-connection by way of the
TCP_CCALGOOPT TCP-level socket option and the new CC_NEWRENO_BETA or
CC_NEWRENO_BETA_ECN CC algo sub-options.

Submitted by:	Tom Jones <tj@enoti.me>
Tested by:	Tom Jones <tj@enoti.me>, Grenville Armitage <garmitage@swin.edu.au>
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/D11616
2018-03-19 16:37:47 +00:00
Kyle Evans
2c58a19393 Amend missed reference to /boot/overlays, moved to /boot/dtb/overlays 2018-03-19 16:17:10 +00:00
Kyle Evans
d5a390e6c7 Move /boot/overlays to /boot/dtb/overlays
The former is fairly vague; these are FDT overlays to be applied to the
running system, so /boot/dtb is a sensible location to put it without
cluttering up /boot/dtb even further if desired.
2018-03-19 16:16:12 +00:00
Kyle Evans
85efc91a3c lualoader: Setup default color scheme if we're using colors
The console may have been set for different colors before lualoader kicks
in; notably, a black-on-white color scheme is not necessarily what we're
expecting.

While here, make color.default() a composition of color.escape() instead of
rewriting the escape sequence to make it more obvious what it's achieving: a
white-on-black color scheme with no attributes set.

Reported by:	emaste, whose eyes may rest easily
2018-03-19 15:48:31 +00:00
Emmanuel Vadot
d9d3a08ed4 sys/dts: Remove arm64 from subdir as it no longer exists.
r325987 removed the arm64 directory, remove it from SUBDIR too.
2018-03-19 15:35:26 +00:00
Kyle Evans
d3cf0e0c00 Add note to UPDATING about UEFI changes requiring loader(8) update
These problems have only been observed with boards using U-Boot (e.g. ARM)
where virtual addresses are already set in the memory map by the firmware
and the firmware is expecting a call to SetVirtualAddressMap to be made.
I refrain from mentioning this in the note because this could also be the
case on some not-yet-tested firmware on amd64 and it's not a bad
recommendation for the general case.
2018-03-19 15:27:53 +00:00
Ed Maste
9bec2ea66e linux*_sysvec.c: rationalize whitespace and comments
There's a fair amount of duplication between MD linuxulator files.
Make indentation and comments consistent between the three versions of
linux_sysvec.c to reduce diffs when comparing them.

Sponsored by:	Turing Robotic Industries Inc.
2018-03-19 15:11:10 +00:00
Ed Maste
c69defc269 loader.conf: remove obsolete non-x86 beastie menu statement
As of r330005 the same loader.conf defaults are used on all platforms.

Sponsored by:	The FreeBSD Foundation
2018-03-19 15:07:15 +00:00
Hans Petter Selasky
5cd5781c75 Remove redundant integer cast in ibcore. The "ref_count" field already
has integer type.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2018-03-19 13:51:33 +00:00
Andrey V. Elsukov
b43b604b30 Remove note that fwd tablearg is supported only by IPv4. IPv6 is
supported too.

MFC after:	1 week
2018-03-19 10:50:27 +00:00
Xin LI
3e09403f77 Plug a possible memory leak.
MFC after:	2 weeks
2018-03-19 05:49:26 +00:00
Mateusz Guzik
c3bf638194 Update my calendar entry to be more specific now that UTF8 turns out to be fine 2018-03-19 00:25:10 +00:00
Mariusz Zaborski
4468cd1a73 The gids argument can be declared as const.
We don't modified it in this function.
2018-03-18 19:50:32 +00:00
Ian Lepore
d892051323 Add the device/chip type to the disk d_descr field, and print more info
about the chip including the erase block size at attach time.

Also add myself to the copyrights since at this point svn blame would point
to me as the culprit for much of this.
2018-03-18 18:58:47 +00:00
Warner Losh
a0139c462a Don't add links or cleanfiles for NO_OBJ case, in addition to not
creating them. Move them under the if after the all: target.  They are
just defines, so it doesn't really matter where we have them.

MFC After: 3 days
2018-03-18 18:50:48 +00:00
Ian Lepore
3c9af13c75 Add support for 4K and 32K erase block sizes. Many of the supported chips
have these flags set in the ident table, but there was no code to support
using the smaller erase sizes.
2018-03-18 18:37:47 +00:00
Ian Lepore
c03ab159f6 Make all internal routines return an int error status, and check the
status at all call points.  Combine the get_status and wait_for_ready
routines, since waiting for ready is the only reason to ever get status.
2018-03-18 17:47:57 +00:00
Mariusz Zaborski
78d69bcbf4 Fix reference to man page in Makefile.
I broke it in r331120.
2018-03-18 17:27:37 +00:00
Ian Lepore
89a1585b8d Add sc_parent to the softc and use it in place of device_get_parent() calls
all over the place.  Also pass the softc as the arg to all the internal
functions instead of passing a device_t and calling device_get_softc() in
each function.
2018-03-18 17:25:23 +00:00
Mark Johnston
4ed6321f41 Use __syscall(2) rather than syscall(2) in syscall/tst.args.c.
Some of mmap(2)'s arguments are 64 bits wide.

MFC after:	3 days
2018-03-18 17:03:26 +00:00
Mark Johnston
95099bbad1 Fix an access of an uninitialized variable in dtrace_probe().
Reported by:	Coverity, via cem
MFC after:	3 days
2018-03-18 17:01:50 +00:00
Ian Lepore
89a895b63c Bugfix: wait for writes/erases to complete after starting them, instead of
before starting them.

Using the wait-before logic would make sense if there was useful time-
consuming work that could be done between the end of one write and the
beginning of the next, but it also requires doing the wait-for-ready before
reading, because a prior write or erase could still be in progress.  Reading
is the far more common case, so adding a whole extra bus transaction to
check for ready before each read would soak up any small gains that might be
had from doing async writes.
2018-03-18 16:52:31 +00:00
Mark Johnston
c6a70eaea8 Avoid dequeuing the fault page during a soft fault.
Such pages are re-enqueued at the end of the fault handler, preserving
LRU. Rather than performing two separate operations per fault, simply
requeue the page at the end of the fault (or bump its activation count
if it resides in PQ_ACTIVE, avoiding the page queue lock entirely).
This elides some page lock and page queue lock operations in common
cases, e.g., CoW faults.

Note that we must still dequeue the source page for "optimized" CoW
faults since the page may not remain enqueued while it is moved to
another object.

Reviewed by:	alc, kib
Tested by:	pho
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D14625
2018-03-18 16:49:30 +00:00
Mark Johnston
0eb50f9cd2 Have vm_page_{deactivate,launder}() requeue already-queued pages.
In many cases the page is not enqueued so the change will have no
effect. However, the change is needed to support an optimization in
the fault handler and in some cases (sendfile, the buffer cache) it
was being emulated by the caller anyway.

Reviewed by:	alc
Tested by:	pho
MFC after:	2 weeks
X-Differential Revision: https://reviews.freebsd.org/D14625
2018-03-18 16:40:56 +00:00
Ian Lepore
19aa9f7183 Eliminate some unneeded intermediate variables. Eliminate some redundant
parens in shift-and-mask expressions.  Reword and reflow some comments.
2018-03-18 16:36:14 +00:00
Mark Johnston
434862acb1 Have vm_page_replace() assert that the new page is not enqueued.
The new page does not belong to a VM object, but the page daemon does
not expect to encounter such pages.

Reviewed by:	alc, kib
Tested by:	pho
MFC after:	1 week
X-Differential Revision: https://reviews.freebsd.org/D14625
2018-03-18 16:35:40 +00:00
Edward Tomasz Napierala
d09cfd2724 Fix typo.
MFC after:	2 weeks
2018-03-18 16:24:11 +00:00
Ian Lepore
f432eb7ea1 Remove a pointless KASSERT and reword a comment a bit. The KASSERT tested
for the same condition that the preceeding lines checked for and would have
returned EIO, so the assert could never possibly trigger (sc_sectorsize must
inherently be an integer multiple of FLASH_PAGE_SIZE).
2018-03-18 16:10:14 +00:00
Mariusz Zaborski
cba559e112 Fix similar typos to r331124. 2018-03-18 16:06:35 +00:00
Mariusz Zaborski
d5219c1955 Fix typo.
Submitted by:	Trond Endrestøl <Trond.Endrestol@ximalas.info>
2018-03-18 16:02:41 +00:00
Ian Lepore
dac94adb63 Do not overwrite the contents of BIO_WRITE buffers. SPI inherently
transfers data in both directions at once.  When writing to the device,
use a dummy buffer for the incoming data, not the same buffer as the
outgoing data.  Writes are done in FLASH_PAGE_SIZE chunks, which is only
256 bytes, so just put the dummy buffer into the softc.
2018-03-18 15:56:10 +00:00
Edward Tomasz Napierala
bdfc6e62ff Here's the new development(7), which removes information that's
no longer relevant (read: most of what was there) and adds some
quick links to point newcomers in the right direction.

Reviewed by:	imp@
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D14680
2018-03-18 15:44:07 +00:00
Mariusz Zaborski
2d649033ec Update libcasper references to all new man pages.
Remove obsolete example. All services has they own example.
This example also show old type of limiting method which is
not recommended to use.

Reviewed by:	bcr@
Differential Revision:	https://reviews.freebsd.org/D14607
2018-03-18 15:24:45 +00:00
Mariusz Zaborski
edd09a2599 Document the sysctl Casper service.
PR:		226102
Reviewed by:	bcr@
Differential Revision:	https://reviews.freebsd.org/D14606
2018-03-18 15:16:47 +00:00
Mariusz Zaborski
54442b3cfa Document the pwd Casper service.
PR:		226102
Reviewed by:	bcr@
Differential Revision:	https://reviews.freebsd.org/D14605
2018-03-18 15:13:37 +00:00