]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC r306807:
kib [Fri, 28 Oct 2016 12:55:14 +0000 (12:55 +0000)]
MFC r306807:
When making a pause after detecting hard kill of the single-user
shell, ensure that we do sleep for at least the specified time, in
presence of signals.

7 years agoMFC r307651:
hselasky [Fri, 28 Oct 2016 12:43:49 +0000 (12:43 +0000)]
MFC r307651:
Add support for adjusting the hardware buffering delay for USB audio.

Requested by: Goran Mekic <meka@tilda.center>

7 years agoMFC 303002: Include process IDs in core dumps.
jhb [Fri, 28 Oct 2016 03:54:19 +0000 (03:54 +0000)]
MFC 303002: Include process IDs in core dumps.

When threads were added to the kernel, the pr_pid member of the
NT_PRSTATUS note was repurposed to store LWP IDs instead of process
IDs.  However, the process ID was no longer recorded in core dumps.
This change adds a pr_pid field to prpsinfo (NT_PRSINFO).  Rather than
bumping the prpsinfo version number, note parsers can use the note's
payload size to determine if pr_pid is present.

7 years agoMFC r307869:
kib [Thu, 27 Oct 2016 09:11:36 +0000 (09:11 +0000)]
MFC r307869:
Fix typo.

7 years agoMFC r305539: work around AMD erratum 793 for family 16h, models 00h-0Fh
avg [Thu, 27 Oct 2016 07:57:25 +0000 (07:57 +0000)]
MFC r305539: work around AMD erratum 793 for family 16h, models 00h-0Fh

7 years agoMFC r306801: implement zfs_vptocnp() using z_parent property
avg [Thu, 27 Oct 2016 07:54:04 +0000 (07:54 +0000)]
MFC r306801: implement zfs_vptocnp() using z_parent property

7 years agoMFC r307578
davidcs [Wed, 26 Oct 2016 17:53:12 +0000 (17:53 +0000)]
MFC r307578
  1. Use taskqueue_create() instead of taskqueue_create_fast() for both
     fastpath and slowpath taskqueues.
  2. Service all transmits in taskqueue threads.
  3. additional stats counters for  keeping track of
   - bd availability
   - tx buf ring not emptied in the fp task queue.
     These are drained via timeout taskqueue.
   - tx attempts during link down.

7 years agoMFC r307628:
ae [Wed, 26 Oct 2016 17:34:33 +0000 (17:34 +0000)]
MFC r307628:
  Fix `ipfw table lookup` handler to return entry value, but not its index.

7 years agoMFC r307638:
gahr [Wed, 26 Oct 2016 08:39:33 +0000 (08:39 +0000)]
MFC r307638:

Chase a cornercase in printenv and sync its behaviour with builtin's

The cornercase is when printenv is passed a parameter in the form
VAR=val, where VAR=val exists in the environment. In this case, printenv would
print a spurious newline and returns 0.

Approved by: cognet
MFC after: 1 week

7 years agoMFC r307132: Use copyout() instead of pointing sbuf to user-space buffer.
mav [Wed, 26 Oct 2016 07:45:15 +0000 (07:45 +0000)]
MFC r307132: Use copyout() instead of pointing sbuf to user-space buffer.

7 years agoMerge r307937:
glebius [Tue, 25 Oct 2016 17:15:32 +0000 (17:15 +0000)]
Merge r307937:
  Fix unchecked array reference in the VGA device emulation code.

  Submitted by:   Ilja Van Sprundel <ivansprundel ioactive.com>
  Patch by:     tychon
  Security:       SA-16:32

7 years agoMerge r307936:
glebius [Tue, 25 Oct 2016 17:14:50 +0000 (17:14 +0000)]
Merge r307936:
  The argument validation in r296956 was not enough to close all possible
  overflows in sysarch(2).

  Submitted by: Kun Yang <kun.yang chaitin.com>
  Patch by:     kib
  Security:     SA-16:15

7 years agoaccept4 actually expect SOCK_NONBLOCK and not O_NONBLOCK
bapt [Tue, 25 Oct 2016 15:21:20 +0000 (15:21 +0000)]
accept4 actually expect SOCK_NONBLOCK and not O_NONBLOCK

Reported by:    jhb
Pointyhat to:   bapt

7 years agoMFC r307787:
bapt [Tue, 25 Oct 2016 14:58:49 +0000 (14:58 +0000)]
MFC r307787:

Fix typo in the COMPILER_VERSION check

PR: 213120
Submitted by: Yuta Satoh <nigoro.dev@gmail.com>

7 years agoMFC r307786:
bapt [Tue, 25 Oct 2016 14:56:42 +0000 (14:56 +0000)]
MFC r307786:

Do not install NIS program rc script if WITHOUT_NIS is set

PR: 213375
Submitted by: sergey@akhmatov.ru

7 years agoMFC r307783:
bapt [Tue, 25 Oct 2016 14:52:14 +0000 (14:52 +0000)]
MFC r307783:

Import tzdata 2016h

7 years agoMFC r307551:
jch [Tue, 25 Oct 2016 12:53:14 +0000 (12:53 +0000)]
MFC r307551:

Fix a double-free when an inp transitions to INP_TIMEWAIT state
after having been dropped.

This change enforces in_pcbdrop() logic in tcp_input():

"in_pcbdrop() is used by TCP to mark an inpcb as unused and avoid future packet
delivery or event notification when a socket remains open but TCP has closed."

PR: 203175
Reported by: Palle Girgensohn, Slawa Olhovchenkov
Tested by: Slawa Olhovchenkov
Reviewed by: Slawa Olhovchenkov
Approved by: gnn, Slawa Olhovchenkov
Differential Revision: https://reviews.freebsd.org/D8211
Sponsored by: Verisign, inc

7 years agoMFC r307379:
manu [Mon, 24 Oct 2016 21:31:47 +0000 (21:31 +0000)]
MFC r307379:

axp209: Add support for regulators

Except for LDO4, all regulators are supported.

7 years agoMFC r306680:
kib [Mon, 24 Oct 2016 11:47:27 +0000 (11:47 +0000)]
MFC r306680:
Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags.

7 years agoMFC r307501:
kib [Mon, 24 Oct 2016 11:33:42 +0000 (11:33 +0000)]
MFC r307501:
If vm_fault_hold(9) finds that fs.m is wired, do not free it after a
pager error, leave the page to the wire owner.

7 years agoMFC r307499:
kib [Mon, 24 Oct 2016 11:28:54 +0000 (11:28 +0000)]
MFC r307499:
Export vm_page_xunbusy_maybelocked().

7 years agoMFC r306570:
markj [Mon, 24 Oct 2016 01:29:46 +0000 (01:29 +0000)]
MFC r306570:
Allow tracing of functions prefixed by "__".

7 years agoMFC r307522: makesyscalls.sh: remove trailing space on the "created from" line
emaste [Mon, 24 Oct 2016 01:14:26 +0000 (01:14 +0000)]
MFC r307522: makesyscalls.sh: remove trailing space on the "created from" line

In r10905 and r10906 makesyscalls was modified to avoid emitting a
literal $Id$ string in the generated file, with:

    gsub("[$]Id: ", "", $0)
    gsub(" [$]", "", $0)

Then r11294 added some functionality and also tried to address the $Id$
problem in a different way, by removing every $:

    sed -e 's/\$//g ...

This rendered the gsub infeffective. The gsub was later updated to
track the $Id$ -> $FreeBSD$ switch, even though it did not do anything.

Revert the addition of the s/\$//g, and update the gsub to keep the
resulting format the same.

7 years agoMFC r307520: elfdump: correct DT_AUXILIARY / DT_USED / DT_FILTER definitions
emaste [Mon, 24 Oct 2016 00:39:04 +0000 (00:39 +0000)]
MFC r307520: elfdump: correct DT_AUXILIARY / DT_USED / DT_FILTER definitions

r109332 introduced these three as DT_SUNW_*. Update to the correct
names already used elsewhere in FreeBSD and the Sun "Linker and
Libraries Guide"

7 years agoMFC r307215:
mm [Sat, 22 Oct 2016 21:41:00 +0000 (21:41 +0000)]
MFC r307215:
Sync libarchive with vendor. Style and tests fixes.

Important vendor bugfixes (relevant to FreeBSD):
#801: FreeBSD Coverity report: resource leak in libarchive/tar/test/main.c

7 years agoMFC r305707:
bapt [Sat, 22 Oct 2016 20:57:51 +0000 (20:57 +0000)]
MFC r305707:

Directly set the O_NONBLOCK flags via open(2)

7 years agoMFC r303223:
bapt [Sat, 22 Oct 2016 20:56:49 +0000 (20:56 +0000)]
MFC r303223:

Update mandoc to 1.13.4 release

7 years agoMFC r302471, r302473:
bapt [Sat, 22 Oct 2016 20:54:54 +0000 (20:54 +0000)]
MFC r302471, r302473:

r302471:
Add RCS Id. Sort options in SYNOPSIS. Fix macro usage. Fix Dd.

Submitted by: wiz@NetBSD.org
Obtained from: NetBSD

r302473:
Sync usage between program and man page. Increase column width. [1]
Simplifay the usage() function
Replace errx/strerror with errc

Submitted by: wiz@NetBSD.org [1]
Obtained from: NetBSD

7 years agoMFC r303265:
bapt [Sat, 22 Oct 2016 20:52:58 +0000 (20:52 +0000)]
MFC r303265:

Remove reference cpp(1) which is not used anymore

7 years agoMFC r307364:
bapt [Sat, 22 Oct 2016 20:50:49 +0000 (20:50 +0000)]
MFC r307364:

directly create the socket with SOCK_NONBLOCK instead of calling fcntl(2)

7 years agoMFC r306554:
bapt [Sat, 22 Oct 2016 20:49:44 +0000 (20:49 +0000)]
MFC r306554:

Use accept4 with O_NONBLOCK rather than accept + fcntl

7 years agoMFC r306544:
bapt [Sat, 22 Oct 2016 20:49:07 +0000 (20:49 +0000)]
MFC r306544:

Import libucl 20160812

7 years agoMFC r303783, r305927:
bapt [Sat, 22 Oct 2016 20:46:57 +0000 (20:46 +0000)]
MFC r303783, r305927:

r303783:
sdiff: remove non finish/function code

2 extra options not available neither on other BSD nor in GNU sdiff:
--diff-pid and --pipe-fd were present in the SoC code, none were usable

Just remove it

r305927:
Remove reference of z(s)diff which was dropped before importing

7 years agoMFC r303784, r303785, r305620:
bapt [Sat, 22 Oct 2016 20:39:18 +0000 (20:39 +0000)]
MFC r303784, r303785, r305620:

r303784:
etcupdate: directly use diff3(1) instead of merge(1)

During the last attempt to rmeove GNU rcs, 2 blockers were spotted:
We need an ident(1) and etcupdate(8) uses merge(1).

Now nothing should prevent to remove rcs from base

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D7401

r303785:
always install etcupdate

Now that etcupdate does not depend on rcs anymore there is no need to
conditionnally install it

r305620: (by vangyzen )
etcupdate: preserve the metadata of the destination file

When using diff3 to perform a three-way merge, etcupdate lost the destination
file's metadata. The metadata from the temporary file were used instead.
This was unpleasant for rc.d scripts, which require execute permission.
Use "cat >" to overwrite the destination file's contents while preserving its
metadata.

Reviewed by: bapt
Sponsored by: Dell Technologies
Differential Revision: https://reviews.freebsd.org/D7817

7 years agoMFC r306860:
gonzo [Sat, 22 Oct 2016 16:42:49 +0000 (16:42 +0000)]
MFC r306860:

Add multitouch support for RPi's FT5406

- Add multitouch support (protocol B)
- Report physical size of the screen
- Switch from using busy loop to callbacks
- Enable callbacks only when there is active listener on /dev/input/eventX

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoMFC r306647, r306855, r306857
gonzo [Sat, 22 Oct 2016 16:38:39 +0000 (16:38 +0000)]
MFC r306647, r306855, r306857

r306647:
const-ify struct evdev_methods

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Suggested by: hselasky

r306855:
Allow using of driver's mutex instead internal one for evdev locking.

Add new API call: evdev_register_mtx which takes lock argument that
should be used instead of internal one for evdev locking. Useful for
cases if evdev_push_event() is always called with driver's lock taken
and reduces amount of lock aquisitions. This allows to avoid LOR
between ev_open/ev_close invocations and evdev_push_event() Such LOR
can happen when ev_open/ev_close methods acquire driver lock and
evdev_push_event() is called with this lock taken.

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

r306857:
Implement EVDEV_FLAG_MT_AUTOREL flag (autorelease touchpoints)

Automaticaly release (send ABS_MT_TRACKING_ID = -1) MT-slots
that has not been listed in current MT protocol type B report.

Slot is counted as listed if corresponding ABS_MT_SLOT event
has been sent regardless of other MT events.

Events are sent on SYN_REPORT event.

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoMFC r306618, r306619
gonzo [Sat, 22 Oct 2016 16:24:12 +0000 (16:24 +0000)]
MFC r306618, r306619

r306618:
Fix attach/detach methods

- Initialize lock before starting worker process
- Do not hold lock when destroying evdev. By that time ther should be no
    other active code pathes that can access softc

r306619:
Add rpi_ft5406 module and add it to extra modules in Raspberry Pi configs

7 years agoMFC r306530, r306531, r306532, r306579:
gonzo [Sat, 22 Oct 2016 15:26:32 +0000 (15:26 +0000)]
MFC r306530, r306531, r306532, r306579:

r306530:
Declare a module for evdev and add dependency to ukbd(4) and ums(4)

Prepare for making evdev a module. "Pure" evdev device drivers (like
touchscreen) and evdev itself can be built as a modules regardless of
"options EVDEV" in kernel config. So if people does not require evdev
functionality in hybrid drivers like ums and ukbd they can, for instance,
kldload evdev and utouchscreen to run FreeBSD in kiosk mode.

r306531:
Add dependency to evdev module (if required)

r306532:
Add dependency to evdev module

r306579:
Modularize evdev

- Convert "options EVDEV" to "device evdev" and "device uinput", add
    modules for both new devices. They are isolated subsystems and do not
    require any compile-time changes to general kernel subsytems
- For hybrid drivers that have evdev as an optional way to deliver input
    events add option EVDEV_SUPPORT. Update all existing hybrid drivers
    to use it instead of EVDEV
- Remove no-op DECLARE_MODULE in evdev, it's not required, MODULE_VERSION
    is enough
- Add evdev module dependency to uinput

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoMFC: 305937
bapt [Sat, 22 Oct 2016 13:20:02 +0000 (13:20 +0000)]
MFC: 305937

Capsicum-ize tee(1)

Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D7940

7 years agoMFC: 307368,307369,307372,307381
bapt [Sat, 22 Oct 2016 13:15:19 +0000 (13:15 +0000)]
MFC: 307368,307369,307372,307381

Remove the common.h include which is actually not used in sdiff.c
Turn editit into a static function
Move cleanup() into the edit.c file which is the only users of that function
Remove common.{c,h}
Fix typos in sdiff(1) message and improve display

7 years agoMFC: 306864,307648
bapt [Sat, 22 Oct 2016 13:09:30 +0000 (13:09 +0000)]
MFC: 306864,307648

Groff is needed only if MK_GROFF and MK_SHAREDOCS are both true.

7 years agoMFC r306430
gonzo [Sat, 22 Oct 2016 02:37:59 +0000 (02:37 +0000)]
MFC r306430

Add touchscreen support for the official 7" RPi touch display

Technically touchscreen chip is FT5406 but all hardware
communication is performed by VideCore and only final results
are presented to ARM part through memory region shared between
VC and ARM.

evdev is used as userland interface. FT5406 supports up to
10 touchpoints, but for now driver emulates single touch device
because I do not have GUI bits to test this functionality.

Driver is not enabled in default config for RPI and RPI2

Tested with: evdev-dump, tslib

7 years agoMFC r306578:
gonzo [Sat, 22 Oct 2016 02:31:49 +0000 (02:31 +0000)]
MFC r306578:

Fix gcc compilation error

input_absinfo.code is unsigned so condition is always false

7 years agoMFC r306134:
gonzo [Sat, 22 Oct 2016 02:26:33 +0000 (02:26 +0000)]
MFC r306134:

Add evdev support to ums(4)

event generation is disabled by default in favour of sysmouse. This
behavoiur is controlled by kern.evdev.rcpt_mask sysctl, bit 2 should
be set to give priority to hw over sysmouse

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Reviewed by: hans
Differential Revision: https://reviews.freebsd.org/D7863

7 years agoMFC r306132, r306275:
gonzo [Sat, 22 Oct 2016 02:15:39 +0000 (02:15 +0000)]
MFC r306132, r306275:

r306132:
Add evdev support to ukbd driver

event generation is disabled by default in favour of kbdmux. This
behavoiur is controlled by kern.evdev.rcpt_mask sysctl, bit 3 should
be set to give priority to hw over mux

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Reviewed by: hans
Differential Revision: https://reviews.freebsd.org/D7957

r306275:
Do not perform extra check for NULL, evdev_free can handle NULL value

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoMFC r305708, r305719
gonzo [Sat, 22 Oct 2016 01:58:21 +0000 (01:58 +0000)]
MFC r305708, r305719

r305708:
Add evdev support to TI ADC/touchscreen driver

Add generic evdev support to touchscreen part of ti_adc: two absolute
coordinates + button touch to indicate pen position. Pressure value
reporting is not implemented yet.

Tested on: Beaglebone Black + 4DCAPE-43T + tslib

r305719:
Cleanup evdev support for TI ADC/TS

- evdev_set_methods call is not required if actual methods are no-ops
- evdev_set_serial is also optional if there is no meaningful input device
    identifier
- evdev_set_id on the other hand is mandatory, so set virtual bus with
    dummy vendor/product/version

Suggested by: Vladimir Kondratiev

7 years agoMFC r305706, r305749, r306274
gonzo [Sat, 22 Oct 2016 01:38:21 +0000 (01:38 +0000)]
MFC r305706, r305749, r306274

r305706:
Add evdev protocol implementation

evdev is a generic input event interface compatible with Linux
evdev API at ioctl level. It allows using unmodified (apart from
header name) input evdev drivers in Xorg, Wayland, Qt.

This commit has only generic kernel API. evdev support for individual
hardware drivers like ukbd, ums, atkbd, etc. will be committed later.

Project was started by Jakub Klama as part of GSoC 2014. Jakub's
evdev implementation was later used as a base, updated and finished
by Vladimir Kondratiev.

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Reviewed by: adrian, hans
Differential Revision: https://reviews.freebsd.org/D6998

r305749:
Remove semicolon from the end of the macro definition

Reported by: hans

r306274:
Handle NULL argument in evdev_free

Add check for evdev argument of evdev_free being NULL. This is valid
value and should not cause crash. In this case evdev_free does nothing

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoMFH (r306488, r306494, r306495, r306496): fix markup and cross-references
des [Sat, 22 Oct 2016 00:38:47 +0000 (00:38 +0000)]
MFH (r306488, r306494, r306495, r306496): fix markup and cross-references

7 years agoMFH (r305414): add a toggle to show approximate swap usage.
des [Sat, 22 Oct 2016 00:35:40 +0000 (00:35 +0000)]
MFH (r305414): add a toggle to show approximate swap usage.

7 years agoFix grammar.
gjb [Fri, 21 Oct 2016 19:23:51 +0000 (19:23 +0000)]
Fix grammar.

Submitted by: Kevin P. Neal
Sponsored by: The FreeBSD Foundation

7 years agoMFC r306276, but don't remove findwin95
asomers [Fri, 21 Oct 2016 18:57:58 +0000 (18:57 +0000)]
MFC r306276, but don't remove findwin95

Mount msdosfs with longnames support by default.

The old behavior depended on the FAT version and on what files were in the
root directory. "mount_msdosfs -o shortnames" is still supported.

7 years agoMFC r307236:
markj [Fri, 21 Oct 2016 17:44:47 +0000 (17:44 +0000)]
MFC r307236:
Plug a vnode lock leak in vm_fault_hold().

7 years agoFix wording.
gjb [Fri, 21 Oct 2016 16:47:02 +0000 (16:47 +0000)]
Fix wording.

Submitted by: adamw
Sponsored by: The FreeBSD Foundation

7 years agoDocument an issue with clang and source-based upgrades from
gjb [Fri, 21 Oct 2016 16:43:13 +0000 (16:43 +0000)]
Document an issue with clang and source-based upgrades from
10.2 and earlier.

Submitted by: imp
Sponsored by: The FreeBSD Foundation

7 years agoFix a copy/paste error.
gjb [Fri, 21 Oct 2016 16:14:58 +0000 (16:14 +0000)]
Fix a copy/paste error.

Sponsored by: The FreeBSD Foundation

7 years agoFix a spacing nit and a typo.
gjb [Fri, 21 Oct 2016 16:12:09 +0000 (16:12 +0000)]
Fix a spacing nit and a typo.

Sponsored by: The FreeBSD Foundation

7 years agoDocument two errata items that may affect systems with ZFS
gjb [Fri, 21 Oct 2016 16:11:29 +0000 (16:11 +0000)]
Document two errata items that may affect systems with ZFS
boot pools on GPT.

Submitted by: lidl
Sponsored by: The FreeBSD Foundation

7 years agoMFH (r305381, r306457): upgrade to unbound 1.5.10 via 1.5.9
des [Fri, 21 Oct 2016 14:28:35 +0000 (14:28 +0000)]
MFH (r305381, r306457): upgrade to unbound 1.5.10 via 1.5.9

7 years agoMFC: r307316
bapt [Fri, 21 Oct 2016 09:15:34 +0000 (09:15 +0000)]
MFC: r307316

Fix build WITHOUT_FORTH

Sponsored by: Gandi.net

7 years agoMFC r303367:
ngie [Fri, 21 Oct 2016 08:40:24 +0000 (08:40 +0000)]
MFC r303367:

Testcase 7.8 no longer needs to be marked TODO

It passes out of the box today

7 years agoMFC r305963,r305970:
ngie [Fri, 21 Oct 2016 08:38:18 +0000 (08:38 +0000)]
MFC r305963,r305970:

r305963:

Reindent TESTSDIR definition for consistency/readability

r305970:

Remove change accidentally committed via r305963 for upcoming tests/sys/fs/...
work

7 years agoMFC r306029:
ngie [Fri, 21 Oct 2016 08:35:20 +0000 (08:35 +0000)]
MFC r306029:

Use SRCTOP instead of the longhand version for defining the path to contrib/atf

7 years agoMFC r305961:
ngie [Fri, 21 Oct 2016 08:33:51 +0000 (08:33 +0000)]
MFC r305961:

Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and add
it to lib/libc/tests/sys/Makefile [*]

Even though make -VPACKAGE and make -n install seem to do the right thing,
the effects are a bit different, depending on the build host.

Obtained from: HardenedBSD (af602f0db) [*]

7 years agoMFC r305920:
ngie [Fri, 21 Oct 2016 08:31:15 +0000 (08:31 +0000)]
MFC r305920:

Remove spurious newlines from atf_tc_fail calls

This changes the results from broken (incorrect) to failed (correct) on
i386

7 years agoMFC r305919:
ngie [Fri, 21 Oct 2016 08:29:17 +0000 (08:29 +0000)]
MFC r305919:

Don't define PACKAGE in lib/libc/tests/{iconv,net/getaddrinfo}
needlessly

This is already being done by bsd.test.mk

The other subdirectory Makefiles were intentionally left alone

7 years agoMFC r305916,r305918:
ngie [Fri, 21 Oct 2016 08:22:39 +0000 (08:22 +0000)]
MFC r305916,r305918:

r305916:

Make sure $TMPDIR is created with 0755 permissions

This is required to ensure that the temporary script can be executed,
as the default mode is apparently too restrictive

r305918:

Only chmod $TMPDIR if it's not /tmp

This is a safety belt to ensure that the /tmp sticky bit stuff doesn't
get whacked by accident if someone runs the script outright

7 years agoMFC r303541, r303542, r303543, r303545, r303546, r303547, r304225, r304226, r304605...
araujo [Fri, 21 Oct 2016 03:10:05 +0000 (03:10 +0000)]
MFC r303541, r303542, r303543, r303545, r303546, r303547, r304225, r304226, r304605, r304676, r305212, r305863:

r303541:
Use nitems() from sys/param.h.

Sponsored by: gandi.net (BSD Day Taiwan)
MFC after:  2 weeks.

r303542:
Use nitems() from sys/param.h.

MFC after: 2 weeks.
Sponsored by: gandi.net (BSD Day Taiwan)

r303543:
Use nitems() from sys/param.h.

MFC after: 2 weeks.
Sponsored by: gandi.net (BSD Day Taiwan)

r303545:
Use nitems() from sys/param.h.

MFC after: 2 weeks.
Sponsored by: gandi.net (BSD Day Taiwan)

r303546:
Use nitems() from sys/param.h.

MFC after: 2 weeks.
Sponsored by: gandi.net (BSD Day Taiwan)

r303547:
Use nitems() from sys/param.h.

MFC after: 2 weeks.
Sponsored by: gandi.net (BSD Day Taiwan)

r304225:
Use nitems() from sys/param.h.

MFC after: 2 weeks.

r304226:
Use nitems() from sys/param.h.

MFC after: 2 weeks.

r304605:
Fix calloc(3) argument order.

Reviewed by: trasz
MFC after: 4 weeks.
Differential Revision: https://reviews.freebsd.org/D7532

r304676:
Fix calloc(3) argument order.

MFC after: 4 weeks.

r305212:
- Invert calloc(3) argument order.

MFC after: 4 weeks

r305863:
Invert calloc(3) argument order.

Reviewed by: ed.
MFC after: 4 weeks.
Differential Revision: https://reviews.freebsd.org/D7902

7 years agoAdd an EN item regarding some recent systems that fail to boot
gjb [Thu, 20 Oct 2016 17:16:09 +0000 (17:16 +0000)]
Add an EN item regarding some recent systems that fail to boot
under certain circumstances.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

7 years agoMFC r307218:
kib [Thu, 20 Oct 2016 11:42:29 +0000 (11:42 +0000)]
MFC r307218:
Fix a race in vm_page_busy_sleep(9).

7 years agoMFC r306762: Fix possible geom destruction before final provider close.
mav [Thu, 20 Oct 2016 08:48:58 +0000 (08:48 +0000)]
MFC r306762: Fix possible geom destruction before final provider close.

Introduce internal counter to track opens.  Using provider's counters is
not very successfull after calling g_wither_provider().

7 years agoMFC: r306559
rmacklem [Thu, 20 Oct 2016 02:03:19 +0000 (02:03 +0000)]
MFC: r306559
r297225 broke udp_output() for the case where the "addr" argument
is NULL and the function jumps to the "release:" label.
For this case, the "inp" was write locked, but the code attempted to
read unlock it. This patch fixes the problem.
This case could occur for NFS over UDP mounts, where the server was
down for a few minutes under certain circumstances.

7 years agoMFC r306571:
markj [Wed, 19 Oct 2016 17:32:38 +0000 (17:32 +0000)]
MFC r306571:
rtsold: Log messages about unexpected RAs at LOG_DEBUG.

7 years agoMFC r306742:
markj [Wed, 19 Oct 2016 17:24:36 +0000 (17:24 +0000)]
MFC r306742:
gmirror: Use bool instead of boolean_t.

7 years agoMFC r306792-r306795, r306826, r306828:
markj [Wed, 19 Oct 2016 17:23:50 +0000 (17:23 +0000)]
MFC r306792-r306795, r306826, r306828:
Miscellaneous ND6 code cleanups.

7 years agoMFC r307384:
markj [Wed, 19 Oct 2016 17:21:39 +0000 (17:21 +0000)]
MFC r307384:
Remove an unused field from struct pmcstat_image.

7 years agoMFC r307398:
markj [Wed, 19 Oct 2016 17:18:48 +0000 (17:18 +0000)]
MFC r307398:
Reference the libc symbols ypresp_{allfn,data} instead of local symbols.

PR: 213506

7 years agoMFC r306332:
pfg [Wed, 19 Oct 2016 16:33:43 +0000 (16:33 +0000)]
MFC r306332:
btree(3): don't shortcut closing if the metadata is dirty.

Obtained from: NetBSD (from krb5 tree)

7 years agoMFC r307145: Use M_WAITOK in PIO_KEYMAP ioctl
emaste [Wed, 19 Oct 2016 13:37:43 +0000 (13:37 +0000)]
MFC r307145: Use M_WAITOK in PIO_KEYMAP ioctl

The malloc return value is not checked.

7 years agoMFC r307152: Add COMPAT_FREEBSD10 to the MIPS ERL kernel config
emaste [Wed, 19 Oct 2016 13:36:52 +0000 (13:36 +0000)]
MFC r307152: Add COMPAT_FREEBSD10 to the MIPS ERL kernel config

As of r302092, pipe is a wrapper around pipe2 and the pipe syscall is no
longer used. It is included only with the COMPAT_FREEBSD10 kernel option.
Add the compat option to support upgrades from systems with an earlier
userland.

7 years agoMFC: 304677, 304680, 305125, 305770, 305769
bapt [Wed, 19 Oct 2016 13:26:07 +0000 (13:26 +0000)]
MFC: 304677, 304680, 305125, 305770, 305769

r304677:
Add tftpfs support for the EFI loader

Allow netbooting on efi without having to setup any NFS server by rebuilding the
loader with LOADER_TFTP_SUPPORT like for the i386 pxeloader

r305125:
Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi

Add a new 'netproto' variable which can be set for now to
NET_TFTP or NET_NFS (default to NET_NONE)

From the dhcp options if one sets the root-path option to:
"ip:path", the loader will consider it is booting over NFS
(meaning same behaviour as the default current behaviour)

if the dhcp option "tftp server address" is set (option 150)
the loader will consider it is booting over tftpfs, it will then
consider the root-path options with 2 possible case
1. "path" then the IP of the tftp server will be the one passed by
the option 150, and the files will be retrieved under "path" on the tftp
server
2. "ip:path" then the IP of the tftp server will be the one passed in
the option "overwritting the IP from the option 150.

We could not "abuse" the rootpath option in the form or tftp://ip:path because
this is already used for other purpose by iPXE preventing any chainload from
iPXE to the FreeBSD loader.

Given at each open(), the loader loops over all available filesystems and keep
the "best" error, we needed to prevent tftpfs to fallback on nfs and vice versa.
the tftpfs and nfs implementation in libstand now return EINVAL early if
'netproto' for that purpose.

Relnotes: yes
Sponsored by: Gandi.net

7 years agoMFC r306740, r307150: groff: use changelog date in man pages
emaste [Wed, 19 Oct 2016 13:19:45 +0000 (13:19 +0000)]
MFC r306740, r307150: groff: use changelog date in man pages

r306740:

groff: use changelog date rather than file modification date in man pages

The source checkout date is not particularly relevant, and this makes
groff man pages build reproducibly.

r307150:

Avoid using 'head' in generating groff doc date

It may not be available in certain cross build cases.

Note that this is a slight change in functionality, in that now only the
first line of the source ChangeLog file is processed. This is acceptable
as groff will be retired and we won't encounter a possibly-different
ChangeLog format.

7 years agoMFC r302558:
gahr [Wed, 19 Oct 2016 08:23:54 +0000 (08:23 +0000)]
MFC r302558:

Do not truncate lines longer than 512 chars.

PR: 210344
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6881

7 years agoMFC 307263
sephe [Wed, 19 Oct 2016 07:46:20 +0000 (07:46 +0000)]
MFC 307263

    hyperv/vmbus: Add __FBSDID

    Sponsored by:   Microsoft

7 years agoMFC 307261
sephe [Wed, 19 Oct 2016 07:43:39 +0000 (07:43 +0000)]
MFC 307261

    hyperv/stor: Fix off-by-one bug; this brings back TRIM support.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Reported by:    Lili Deng <v-lide microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8238

7 years agoMFC 307078
sephe [Wed, 19 Oct 2016 07:33:43 +0000 (07:33 +0000)]
MFC 307078

    ifnet: Use if_link_state snapshot to invoke ifnet_link_event

    So that everyone in this task have consistent view of link state.

    Reviewed by:    ae
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8214

7 years agoMFC 307012,307013,307262
sephe [Wed, 19 Oct 2016 07:27:45 +0000 (07:27 +0000)]
MFC 307012,307013,307262

307012
    hyperv/vmbus: Allow driver to inject synchronous task into channel taskq.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8208

307013
    hyperv/hn: Rework link status support.

    This is the preamble for network device SR-IOV and
    NDIS_STATUS_NETWORK_CHANGE handling.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8209

307262
    hyperv/hn: Management parts always need suspend and resume.

    Sponsored by:   Microsoft

7 years agoMFC 306936-306939
sephe [Wed, 19 Oct 2016 07:24:32 +0000 (07:24 +0000)]
MFC 306936-306939

306936
    hyperv/hn: Fix checksum offload settings

    The _correct_ way to identify the supported checksum offloading and
    TSO parameters is to query OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8088

306937
    hyperv/hn: Fix if_hw_tsomax setup.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8089

306938
    hyperv/hn: Generalize RSS capabilities query.

    - Support NDIS < 6.30.
    - Stringent response checks.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8090

306939
    hyperv/hn: Suffix NDIS offload size with NDIS version.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8091

7 years agoMFC 306484,306485
sephe [Wed, 19 Oct 2016 07:16:26 +0000 (07:16 +0000)]
MFC 306484,306485

306484
    hyperv/vmbus: Add missing vmbus_if.c to module build.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8067

306485
    hyperv/hn: Add stubs for OFFLOAD_CURRENT_CONFIG and NETWORK_CHANGE status

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8068

7 years agoMFC 306482,306483
sephe [Wed, 19 Oct 2016 07:08:28 +0000 (07:08 +0000)]
MFC 306482,306483

306482
    hyperv/hn: If synthetic parts are detached, don't touch them.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8065

306483
    hyperv/hn: Fix detach and attach error handling.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8066

7 years agoMFC 306481
sephe [Wed, 19 Oct 2016 07:03:54 +0000 (07:03 +0000)]
MFC 306481

    x86/ioapic: Fix destination cpu for Hyper-V

    On Hyper-V:
    - Stick to the first cpu for all I/O APIC pins.
    - And don't allow destination cpu changes.

    Reviewed by:    jhb
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7949

7 years agoMFC 306433
sephe [Wed, 19 Oct 2016 06:59:45 +0000 (06:59 +0000)]
MFC 306433

    hyperv/hn: Don't set HASHVAL pktinfo for NDIS < 6.30

    This unbreaks packet sending on WS2008R2.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8057

7 years agoMFC 306431,306432
sephe [Wed, 19 Oct 2016 06:57:18 +0000 (06:57 +0000)]
MFC 306431,306432

306431
    hyperv/hn: Move TX tasks' draining into hn_suspend().

    This prepares to consolidate hn_stop() and netvsc_detach().

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8055

306432
    hyperv/hn: Consolidate hn_init() and hn_stop()

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8056

7 years agoMFC 306426
sephe [Wed, 19 Oct 2016 06:45:53 +0000 (06:45 +0000)]
MFC 306426

    hyperv/storvsc: Fix the blkvsc disk attachment issues.

    - The original 'disengage' ATA controller model does not work properly
      for all possible disk configurations.  Use the newly added ATA disk
      veto eventhandler to fit into all possible disk configuration.
    - If the 'invalid LUN' happens on blkvsc controllers, return
      CAM_DEV_NOT_THERE so that CAM will not destroy attached disks under
      the blkvsc controllers.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Discussed with: mav
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7693

7 years agoMFC 306396
sephe [Wed, 19 Oct 2016 06:15:27 +0000 (06:15 +0000)]
MFC 306396

    cam/ata: Allow drivers to veto ATA disk attachment.

    This eventhandler is mainly used by VMs, e.g. Hyper-V, whose disk
    controllers share the disks with the simulated ATA controllers.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Discussed with: mav
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7693

7 years agoMFC 306393
sephe [Wed, 19 Oct 2016 05:38:50 +0000 (05:38 +0000)]
MFC 306393

    hyperv/hn: Flatten RX filter configuration.

    This paves way for more fixes.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8049

7 years agoMFC 306390-306392
sephe [Wed, 19 Oct 2016 05:08:46 +0000 (05:08 +0000)]
MFC 306390-306392

306390
    hyperv/hn: Suspend and resume the backend properly upon MTU change.

    Suspend:
    - Prevent the backend from being touched on TX path.
    - Clear the RNDIS RX filter, and wait for RX to drain.
    - Make sure that NVS see the chimney sending buffer and RXBUF
      disconnection, before unlink these buffers from the channel.

    Resume:
    - Reconfigure the RNDIS filter.
    - Allow TX path to work on the backend.
    - Kick start the TX eof task, in case the OACTIVE is set.

    This fixes various panics, when the interface has traffic and MTU
    is being changed.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8046

306391
    hyperv/hn: Reorganize the synthetic parts detach.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8047

306392
    hyperv/hn: Reorder the comment a little bit.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8048

7 years agoMFC r307239:
gonzo [Wed, 19 Oct 2016 02:39:24 +0000 (02:39 +0000)]
MFC r307239:

Fix BCM283x(Raspberry Pi) SDHCI driver for ARM64 build

- Revert BUS_SPACE_PHYSADDR back to rman_get_start. BUS_SPACE_PHYSADDR was
    introduced in 2013 as temporary wrapper until proper solution appears.
    It's ARM only and since we need this file for ARM64 build and no proper
    API has been introduced - just revert the change and make sure it's
    going to appear when people grep for BUS_SPACE_PHYSADDR in sources.

- Fix printf format for size_t variables

7 years agoMFC 306360,306387,306389
sephe [Wed, 19 Oct 2016 02:24:17 +0000 (02:24 +0000)]
MFC 306360,306387,306389

306360
    hyperv/vmbus: Add dynamic device add and remove support

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8008

306387
    hyperv/vmbus: Add functions to test RX/TX bufring emptiness

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8044

306389
    hyperv/vmbus: Add function to drain channel interrupt task.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8045

7 years agoMFC 306359
sephe [Wed, 19 Oct 2016 02:20:48 +0000 (02:20 +0000)]
MFC 306359

    pci: Clear the MEM/PORT_EN bit when updating PCI BAR

    It's unsafe to update the BAR when the related EN bit is set.

    Submitted by:   Dexuan Cui <decui microsoft com>
    Reviewed by:    jhb
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7914

7 years agoMFC r306557, r307240, r307241:
gonzo [Wed, 19 Oct 2016 02:15:41 +0000 (02:15 +0000)]
MFC r306557, r307240, r307241:

r306557:
Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer

VM_MEMATTR_WRITE_COMBINING sets write-through cache flag for framebuffer
memory that prevents pixel data from being stuck in cache until evicition
happens

r307240:
Fix BCM238x framebuffer driver build for ARM64

VM_MEMATTR_WRITE_COMBINING can be undefined for some platforms, use it only
if it's defined

r307241:
Do not set FB_FLAG_MEMATTR if VM_MEMATTR_WRITE_COMBINING is not available

Pintyhat to: gonzo
Spotted by: jmallett