]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agonetmap: Unbreak i386 LINT building
Sepherosa Ziehau [Fri, 21 Oct 2016 06:05:16 +0000 (06:05 +0000)]
netmap: Unbreak i386 LINT building

Sponsored by: Microsoft

7 years agoIntegrate contrib/netbsd-tests/fs/tmpfs into the FreeBSD test suite
Enji Cooper [Fri, 21 Oct 2016 05:24:08 +0000 (05:24 +0000)]
Integrate contrib/netbsd-tests/fs/tmpfs into the FreeBSD test suite
as tests/sys/fs

These testcases exercise tmpfs support

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoExpect tests/sys/fs/tmpfs/link_test:kqueue to fail
Enji Cooper [Fri, 21 Oct 2016 05:21:20 +0000 (05:21 +0000)]
Expect tests/sys/fs/tmpfs/link_test:kqueue to fail

It fails with: "dir/b did not receive NOTE_LINK"

Also, add needed cleanup logic to cleanup the mountpoint after the fact

MFC after: 2 weeks
PR: 213662
Sponsored by: Dell EMC Isilon

7 years agoOnly build lib/libc/tests/iconv if MK_ICONV != no
Enji Cooper [Fri, 21 Oct 2016 04:54:43 +0000 (04:54 +0000)]
Only build lib/libc/tests/iconv if MK_ICONV != no

MFC after: 1 week
Reported by: damian@damianek.be
Sponsored by: Dell EMC Isilon

7 years agoRevert r307689
Enji Cooper [Fri, 21 Oct 2016 04:49:39 +0000 (04:49 +0000)]
Revert r307689

The proposed change ("Fix building of llvm's unwind if gcc has been
also built") breaks the build with clang/llvm.

Tested with...

(
export SRCCONF=/dev/null WITH_CLANG=
cd gnu/lib/libgcc; make obj; make depend; make all
)

MFC after: 3 days
X-MFC with: r307689
Pointyhat to: bapt
Reported by: Jenkins, O. Hartmann <ohartman@zedat.fu-berlin.de>
Sponsored by: Dell EMC Isilon

7 years ago- Add required header for fixing `make` in sys/modules/gpio
Li-Wen Hsu [Fri, 21 Oct 2016 03:23:17 +0000 (03:23 +0000)]
- Add required header for fixing `make` in sys/modules/gpio

Reviewed by: imp, loos
Differential Revision: https://reviews.freebsd.org/D7815

7 years agoRemove a hack requiring dtsec0 to always be enabled for mdio.
Justin Hibbits [Fri, 21 Oct 2016 02:16:11 +0000 (02:16 +0000)]
Remove a hack requiring dtsec0 to always be enabled for mdio.

Instead replace it with a different hack, that turns fman into a simplebus
subclass, and maps its children within its address space.

Since all PHY communication is done through dtsec0's mdio space, the FDT
contains a reference to the dtsec0 mdio handle in all nodes that need it.
Instead of using Freescale's implementation for MII access, use our own (copied
loosely from the eTSEC driver, and could possibly be merged eventually).  This
lets us access the registers directly rather than needing a full dtsec interface
just to access the registers.

Future directions will include turning fman into more of a simplebus, and not
mapping the region and playing games.  This will require changes to the dtsec
driver to make it a child of fman, and possibly other drivers as well.

7 years agoRemove an unnecessary debug printf.
Justin Hibbits [Fri, 21 Oct 2016 02:07:03 +0000 (02:07 +0000)]
Remove an unnecessary debug printf.

7 years agoA problem w.r.t. interoperation between the FreeBSD NFSv4.1 server with
Rick Macklem [Thu, 20 Oct 2016 23:53:16 +0000 (23:53 +0000)]
A problem w.r.t. interoperation between the FreeBSD NFSv4.1 server with
delegations enabled and the Linux NFSv4.1 client was reported in
reviews.freebsd.org/D7891.
I believe that the FreeBSD server behaviour conforms to the RFC and that
the Linux client has a bug. Therefore, I do not think the proposed patch
is appropriate. When nfsrv_writedelegifpos is non-zero, the FreeBSD
server will issue a write delegation for a read open if possible.
The Linux client then erroneously assumes that the credentials used for
the read open can write the file.
This patch reverses the default value for nfsrv_writedelegifpos to 0 so
that the default behaviour is Linux compatible and adds a sysctl that can
be used to set nfsrv_writedelegifpos.

This change should only affect users that are mounting a FreeBSD server
with delegations enabled (they are not enabled by default) with a Linux
NFSv4.1 client mount.

Reported by: fatih.acar@gandi.net
Tested by: fatih.acar@gandi.net
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D7891

7 years agoSimplify keg_drain() a bit by using LIST_FOREACH_SAFE.
Mark Johnston [Thu, 20 Oct 2016 23:10:27 +0000 (23:10 +0000)]
Simplify keg_drain() a bit by using LIST_FOREACH_SAFE.

MFC after: 1 week

7 years agogmirror: Add a subroutine to free synchronization BIOs.
Mark Johnston [Thu, 20 Oct 2016 23:08:40 +0000 (23:08 +0000)]
gmirror: Add a subroutine to free synchronization BIOs.

This addresses a memory leak that occurs upon an I/O error during a mirror
synchronization.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agogmirror: Release pending regular requests when synchronization stops.
Mark Johnston [Thu, 20 Oct 2016 23:02:30 +0000 (23:02 +0000)]
gmirror: Release pending regular requests when synchronization stops.

Normally gmirror allows colliding requests to proceed whenever a
synchronization request completes and advances to the next offset. However
if an I/O request collides with one of the final g_mirror_syncreqs, nothing
releases it once synchronization completes, resulting in an apparent I/O
hang. The same problem can occur if synchronization is aborted by an
I/O error. Therefore, be sure to requeue pending requests when
mirror synchronization is stopped for any reason.

While here, remove some dead code from g_mirror_regular_release().

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoDon't build libssp as a prereq lib if WITHOUT_SSP is set
Ed Maste [Thu, 20 Oct 2016 21:29:59 +0000 (21:29 +0000)]
Don't build libssp as a prereq lib if WITHOUT_SSP is set

Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D8301

7 years agoFix building of llvm's unwind if gcc has been also built
Baptiste Daroussin [Thu, 20 Oct 2016 21:12:50 +0000 (21:12 +0000)]
Fix building of llvm's unwind if gcc has been also built

when building gcc an unwind.h header is generate in the cc_tool directory
which is included in the CFLAGS before the path where the llvm's unwind.h file
lives

Reviewed by: emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7357

7 years agoTidy up ia32_sysvec sv_flags setting
Ed Maste [Thu, 20 Oct 2016 20:29:54 +0000 (20:29 +0000)]
Tidy up ia32_sysvec sv_flags setting

Use the same approach as sys/arm/arm/elf_machdep.c to avoid an odd-
looking , on a separate line.

7 years agoarch.7: correct typo in predefined macro example
Ed Maste [Thu, 20 Oct 2016 20:16:10 +0000 (20:16 +0000)]
arch.7: correct typo in predefined macro example

The example incorrectly used -Dm, which defines macro m with value 1.
It is supposed to be -dM, which lists macros.

7 years agoUse MACHINE_ARCH rather than TARGET_ARCH which has no meaning outside
Warner Losh [Thu, 20 Oct 2016 20:12:34 +0000 (20:12 +0000)]
Use MACHINE_ARCH rather than TARGET_ARCH which has no meaning outside
of Makefile.inc1

7 years agocache: fix up a corner case in r307650
Mateusz Guzik [Thu, 20 Oct 2016 19:55:50 +0000 (19:55 +0000)]
cache: fix up a corner case in r307650

If no negative entry is found on the last list, the ncp pointer will be
left uninitialized and a non-null value will make the function assume an
entry was found.

Fix the problem by initializing to NULL on entry.

Reported by: glebius

7 years agoFor CCBs allocated on the stack, we need to clear the entire CCB, not just
Kenneth D. Merry [Thu, 20 Oct 2016 19:42:26 +0000 (19:42 +0000)]
For CCBs allocated on the stack, we need to clear the entire CCB, not just
the header.  Otherwise stack garbage can lead to random flags getting set.

This showed up as 'camcontrol rescan all' failing with EINVAL because the
address type wasn't CAM_DATA_VADDR.

sbin/camcontrol/camcontrol.c:
In rescan_or_reset_bus(), bzero the stack-allocated CCBs before
use instead of clearing the body.

MFC after: 3 days
Sponsored by: Spectra Logic

7 years agoCorrect typo in r307679: the variable is MK_GNU_GREP_COMPAT
Ed Maste [Thu, 20 Oct 2016 18:43:12 +0000 (18:43 +0000)]
Correct typo in r307679: the variable is MK_GNU_GREP_COMPAT

7 years agoSet the executable bit on arcgit and importgit
Ryan Stone [Thu, 20 Oct 2016 18:28:05 +0000 (18:28 +0000)]
Set the executable bit on arcgit and importgit

Make it possible to run these scripts directly out of svn by setting
the executable property on them.

7 years agoAdd some tools to simplify the use of git
Ryan Stone [Thu, 20 Oct 2016 18:23:44 +0000 (18:23 +0000)]
Add some tools to simplify the use of git

Add some scripts that wraps some FreeBSD Project infrastructure
and simplifies using them with git.  The scripts are:

 - arcgit, which creates a series of reviews in Differential
 - importgit, which applies a series of git commits to svn

Differential Revision:      https://reviews.freebsd.org/D2071

7 years agoBuild libgnuregex only if necessary for other components
Ed Maste [Thu, 20 Oct 2016 17:28:52 +0000 (17:28 +0000)]
Build libgnuregex only if necessary for other components

Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D8298

7 years agoDisable geom_eli module build on MIPS64 as it has alignment
Ruslan Bukin [Thu, 20 Oct 2016 17:10:26 +0000 (17:10 +0000)]
Disable geom_eli module build on MIPS64 as it has alignment
issues and causes kernel panic.
ELI metadata is also not aligned properly for MIPS64 case.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoAdd make rules to build LLVM IR from C/C++ sources.
Jonathan Anderson [Thu, 20 Oct 2016 15:14:21 +0000 (15:14 +0000)]
Add make rules to build LLVM IR from C/C++ sources.

As a foundation for future work with LLVM's Intermediate Representation (IR),
add new suffix rules that can be used to build .llo (text) or .bco (bitcode)
files from C or C++ sources.  This compilation step uses the same CFLAGS, etc.,
as are used for building .o files, with the exception of optimization flags.
Many of the things we would like to do with IR (e.g., instrumentation) work
better with unoptimized code, so our approach is to build .c->.bco without
optimization and then apply the optimization in post-analysis,
post-instrumentation linking.

The overall result of these changes is:

* one can "make foo.llo" or "make foo.bco" wherever "make foo.o" was supported
* new make variables IR_CFLAGS and IR_CXXFLAGS are available to inspect the
  flags that are used by Clang to generate the IR

These new rules are added unconditionally to our non-POSIX suffix rule set,
since we cannot inspect COMPILER_TYPE in sys.mk.  Future changes that depend
on these rules (e.g., building IR versions of binaries from bsd.prog.mk)
should use COMPILER_TYPE to determine when we can expect IR rules to succeed.

Reviewed by: emaste, imp
Approved by: rwatson (mentor)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D4339

7 years agoRemove trailing whitespace from r307674
Ed Maste [Thu, 20 Oct 2016 15:12:06 +0000 (15:12 +0000)]
Remove trailing whitespace from r307674

7 years agoAdd knobs to make GNU diff and GNU grep optional
Ed Maste [Thu, 20 Oct 2016 14:48:57 +0000 (14:48 +0000)]
Add knobs to make GNU diff and GNU grep optional

This is added to facilitate experiments building FreeBSD without
copyleft software.

If WITHOUT_GNU_DIFF is set no /usr/bin/diff or /usr/bin/diff3 will
be built.

If WITHOUT_GNU_GREP is set then BSD grep will be installed as
/usr/bin/bsdgrep or /usr/bin/grep, depending on the WITH_BSD_GREP
knob.

Reviewed by: brooks (earlier)
Sponsored by: The FreeBSD Foundation
Differential Revision: Differential Revision: https://reviews.freebsd.org/D8288

7 years agoClear mbuf hashtype on loopback when RSS is enabled.
Andrew Gallatin [Thu, 20 Oct 2016 13:48:29 +0000 (13:48 +0000)]
Clear mbuf hashtype on loopback when RSS is enabled.

The hashtype on an outgoing mbuf reflects the correct hash on the
transmit side of the connection.  If this hash persists on loopback,
the receiving RSS/PCBGROUP code will use it to look up the pcbgroup
for the transmit side, which will often not match the pcbgroup for the
receive side of the connection.  This leads to TCP connections
hanging, and dropping the SYN/ACK packet.   This is essentially
the same as having a hardware network card generate mbufs with an
incorrect RSS hash.

There are a number of places which can set the hash on transmit,
so the simplest fix is to simply clear the hash at loopback time.
Clearing the hash allows a new, correct hash to be calculated in
software on the receive side.

Reviewed by: jtl
Discussed with: adrian
Sponsored by: Netflix

7 years agoDriver for PCI Ethernet NIC on Alpine V1 and V2.
Wojciech Macek [Thu, 20 Oct 2016 11:31:11 +0000 (11:31 +0000)]
Driver for PCI Ethernet NIC on Alpine V1 and V2.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           wma
Differential Revision: https://reviews.freebsd.org/D7814

7 years agoSupport for Alpine Serializer/Deserializer.
Wojciech Macek [Thu, 20 Oct 2016 11:26:51 +0000 (11:26 +0000)]
Support for Alpine Serializer/Deserializer.

The exported functions will be used by
Alpine Ethernet driver.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           wma
Differential Revision: https://reviews.freebsd.org/D7763

7 years agoSupport for MSI-X on Annapurna Alpine
Wojciech Macek [Thu, 20 Oct 2016 11:23:59 +0000 (11:23 +0000)]
Support for MSI-X on Annapurna Alpine

This patch adds support for MSI-X interrupts
on Annapurna Alpine platform. MSI-X on Alpine
work similarly to GICv2m, i.e. some range of
SPI interrupts is reserved in GIC and individual
SPIs can be triggered by MSI-X messages.
This SPI range is defined in FDT.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           nwhitehorn, wma
Differential Revision: https://reviews.freebsd.org/D7579

7 years agoAdd support for the fpu_kern(9) KPI on arm64. It hooks into the existing
Andrew Turner [Thu, 20 Oct 2016 09:22:10 +0000 (09:22 +0000)]
Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing
VFP code to store the old context, with lazy loading of the new context
when needed.

FPU_KERN_NOCTX is missing as this is unused in the crypto code this has
been tested with, and I am unsure on the requirements of the UEFI
Runtime Services.

Reviewed by: kib
Obtained from: ABT Systeems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8276

7 years agoRemove register keyword.
Kevin Lo [Thu, 20 Oct 2016 01:21:10 +0000 (01:21 +0000)]
Remove register keyword.

Reviewed by: kib

7 years agoRemove a sentence about putting initialization in init_proc.c or kern_proc.c
Kevin Lo [Thu, 20 Oct 2016 01:19:37 +0000 (01:19 +0000)]
Remove a sentence about putting initialization in init_proc.c or kern_proc.c
and useless comment.

Reviewed by: kib

7 years agoCapsicum support for jot(1)
Conrad Meyer [Wed, 19 Oct 2016 21:50:57 +0000 (21:50 +0000)]
Capsicum support for jot(1)

Limit descriptors and enter capability mode in jot(1).

Submitted by: brueffer (earlier version)
Reviewed by: emaste, jonathan (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D1345

7 years agoSwitch gnu/usr.bin/Makefile to SUBDIR.${MK_*} optional subdir style
Ed Maste [Wed, 19 Oct 2016 21:25:59 +0000 (21:25 +0000)]
Switch gnu/usr.bin/Makefile to SUBDIR.${MK_*} optional subdir style

7 years agomd5: enter capability on last fd or when acting as a filter
Ed Maste [Wed, 19 Oct 2016 21:07:17 +0000 (21:07 +0000)]
md5: enter capability on last fd or when acting as a filter

Reviewed by: allanjude, cem
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8271

7 years agoResolve whitespace diff to NextBSD.
Sean Bruno [Wed, 19 Oct 2016 21:01:24 +0000 (21:01 +0000)]
Resolve whitespace diff to NextBSD.

Check to see that the taskqueue thread count requires us to acutally
iterate over the thread count to bind to cpus.

Submitted by: mmacy@nextbsd.org

7 years agoPut each SUBDIR on a separate line for ease of maintenance
Ed Maste [Wed, 19 Oct 2016 20:56:21 +0000 (20:56 +0000)]
Put each SUBDIR on a separate line for ease of maintenance

Additional patches to this file are in progress, and having each SUBDIR
entry on a separate line makes it easier to change the order in which
the patches are reviewed, tested, and applied.

7 years agoForce MK_GDB to no if MK_BINUTILS == no
Ed Maste [Wed, 19 Oct 2016 19:57:36 +0000 (19:57 +0000)]
Force MK_GDB to no if MK_BINUTILS == no

This is currently encoded in conditional blocks in gnu/lib/Makefile and
gnu/usr.bin/Makefile. Set it via src.opts.mk to make GDB's dependency
on binutils more clear.

7 years agoFix incorrect assertion that could miss overflows.
Gleb Smirnoff [Wed, 19 Oct 2016 19:50:09 +0000 (19:50 +0000)]
Fix incorrect assertion that could miss overflows.

Reviewed by: kib

7 years agoMark a bunch of mpsafe sysctls as such.
Mateusz Guzik [Wed, 19 Oct 2016 19:42:01 +0000 (19:42 +0000)]
Mark a bunch of mpsafe sysctls as such.

This gives me a sysctl Giant-free buildworld.

7 years agoSwitch gnu/lib/Makefile to SUBDIR.${MK_*} optional subdir style
Ed Maste [Wed, 19 Oct 2016 19:32:06 +0000 (19:32 +0000)]
Switch gnu/lib/Makefile to SUBDIR.${MK_*} optional subdir style

Compound conditions are left unchanged

7 years agoAdd support for adjusting the hardware buffering delay for USB audio.
Hans Petter Selasky [Wed, 19 Oct 2016 18:45:06 +0000 (18:45 +0000)]
Add support for adjusting the hardware buffering delay for USB audio.

Requested by: Goran Mekic <meka@tilda.center>
MFC after: 1 week

7 years agocache: split negative entry LRU into multiple lists
Mateusz Guzik [Wed, 19 Oct 2016 18:29:52 +0000 (18:29 +0000)]
cache: split negative entry LRU into multiple lists

This splits the ncneg_mtx lock while preserving the hit ratio at least
during buildworld.

Create N dedicated lists for new negative entries.

Entries with at least one hit get promoted to the hot list, where they
get requeued every M hits.

Shrinking demotes one hot entry and performs a round-robin shrinking of
regular lists.

Reviewed by: kib

7 years agoPartial workaround for Intel PCI adapters reading past the end of the
Konstantin Belousov [Wed, 19 Oct 2016 18:15:44 +0000 (18:15 +0000)]
Partial workaround for Intel PCI adapters reading past the end of the
host-programmed DMA regions.  This change seemingly fixes the
descriptor fetches, but the packet memory accesses are left
problematic.

Reviewed by: emaste, erj, sbruno
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D8282

7 years agoFix MK_SHAREDOCS test from r306864
Ed Maste [Wed, 19 Oct 2016 17:42:45 +0000 (17:42 +0000)]
Fix MK_SHAREDOCS test from r306864

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

7 years agoAfter deeper software archaeology, reports that 10.3R was affected
Warner Losh [Wed, 19 Oct 2016 15:13:08 +0000 (15:13 +0000)]
After deeper software archaeology, reports that 10.3R was affected
turned out to be mistaken. Adjust the entry and fix a few typos.

7 years agoChase a cornercase in printenv and sync its behaviour with builtin's
Pietro Cerutti [Wed, 19 Oct 2016 14:51:25 +0000 (14:51 +0000)]
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 agoTEGRA: Raise minimum voltage for CPU, original 0.9 V was too optimistic.
Michal Meloun [Wed, 19 Oct 2016 14:28:51 +0000 (14:28 +0000)]
TEGRA: Raise minimum voltage for CPU, original 0.9 V was too optimistic.
While I'm in, remove duplicated line from CPU frequency table.

MFC after: 2 weeks

7 years agoDocument the unique requirements for upgrading more
Warner Losh [Wed, 19 Oct 2016 13:45:51 +0000 (13:45 +0000)]
Document the unique requirements for upgrading more
prominently. Unlike in the past (dating back to the 4.x branch point),
you cannot upgrade from any point on the past couple of stable
branches to -current. Due to a bug in clang that existed before
r286035 in stable/9 or r286033 in stable/10, we cannot compile llvm
that's in 11.x or -current. Unfortunately, these revisions are after
9.3R and 10.3R on their respective branches. stable/11 and 11.0R are
not affected.

This also affects the upgrade path to 11 (including 11.0R) from
stable/9 and stable/10 (which would otherwise work, were it not for
this bug).

We also need to amend the 11.0R release notes.

MFC After: 3 days

7 years agoIncrease timeouts so tests have more chances to succeed
Ruslan Bukin [Wed, 19 Oct 2016 12:23:02 +0000 (12:23 +0000)]
Increase timeouts so tests have more chances to succeed
on MIPS64EB in QEMU.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoFix `ipfw table lookup` handler to return entry value, but not its index.
Andrey V. Elsukov [Wed, 19 Oct 2016 11:51:17 +0000 (11:51 +0000)]
Fix `ipfw table lookup` handler to return entry value, but not its index.

Submitted by: loos
MFC after: 1 week

7 years agoAdd FFS pager, which uses buffer cache read operation to validate pages.
Konstantin Belousov [Wed, 19 Oct 2016 11:09:29 +0000 (11:09 +0000)]
Add FFS pager, which uses buffer cache read operation to validate pages.
See the comments for more detailed description of the algorithm.

The pager is used unconditionally when the block size of the
underlying device is larger than the machine page size, since local
vnode pager cannot handle the configuration [1].  Otherwise, the
vfs.ffs.use_buf_pager sysctl allows to switch to the local pager.

Measurements demonstrated no regression in the ever-important
buildworld benchmark, and small (~5%) throughput improvements in the
special microbenchmark configuration for dbench over swap-backed
md(4).

Code can be generalized and reused for other filesystems which use
buffer cache.

Reported by: Anton Yuzhaninov <citrin@citrin.ru> [1]
Tested by: pho
Benchmarked by: mjg, pho
Reviewed by: alc, markj, mckusick (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D8198

7 years agoAdd big-endian uzip file system and choose right file system
Ruslan Bukin [Wed, 19 Oct 2016 10:01:04 +0000 (10:01 +0000)]
Add big-endian uzip file system and choose right file system
to proceed tests with.

Reviewed by: jmmv, ngie
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D8073

7 years agohyperv/vmbus: Expose channel management taskqueue for driver to use.
Sepherosa Ziehau [Wed, 19 Oct 2016 09:12:14 +0000 (09:12 +0000)]
hyperv/vmbus: Expose channel management taskqueue for driver to use.

MFC after: 3 days
Sponsored by: Microsoft

7 years agoRPI3 is retired in preference to GENERIC-UP. Use that instead.
Warner Losh [Wed, 19 Oct 2016 07:40:51 +0000 (07:40 +0000)]
RPI3 is retired in preference to GENERIC-UP. Use that instead.

7 years agoUse MODULES_EXTRA rather than MODULES_OVERRIDE for dtb.
Warner Losh [Wed, 19 Oct 2016 05:53:43 +0000 (05:53 +0000)]
Use MODULES_EXTRA rather than MODULES_OVERRIDE for dtb.

Submitted by: Oleksandr Tymoshenko

7 years ago[net80211] Initial full-offload scan support.
Adrian Chadd [Wed, 19 Oct 2016 05:03:46 +0000 (05:03 +0000)]
[net80211] Initial full-offload scan support.

This is a very simple addition to the net80211 scan support.

It doesn't implement a replacement scan interface - it just disables
the pieces that we should disable to make this lifecycle a bit
more managable.

There's more work to come before full scan offload support is available
but it should be good enough for driver work.

* add a flag to say "full offload"
* don't do probe requests when scanning full-offload - firmware can do that
* don't do powersave transitions and buffering - firmware can do that

tested:

* iwm(4) - STA mode
* ath10k port (local, not in freebsd-head yet)

Reviewed by: avos
Differential Revision: https://reviews.freebsd.org/D8262

7 years agoFix typo in comment.
Kevin Lo [Wed, 19 Oct 2016 02:24:57 +0000 (02:24 +0000)]
Fix typo in comment.

7 years agoUn-static two local variables in the FPU emulator
Justin Hibbits [Wed, 19 Oct 2016 02:23:29 +0000 (02:23 +0000)]
Un-static two local variables in the FPU emulator

Static variables aren't MP-safe, and this was causing bizarre segfaults on a
dual-core e500v2 system (P1022).

Still left is one static variable, which should be moved into the pcb instead,
but as illegal instructions haven't been hit yet, it's lower priority.

MFC after: 1 week

7 years agoMove SOC_BRCM_BCM2837 to GENERIC-UP since does not support SMP
Oleksandr Tymoshenko [Wed, 19 Oct 2016 02:03:30 +0000 (02:03 +0000)]
Move SOC_BRCM_BCM2837 to GENERIC-UP since does not support SMP

7 years agobcm2835_bsc.c should be compiled only if SOC_BRCM_BCM2837 is enabled
Oleksandr Tymoshenko [Wed, 19 Oct 2016 02:02:21 +0000 (02:02 +0000)]
bcm2835_bsc.c should be compiled only if SOC_BRCM_BCM2837 is enabled

7 years agoRetire RPI3 kernel config in favour of GENERIC-UP
Oleksandr Tymoshenko [Tue, 18 Oct 2016 23:48:47 +0000 (23:48 +0000)]
Retire RPI3 kernel config in favour of GENERIC-UP

Policy for FreeBSD/arm64 kernel config is the same one as for x86
architectures: provide GENERIC kernel bootable on as many systems
as possible. Since there is no SMP support for RPi 3 yet new kernel
config was introduced: GENERIC-UP, which is effectively GENERIC with
SMP option disabled

7 years agoFix C++ includability of crypto headers with static array sizes
Alan Somers [Tue, 18 Oct 2016 23:20:49 +0000 (23:20 +0000)]
Fix C++ includability of crypto headers with static array sizes

C99 allows array function parameters to use the static keyword for their
sizes. This tells the compiler that the parameter will have at least the
specified size, and calling code will fail to compile if that guarantee is
not met. However, this syntax is not legal in C++.

This commit reverts r300824, which worked around the problem for
sys/sys/md5.h only, and introduces a new macro: min_size(). min_size(x) can
be used in headers as a static array size, but will still compile in C++
mode.

Reviewed by: cem, ed
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8277

7 years agoSkip test on FreeBSD only. So test can be upstreamed to NetBSD.
Ruslan Bukin [Tue, 18 Oct 2016 22:53:58 +0000 (22:53 +0000)]
Skip test on FreeBSD only. So test can be upstreamed to NetBSD.

Requested by: ngie
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoAnnounce where we've put the image too
Warner Losh [Tue, 18 Oct 2016 22:40:14 +0000 (22:40 +0000)]
Announce where we've put the image too

7 years agoFix NANO_NAME
Warner Losh [Tue, 18 Oct 2016 22:40:12 +0000 (22:40 +0000)]
Fix NANO_NAME

7 years ago1. Use taskqueue_create() instead of taskqueue_create_fast() for both
David C Somayajulu [Tue, 18 Oct 2016 21:33:57 +0000 (21:33 +0000)]
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.

MFC after: 5 days

7 years agortwn(4): fix build with 'options IEEE80211_SUPPORT_SUPERG'
Andriy Voskoboinyk [Tue, 18 Oct 2016 21:17:31 +0000 (21:17 +0000)]
rtwn(4): fix build with 'options IEEE80211_SUPPORT_SUPERG'

7 years agoremove stale and unused code from various files
Luigi Rizzo [Tue, 18 Oct 2016 16:18:25 +0000 (16:18 +0000)]
remove stale and unused code from various files
fix build on 32 bit platforms
simplify logic in netmap_virt.h

The commands (in net/netmap.h) to configure communication with the
hypervisor may be revised soon.
At the moment they are unused so this will not be a change of API.

7 years agoremove conditional code for an obsolete feature. if_ptnet now does better.
Luigi Rizzo [Tue, 18 Oct 2016 15:50:20 +0000 (15:50 +0000)]
remove conditional code for an obsolete feature. if_ptnet now does better.

7 years agoremove trailing whitespace. No code changes.
Luigi Rizzo [Tue, 18 Oct 2016 15:41:57 +0000 (15:41 +0000)]
remove trailing whitespace. No code changes.

7 years agofix a stale sentence in the manpage
Luigi Rizzo [Tue, 18 Oct 2016 15:24:56 +0000 (15:24 +0000)]
fix a stale sentence in the manpage

7 years agoAdd support for non-contiguous IPv6 masks in ipfw(8) rules.
Andrey V. Elsukov [Tue, 18 Oct 2016 15:14:46 +0000 (15:14 +0000)]
Add support for non-contiguous IPv6 masks in ipfw(8) rules.

For example fe::640:0:0/ffff::ffff:ffff:0:0 will match
addresses fe:*:*:*:0:640:*:*

Submitted by: Eugene Mamchits <mamchits at yandex-team dot ru>
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC

7 years agoRestore svn r306772 that was overwritten by netmap import at svn r307394
Sean Bruno [Tue, 18 Oct 2016 14:48:41 +0000 (14:48 +0000)]
Restore svn r306772 that was overwritten by netmap import at svn r307394

#include <sys/selinfo.h> should be here as all drivers that support
netmap need to use this file regardless.

7 years agoSet default capabilities at attach.
Sean Bruno [Tue, 18 Oct 2016 14:02:45 +0000 (14:02 +0000)]
Set default capabilities at attach.

ref: https://github.com/NextBSD/NextBSD/commit/6425f45e5fc89f64925995bbcfc09c7558d896ea

Submitted by: mmacy@nextbsd.org

7 years agoAssert that we're assigning a non-null taskqueue.
Sean Bruno [Tue, 18 Oct 2016 14:00:26 +0000 (14:00 +0000)]
Assert that we're assigning a non-null taskqueue.
ref: https://github.com/NextBSD/NextBSD/commit/535865d02c162e415d7436899cd6db5000a0cc7b

Fix cpu assignment by assuring stride is non-zero, assert that all tasks
have a valid taskqueue.
ref: https://github.com/NextBSD/NextBSD/commit/db398176234fe3ce9f8e8b671f56000f8276feba

Start cpu assignment from zero.
ref: https://github.com/NextBSD/NextBSD/commit/d99d39b6b6c5dfac1eb440c41e36ebf4c897198e

Submitted by: mmacy@nextbsd.org

7 years agoEnsure that tasks with a specific cpu set prior to smp starting get
Sean Bruno [Tue, 18 Oct 2016 13:55:34 +0000 (13:55 +0000)]
Ensure that tasks with a specific cpu set prior to smp starting get
re-attached to a thread running on that cpu.

ref: https://github.com/NextBSD/NextBSD/commit/fcc20e306bc93ebbbe51f3775d1afb527970a2e9

Submitted by: mmacy@nextbsd.org

7 years agoAdd PCB_FP_USERMASK so we can mask off floating point flags that should
Andrew Turner [Tue, 18 Oct 2016 13:39:55 +0000 (13:39 +0000)]
Add PCB_FP_USERMASK so we can mask off floating point flags that should
not be sent to userspace, for example the future flag to tell when we are
using floating point in the kernel.

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

7 years agomakewhatis: avoid skipping another page after one with no mlinks
Ed Maste [Tue, 18 Oct 2016 13:37:59 +0000 (13:37 +0000)]
makewhatis: avoid skipping another page after one with no mlinks

Submitted by: Ingo Schwarze
MFC after: 3 weeks
MFC with: r307003

7 years agoWhen deciding whether or not to call tqg_attach_cpu(), reference rid
Sean Bruno [Tue, 18 Oct 2016 13:29:30 +0000 (13:29 +0000)]
When deciding whether or not to call tqg_attach_cpu(), reference rid
directly.

ref: https://github.com/NextBSD/NextBSD/commit/c9b47b468b8a3350811acfd9e167a8b91dc8f0c6

Submitted by: mmacy@nextbsd.org

7 years agoToggle v4/v6 rxcsum together
Sean Bruno [Tue, 18 Oct 2016 13:22:44 +0000 (13:22 +0000)]
Toggle v4/v6 rxcsum together

Only re-init if driver is running

ref: https://github.com/NextBSD/NextBSD/commit/106518e874ec9a61daf4c09894170d24e2f4d60d

Submitted by: mmacy@nextbsd.org

7 years agoTell gtask to what we've been bound.
Sean Bruno [Tue, 18 Oct 2016 13:16:27 +0000 (13:16 +0000)]
Tell gtask to what we've been bound.

ref: https://github.com/NextBSD/NextBSD/commit/54414984cfebb920bbc40aadeb601bdce448d8d7

Submitted by: mmacy@nextbsd.org

7 years agoFix misusage of CPU_FFS when binding queues to cpus
Sean Bruno [Tue, 18 Oct 2016 13:12:19 +0000 (13:12 +0000)]
Fix misusage of CPU_FFS when binding queues to cpus

ref: https://github.com/NextBSD/NextBSD/commit/922d0bdf2277f30954f143107d2a3eddb02abd2d

Submitted by: mmacy@nextbsd.org

7 years agofstyp tests comes with pre-created EL filesystems,
Ruslan Bukin [Tue, 18 Oct 2016 12:58:17 +0000 (12:58 +0000)]
fstyp tests comes with pre-created EL filesystems,
but fstyp cannot detect EL filesystem on EB machine,
so exclude test files from distribution and skip the
test.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoREGULATOR: Move functions for handling with regulator ranges to
Michal Meloun [Tue, 18 Oct 2016 12:27:46 +0000 (12:27 +0000)]
REGULATOR: Move functions for handling with regulator ranges to
common file. They can be useful for other PMICs.

MFC after: 2 weeks

7 years agoTEGRA: Attach cpufreq and coretemp drivers only on tegra124 SoC.
Michal Meloun [Tue, 18 Oct 2016 12:26:22 +0000 (12:26 +0000)]
TEGRA: Attach cpufreq and coretemp drivers only on tegra124 SoC.
It's needed by GENERIC kernel.

MFC after: 2 weeks

7 years agoTEGRA: Really implement early printf. The original version
Michal Meloun [Tue, 18 Oct 2016 12:21:45 +0000 (12:21 +0000)]
TEGRA: Really implement early printf. The original version
was cut&pasted from another SoC.

Pointy-hat to: mmel

MFC after: 2 weeks

7 years agoFix comment. We have different VM layout on MIPS, so test is skipped.
Ruslan Bukin [Tue, 18 Oct 2016 10:20:58 +0000 (10:20 +0000)]
Fix comment. We have different VM layout on MIPS, so test is skipped.

Requested by: kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoSkip test on MIPS as it modifies TLS pointer in set_mcontext().
Ruslan Bukin [Tue, 18 Oct 2016 10:13:54 +0000 (10:13 +0000)]
Skip test on MIPS as it modifies TLS pointer in set_mcontext().

Discussed with: kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoFix a double-free when an inp transitions to INP_TIMEWAIT state
Julien Charbon [Tue, 18 Oct 2016 07:16:49 +0000 (07:16 +0000)]
Fix a double-free when an inp transitions to INP_TIMEWAIT state
after having been dropped.

This fixes 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
MFC after: 1 week
Sponsored by: Verisign, inc

7 years agoAdd a new flag to mkimg (-a num) to specify the active partition for
Warner Losh [Tue, 18 Oct 2016 05:43:12 +0000 (05:43 +0000)]
Add a new flag to mkimg (-a num) to specify the active partition for
those partitioning schemes that have this concept. Implement it as an
override for mbr's setting 0x80 in the flags for the first partition
when we have boot code.

Differential Revision: https://reviews.freebsd.org/D4403

7 years agoAdd preliminary support for Raspberry PI3 images to nanobsd.
Warner Losh [Tue, 18 Oct 2016 04:02:00 +0000 (04:02 +0000)]
Add preliminary support for Raspberry PI3 images to nanobsd.

7 years agoAlso include the DTBs in /boot/dtb for omap4 systems.
Warner Losh [Tue, 18 Oct 2016 04:01:58 +0000 (04:01 +0000)]
Also include the DTBs in /boot/dtb for omap4 systems.

7 years agoAdd support for building pandaboard images with nanobsd.
Warner Losh [Tue, 18 Oct 2016 04:01:56 +0000 (04:01 +0000)]
Add support for building pandaboard images with nanobsd.

7 years agoSkip the checks in mtools. They are false positive for errors.
Warner Losh [Tue, 18 Oct 2016 04:01:54 +0000 (04:01 +0000)]
Skip the checks in mtools. They are false positive for errors.

7 years agoMake sure tcp_mss() has the same check as tcp_mss_update() to have t_maxseg set
Hiren Panchasara [Tue, 18 Oct 2016 02:40:25 +0000 (02:40 +0000)]
Make sure tcp_mss() has the same check as tcp_mss_update() to have t_maxseg set
to at least 64.

This is still just a coverup to avoid kernel panic and not an actual fix.

PR: 213232
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D8272

7 years ago o Provide a private definition for UUIDs (mkimg_uuid_t) because
Marcel Moolenaar [Tue, 18 Oct 2016 01:55:07 +0000 (01:55 +0000)]
 o  Provide a private definition for UUIDs (mkimg_uuid_t) because
    UUIDs are not portable.
 o  Move mkimg_uuid() to a new file and merge both gpt_uuid_enc()
    and vhd_uuid_enc() into a single mkimg_uuid_enc() that lives
    in the same file.
 o  Move the OS-specific implementation of generating a UUID to
    osdep_uuidgen() and provide the implementations for FreeBSD,
    macOS and Linux.
 o  Expect the partitioning scheme headers to be found by having
    a search to the directory in which the headers live. This
    avoids conflicts on non-FreeBSD machines.

7 years agoAdd LORDER, TSORT and TSORTFLAGS variables and replace the
Marcel Moolenaar [Tue, 18 Oct 2016 01:42:42 +0000 (01:42 +0000)]
Add LORDER, TSORT and TSORTFLAGS variables and replace the
hardcoded utility names and tsort flags.