]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agosys/boot: make use of the howmany() macro when available.
Pedro F. Giffuni [Tue, 26 Apr 2016 14:51:58 +0000 (14:51 +0000)]
sys/boot: make use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agoAdd GEOM::physpath documentation to devd.conf(5)
Alan Somers [Tue, 26 Apr 2016 14:48:58 +0000 (14:48 +0000)]
Add GEOM::physpath documentation to devd.conf(5)

Suggested by: trasz
Reviewed by: trasz
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6063

8 years agosys/arm: make use of the howmany() macro when available.
Pedro F. Giffuni [Tue, 26 Apr 2016 14:47:52 +0000 (14:47 +0000)]
sys/arm: make use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agosys/powerpc: make use of the howmany() macro when available.
Pedro F. Giffuni [Tue, 26 Apr 2016 14:44:49 +0000 (14:44 +0000)]
sys/powerpc: make use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agoRework the list of all pmaps: embed the list link into pmap.
Ruslan Bukin [Tue, 26 Apr 2016 14:38:18 +0000 (14:38 +0000)]
Rework the list of all pmaps: embed the list link into pmap.

8 years agoed(1): switch two statements so we check the index before dereferencing.
Pedro F. Giffuni [Tue, 26 Apr 2016 14:31:48 +0000 (14:31 +0000)]
ed(1): switch two statements so we check the index before dereferencing.

This is related to r270256 but was missed in that occasion.

MFC after: 3 days

8 years agoDisable ACPI on arm64 ad it has only had minimal testing and is causing
Andrew Turner [Tue, 26 Apr 2016 14:21:39 +0000 (14:21 +0000)]
Disable ACPI on arm64 ad it has only had minimal testing and is causing
boot issues when booting with FDT. It is planned to re-enable this at a
later date.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoo Add device tree files and kernel configuration files
Ruslan Bukin [Tue, 26 Apr 2016 13:22:08 +0000 (13:22 +0000)]
o Add device tree files and kernel configuration files
  for RISC-V cpus synthesized on FPGA hardware.
o Include new files to the build.

8 years agoStop including machine/fdt.h from the fdt uart code, it's unneeded.
Andrew Turner [Tue, 26 Apr 2016 13:16:45 +0000 (13:16 +0000)]
Stop including machine/fdt.h from the fdt uart code, it's unneeded.

Sponsored by: ABT Systems Ltd

8 years agoAdd the non-standard "IO interrupt" vector used by lowRISC.
Ruslan Bukin [Tue, 26 Apr 2016 12:56:44 +0000 (12:56 +0000)]
Add the non-standard "IO interrupt" vector used by lowRISC.
For now they provide UART irq only.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoAdd the implementation of basic bus_space_read/write functions.
Ruslan Bukin [Tue, 26 Apr 2016 12:45:01 +0000 (12:45 +0000)]
Add the implementation of basic bus_space_read/write functions.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoFix calculation of LCD CH1 SCLK1 output frequency when SCLK2 /2 is used
Jared McNeill [Tue, 26 Apr 2016 12:36:12 +0000 (12:36 +0000)]
Fix calculation of LCD CH1 SCLK1 output frequency when SCLK2 /2 is used
as source.

PR: 208680
Reported by: David Binderman <dcb314@hotmail.com>

8 years agoAdd the implementation of OF_decode_addr().
Ruslan Bukin [Tue, 26 Apr 2016 12:33:25 +0000 (12:33 +0000)]
Add the implementation of OF_decode_addr().

8 years agoDo not include fdt.h on RISC-V.
Ruslan Bukin [Tue, 26 Apr 2016 12:31:23 +0000 (12:31 +0000)]
Do not include fdt.h on RISC-V.

8 years agoAdd support for RISC-V.
Ruslan Bukin [Tue, 26 Apr 2016 12:29:47 +0000 (12:29 +0000)]
Add support for RISC-V.

8 years agoAdd support for 8-bit eMMC.
Jared McNeill [Tue, 26 Apr 2016 12:02:36 +0000 (12:02 +0000)]
Add support for 8-bit eMMC.

Set MMC_CAP_4_BIT_DATA and MMC_CAP_8_BIT_DATA based on the "bus-width"
DT property and reduce maximum bus frequency from 52MHz to 50MHz to match
the capabilities of the clock provider.

Tested on a BananaPi BPI-M3 (A83T).

8 years agoMove arm's devmap to some generic place, so it can be used
Ruslan Bukin [Tue, 26 Apr 2016 11:53:37 +0000 (11:53 +0000)]
Move arm's devmap to some generic place, so it can be used
by other architectures.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D6091
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoStop using sbrk in csh. This is a legacy interface and its use within csh
Andrew Turner [Tue, 26 Apr 2016 11:39:32 +0000 (11:39 +0000)]
Stop using sbrk in csh. This is a legacy interface and its use within csh
is invalid. It is used to find the size of allocated memory. As malloc may
allocate memory with mmap it will fail to take this memory into account.

Obtained from: brooks

8 years agoConvert A10 interrupt controller to INTRNG
Emmanuel Vadot [Tue, 26 Apr 2016 11:15:48 +0000 (11:15 +0000)]
Convert A10 interrupt controller to INTRNG

Reviewed by: skra
Approved by: cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5573

8 years agoRemove unportable calls to basename().
Ed Schouten [Tue, 26 Apr 2016 10:04:06 +0000 (10:04 +0000)]
Remove unportable calls to basename().

The POSIX version of basename() doesn't use a 'const char *' argument;
the function may overwrite its input buffer. Instead of copying the
input string, let's just simplify this code by using our getprogname()
function that already returns the name of the application in the right
format.

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

8 years agohyperv/hn: Change description to "Hyper-V Network Interface"
Sepherosa Ziehau [Tue, 26 Apr 2016 06:50:41 +0000 (06:50 +0000)]
hyperv/hn: Change description to "Hyper-V Network Interface"

This is consistent w/ other Hyper-V devices.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoRelax TOC offsets checking somewhat, allowing offset pointing to
Maxim Sobolev [Tue, 26 Apr 2016 06:50:38 +0000 (06:50 +0000)]
Relax TOC offsets checking somewhat, allowing offset pointing to
the next byte past EOF to denote zero-block(s) at the very end of
the file.

8 years agohyperv/stor: Set description properly in probe devmethod
Sepherosa Ziehau [Tue, 26 Apr 2016 06:41:36 +0000 (06:41 +0000)]
hyperv/stor: Set description properly in probe devmethod

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/channel: Git rid of the sub-channel creation callback
Sepherosa Ziehau [Tue, 26 Apr 2016 05:21:27 +0000 (05:21 +0000)]
hyperv/channel: Git rid of the sub-channel creation callback

It is no longer used.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/stor: Avoid sub-channel creation callback.
Sepherosa Ziehau [Tue, 26 Apr 2016 05:15:15 +0000 (05:15 +0000)]
hyperv/stor: Avoid sub-channel creation callback.

Since the sub-channel offers are synchronized, we can do our own
channel setup without using the sub-channel creation callback.

This paves the way to whack the sub-channel creation callback.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Avoid sub-channel creation callback.
Sepherosa Ziehau [Tue, 26 Apr 2016 05:08:55 +0000 (05:08 +0000)]
hyperv/hn: Avoid sub-channel creation callback.

Since the sub-channel offers are synchronized, we can do our own
channel setup without using the sub-channel creation callback.

This paves the way to whack the sub-channel creation callback.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/stor: Synchronize sub-channel offers
Sepherosa Ziehau [Tue, 26 Apr 2016 05:00:40 +0000 (05:00 +0000)]
hyperv/stor: Synchronize sub-channel offers

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/stor: Remove the useless hs_open_multi_channel
Sepherosa Ziehau [Tue, 26 Apr 2016 04:48:57 +0000 (04:48 +0000)]
hyperv/stor: Remove the useless hs_open_multi_channel

This fixes the sub-channel offer race after Hyper-V device probe/attach
is moved to vmbus SYSINIT/attach.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years ago[iwm] implement suspend/resume through ieee80211_{suspend,resume}_all
Adrian Chadd [Tue, 26 Apr 2016 04:40:59 +0000 (04:40 +0000)]
[iwm] implement suspend/resume through ieee80211_{suspend,resume}_all

This allows wifi to associate correctly after a suspend/resume cycle.

Yes, I'm using this now day to day.

Tested:

* Intel 7260AC, STA mode

8 years ago[iwm] add extra transmit setup/completion logging so I can see what's going on.
Adrian Chadd [Tue, 26 Apr 2016 03:24:28 +0000 (03:24 +0000)]
[iwm] add extra transmit setup/completion logging so I can see what's going on.

I'm seeing 5GHz association work but data not work until the rate drops,
so I need way more information about what's being programmed into the
transmit descriptors.

Tested:

* 7260AC, STA mode

8 years agoddb: Make use of our roundup() macro when available.
Pedro F. Giffuni [Tue, 26 Apr 2016 01:52:35 +0000 (01:52 +0000)]
ddb: Make use of our roundup() macro when available.

8 years agoext2fs: make use of the howmany() macro when available.
Pedro F. Giffuni [Tue, 26 Apr 2016 01:41:15 +0000 (01:41 +0000)]
ext2fs: make use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

MFC after: 2 weeks

8 years ago[ath] add LDPC capability support and LDPC RX support.
Adrian Chadd [Tue, 26 Apr 2016 01:37:03 +0000 (01:37 +0000)]
[ath] add LDPC capability support and LDPC RX support.

This enables LDPC receive support for the AR9300 chips that support it.
It'll announce LDPC support via net80211.

Tested:

* AR9380, STA mode
* AR9331, (to verify the HAL didn't attach it to a chip which
  doesn't support LDPC.)

TODO:

* Add in net80211 machinery to make this configurable at runtime.

8 years ago[ath] obey the STBC flag setting in iv_flags_ht
Adrian Chadd [Tue, 26 Apr 2016 01:34:21 +0000 (01:34 +0000)]
[ath] obey the STBC flag setting in iv_flags_ht

Add support for the FHT_STBC_TX flag in iv_flags_ht, so it'll now obey
the per-vap ifconfig stbctx flag.

This means that we can do STBC TX on one vap and not another VAP.
(As well as STBC RX on said vap; that changes the HTCAP announcement.)

8 years ago[ifconfig] add STBC TX/RX configuration
Adrian Chadd [Tue, 26 Apr 2016 01:30:29 +0000 (01:30 +0000)]
[ifconfig] add STBC TX/RX configuration

This adds the ability to view and configure the STBC parameter for
both transmit and receive.

Whilst here, fix a typo for AMSDU.

TODO:

* manpage update

8 years ago[net80211] add the STBC ioctl support.
Adrian Chadd [Tue, 26 Apr 2016 01:29:26 +0000 (01:29 +0000)]
[net80211] add the STBC ioctl support.

This adds configurable STBC TX and RX support.

8 years ago[net80211] add STBC capability flags to iv_flags_ht.
Adrian Chadd [Tue, 26 Apr 2016 01:29:03 +0000 (01:29 +0000)]
[net80211] add STBC capability flags to iv_flags_ht.

This is in preparation for exposing configuring STBC flags up to ifconfig
so STBC TX/RX can be configured at runtime.

* Set the FHT_STBC flags for TX/RX if the HT capabilitiex exist
* Clear the RX STBC HT capability flag when creating a HTCAP IE, so
  we only announce it if it's configured in the FHT flags.

Tested:

* AR9331 (carambola2), AP/STA modes

8 years ago[net80211] add an ioctl for LDPC configuration.
Adrian Chadd [Tue, 26 Apr 2016 01:26:11 +0000 (01:26 +0000)]
[net80211] add an ioctl for LDPC configuration.

8 years agolibcuse: make more use of the howmany() macro when available.
Pedro F. Giffuni [Tue, 26 Apr 2016 01:20:16 +0000 (01:20 +0000)]
libcuse: make more use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agolibstand: make more use of the howmany() macro when available.
Pedro F. Giffuni [Tue, 26 Apr 2016 01:19:36 +0000 (01:19 +0000)]
libstand: make more use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agolibc: make more use of the howmany() macro when available.
Pedro F. Giffuni [Tue, 26 Apr 2016 01:17:05 +0000 (01:17 +0000)]
libc: make more use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agoUse MIN() instead of MAX() as the previous syntax was wrote in a weird and
Marcelo Araujo [Tue, 26 Apr 2016 00:29:00 +0000 (00:29 +0000)]
Use MIN() instead of MAX() as the previous syntax was wrote in a weird and
confused way: "prec > 9 ? 9 : prec".

Submitted by: pfg, ngie and luke <luke.tw@gmail.com>
MFC after: 2 weeks.

8 years agoFixes the comment to reflect the code.
Luiz Otavio O Souza [Mon, 25 Apr 2016 23:12:39 +0000 (23:12 +0000)]
Fixes the comment to reflect the code.

Sponsored by: Rubicon Communications (Netgate)

8 years agoFix the logic in r298585: shm_prison_cansee returns an errno, so is
Jamie Gritton [Mon, 25 Apr 2016 22:30:10 +0000 (22:30 +0000)]
Fix the logic in r298585: shm_prison_cansee returns an errno, so is
the opposite of a boolean.

PR: 48471

8 years agoImport ACPICA 20160422.
Jung-uk Kim [Mon, 25 Apr 2016 22:24:53 +0000 (22:24 +0000)]
Import ACPICA 20160422.

8 years ago[iwm] restart the VAP if there's a firmware panic.
Adrian Chadd [Mon, 25 Apr 2016 22:00:05 +0000 (22:00 +0000)]
[iwm] restart the VAP if there's a firmware panic.

Always print out the firmware panic info before restarting; don't
put it behind IWM_DEBUG.

Submitted by: bapt
Differential Revision: https://reviews.freebsd.org/D6081

8 years agodev/random: use our roundup() macro instead of re-implementing it.
Pedro F. Giffuni [Mon, 25 Apr 2016 21:14:32 +0000 (21:14 +0000)]
dev/random: use our roundup() macro instead of re-implementing it.

While here also use howmany() macro from sys/param.h
No functional change.

Reviewed by: markm (roundup replacement part)
Approved by: so

8 years agoRemove a variable and three lines of code which I should have removed as
Garance A Drosehn [Mon, 25 Apr 2016 20:58:54 +0000 (20:58 +0000)]
Remove a variable and three lines of code which I should have removed as
part of revision 98776 back on June 24/2002.  Noticed by pfg@ trying
coccinelle for checking code.

MFC after: 3 weeks

8 years ago1. Removed -Wno-shift-negative-value from Makefile
David C Somayajulu [Mon, 25 Apr 2016 18:55:01 +0000 (18:55 +0000)]
1. Removed -Wno-shift-negative-value from Makefile
2. Fixed warning its absence caused in bxe_elink.c

MFC after:5 days

8 years agoIncrease DTRACE_FUNCNAMELEN from 128 to 192.
Mark Johnston [Mon, 25 Apr 2016 18:44:11 +0000 (18:44 +0000)]
Increase DTRACE_FUNCNAMELEN from 128 to 192.

This allows for the long function components encountered in www/firefox.
This constant is part of DTrace's userland ABI, so this change may not be
MFC'ed.

PR: 207735

8 years agoAllow DOF sections with excessively long probe function components.
Mark Johnston [Mon, 25 Apr 2016 18:40:57 +0000 (18:40 +0000)]
Allow DOF sections with excessively long probe function components.

Without this change, DTrace will refuse to load a DOF section if the
function component of any of its probes exceeds DTRACE_FUNCNAMELEN (128).
Probes in C++ programs can have very long function components. Rather than
rejecting all probes if a single probe exceeds the limit, simply skip the
invalid probe and emit a warning. This ensures that valid probes are
instantiated.

PR: 207735
MFC after: 2 weeks

8 years agoAdd a kern.dtrace.err_verbose sysctl to control dtrace_err_verbose.
Mark Johnston [Mon, 25 Apr 2016 18:09:36 +0000 (18:09 +0000)]
Add a kern.dtrace.err_verbose sysctl to control dtrace_err_verbose.

When this flag is turned on, DOF and DIF validation errors are printed to
the kernel message buffer. This is useful for debugging.

Also remove the debug.dtrace.debug sysctl, which has no effect.

8 years agoUse the yield instruction in the arm64 cpu_spinwait. This instruction is
Andrew Turner [Mon, 25 Apr 2016 17:32:08 +0000 (17:32 +0000)]
Use the yield instruction in the arm64 cpu_spinwait. This instruction is
a hint to the hardware the software is not performing a task.

Sponsored by: ABT Systems Ltd

8 years agoEncapsulate SYSV IPC objects in jails. Define per-module parameters
Jamie Gritton [Mon, 25 Apr 2016 17:06:50 +0000 (17:06 +0000)]
Encapsulate SYSV IPC objects in jails.  Define per-module parameters
sysvmsg, sysvsem, and sysvshm, with the following bahavior:

inherit: allow full access to the IPC primitives.  This is the same as
the current setup with allow.sysvipc is on.  Jails and the base system
can see (and moduly) each other's objects, which is generally considered
a bad thing (though may be useful in some circumstances).

disable: all no access, same as the current setup with allow.sysvipc off.

new: A jail may see use the IPC objects that it has created.  It also
gets its own IPC key namespace, so different jails may have their own
objects using the same key value.  The parent jail (or base system) can
see the jail's IPC objects, but not its keys.

PR: 48471
Submitted by: based on work by kikuchan98@gmail.com
MFC after: 5 days

8 years agoNote the existence of module-specific jail paramters, starting with the
Jamie Gritton [Mon, 25 Apr 2016 17:01:13 +0000 (17:01 +0000)]
Note the existence of module-specific jail paramters, starting with the
linux.* parameters when linux emulation is loaded.

MFC after: 5 days

8 years ago[bhnd] Fix ChipCommon probing.
Adrian Chadd [Mon, 25 Apr 2016 16:53:13 +0000 (16:53 +0000)]
[bhnd] Fix ChipCommon probing.

ChipCommon probing uses mapping table "chipc_devices". It calls bhnd_device_lookup,
which iterate over mapping table with end condition:

entry->desc != NULL

So if mapping table contains row with description equals to NULL, it will
stop processing of mapping. I.e. description is mandatory field and should
be not NULL.

This patch corrects mapping table for ChipCommon.

Submitted by: Michael Zhilin <mizhka@gmail.com>
Differential Revision: https://reviews.freebsd.org/D6088

8 years ago[iwn] fix firmware command use in iwm_auth().
Adrian Chadd [Mon, 25 Apr 2016 16:13:04 +0000 (16:13 +0000)]
[iwn] fix firmware command use in iwm_auth().

The iwm firmware has separate commands for add, modify and delete for
various things (mac, phy context, etc.)  The openbsd driver has a habit
of just completely resetting the NIC each time, which is technically
mostly okay (as long as the reset doesn't actually fail!) but it means
a lot of the code is doing ADD when it should do MODIFY.

The firmware responds in kind - it just asserts.

This fixes auth attempts that occur after the NIC has been already
configured.

(I'm sure there are more instances of this!)

Tested:

iwm0: <Intel Dual Band Wireless AC 7260> mem 0xf1400000-0xf1401fff irq 17 at device 0.0 on pci2
iwm0: revision: 0x140, firmware 25.228 (API ver. 9)

.. STA mode.

Submitted by: Masachika ISHIZUKA <ish@amail.plala.or.jp>

8 years agoExample RIPE whois query with options and spaces.
Tony Finch [Mon, 25 Apr 2016 15:46:42 +0000 (15:46 +0000)]
Example RIPE whois query with options and spaces.

Since it is used in the example, mention the -- option in the synopsis
even though it is a universal standard, and tweak to fit it on one line.

8 years agoo Implement shared pagetables and switch from 4 to 3 levels page
Ruslan Bukin [Mon, 25 Apr 2016 14:47:51 +0000 (14:47 +0000)]
o Implement shared pagetables and switch from 4 to 3 levels page
memory system.

RISC-V ISA has only single page table base register for both kernel
and user addresses translation. Before this commit we were using an
extra (4th) level of pagetables for switching between kernel and user
pagetables, but then realized FPGA hardware has 3-level page system
hardcoded. It is also become clear that the bitfile synthesized for
4-level system is untested/broken, so we can't use extra level for
switching.

We are now share level 1 of pagetables between kernel and user VA.
This requires to keep track of all the user pmaps created and once we
adding L1 page to kernel pmap we have to add it to all the user pmaps.

o Change the VM layout as we must have topmost bit to be 1 in the
  selected page system for kernel addresses and 0 for user addresses.
o Implement pmap_kenter_device().
o Create the l3 tables for the early devmap.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoDo not setup machine exception vector.
Ruslan Bukin [Mon, 25 Apr 2016 13:30:37 +0000 (13:30 +0000)]
Do not setup machine exception vector.

Sounds strange, but both RocketCore and lowRISC do not operate
if we set it.

All the known implementations (Spike, QEMU, RocketCore, lowRISC) uses
default machine trap vector address and operates fine with this.

Original Berkeley Boot Loader (bbl) does not set this as well.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoRevert r298477 ("Clear the DDR memory").
Ruslan Bukin [Mon, 25 Apr 2016 13:20:57 +0000 (13:20 +0000)]
Revert r298477 ("Clear the DDR memory").

There is no need to clear all the DDR memory (we only need to clear
BSS section).
I was playing with non-default version of hardware (the bitfile
synthesized for 4-level page memory system) and clearing was helpful,
but then realized support for 4-level page system is untested/broken
in both RocketCore and lowRISC.

8 years agoTry to make gcc builds happy again by removing a redundant declaration.
Bjoern A. Zeeb [Mon, 25 Apr 2016 13:20:35 +0000 (13:20 +0000)]
Try to make gcc builds happy again by removing a redundant declaration.

8 years agohyperv/hn: Synchronize sub-channel offers
Sepherosa Ziehau [Mon, 25 Apr 2016 10:16:07 +0000 (10:16 +0000)]
hyperv/hn: Synchronize sub-channel offers

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/channel: Add functions to synchronize sub-channel offers
Sepherosa Ziehau [Mon, 25 Apr 2016 09:00:06 +0000 (09:00 +0000)]
hyperv/channel: Add functions to synchronize sub-channel offers

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agolinux_map_osrel doesn't need to be checked in linux_prison_set,
Jamie Gritton [Mon, 25 Apr 2016 06:08:45 +0000 (06:08 +0000)]
linux_map_osrel doesn't need to be checked in linux_prison_set,
since it already was in linux_prison_check.

8 years agohyperv/channel: Log a warning about duplicated primary channel offer
Sepherosa Ziehau [Mon, 25 Apr 2016 05:58:32 +0000 (05:58 +0000)]
hyperv/channel: Log a warning about duplicated primary channel offer

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/channel: Remove unapplied comment
Sepherosa Ziehau [Mon, 25 Apr 2016 05:46:44 +0000 (05:46 +0000)]
hyperv/channel: Remove unapplied comment

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/channel: Minor style changes; no functional changes.
Sepherosa Ziehau [Mon, 25 Apr 2016 05:30:42 +0000 (05:30 +0000)]
hyperv/channel: Minor style changes; no functional changes.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/channel: Remove the unnecessary 'new' flag
Sepherosa Ziehau [Mon, 25 Apr 2016 05:22:35 +0000 (05:22 +0000)]
hyperv/channel: Remove the unnecessary 'new' flag

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/et: Strip extra white space in function name
Sepherosa Ziehau [Mon, 25 Apr 2016 04:58:14 +0000 (04:58 +0000)]
hyperv/et: Strip extra white space in function name

Reported by: Sascha Wildner <saw online de>
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoUse the new PR_METHOD_REMOVE to clean up jail handling in POSIX
Jamie Gritton [Mon, 25 Apr 2016 04:36:54 +0000 (04:36 +0000)]
Use the new PR_METHOD_REMOVE to clean up jail handling in POSIX
message queues.

8 years agoPass the current/new jail to PR_METHOD_CHECK, which pushes the call
Jamie Gritton [Mon, 25 Apr 2016 04:27:58 +0000 (04:27 +0000)]
Pass the current/new jail to PR_METHOD_CHECK, which pushes the call
until after the jail is found or created.  This requires unlocking the
jail for the call and re-locking it afterward, but that works because
nothing in the jail has been changed yet, and other processes won't
change the important fields as long as allprison_lock remains held.

Keep better track of name vs namelc in kern_jail_set.  Name should
always be the hierarchical name (relative to the caller), and namelc
the last component.

PR: 48471
MFC after: 5 days

8 years agoAdd a new jail OSD method, PR_METHOD_REMOVE. It's called when a jail is
Jamie Gritton [Mon, 25 Apr 2016 04:24:00 +0000 (04:24 +0000)]
Add a new jail OSD method, PR_METHOD_REMOVE.  It's called when a jail is
removed from the user perspective, i.e. when the last pr_uref goes away,
even though the jail mail still exist in the dying state.  It will also
be called if either PR_METHOD_CREATE or PR_METHOD_SET fail.

PR: 48471
MFC after:  5 days

8 years agoRemove the PR_REMOVE flag, which was meant as a temporary marker for
Jamie Gritton [Mon, 25 Apr 2016 03:58:08 +0000 (03:58 +0000)]
Remove the PR_REMOVE flag, which was meant as a temporary marker for
a jail that might be seen mid-removal.  It hasn't been doing the right
thing since at least the ability to resurrect dying jails, and such
resurrection also makes it unnecessary.

8 years agohyperv/hn: Allow users to configure ifq or bufring depth.
Sepherosa Ziehau [Mon, 25 Apr 2016 03:48:28 +0000 (03:48 +0000)]
hyperv/hn: Allow users to configure ifq or bufring depth.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoMake jail(8) interpret escape codes in fstab the same as getfsent(3).
Jamie Gritton [Mon, 25 Apr 2016 03:24:48 +0000 (03:24 +0000)]
Make jail(8) interpret escape codes in fstab the same as getfsent(3).

PR: 208663
MFC after: 3 days

8 years agohn: Increase odrops for if_transmit method if drbr_enqueue fails.
Sepherosa Ziehau [Mon, 25 Apr 2016 03:14:55 +0000 (03:14 +0000)]
hn: Increase odrops for if_transmit method if drbr_enqueue fails.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoOR in the unsigned form of the MCAR lower register.
Justin Hibbits [Mon, 25 Apr 2016 03:01:57 +0000 (03:01 +0000)]
OR in the unsigned form of the MCAR lower register.

When ORing in a register_t to a wider integer (vm_paddr_t), it gets sign
extended, so high addresses overwrite the upper word with all 0xf.  Cast to the
unsigned form (u_register_t), to avoid this problem, and get correct addresses
printed.

8 years agoInit static compiled-in env when no metadata present.
Justin Hibbits [Mon, 25 Apr 2016 00:55:51 +0000 (00:55 +0000)]
Init static compiled-in env when no metadata present.

With this, a static environment can be compiled in via config(5).  This allows,
among other things, the use of a compiled-in debug console (hw.uart.dbgport) for
kgdb.

8 years agoifconfig: prevent some improbable signed integer overflows.
Pedro F. Giffuni [Mon, 25 Apr 2016 00:41:23 +0000 (00:41 +0000)]
ifconfig: prevent some improbable signed integer overflows.

ic_nchans, from struct:ieee80211req_chaninfo, is an unsigned int.
Use an unsigned index to prevent overflowing the index.

Adopt unsigned integers in other cases where it is useful
to be aware of the unsigned quantities and there is no
risk of the values being negative.

MFC after: 1 week

8 years agoAMD64 pmap: Use howmany() macro
Conrad Meyer [Sun, 24 Apr 2016 21:35:01 +0000 (21:35 +0000)]
AMD64 pmap: Use howmany() macro

Use param.h howmany() instead of hand-rolled version.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd myself (finally) to the port committer's dot file.
Gordon Tetlow [Sun, 24 Apr 2016 21:19:00 +0000 (21:19 +0000)]
Add myself (finally) to the port committer's dot file.

Approved by: mat (mentor)
Differential Revision: https://reviews.freebsd.org/D6074

8 years agofsck_ffs: Adopt some type safety for the journalling checks.
Pedro F. Giffuni [Sun, 24 Apr 2016 20:31:22 +0000 (20:31 +0000)]
fsck_ffs: Adopt some type safety for the journalling checks.

fs_ncg is of type uint32, and we were indexing it with an int.
Fixed this using an unsigned type and adopt some other unsigned
indexes to remind us when we are dealing with unsigned numbers.

Reviewed by: mckusick
MFC after: 5 days

8 years agoFix duplicate "name" variable that sneaked in with the rc description commit.
Lars Engels [Sun, 24 Apr 2016 19:25:11 +0000 (19:25 +0000)]
Fix duplicate "name" variable that sneaked in with the rc description commit.

Approved by: jhibbits

8 years agoFix build for NOINET and NOINET6 kernels.
Andrey V. Elsukov [Sun, 24 Apr 2016 17:09:51 +0000 (17:09 +0000)]
Fix build for NOINET and NOINET6 kernels.

Use own protosw structures for both address families.
Check proto in encapcheck function and use -1 as proto argument in
encap_attach_func(), both address families can have IPPROTO_IPV4
and IPPROTO_IPV6 protocols.

Reported by: bz

8 years agoFix NOIP kernels to compile.
Bjoern A. Zeeb [Sun, 24 Apr 2016 15:56:05 +0000 (15:56 +0000)]
Fix NOIP kernels to compile.

8 years agoAdd myself as src commiter.
Emmanuel Vadot [Sun, 24 Apr 2016 14:49:01 +0000 (14:49 +0000)]
Add myself as src commiter.

Approved by: cognet (mentor)

8 years agoFix typo (forgotten "=" after desc).
Stefan Eßer [Sun, 24 Apr 2016 12:07:44 +0000 (12:07 +0000)]
Fix typo (forgotten "=" after desc).

8 years agoMLINK mfi.4 to mfi_linux.4 and mfip.4 to cover these kernel modules.
Christian Brueffer [Sun, 24 Apr 2016 11:41:36 +0000 (11:41 +0000)]
MLINK mfi.4 to mfi_linux.4 and mfip.4 to cover these kernel modules.

The mfi(4) manpage doesn't explain the modules yet, but at least we direct
users to the right place.

PR: 205925
Submitted by: dvl
MFC after: 1 week
Sponsored by: Essen Hackathon 2016

8 years agoCosmetics: - no need to escape the newline after '|'
Jens Schweikhardt [Sun, 24 Apr 2016 10:52:59 +0000 (10:52 +0000)]
Cosmetics: - no need to escape the newline after '|'
           - parenthesize the "case" string for symmetry and improved
             search for matching paren (e.g. with vi's %)

8 years agoUse ipsec_address() function to print IP addresses.
Andrey V. Elsukov [Sun, 24 Apr 2016 09:05:29 +0000 (09:05 +0000)]
Use ipsec_address() function to print IP addresses.

8 years agoHandle non-compressed packets for IPComp in tunnel mode.
Andrey V. Elsukov [Sun, 24 Apr 2016 09:02:17 +0000 (09:02 +0000)]
Handle non-compressed packets for IPComp in tunnel mode.

RFC3173 says that the IP datagram MUST be sent in the original
non-compressed form, when the total size of a compressed payload
and the IPComp header is not smaller than the size of the original
payload. In tunnel mode for small packets IPComp will send
encapsulated IP datagrams without IPComp header.
Add ip_encap handler for IPPROTO_IPV4 and IPPROTO_IPV6 to handle
these datagrams. The handler does lookup for SA related to IPComp
protocol and given from mbuf source and destination addresses as
tunnel endpoints. It decapsulates packets only when corresponding SA
is found.

Reported by: gnn
Reviewed by: gnn
Differential Revision: https://reviews.freebsd.org/D6062

8 years agoCorrect types for g_example_start() and g_example_access().
Christian Brueffer [Sun, 24 Apr 2016 08:31:32 +0000 (08:31 +0000)]
Correct types for g_example_start() and g_example_access().

PR: 203498
Submitted by: chadf@triularity.org, ae
MFC after: 1 week
Sponsored by: Essen Hackathon 2016

8 years agoAdjust a type from r267490.
Pedro F. Giffuni [Sun, 24 Apr 2016 04:28:04 +0000 (04:28 +0000)]
Adjust a type from r267490.

Independent of the maximum length, the return type for strnlen(3)
is always size_t.

8 years agopatch(1): avoid signed integer overflow when debugging.
Pedro F. Giffuni [Sun, 24 Apr 2016 04:08:36 +0000 (04:08 +0000)]
patch(1): avoid signed integer overflow when debugging.

Integer i is used to index p_end of type LINENUM (actually long).

Match the types.

MFC after: 5 days

8 years agoZero the newly allocated spinlock.
Justin Hibbits [Sun, 24 Apr 2016 01:38:45 +0000 (01:38 +0000)]
Zero the newly allocated spinlock.

Not sure how this worked testing with DIAGNOSTIC set, but with it disabled this
fails due to the spinlock being "initialized" with 0xdeadc0de.

8 years agoAdd a single example of adding a user that roughly corresponds with the
Warren Block [Sat, 23 Apr 2016 22:57:54 +0000 (22:57 +0000)]
Add a single example of adding a user that roughly corresponds with the
adduser example in the Handbook.

MFC after: 1 week

8 years agoDefine which of the username options (-u/-U) to jexec(8) is the default.
Benedict Reuschling [Sat, 23 Apr 2016 22:31:58 +0000 (22:31 +0000)]
Define which of the username options (-u/-U) to jexec(8) is the default.
Bump Dd.

PR: 207587
Submitted by: dewayne@heuristicsystems.com.au
MFC after: 3 days
Sponsored by: Essen Hackathon 2016

8 years agoAllow the NFSv4 server to reply NFSERR_WRONGSEC for the SetClientID operation.
Rick Macklem [Sat, 23 Apr 2016 21:18:45 +0000 (21:18 +0000)]
Allow the NFSv4 server to reply NFSERR_WRONGSEC for the SetClientID operation.

It was reported via email that a Linux client couldn't do a Kerberized
NFS mount when only "sec=krb5" was specified for the exports. The Linux
client attempted a mount via krb5i and the server replied NFSERR_SERVERFAULT.
Although NFSERR_WRONGSEC isn't listed as an error for SetClientID, I
think it is the correct reply, so this patch enables that.
I do not know if this fixes the mount attempt, but adding "krb5i" to the
list of allowed security flavours does allow the mount to work.

Reported by: joef@spectralogic.com
MFC after: 2 weeks

8 years agoThe default value of MINFREE is defined to be 8% in
Benedict Reuschling [Sat, 23 Apr 2016 20:45:52 +0000 (20:45 +0000)]
The default value of MINFREE is defined to be 8% in
ufs/ffs/fs.h and not 10%.  The newfs(8) and tunefs(8)
man pages had this change already, but fs(5) did not.
This change makes it consistent again.

Bump Dd.

PR:             204929
Submitted by:   amutu@amutu.com
MFC after:      3 days
Sponsored by:   Essen Linuxhotel Hackathon 2016