]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoUpgrade to OpenSSH 7.1p2.
des [Thu, 21 Jan 2016 11:54:34 +0000 (11:54 +0000)]
Upgrade to OpenSSH 7.1p2.

8 years agoEnable DSA keys by default. They were disabled in OpenSSH 6.9p1.
des [Thu, 21 Jan 2016 11:10:14 +0000 (11:10 +0000)]
Enable DSA keys by default.  They were disabled in OpenSSH 6.9p1.

Noticed by: glebius

8 years agoTake care not to pick up the wrong version of OpenSSL when running in an
des [Thu, 21 Jan 2016 10:57:45 +0000 (10:57 +0000)]
Take care not to pick up the wrong version of OpenSSL when running in an
environment that has OpenSSL from ports in addition to the base version.

8 years agoFix EFI UFS caching
smh [Thu, 21 Jan 2016 08:58:39 +0000 (08:58 +0000)]
Fix EFI UFS caching

EFI was mixing caching in two separate places causing issues when multiple
partitions where tested.

Eliminate this by removing fsstat and re-factoring fsread into fsread_size,
adding basic parameter validation.

Also:
* Enhance some error print outs.
* Fix compilation under UFS1_ONLY and UFS2_ONLY
* Use sizeof on vars instead of structs.
* Add basic parameter validation to fsread_size.

MFC after: 1 week
X-MFC-With: r293268
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4989

8 years agoNote that new ssh(1) doesn't allow to use DSA keys by default.
glebius [Thu, 21 Jan 2016 07:54:05 +0000 (07:54 +0000)]
Note that new ssh(1) doesn't allow to use DSA keys by default.

8 years agoAIO daemons have always been kernel processes to facilitate switching to
jhb [Thu, 21 Jan 2016 02:20:38 +0000 (02:20 +0000)]
AIO daemons have always been kernel processes to facilitate switching to
user VM spaces while servicing jobs.  Update various comments and data
structures that refer to AIO daemons as threads to refer to processes
instead.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4999

8 years agoRemove unused variables for socket AIO.
jhb [Thu, 21 Jan 2016 01:28:31 +0000 (01:28 +0000)]
Remove unused variables for socket AIO.

In r55943, a per-process queue of pending socket AIO requests (requests
waiting for the socket to become ready) was added so that they could be
cancelled during process rundown.  In r154765, the rundown code was
changed to handle jobs in this state (JOBST_JOBQSOCK) directly removing
the need for the extra queue.  However, the per-process queue head and
global lock were never removed.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4997

8 years agocache: minor changes
mjg [Thu, 21 Jan 2016 01:09:39 +0000 (01:09 +0000)]
cache: minor changes

1. vhold and zap immediately instead of postponing few lines later
2. increment numneg after new entry is added

No functional changes.

No objections: kib

8 years agocache: perform . lockup without the namecache lock
mjg [Thu, 21 Jan 2016 01:07:05 +0000 (01:07 +0000)]
cache: perform . lockup without the namecache lock

Reviewed by: kib

8 years agocache: provide a helper for computing the hash
mjg [Thu, 21 Jan 2016 01:05:41 +0000 (01:05 +0000)]
cache: provide a helper for computing the hash

Reviewed by: kib

8 years agocache: use counter(9) API to maintain statistics
mjg [Thu, 21 Jan 2016 01:04:03 +0000 (01:04 +0000)]
cache: use counter(9) API to maintain statistics

Previously the code would just increment statistics while only holding a
shared lock, in effect losing updates.

Separate tracking for nchstats is removed as values can be obtained from
existing counters. Note that some fields are updated by external
consumers and are left unfixed. This should not be a serious issue as
this structure looks quite obsolete.

No strong objections: kib

8 years agoiw_cxgbe: fix a couple of problems int the RDMA_TERMINATE handler.
np [Thu, 21 Jan 2016 00:42:48 +0000 (00:42 +0000)]
iw_cxgbe: fix a couple of problems int the RDMA_TERMINATE handler.

a) Look for the CPL in the payload buffer instead of the descriptor.
b) Retrieve the socket associated with the tid with the inpcb lock held.

Submitted by: Krishnamraju Eraparaju @ Chelsio

8 years agourtwn: add temperature calibration
avos [Wed, 20 Jan 2016 23:55:39 +0000 (23:55 +0000)]
urtwn: add temperature calibration

Redo LC calibration if temperature changed significantly since last
calibration.

Tested with RTL8188EU/RTL8188CUS in STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Obtained from: NetBSD (mostly)
Differential Revision: https://reviews.freebsd.org/D4966

8 years agosession: avoid proctree lock on proc exit when possible
mjg [Wed, 20 Jan 2016 23:33:58 +0000 (23:33 +0000)]
session: avoid proctree lock on proc exit when possible

We can get away with the common case with only proc lock held.

Reviewed by: kib

8 years agourtwn: rework debug handling
avos [Wed, 20 Jan 2016 23:27:02 +0000 (23:27 +0000)]
urtwn: rework debug handling

- Use bitmap for debug output selection.
- Add few new messages (one for URTWN_DEBUG_BEACON
and another one for URTWN_DEBUG_INTR).
- Replace an undocumented URTWN_DEBUG definition with USB_DEBUG.

Tested with RTL8188EU / RTL8188CUS in IBSS / HOSTAP modes.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4959

8 years agoFix initlist_add_object invocation parameters.
kan [Wed, 20 Jan 2016 23:26:35 +0000 (23:26 +0000)]
Fix initlist_add_object invocation parameters.

The tail parameter should point to the last object for
which dependencies should be processed. In most cases,
this is the object itself.

8 years agoRemove RCS tags from files in which we no longer have any local
des [Wed, 20 Jan 2016 23:23:08 +0000 (23:23 +0000)]
Remove RCS tags from files in which we no longer have any local
modifications, and add them to two files in which we do.

8 years agosession: tidy up fixjobc
mjg [Wed, 20 Jan 2016 23:22:36 +0000 (23:22 +0000)]
session: tidy up fixjobc

This stops abusing the 'p' pointer for iteration over children processes
and gets rid of useless locking around PRS_ZOMBIE check.

Suggested by: kib

8 years agoRemove a number of generated files which are either out-of-date (because
des [Wed, 20 Jan 2016 23:08:57 +0000 (23:08 +0000)]
Remove a number of generated files which are either out-of-date (because
they are never regenerated to reflect our changes) or in the way of
freebsd-configure.sh.

8 years agourtwn: use ic_updateslot method to handle slot time change
avos [Wed, 20 Jan 2016 23:01:33 +0000 (23:01 +0000)]
urtwn: use ic_updateslot method to handle slot time change
(by default it was set to 9us).

Tested with RTL8188EU / RTL8188CUS in STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4535

8 years agoUpgrade to OpenSSH 7.0p1.
des [Wed, 20 Jan 2016 22:57:10 +0000 (22:57 +0000)]
Upgrade to OpenSSH 7.0p1.

8 years agoShift saved floating point registers up in jmp_buf.
brooks [Wed, 20 Jan 2016 22:23:08 +0000 (22:23 +0000)]
Shift saved floating point registers up in jmp_buf.

sigmask_t is 128-bits so requires two slots.

Approved by: CheriBSD (93699cb9b6e73980ac369e379cea9772c9494ccc)
MFC after: 1 week
Sponsored by: DARPA, AFRL

8 years agoMIPS also needs ofw_bus_if.h in some cases.
brooks [Wed, 20 Jan 2016 21:54:43 +0000 (21:54 +0000)]
MIPS also needs ofw_bus_if.h in some cases.

8 years agoAdd .NOMETA missed in r291320.
bdrewery [Wed, 20 Jan 2016 20:58:42 +0000 (20:58 +0000)]
Add .NOMETA missed in r291320.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd a simple manpage for the cfi(4) and associated cfid(4) drivers.
brooks [Wed, 20 Jan 2016 18:47:33 +0000 (18:47 +0000)]
Add a simple manpage for the cfi(4) and associated cfid(4) drivers.

MFC after: 1 week
Sponsored by: DARPA, AFRL

8 years agoIncrease BERI boot components section alignment to 16
emaste [Wed, 20 Jan 2016 18:35:43 +0000 (18:35 +0000)]
Increase BERI boot components section alignment to 16

The .text, .bss, and .data sections claimed 16-byte alignment, but were
only aligned to 8 by the linker script.

Discovered with elfcopy(1) from elftoolchain, which performs validation
absent from the binutils strip(1). ELF tool chain ticket #512.

Reported by: brooks
Reviewed by: brooks
Sponsored by: DARPA, AFRL

8 years agoAdd some missing dependencies on pci_iov_if.h.
bdrewery [Wed, 20 Jan 2016 16:45:39 +0000 (16:45 +0000)]
Add some missing dependencies on pci_iov_if.h.

Sponsored by: EMC / Isilon Storage Division

8 years agoxen-netfront: add multiqueue support
royger [Wed, 20 Jan 2016 15:02:43 +0000 (15:02 +0000)]
xen-netfront: add multiqueue support

Add support for multiple TX and RX queue pairs. The default number of queues
is set to 4, but can be easily changed from the sysctl node hw.xn.num_queues.

Also heavily refactor netfront driver: break out a bunch of helper
functions and different structures. Use threads to handle TX and RX.
Remove some dead code and fix quite a few bugs as I go along.

Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Sponsored by: Citrix Systems R&D
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D4193

8 years agoIntroduce initial driver for PMSU on Armada38x
zbb [Wed, 20 Jan 2016 14:49:16 +0000 (14:49 +0000)]
Introduce initial driver for PMSU on Armada38x

This is a stub for PMSU driver. Note that it cannot be used to set the
secondary core boot address during attach because drivers are attached
later than SI_SUB_CPU sysinit where cores are started.
Setting the boot address should be done manually in platform_mp_start_ap().

SMP is working fine with this commit and was enabled in Armada38x kernel
configuration file.

Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4427

8 years agoOFW: Fix ofw_bus_string_list_to_array() function.
mmel [Wed, 20 Jan 2016 14:49:01 +0000 (14:49 +0000)]
OFW: Fix ofw_bus_string_list_to_array() function.
Originally committed version was unfinished and didn't work at all,
because I took it from the wrong WIP branch by mistake.

Approved by: kib (mentor)

8 years agoAdd initial support for SMP on Armada38x
zbb [Wed, 20 Jan 2016 14:45:54 +0000 (14:45 +0000)]
Add initial support for SMP on Armada38x

- Add file sys/arm/mv/armada38x/armada38x_mp.c
- Set mp_maxid and mp_ncpus based on FDT unless SCU register indicates
  only one core
- Boot CPU1 in platform_mp_start_ap()
- IPI range defined

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4426

8 years agoOpen window to bootROM memory on Armada38x to allow CPU1 to boot
zbb [Wed, 20 Jan 2016 14:30:17 +0000 (14:30 +0000)]
Open window to bootROM memory on Armada38x to allow CPU1 to boot

CPU1 is halted in bootROM code while it is waiting to be released.
Memory window to bootROM must be opened before booting the core.

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4425

8 years agoSupport watchdog depending on "mrvl,has-wdt" property
zbb [Wed, 20 Jan 2016 14:28:05 +0000 (14:28 +0000)]
Support watchdog depending on "mrvl,has-wdt" property

With this commit, watchdog is supported only in case of having
"mrvl,has-wdt" property or dedicated for watchdog compatibility field
("marvell,armada-380-wdt"). There is no need to modify dts files,
as "has-wdt" property already exists.

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4424

8 years agoAdd support for watchdog on Armada38x
zbb [Wed, 20 Jan 2016 14:23:57 +0000 (14:23 +0000)]
Add support for watchdog on Armada38x

A38X watchdog support was implemented in sys/arm/mv/timer.c driver.
It required following modifications:
- add "marvell,armada-380-wdt" compatibility, which supports only watchdog
- correct and enhance definitions related to timer control register
- unmask reset capability in RSTOUTn_MASK register
- use dedicated watchdog timer on A38X instead of second timer

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4423

8 years agoAdd support for I2C on Armada38x
zbb [Wed, 20 Jan 2016 14:21:06 +0000 (14:21 +0000)]
Add support for I2C on Armada38x

Extend driver's compatible strings' table
and enable I2C compilation in kernconf.

Reviewed by:    andrew, ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Jan Dabros <jsd@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4422

8 years agoAdd a new RTC driver for Armada38x
zbb [Wed, 20 Jan 2016 14:18:49 +0000 (14:18 +0000)]
Add a new RTC driver for Armada38x

New driver registers RTC as system clock. New RTC resolution is 1 sec.
Settime and gettime functions were implemented.

Reviewed by:    andrew, ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Jan Dabros <jsd@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4421

8 years agoCorrect MV_DDR_CADR_BASE definiton in mvwin.h
zbb [Wed, 20 Jan 2016 14:16:13 +0000 (14:16 +0000)]
Correct MV_DDR_CADR_BASE definiton in mvwin.h

SOC_MV_ARMADAXP ifdef was enhanced with SOC_MV_ARMADA38X,
correcting MV_DDR_CADR_BASE definition. It fixes PCIe hangs issue.

Reviewed by:    andrew
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4380

8 years agoChange DTS entry of PCIe controller for Armada38x
zbb [Wed, 20 Jan 2016 14:14:30 +0000 (14:14 +0000)]
Change DTS entry of PCIe controller for Armada38x

Invalid (in FreeBSD) definition of PCI controller was
replaced with another one, working in FreeBSD environment.

PCI controller's entry had to move from its parent node
so as to be recognized properly by FBSD.

PCI was enabled in kernel configuration file.

Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4379

8 years agoImprove definitions of CPU/PCIe windows for Armada38x
zbb [Wed, 20 Jan 2016 14:10:00 +0000 (14:10 +0000)]
Improve definitions of CPU/PCIe windows for Armada38x

Enhance existing ARMADAXP defines and introduce new MV_WIN_PCIE_
definitions.

Reviewed by:    andrew
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4378

8 years agoFix invalid root link detection in mv_pci driver
zbb [Wed, 20 Jan 2016 14:05:21 +0000 (14:05 +0000)]
Fix invalid root link detection in mv_pci driver

mv_pci driver omitted slot 0, which can be valid device on Armada38x.
New mechanism detects if device is root link, basing on vendor's
and device's IDs.
It is restricted to Armada38x; on other machines, behaviour remains
the same.

Reviewed by:    andrew
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4377

8 years agoEnhance remap capabilities for Armada38x
zbb [Wed, 20 Jan 2016 14:02:36 +0000 (14:02 +0000)]
Enhance remap capabilities for Armada38x

Add conditions corresponding to Armada38x-based SoCs,
enhancing their remap capabilities.
This is required for PCIe to work properly.

Reviewed by:    andrew
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4376

8 years agoEnable USB in kernconf of Armada38x
zbb [Wed, 20 Jan 2016 14:00:32 +0000 (14:00 +0000)]
Enable USB in kernconf of Armada38x

With this commit, USB 2.0 works fine on Armada38x platforms.

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4375

8 years agoImprove attachment of the ehci_mv driver
zbb [Wed, 20 Jan 2016 13:58:07 +0000 (13:58 +0000)]
Improve attachment of the ehci_mv driver

Driver was modified to ensure it attaches properly to "marvell,orion-ehci"
node, which doesn't have error interrupt line defined. Neccessary
ofw_compat_data struct was added and probe procedure was altered.

Reviewed by:    andrew, ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4369

8 years agoEnable SCU unit for Armada38x
zbb [Wed, 20 Jan 2016 13:55:51 +0000 (13:55 +0000)]
Enable SCU unit for Armada38x

Valid SCU operation is necessary for SMP interoperability.
Initialization function armada38x_enable_scu() was added.

Reviewed by:    andrew, ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4220

8 years agoSet IO Sync Barrier flags for all Mbus devices on Armada38x
zbb [Wed, 20 Jan 2016 13:53:33 +0000 (13:53 +0000)]
Set IO Sync Barrier flags for all Mbus devices on Armada38x

IO Sync Barrier setting is required for I/O coherency.

Reviewed by:   andrew, ian, imp
Obtained from: Semihalf
Sponsored by:  Stormshield
Submitted by:  Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4219

8 years agoFix busy-detect when using DesignWare UART
zbb [Wed, 20 Jan 2016 13:51:14 +0000 (13:51 +0000)]
Fix busy-detect when using DesignWare UART

uart_dev_ns8250 now relies on compatible property instead of additional
'busy-detect' cell. All drivers with compatible = "snps,dw-apb-uart" have
busy detection turned on. DTS files of devices affected by the change
were modified and 'busy-detect' property was removed.

Reviewed by:    andrew, ian, imp
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4218

8 years agoAdd compatibility string for dw-apb-uart in ns8250 driver
zbb [Wed, 20 Jan 2016 13:47:44 +0000 (13:47 +0000)]
Add compatibility string for dw-apb-uart in ns8250 driver

This compatibility string is used in .dts file of Armada38x
and isrequired for driver attachment.

Reviewed by:    andrew, ian, imp
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4216

8 years agoFix GIC FDT interrupts decoding
zbb [Wed, 20 Jan 2016 13:45:35 +0000 (13:45 +0000)]
Fix GIC FDT interrupts decoding

Interrupt type in FDT was interpreted incorrectly.
Patch taken from freebsd-arm thread 'GIC - interrupts interpretation in
DTS/FDT':
https://lists.freebsd.org/pipermail/freebsd-arm/2015-August/012145.html

Reviewed by:    ian, imp
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4215

8 years agoUse GIC-specific decoding function in mv_common.c
zbb [Wed, 20 Jan 2016 13:42:54 +0000 (13:42 +0000)]
Use GIC-specific decoding function in mv_common.c

Add gic_decode_fdt function to fdt_pic_table, allowing to recognize GIC
interrupts on Armada38x. SOC_MV_ARMADA38X ifdef is required because A38X
is the only Marvell's platform in FreeBSD using GIC; lack of ifdef would
lead to linking errors on other platforms.

Reviewed by:    andrew, ian, imp
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4214

8 years agoAdd global mpcore timer node to Armada 38x DTS
zbb [Wed, 20 Jan 2016 13:40:54 +0000 (13:40 +0000)]
Add global mpcore timer node to Armada 38x DTS

Changes:
- global mpcore timer dts node added
- required by driver 'clock-frequency' property added

Reviewed by:    ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4213

8 years agoDo not require strict compatibility on simplebus
zbb [Wed, 20 Jan 2016 13:35:06 +0000 (13:35 +0000)]
Do not require strict compatibility on simplebus

Strict compatibility requirement is a root of problems when simplebus'
node has two compatibility strings (i.e. on Armada38x). Removing this
requirement should not interfere with other platforms.

fdt_is_compatible_strict() and fdt_find_compatible() calls were changed
in fdt_common.c and mv_common.c.

Reviewed by:    ian, imp
Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4602

8 years agoCorrect ranges in Armada38x dts
zbb [Wed, 20 Jan 2016 13:32:13 +0000 (13:32 +0000)]
Correct ranges in Armada38x dts

Ranges property of 'soc' node used two-cell addresses which resulted in
casting errors as simplebus resource allocation works with 32-bit u_long
variables. FDT ranges were simplified.

Reviewed by:    imp
Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4212

8 years agoIntroduce initial support for Marvell Armada38x
zbb [Wed, 20 Jan 2016 13:14:36 +0000 (13:14 +0000)]
Introduce initial support for Marvell Armada38x

This commit introduces initial support for Marvell Armada38x platform.
Changes:
- Add common DTS files for Armada38x SoCs and DTS file for A388-GP
- Add ARMADA38X kernel configuration
- Add option SOC_MV_ARMADA38X and set MV_PCI_PORTS
- Add list of files to compile
- Implement get_tclk(), get_sar_value(), cpu_reset() functions
- Add CPU ID and SoC numbers
- Correct ifdefs in arm/mv/timer.c

Reviewed by:    ian, imp
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4210

8 years agoWelcome miwi back to the portmgr team
culot [Wed, 20 Jan 2016 12:19:34 +0000 (12:19 +0000)]
Welcome miwi back to the portmgr team

8 years agoCorrect assertions in r294362, foobared when separating style fixes
marius [Wed, 20 Jan 2016 12:10:14 +0000 (12:10 +0000)]
Correct assertions in r294362, foobared when separating style fixes
from functional changes before commit.

8 years agoMark gpio as "optional" in files.mv and edit Marvell's kernconfs
zbb [Wed, 20 Jan 2016 11:57:11 +0000 (11:57 +0000)]
Mark gpio as "optional" in files.mv and edit Marvell's kernconfs

Including arm/mv/gpio.c now depends on 'gpio' device. 'device gpio' was
added to all kernconf files of Marvell boards, except ARMADAXP (dummy
mv_gpio_res definition was removed) and ARMADA38X (not supported yet).

This commit allows to use generic files.mv on A38X.

Reviewed by:    andrew
Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D4372

8 years agoRevert r294267 to avoid using experimental VFS_AIO in ARM64's GENERIC
zbb [Wed, 20 Jan 2016 11:34:22 +0000 (11:34 +0000)]
Revert r294267 to avoid using experimental VFS_AIO in ARM64's GENERIC

Remove VFS_AIO from the ARM64's GENERIC as it can be used
as a loadable module.

8 years agoFix rte refcount leak in ip6_forward().
melifaro [Wed, 20 Jan 2016 11:25:30 +0000 (11:25 +0000)]
Fix rte refcount leak in ip6_forward().

Reviewed by: ae
MFC after: 2 weeks
Sponsored by: Yandex LLC

8 years agoAdding info about myself to committers-src.xml
wma [Wed, 20 Jan 2016 11:15:54 +0000 (11:15 +0000)]
Adding info about myself to committers-src.xml

Approved by:           cognet (mentor)
Differential revision: https://reviews.freebsd.org/D5001

8 years agoMFV (r285035): fix props (no content changes)
des [Wed, 20 Jan 2016 09:14:37 +0000 (09:14 +0000)]
MFV (r285035): fix props (no content changes)

8 years agoDo not call callbacks for dl_iterate_phdr(3) with the rtld bind and
kib [Wed, 20 Jan 2016 07:21:33 +0000 (07:21 +0000)]
Do not call callbacks for dl_iterate_phdr(3) with the rtld bind and
phdr locks locked.  This allows to call rtld services from the
callback, which is only reasonable for dlopen(path, RTLD_NOLOAD) to
test existence of the library in the image, and for dlsym().  The
later might still be not quite safe, due to the lazy resolution of
filters.

To allow dropping the locks around iteration in dl_iterate_phdr(3), we
insert markers to track current position between relocks.  The global
objects list is converted to tailq and all iterators skip markers,
globallist_next() and globallist_curr() helpers are added.

Reported and tested by: davide
Reviewed by: kan
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

8 years agosfxge: refresh version to note matching version of out-of-tree driver
arybchik [Wed, 20 Jan 2016 06:56:18 +0000 (06:56 +0000)]
sfxge: refresh version to note matching version of out-of-tree driver

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: support __out_bcount_part[_opt] PREfast annotations
arybchik [Wed, 20 Jan 2016 06:50:30 +0000 (06:50 +0000)]
sfxge: cleanup: support __out_bcount_part[_opt] PREfast annotations

New annotation coming into use in the common code. Support its use by
adding null macro definitions for non-Windows platforms.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
X-MFC with:     r293901

8 years agomkdep: Fix -include not being added for .depend tracking.
bdrewery [Wed, 20 Jan 2016 01:40:18 +0000 (01:40 +0000)]
mkdep: Fix -include not being added for .depend tracking.

This fixes incremental build of OpenSSH after the recent upgrade.

For example, in secure/lib/libssh, -include ssh_namespace.h is used on
all files.  This is not tracked in the .depend file though due to
MKDEP_CFLAGS not including it.  The ssh example was broken in r291941
when not using FAST_DEPEND due to the .depend bug.  FAST_DEPEND was not
affected by this because it generates dependencies at compile time and
thus sees the -include.

This ugly make syntax could be simpler for bmake by using :tW but
fmake-compatible syntax is used since this needs to be MFC'd all the way
to stable/9.

Also add a temporary hack to workaround existing checkouts building
incrementally with a .depend file not having these headers.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate for API changes in OpenSSH 6.8p1.
jhb [Wed, 20 Jan 2016 00:26:50 +0000 (00:26 +0000)]
Update for API changes in OpenSSH 6.8p1.

First, the authfd API now uses a direct file descriptor for the control
socket instead of a more abstract AuthenticationConnection structure.
Second, the functions now consistently return an error value.

Reviewed by: bdrewery

8 years agoInitialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.
jhb [Wed, 20 Jan 2016 00:14:34 +0000 (00:14 +0000)]
Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.

If a driver's Linux mmap callback passed vm_page_prot through unchanged,
then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx
value 0 is to the mapping.  On x86, VM_MEMATTR_DEFAULT is the PAT value
for write-back (WB) which is 6, while 0 maps to the PAT value for
uncacheable (UC).  Thus, any mmap request that did not explicitly set
page_prot was tried to map memory as UC triggering the warning in
sg_pager_getpages().

Tested by: np
Reported by: Krishnamraju Eraparaju @ Chelsio
MFC after: 3 days
Sponsored by: Chelsio Communications

8 years agoList source files (foo.c) instead of object files in SRCS.
jhb [Wed, 20 Jan 2016 00:03:28 +0000 (00:03 +0000)]
List source files (foo.c) instead of object files in SRCS.

Reviewed by: bdrewery

8 years agoRevert a printf change from r294307.
jhibbits [Tue, 19 Jan 2016 23:35:12 +0000 (23:35 +0000)]
Revert a printf change from r294307.

Caused build failures with MPC85XX.

Pointy-hat to: jhibbits

8 years agoFix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
marius [Tue, 19 Jan 2016 23:34:27 +0000 (23:34 +0000)]
Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
to actually wait until the TX FIFOs of UARTs have be drained before
returning. This is done by bringing the equivalent of the TS_BUSY flag
found in the previous implementation back in an ABI-preserving way.
Reported and tested by: Patrick Powell

Most likely, drivers for USB-serial-adapters likewise incorporating
TX FIFOs as well as other terminal devices that buffer output in some
form should also provide implementations of tsw_busy.

MFC after: 3 days

8 years agoFAST_DEPEND: Fix improperly depending all .So objects on all headers.
bdrewery [Tue, 19 Jan 2016 23:28:18 +0000 (23:28 +0000)]
FAST_DEPEND: Fix improperly depending all .So objects on all headers.

This was a regression in r290629, which was revealed partly in r294360.
Once 'make depend' has ran it will generate all headers already.  Thus
even with FAST_DEPEND lacking proper dependencies before building, it
will not have any missing headers.  Once objects are compiled the depend
files will be generated with proper dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoRevert r294352.
bdrewery [Tue, 19 Jan 2016 23:25:25 +0000 (23:25 +0000)]
Revert r294352.

Further research showed it was the wrong fix and revealed a bigger
problem with the goal of skipping 'make depend'.

8 years agoQuell harmless CID about unchecked return value in nvlist_get_guids.
asomers [Tue, 19 Jan 2016 23:16:24 +0000 (23:16 +0000)]
Quell harmless CID about unchecked return value in nvlist_get_guids.

The return value doesn't need to be checked, because nvlist_get_guid's
callers check the returned values of the guids.

Coverity CID: 1341869
MFC after: 1 week
X-MFC-With: 292066
Sponsored by: Spectra Logic Corp

8 years agoAllow specifying an alternative LD_LIBRARY_PATH for the ldd(1) lookup.
bdrewery [Tue, 19 Jan 2016 22:42:16 +0000 (22:42 +0000)]
Allow specifying an alternative LD_LIBRARY_PATH for the ldd(1) lookup.

This is needed to be able to run check-links.sh against a "sysrooted"
binary while ensuring that the ldd(1) call done on the host uses the
host libc.  It is not possible to set LD_LIBRARY_PATH before calling
check-links.sh as then the "sysrooted" libc would be incorrectly used.

A LD_PRELOAD=libc.so is used to ldd(1) as it needs to use the host libc
to run.  ldd(1) is a simple wrapper around execve(2) and dlopen(2) with
env LD_TRACE_LOADED_OBJECTS set.  Due to the dlopen(2) restriction on
shared library tracing ldd(1) is still required for this lookup.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd some documentation.
bdrewery [Tue, 19 Jan 2016 22:42:13 +0000 (22:42 +0000)]
Add some documentation.

Sponsored by: EMC / Isilon Storage Division

8 years agoValidate that the file exists rather than obscure 'Not an elf file' error.
bdrewery [Tue, 19 Jan 2016 22:42:10 +0000 (22:42 +0000)]
Validate that the file exists rather than obscure 'Not an elf file' error.

Sponsored by: EMC / Isilon Storage Division

8 years agobsd.subdir.mk: Allow easier modification of [STANDALONE_]SUBDIR_TARGETS.
bdrewery [Tue, 19 Jan 2016 22:42:07 +0000 (22:42 +0000)]
bsd.subdir.mk: Allow easier modification of [STANDALONE_]SUBDIR_TARGETS.

This reworks r289254 and removes ALL_SUBDIR_TARGETS.

Because there is an include guard in this file there is no need for
LOCAL_ or ?= on SUBDIR_TARGETS or STANDALONE_SUBDIR_TARGETS.  These can
just be set via src.conf.  By the time bsd.subdir.mk is included it will
just append the values to the existing value and work fine.  This allows
a consistent way to append to these variables without introducing a
LOCAL_ var for STANDALONE_SUBDIR_TARGETS or renaming the historical
SUBDIR_TARGETS.

Sponsored by: EMC / Isilon Storage Division

8 years agoinstallconfig is PARALLEL_SUBDIR safe.
bdrewery [Tue, 19 Jan 2016 22:42:04 +0000 (22:42 +0000)]
installconfig is PARALLEL_SUBDIR safe.

Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Add header dependency missed in r290629.
bdrewery [Tue, 19 Jan 2016 22:42:01 +0000 (22:42 +0000)]
FAST_DEPEND: Add header dependency missed in r290629.

Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Still use if filemon is not used.
bdrewery [Tue, 19 Jan 2016 22:41:58 +0000 (22:41 +0000)]
FAST_DEPEND: Still use if filemon is not used.

If filemon is used then there is no need to generate dependency files during
compilation as the .meta files will achieve the same result.

This is a temporary solution until FAST_DEPEND is default.  Once that is
default there will be an option to disable dependency generation entirely
as it is only useful if an incremental build is planned, thus META_MODE+filemon
can enable that option to short-circuit all FAST_DEPEND-related logic.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Ensure bmake does not use filemon if it is not loaded.
bdrewery [Tue, 19 Jan 2016 22:41:55 +0000 (22:41 +0000)]
META_MODE: Ensure bmake does not use filemon if it is not loaded.

Sponsored by: EMC / Isilon Storage Division

8 years agoDefine .MAKE.MODE to normal to avoid the need for :U later.
bdrewery [Tue, 19 Jan 2016 22:41:44 +0000 (22:41 +0000)]
Define .MAKE.MODE to normal to avoid the need for :U later.

Sponsored by: EMC / Isilon Storage Division

8 years agosh: Simplify some code related to positional parameters.
jilles [Tue, 19 Jan 2016 22:41:26 +0000 (22:41 +0000)]
sh: Simplify some code related to positional parameters.

8 years agoFix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp.
asomers [Tue, 19 Jan 2016 22:07:39 +0000 (22:07 +0000)]
Fix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp.

The bad_truncate test sets the uimmutable flag to produce an error in
truncate, but that flag isn't supported by ZFS.  If /tmp is on a ZFS
filesystem, the test will fail.  Change it to use readonly permissions and
an unpriveleged user instead.

Reviewed by: jilles
MFC after: 1 week
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4862

8 years agoVarious cleanups to the main function for AIO kernel processes:
jhb [Tue, 19 Jan 2016 21:37:51 +0000 (21:37 +0000)]
Various cleanups to the main function for AIO kernel processes:

- Pull the vmspace logic out into helper functions and reduce duplication.
  Operations on the vmspace are all isolated to vm_map.c, but it now exports
  a new 'vmspace_switch_aio' for use by AIO kernel processes.
- When an AIO kernel process wants to exit, break out of the main loop and
  perform cleanup after the loop end.  This reduces a lot of indentation and
  allows cleanup to more closely mirror setup actions before the loop starts.
- Convert a DIAGNOSTIC to KASSERT().
- Replace mycp with more typical 'p'.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4990

8 years agoDon't create a dedicated session for each AIO kernel process.
jhb [Tue, 19 Jan 2016 20:46:30 +0000 (20:46 +0000)]
Don't create a dedicated session for each AIO kernel process.

This code dates back to the initial AIO support and the commit log does
not explain why it is needed.  However, I cannot find anything in the
AIO code or the various file methods (fo_read/fo_write) that would change
behavior due to using a private session instead of proc0's session.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4988

8 years agoUpgrade to OpenSSH 6.9p1.
des [Tue, 19 Jan 2016 18:55:44 +0000 (18:55 +0000)]
Upgrade to OpenSSH 6.9p1.

8 years agoRe-add HPN configuration options as deprecated options to avoid breaking
des [Tue, 19 Jan 2016 18:38:17 +0000 (18:38 +0000)]
Re-add HPN configuration options as deprecated options to avoid breaking
existing configurations that use them.  Note that there is no functional
difference between OpenSSH with HPN and OpenSSH without HPN.

8 years agobegone, foul autoprops!
des [Tue, 19 Jan 2016 18:32:51 +0000 (18:32 +0000)]
begone, foul autoprops!

8 years agoUpgrade to OpenSSH 6.8p1.
des [Tue, 19 Jan 2016 18:28:23 +0000 (18:28 +0000)]
Upgrade to OpenSSH 6.8p1.

8 years agoRemove local override for .cpp.o and .cpp.po rules
emaste [Tue, 19 Jan 2016 17:40:29 +0000 (17:40 +0000)]
Remove local override for .cpp.o and .cpp.po rules

The local build rule used to set -fvisibility=hidden and -fPIC, in
addition to -fexceptions and -D defines that had no effect.

With -fvisibility=hidden and -fPIC in STATIC_CXXFLAGS the standard
bsd.lib.mk rules are suitable for libgcc_s's C++ source.

PR: 206381
Sponsored by: The FreeBSD Foundation

8 years agoNow that we have local modifications in configure.ac and configure, run
des [Tue, 19 Jan 2016 17:20:07 +0000 (17:20 +0000)]
Now that we have local modifications in configure.ac and configure, run
autoheader and autoconf to avoid having to patch configure manually.

8 years agoDisallow zvol-backed ZFS pools
asomers [Tue, 19 Jan 2016 17:00:25 +0000 (17:00 +0000)]
Disallow zvol-backed ZFS pools

Using zvols as backing devices for ZFS pools is fraught with panics and
deadlocks. For example, attempting to online a missing device in the
presence of a zvol can cause a panic when vdev_geom tastes the zvol.  Better
to completely disable vdev_geom from ever opening a zvol. The solution
relies on setting a thread-local variable during vdev_geom_open, and
returning EOPNOTSUPP during zvol_open if that thread-local variable is set.

Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent
was to prevent a recursive mutex acquisition panic. However, the new check
for the thread-local variable also fixes that problem.

Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this
function was set to panic. But it can occur that a device disappears during
tasting, and it causes no problems to ignore this departure.

Reviewed by: delphij
MFC after: 1 week
Relnotes: yes
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4986

8 years agoUpgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
des [Tue, 19 Jan 2016 16:18:26 +0000 (16:18 +0000)]
Upgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
upstream) and a number of security fixes which we had already backported.

MFC after: 1 week

8 years agoAdd optimizing LRO wrapper:
hselasky [Tue, 19 Jan 2016 15:33:28 +0000 (15:33 +0000)]
Add optimizing LRO wrapper:

- Add optimizing LRO wrapper which pre-sorts all incoming packets
  according to the hash type and flowid. This prevents exhaustion of
  the LRO entries due to too many connections at the same time.
  Testing using a larger number of higher bandwidth TCP connections
  showed that the incoming ACK packet aggregation rate increased from
  ~1.3:1 to almost 3:1. Another test showed that for a number of TCP
  connections greater than 16 per hardware receive ring, where 8 TCP
  connections was the LRO active entry limit, there was a significant
  improvement in throughput due to being able to fully aggregate more
  than 8 TCP stream. For very few very high bandwidth TCP streams, the
  optimizing LRO wrapper will add CPU usage instead of reducing CPU
  usage. This is expected. Network drivers which want to use the
  optimizing LRO wrapper needs to call "tcp_lro_queue_mbuf()" instead
  of "tcp_lro_rx()" and "tcp_lro_flush_all()" instead of
  "tcp_lro_flush()". Further the LRO control structure must be
  initialized using "tcp_lro_init_args()" passing a non-zero number
  into the "lro_mbufs" argument.

- Make LRO statistics 64-bit. Previously 32-bit integers were used for
  statistics which can be prone to wrap-around. Fix this while at it
  and update all SYSCTL's which expose LRO statistics.

- Ensure all data is freed when destroying a LRO control structures,
  especially leftover LRO entries.

- Reduce number of memory allocations needed when setting up a LRO
  control structure by precomputing the total amount of memory needed.

- Add own memory allocation counter for LRO.

- Bump the FreeBSD version to force recompilation of all KLDs due to
  change of the LRO control structure size.

Sponsored by: Mellanox Technologies
Reviewed by: gallatin, sbruno, rrs, gnn, transport
Tested by: Netflix
Differential Revision: https://reviews.freebsd.org/D4914

8 years agoTest for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH
bapt [Tue, 19 Jan 2016 15:02:37 +0000 (15:02 +0000)]
Test for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH

Prior to this patch, unless SSL_CA_CERT_FILE is set in the environment,
libfetch will set the CA file to "/usr/local/etc/cert.pem" if it exists,
and to "/etc/ssl/cert.pem" otherwise. This has the consequence of
masking SSL_CA_CERT_PATH, because OpenSSL will ignore the CA path if a CA
file is set but fails to load (see X509_STORE_load_locations()).

While here, fall back to OpenSSL defaults if neither SSL_CA_CERT_FILE nor
SSL_CA_CERT_PATH are set in the environment, and if neither of the
libfetch default CA files exists.

PR: 193871
Submitted by: John W. O'Brien <john@saltant.com>
Approved by: des
MFC after: 1 week

8 years agoAs previously threatened, remove the HPN patch from OpenSSH.
des [Tue, 19 Jan 2016 14:38:20 +0000 (14:38 +0000)]
As previously threatened, remove the HPN patch from OpenSSH.

8 years agoUse 'svn list -R' instead of find, and recognize comments in shell scripts
des [Tue, 19 Jan 2016 14:25:22 +0000 (14:25 +0000)]
Use 'svn list -R' instead of find, and recognize comments in shell scripts
and {ssh,sshd}_config.

8 years agoRecognize *roff comments.
des [Tue, 19 Jan 2016 13:15:57 +0000 (13:15 +0000)]
Recognize *roff comments.

8 years agoAdd "vidcontrol -i active", to print out active vty number,
trasz [Tue, 19 Jan 2016 13:09:20 +0000 (13:09 +0000)]
Add "vidcontrol -i active", to print out active vty number,
to be used with eg "vidcontrol -s".

Reviewed by: emaste@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4968

8 years agoUpdate the pre- and post-merge scripts to work correctly after the recent
des [Tue, 19 Jan 2016 12:38:53 +0000 (12:38 +0000)]
Update the pre- and post-merge scripts to work correctly after the recent
cleanup.  A round-trip (./freebsd-pre-merge.sh ; ./freebsd-post-merge.sh)
now results in an unchanged working copy.