]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoMFV r282150
Pedro F. Giffuni [Tue, 28 Apr 2015 16:47:56 +0000 (16:47 +0000)]
MFV r282150
libgomp: Update to version 4.3.5.

This is a partial revert of r282115, to bring the fromal upstream
libgomp from GCC 4.3.5 Release under LGPLv2.1+.

This is only brought to ease the ongoing development of the CPU
affinity support.

This shall not be MFC'd.

9 years agoFix pmap_dcache_wb_pou in the new armv6 pmap to correctly achieve icache
Andrew Turner [Tue, 28 Apr 2015 16:47:34 +0000 (16:47 +0000)]
Fix pmap_dcache_wb_pou in the new armv6 pmap to correctly achieve icache
consistency from ptrace.

PR: 199739
Submitted by: Jurgen Weiss <weiss at uni-mainz.de> (original version)
Submitted by: Svatopluk Kraus <onwahe at gmail.com>

9 years agoBring updated versions of libcpp and libgomp.
Pedro F. Giffuni [Tue, 28 Apr 2015 16:28:29 +0000 (16:28 +0000)]
Bring updated versions of libcpp and libgomp.

While GCC 4.3 changed license, the library components remained under
LGPLv2.1 all the during all the existence of the branch.
From gcclibs, only libcpp and libgomp have some value for us in the base
gcc 4.2.1: bring updated versions from GCC 4.3.5 as reference as we have
already been including some of the fixes.

These not expected to become part of any FreeBSD release.

9 years agoThere may not be an FACS table, check for this before accessing it.
Andrew Turner [Tue, 28 Apr 2015 16:06:58 +0000 (16:06 +0000)]
There may not be an FACS table, check for this before accessing it.

Sponsored by: The FreeBSD Foundation

9 years agoFix CROCHETBRANCH, forgotten in r280640.
Glen Barber [Tue, 28 Apr 2015 15:32:59 +0000 (15:32 +0000)]
Fix CROCHETBRANCH, forgotten in r280640.

Submitted by: ruben.kerkhof@gmail.com
PR: 199760
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoThe presence/absence of CPU features should be tested with
Warner Losh [Tue, 28 Apr 2015 14:14:06 +0000 (14:14 +0000)]
The presence/absence of CPU features should be tested with
MACHINE_CPUARCH or MACHINE_ARCH, not MACHINE. The latter is for kernel
only things. Also, I think this should be unconditional since all our
architectures have long double support, but I don't have time to test
that thoroughly so just add a comment to that effect.

9 years agoRequire "ldconfig" for "devd". It is possible that user puts into
Gleb Smirnoff [Tue, 28 Apr 2015 13:13:23 +0000 (13:13 +0000)]
Require "ldconfig" for "devd". It is possible that user puts into
devd.conf execution of third-party software, that needs libraries
from /usr/local. Since devd is launched before ldconfig script, if
the hardware that has associated software is attached on boot, then
execution would fail.

Differential Revision: https://reviews.freebsd.org/D2332
Reviewed by: imp

9 years agocrunchide: add basic string table sanity checks
Ed Maste [Tue, 28 Apr 2015 13:04:51 +0000 (13:04 +0000)]
crunchide: add basic string table sanity checks

Reported by: Coverity Scan
CID: 978805, 980919
Sponsored by: The FreeBSD Foundation

9 years agoFix the comment. We will not do SPD lookup again, because
Andrey V. Elsukov [Tue, 28 Apr 2015 11:03:47 +0000 (11:03 +0000)]
Fix the comment. We will not do SPD lookup again, because
ip[6]_ipsec_output() will find PACKET_TAG_IPSEC_OUT_DONE mbuf tag.

Sponsored by: Yandex LLC

9 years agoAdjust CFLAGS to find freebsd_test_suite/macros.h
Enji Cooper [Tue, 28 Apr 2015 10:59:06 +0000 (10:59 +0000)]
Adjust CFLAGS to find freebsd_test_suite/macros.h

MFC after: 6 days

9 years agoUse PLAIN_REQUIRE_KERNEL_MODULE to require "mqueuefs"
Enji Cooper [Tue, 28 Apr 2015 10:56:59 +0000 (10:56 +0000)]
Use PLAIN_REQUIRE_KERNEL_MODULE to require "mqueuefs"

MFC after: 6 days

9 years ago- Use ATF_REQUIRE_KERNEL_MDOULE to require aio(4)
Enji Cooper [Tue, 28 Apr 2015 10:53:06 +0000 (10:53 +0000)]
- Use ATF_REQUIRE_KERNEL_MDOULE to require aio(4)
- Don't use /tmp as a basis for temporary files as it's outside of the ATF
  sandbox
- Don't override MAX macro in sys/param.h

MFC after: 6 days

9 years agoUse ATF_REQUIRE_KERNEL_MODULE instead of aio_available function
Enji Cooper [Tue, 28 Apr 2015 10:51:12 +0000 (10:51 +0000)]
Use ATF_REQUIRE_KERNEL_MODULE instead of aio_available function

MFC after: 6 days

9 years agoAdd initial (unpolished) macros for interfacing with the FreeBSD test suite
Enji Cooper [Tue, 28 Apr 2015 10:50:31 +0000 (10:50 +0000)]
Add initial (unpolished) macros for interfacing with the FreeBSD test suite

This is very rough, but will be replaced/redesigned some time soon after I fix
the Jenkins breakage I introduced

MFC after: 6 days

9 years agoFill in the copyright boilerplate for the test program
Enji Cooper [Tue, 28 Apr 2015 10:29:42 +0000 (10:29 +0000)]
Fill in the copyright boilerplate for the test program

MFC after: 6 days

9 years agoSince PFIL can change mbuf pointer, we should update pointers after
Andrey V. Elsukov [Tue, 28 Apr 2015 09:29:28 +0000 (09:29 +0000)]
Since PFIL can change mbuf pointer, we should update pointers after
calling ipsec_filter().

Sponsored by: Yandex LLC

9 years agoreplace a comment about zfs recv -F corner case with a longer, more detailed one
Andriy Gapon [Tue, 28 Apr 2015 09:19:40 +0000 (09:19 +0000)]
replace a comment about zfs recv -F corner case with a longer, more detailed one

The old comment in zfs_rezget explains what situation the code handles,
the new comment also describes how the situation can arise.

Also, re-join a line that became sufficiently shorti some time ago.

Differential Revision: https://reviews.freebsd.org/D2352
Reviewed by: delphij, smh
MFC after: 12 days

9 years agozfs_onexit_fd_hold: return EBADF even if devfs_get_cdevpriv gave ENOENT
Andriy Gapon [Tue, 28 Apr 2015 09:11:47 +0000 (09:11 +0000)]
zfs_onexit_fd_hold: return EBADF even if devfs_get_cdevpriv gave ENOENT

/dev/zfs always has per-open data, so when it is missing the file
descriptor is for some other file.  Returning ENOENT in this case
is confusing as a variety of other conditions (like a missing dataset)
may result in the same error.  It's better to consistently return
EBADF for any problems with the file descriptor.

Note that zfs_onexit_fd_hold() is used with 'automatic cleanup fd'
- when that fd is closed, typically because a process is terminated,
some cleanup action is taken by ZFS driver.  E.g. a temporary
snapshot hold is released.

Perhaps, it would even be worthwhile changing devfs_get_cdevpriv()
to return EBADF if there is no associated data.

Differential Revision: https://reviews.freebsd.org/D2370
Reviewed by: delphij, smh
MFC after: 12 days

9 years agoUpdate Amlogic MMC driver:
Ganbold Tsagaankhuu [Tue, 28 Apr 2015 08:27:44 +0000 (08:27 +0000)]
Update Amlogic MMC driver:

  1) Advertise the actual min / max speeds the hardware is capable
       of supporting given the reference clock used by the board.

  2) Rather than attempting to extend the hardware's timeout register
       in software (the hardware doesn't have sufficient bits to directly
            support long timeouts), simply implement the same timeout approach
         used in the SDXC driver.

  3) Set the timeout for a linked command (e.g. STOP TRANSMISSION) based
       on the previous multiblock read / write.

The changes have been smoke tested on both the ODROID-C1 and the VSATV102-M6
using the following cards:

* PQI 2GB microSD
* SanDisk 2GB microSD
* PQI 8GB SDHC (not a microSD so only tested on the ATV-102)
* PNY 8GB microSDHC
* SanDisk Ultra 32GB microSDHC

Submitted by:  John Wehle

9 years agoDo not sleep waiting for the MAP_ENTRY_IN_TRANSITION state ending with
Konstantin Belousov [Tue, 28 Apr 2015 08:20:23 +0000 (08:20 +0000)]
Do not sleep waiting for the MAP_ENTRY_IN_TRANSITION state ending with
the vnode locked.

Review: https://reviews.freebsd.org/D2381
Submitted by: Conrad Meyer, Attilio Rao
MFC after: 1 week

9 years agodsl_dir_rename_check: return EXDEV on cross-pool rename attempt
Andriy Gapon [Tue, 28 Apr 2015 08:04:16 +0000 (08:04 +0000)]
dsl_dir_rename_check: return EXDEV on cross-pool rename attempt

Obtained from: zfsonlinux/zfs@9063f65476b7b7d78ccf096fec890b8727117e2a
Obtained from: Boris Protopopov <boris.protopopov@actifio.com>
MFC after: 10 days

9 years agoMFV r282123: 5610 zfs clone from different source and target pools produces coredump
Andriy Gapon [Tue, 28 Apr 2015 07:42:28 +0000 (07:42 +0000)]
MFV r282123: 5610 zfs clone from different source and target pools produces coredump

MFC after: 10 days

9 years agoMFV r282124: 5393 spurious failures from dsl_dataset_hold_obj()
Andriy Gapon [Tue, 28 Apr 2015 07:37:38 +0000 (07:37 +0000)]
MFV r282124: 5393 spurious failures from dsl_dataset_hold_obj()

The actual bugfix was pro-actively committed in r275515.
This MFV is cosmetic, it just aligns code style with the upstream.

MFC after: 10 days

9 years agonvpair_type_is_array: DATA_TYPE_INT8_ARRAY was not recognized
Andriy Gapon [Tue, 28 Apr 2015 06:34:55 +0000 (06:34 +0000)]
nvpair_type_is_array: DATA_TYPE_INT8_ARRAY was not recognized

To do: upstream (https://www.illumos.org/issues/5778)
MFC after: 10 days

9 years agodump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY
Andriy Gapon [Tue, 28 Apr 2015 06:33:42 +0000 (06:33 +0000)]
dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY

To do: upstream (https://www.illumos.org/issues/5752)
MFC after: 10 days

9 years agoThe add_bounce_page() function can be called when loading physical
Hans Petter Selasky [Tue, 28 Apr 2015 06:12:37 +0000 (06:12 +0000)]
The add_bounce_page() function can be called when loading physical
pages which pass a NULL virtual address. If the BUS_DMA_KEEP_PG_OFFSET
flag is set, use the physical address to compute the page offset
instead. The physical address should always be valid when adding
bounce pages and should contain the same page offset like the virtual
address.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>
MFC after: 1 week
Reviewed by: jhb@

9 years ago- Add a new urtwn(4) device
Kevin Lo [Tue, 28 Apr 2015 03:24:27 +0000 (03:24 +0000)]
- Add a new urtwn(4) device
- Remove duplicate REALTEK RTL8188CU_0 entry.

9 years agoFix build breakage with GCC.
Marcel Moolenaar [Mon, 27 Apr 2015 21:58:41 +0000 (21:58 +0000)]
Fix build breakage with GCC.

Pointed out by: bz@

9 years agoAdd the cw-ec2-portinstall target to always install the
Glen Barber [Mon, 27 Apr 2015 21:38:12 +0000 (21:38 +0000)]
Add the cw-ec2-portinstall target to always install the
net/bsdec2-image-upload port.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agolibgomp: bring early CPU affinity support from FSF GCC-4_3 branch.
Pedro F. Giffuni [Mon, 27 Apr 2015 21:27:51 +0000 (21:27 +0000)]
libgomp: bring early CPU affinity support from FSF GCC-4_3 branch.

This is not likely to make it into a release and is basically disabled
but should still be useful for testing.

Obtained from: GCC pre-4.3 (rev. 123494, 125542; LGPLv2.1+)

9 years agoGenerate new UUID if system UUID is known bad or malformed and add a two
Xin LI [Mon, 27 Apr 2015 20:21:56 +0000 (20:21 +0000)]
Generate new UUID if system UUID is known bad or malformed and add a two
seconds sleep if we found the system UUID be invalid.

Obtained from: FreeNAS
MFC after: 2 weeks

9 years agoFix a comment.
Glen Barber [Mon, 27 Apr 2015 19:49:50 +0000 (19:49 +0000)]
Fix a comment.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoDrop the default for performance_cx_lowest (ie, what to use when AC is connected...
Adrian Chadd [Mon, 27 Apr 2015 19:18:51 +0000 (19:18 +0000)]
Drop the default for performance_cx_lowest (ie, what to use when AC is connected) to ACPI C2.

ACPI C3 ends up doing a lot more work before entering sleep, some of which
requires grabbing a global ACPI hardware serialising mutex.

Because of this, the more CPU cores you have, the more that lock contends
under load, reaching close to the #1 lock contention (after VM, which is being
worked on.)

Tested:

* Sandy bridge Xeon, 2 socket * 8 core
* Ivy bridge Xeon v2, 2 socket * 8 core
* Westmere-EX, 4 socket * 10 core
* Ivybridge desktop
* Sandybridge mobile
* Ivybridge mobile

MFC after: 2 weeks

9 years agoChange interpretation of the DF_ORIGIN and DF_1_ORIGIN flags.
Konstantin Belousov [Mon, 27 Apr 2015 18:41:31 +0000 (18:41 +0000)]
Change interpretation of the DF_ORIGIN and DF_1_ORIGIN flags.
According to standard, the presence of the flags only means that the
object path must be resolved at the time object loading, instead of my
reading that the flag is required to enable token substitution at all.

The consequence is that -z origin linker flag is no longer required
for the token substitution in the run/rpath or the needed library
soname.  It is only recommended if token substition is needed at
dlopen(3) time, since namecache might drop the required entries at the
time of resolution.

Found, reviewed and tested by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix a typo (linnker -> linker)
Enji Cooper [Mon, 27 Apr 2015 18:21:42 +0000 (18:21 +0000)]
Fix a typo (linnker -> linker)

9 years agoDo not nest the BSD and MBR partitions, which produces
Glen Barber [Mon, 27 Apr 2015 18:07:11 +0000 (18:07 +0000)]
Do not nest the BSD and MBR partitions, which produces
an unbootable image.  Use just an MBR scheme instead.

Sponsored by: The FreeBSD Foundation

9 years agoRemove per-architecture checks for enabling HAVE_FENV_H
Enji Cooper [Mon, 27 Apr 2015 18:01:52 +0000 (18:01 +0000)]
Remove per-architecture checks for enabling HAVE_FENV_H

The conditional came from NetBSD, where only select architectures have this
header/support

All architectures on FreeBSD have the necessary support though, so the
conditional's completely unnecessary

make tinderbox done on all architectures (including arm64, where the issue
occurred before) this time

X-MFC with: r282057, r282092
MFC after: 6 days

9 years agoAdd OLD_FILES entry for r282076
Enji Cooper [Mon, 27 Apr 2015 17:55:57 +0000 (17:55 +0000)]
Add OLD_FILES entry for r282076

MFC after: never

9 years agoMove tests/sys/kern/mmap_test to tests/sys/vm/mmap_test
Enji Cooper [Mon, 27 Apr 2015 17:53:09 +0000 (17:53 +0000)]
Move tests/sys/kern/mmap_test to tests/sys/vm/mmap_test

As jhb noted, the actual mmap(2) implementation is under sys/vm, not
sys/kern/, so the correct logical place is tests/sys/vm/, not
tests/sys/kern/

X-MFC with: r282076
MFC after: 6 days

9 years agoGenerate the arm64/aarch64 memstick image as MBR instead of
Glen Barber [Mon, 27 Apr 2015 17:39:40 +0000 (17:39 +0000)]
Generate the arm64/aarch64 memstick image as MBR instead of
GPT.

Boot tested by: andrew
Sponsored by: The FreeBSD Foundation

9 years agoFix potential memory leak.
Mariusz Zaborski [Mon, 27 Apr 2015 17:33:00 +0000 (17:33 +0000)]
Fix potential memory leak.

Pointed-out by: pfg
Approved by: pjd (mentor)

9 years agoUpgrade libxo to 0.3.2.
Marcel Moolenaar [Mon, 27 Apr 2015 17:23:19 +0000 (17:23 +0000)]
Upgrade libxo to 0.3.2.

Obtained from:  https://github.com/Juniper/libxo/tree/0.3.2
Requested by: Phil Shafer <phil@juniper.net>

This import incorporates local change 279966.
Local change 276260 has been merged-in.

9 years agoThe Dutch queen abdicated two years ago, the national holiday associated with
Rene Ladan [Mon, 27 Apr 2015 17:04:27 +0000 (17:04 +0000)]
The Dutch queen abdicated two years ago, the national holiday associated with
her birthday is now associated with the birthday of her son.

9 years agoAdd myself (oshogbo) to calendar.freebsd and committers-src.dot.
Mariusz Zaborski [Mon, 27 Apr 2015 16:45:16 +0000 (16:45 +0000)]
Add myself (oshogbo) to calendar.freebsd and committers-src.dot.

Approved by: pjd (mentor)

9 years ago- remove -l option from ntpdate manpage, as it is no longer an option
Jason Helfman [Mon, 27 Apr 2015 15:22:57 +0000 (15:22 +0000)]
- remove -l option from ntpdate manpage, as it is no longer an option

Differential Revision: https://reviews.freebsd.org/D2358
Submitted by: gnn@
Approved by: wblock (mentor)
MFC after: after 1 week

9 years agoReturn NULL on failure from nexus_alloc_resource as it reutrns a pointer.
Andrew Turner [Mon, 27 Apr 2015 15:16:51 +0000 (15:16 +0000)]
Return NULL on failure from nexus_alloc_resource as it reutrns a pointer.

9 years agoFix wrong cast of pointer to u_int in db_interface.c on ARM64
Zbigniew Bodek [Mon, 27 Apr 2015 14:18:07 +0000 (14:18 +0000)]
Fix wrong cast of pointer to u_int in db_interface.c on ARM64

Fix to commit introduced in: r282078

Pointed out by: andrew
Obtained from:  Semihalf
Sponsored by:   The FreeBSD Foundation

9 years agoCorrect the spelling of MACHINE_CPUARCH, MACHINE_CPU is not set on arm64.
Andrew Turner [Mon, 27 Apr 2015 13:57:39 +0000 (13:57 +0000)]
Correct the spelling of MACHINE_CPUARCH, MACHINE_CPU is not set on arm64.

9 years agoDisable the tests that use makecontext on arm64, it still needs to be
Andrew Turner [Mon, 27 Apr 2015 13:56:20 +0000 (13:56 +0000)]
Disable the tests that use makecontext on arm64, it still needs to be
written.

9 years agoUpgrade Unbound to 1.5.3.
Dag-Erling Smørgrav [Mon, 27 Apr 2015 12:06:13 +0000 (12:06 +0000)]
Upgrade Unbound to 1.5.3.

9 years agoAdd a script that runs configure for both ldns and drill.
Dag-Erling Smørgrav [Mon, 27 Apr 2015 12:02:16 +0000 (12:02 +0000)]
Add a script that runs configure for both ldns and drill.

Run configure for drill (I forgot to do it when I imported 1.6.17, but the
omission was harmless).  Note that running configure --with-drill at the
top level doesn't quite work for us since it is geared toward the slightly
weird upstream Makefiles, which we don't use.

9 years agoRestore packaging subdir to enable running unmodified configure script.
Dag-Erling Smørgrav [Mon, 27 Apr 2015 11:45:48 +0000 (11:45 +0000)]
Restore packaging subdir to enable running unmodified configure script.

9 years agoMake setproctitle(3) work in Capsicum capability mode. This makes
Edward Tomasz Napierala [Mon, 27 Apr 2015 11:18:16 +0000 (11:18 +0000)]
Make setproctitle(3) work in Capsicum capability mode.  This makes
ctld(8) child processes to indicate initiator address and name in
their titles, similar to what iscsid(8) child processes do.

PR: 181352
Differential Revision: https://reviews.freebsd.org/D2363
Reviewed by: rwatson@, mjg@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoPartially revert r255986: do not call VOP_FSYNC() when helping
Konstantin Belousov [Mon, 27 Apr 2015 11:13:19 +0000 (11:13 +0000)]
Partially revert r255986: do not call VOP_FSYNC() when helping
bufdaemon in getnewbuf(), do use buf_flush().  The difference is that
bufdaemon uses TRYLOCK to get buffer locks, which allows calls to
getnewbuf() while another buffer is locked.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix locking for oshmctl() and shmsys().
Konstantin Belousov [Mon, 27 Apr 2015 11:12:51 +0000 (11:12 +0000)]
Fix locking for oshmctl() and shmsys().

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd GCC to the list of broken options on arm64.
Andrew Turner [Mon, 27 Apr 2015 10:19:21 +0000 (10:19 +0000)]
Add GCC to the list of broken options on arm64.

9 years agoFix 'may be used uninitialized' warning not caught by clang.
Alexander V. Chernikov [Mon, 27 Apr 2015 10:01:22 +0000 (10:01 +0000)]
Fix 'may be used uninitialized' warning not caught by clang.

9 years agoUse free_nat_instance() for nat instance deletion.
Alexander V. Chernikov [Mon, 27 Apr 2015 09:16:22 +0000 (09:16 +0000)]
Use free_nat_instance() for nat instance deletion.

Sponsored by: Yandex LLC

9 years agoIntroduce ddb(4) support for ARM64
Zbigniew Bodek [Mon, 27 Apr 2015 09:12:54 +0000 (09:12 +0000)]
Introduce ddb(4) support for ARM64

Obtained from: Semihalf
Reviewed by:   emaste
Sponsored by:  The FreeBSD Foundation

9 years agoIntegrate tools/regression/mmap into the FreeBSD test suite as
Enji Cooper [Mon, 27 Apr 2015 09:06:27 +0000 (09:06 +0000)]
Integrate tools/regression/mmap into the FreeBSD test suite as
tests/sys/kern/mmap_test

MFC after: 1 week

9 years agoConvert this testcase over to a TAP format testcase
Enji Cooper [Mon, 27 Apr 2015 09:04:16 +0000 (09:04 +0000)]
Convert this testcase over to a TAP format testcase

MFC after: 1 week

9 years agoIntegrate tools/regression/aio/aiotest and tools/regression/aio/kqueue into the
Enji Cooper [Mon, 27 Apr 2015 08:51:40 +0000 (08:51 +0000)]
Integrate tools/regression/aio/aiotest and tools/regression/aio/kqueue into the
FreeBSD test suite as tests/sys/aio

MFC after: 1 week

9 years ago- Fix style(9) a bit
Enji Cooper [Mon, 27 Apr 2015 08:37:13 +0000 (08:37 +0000)]
- Fix style(9) a bit
-- Fix whitespace
-- Use err/errx
-- Remove superfluous braces
- Be a bit more defensive with input from the end-user
- Don't throw a floating point exception by dividing by 0 when processing a
  zero-byte file

MFC after: 1 week

9 years ago- Fix compilation (MAP_INHERIT's dead)
Enji Cooper [Mon, 27 Apr 2015 08:34:46 +0000 (08:34 +0000)]
- Fix compilation (MAP_INHERIT's dead)
- Fix warnings
- Use mkstemp instead of tmpnam

MFC after: 1 week

9 years agoIntegrate tools/regression/mqueue into the FreeBSD test suite as
Enji Cooper [Mon, 27 Apr 2015 08:31:43 +0000 (08:31 +0000)]
Integrate tools/regression/mqueue into the FreeBSD test suite as
tests/sys/mqueue

MFC after: 1 week

9 years agoMake rule table kernel-index rewriting support any kind of objects.
Alexander V. Chernikov [Mon, 27 Apr 2015 08:29:39 +0000 (08:29 +0000)]
Make rule table kernel-index rewriting support any kind of objects.

Currently we have tables identified by their names in userland
with internal kernel-assigned indices. This works the following way:

When userland wishes to communicate with kernel to add or change rule(s),
it makes indexed sorted array of table names
(internally ipfw_obj_ntlv entries), and refer to indices in that
array in rule manipulation.
Prior to committing new rule to the ruleset kernel
a) finds all referenced tables, bump their refcounts and change
 values inside the opcodes to be real kernel indices
b) auto-creates all referenced but not existing tables and then
 do a) for them.

Kernel does almost the same when exporting rules to userland:
 prepares array of used tables in all rules in range, and
 prepends it before the actual ruleset retaining actual in-kernel
 indexes for that.

There is also special translation layer for legacy clients which is
able to provide 'real' indices for table names (basically doing atoi()).

While it is arguable that every subsystem really needs names instead of
numbers, there are several things that should be noted:

1) every non-singleton subsystem needs to store its runtime state
somewhere inside ipfw chain (and be able to get it fast)
2) we can't assume object numbers provided by humans will be dense.

Existing nat implementation (O(n) access and LIST inside chain) is a
good example.

Hence the following:
* Convert table-centric rewrite code to be more generic, callback-based
* Move most of the code from ip_fw_table.c to ip_fw_sockopt.c
* Provide abstract API to permit subsystems convert their objects
  between userland string identifier and in-kernel index.
  (See struct opcode_obj_rewrite) for more details
* Create another per-chain index (in next commit) shared among all subsystems
* Convert current NAT44 implementation to use new API, O(1) lookups,
 shared index and names instead of numbers (in next commit).

Sponsored by: Yandex LLC

9 years agoIntegrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo
Enji Cooper [Mon, 27 Apr 2015 08:15:17 +0000 (08:15 +0000)]
Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo
and tools/regression/file into the FreeBSD test suite as tests/sys/file

MFC after: 1 week

9 years agoSmall change in header order to allow this to compile.
Scott Long [Mon, 27 Apr 2015 07:38:46 +0000 (07:38 +0000)]
Small change in header order to allow this to compile.

Obtained from: Netflix, Inc.
MFC after: 3 days

9 years agoIntegrate tools/regression/kqueue into the FreeBSD test suite as
Enji Cooper [Mon, 27 Apr 2015 07:37:48 +0000 (07:37 +0000)]
Integrate tools/regression/kqueue into the FreeBSD test suite as
tests/sys/kqueue

MFC after: 1 week

9 years agoFix -Wformat warnings by using proper format string qualifiers for
Enji Cooper [Mon, 27 Apr 2015 07:28:41 +0000 (07:28 +0000)]
Fix -Wformat warnings by using proper format string qualifiers for
long and unsigned[ long] types

MFC after: 1 week

9 years agoIntegrate tools/regression/execve into the FreeBSD test suite as
Enji Cooper [Mon, 27 Apr 2015 07:22:18 +0000 (07:22 +0000)]
Integrate tools/regression/execve into the FreeBSD test suite as
tests/sys/kern/execve

MFC after: 1 week

9 years agoMove etc/tests/rc.d to etc/rc.d/tests to match the directory layout jmmv@
Enji Cooper [Mon, 27 Apr 2015 07:00:34 +0000 (07:00 +0000)]
Move etc/tests/rc.d to etc/rc.d/tests to match the directory layout jmmv@
documented and implemented in other areas of the FreeBSD tree

MFC after: 1 week

9 years agoBuild/install libc, librt, libthr, and msun NetBSD test suites on all
Enji Cooper [Mon, 27 Apr 2015 06:49:27 +0000 (06:49 +0000)]
Build/install libc, librt, libthr, and msun NetBSD test suites on all
architectures

MFC after: 1 week

9 years agoThe fmodl compat shims on arm/mips/powerpc aren't complete
Enji Cooper [Mon, 27 Apr 2015 06:46:33 +0000 (06:46 +0000)]
The fmodl compat shims on arm/mips/powerpc aren't complete

Disable the test code for now on those architectures

MFC after: 1 week
PR: 199422

9 years agoath3kfw, bcmfw, bthidcontrol, bthidd all require usb(4); build them
Enji Cooper [Mon, 27 Apr 2015 06:34:51 +0000 (06:34 +0000)]
ath3kfw, bcmfw, bthidcontrol, bthidd all require usb(4); build them
conditionally if MK_USB != no

MFC after: 1 week

9 years agoFix memory leak.
Gleb Smirnoff [Mon, 27 Apr 2015 05:44:09 +0000 (05:44 +0000)]
Fix memory leak.

PR: 199670
Reviewed by: ae

9 years agoPass the supplied buffer length instead of a fixed size.
Luiz Otavio O Souza [Mon, 27 Apr 2015 01:36:16 +0000 (01:36 +0000)]
Pass the supplied buffer length instead of a fixed size.

9 years agoMake ipsec_in_reject() static. We use ipsec[46]_in_reject() instead.
Andrey V. Elsukov [Mon, 27 Apr 2015 01:12:51 +0000 (01:12 +0000)]
Make ipsec_in_reject() static. We use ipsec[46]_in_reject() instead.

Sponsored by: Yandex LLC

9 years agoRemove now unneded KEY_FREESP() for case when ipsec[46]_process_packet()
Andrey V. Elsukov [Mon, 27 Apr 2015 01:11:09 +0000 (01:11 +0000)]
Remove now unneded KEY_FREESP() for case when ipsec[46]_process_packet()
returns EJUSTRETURN.

Sponsored by: Yandex LLC

9 years agoFix possible use after free due to security policy deletion.
Andrey V. Elsukov [Mon, 27 Apr 2015 00:55:56 +0000 (00:55 +0000)]
Fix possible use after free due to security policy deletion.

When we are passing mbuf to IPSec processing via ipsec[46]_process_packet(),
we hold one reference to security policy and release it just after return
from this function. But IPSec processing can be deffered and when we release
reference to security policy after ipsec[46]_process_packet(), user can
delete this security policy from SPDB. And when IPSec processing will be
done, xform's callback function will do access to already freed memory.

To fix this move KEY_FREESP() into callback function. Now IPSec code will
release reference to SP after processing will be finished.

Differential Revision: https://reviews.freebsd.org/D2324
No objections from: #network
Sponsored by: Yandex LLC

9 years agoEnable root mounting from mmc/sd card.
Ganbold Tsagaankhuu [Mon, 27 Apr 2015 00:39:57 +0000 (00:39 +0000)]
Enable root mounting from mmc/sd card.

9 years agoDon't panic under INVARIANTS when receiving a SACK which cumacks
Michael Tuexen [Sun, 26 Apr 2015 21:47:15 +0000 (21:47 +0000)]
Don't panic under INVARIANTS when receiving a SACK which cumacks
a TSN never sent.
While there, fix two typos.

MFC after: 1 week

9 years agohexdump: Don't use uninitialized struct stat.
Jilles Tjoelker [Sun, 26 Apr 2015 21:34:55 +0000 (21:34 +0000)]
hexdump: Don't use uninitialized struct stat.

9 years agoDon't use ifm_data. It was used only for self checking debug.
Gleb Smirnoff [Sun, 26 Apr 2015 21:31:30 +0000 (21:31 +0000)]
Don't use ifm_data.  It was used only for self checking debug.

Reviewed by: np

9 years agofd: plug an always overwritten initialization in fdalloc
Mateusz Guzik [Sun, 26 Apr 2015 17:27:55 +0000 (17:27 +0000)]
fd: plug an always overwritten initialization in fdalloc

9 years agoConsistently use p instead of td->td_proc in create_thread
Mateusz Guzik [Sun, 26 Apr 2015 17:22:59 +0000 (17:22 +0000)]
Consistently use p instead of td->td_proc in create_thread

No functional changes.

9 years agoCleanup a little more:
Andrew Turner [Sun, 26 Apr 2015 16:37:27 +0000 (16:37 +0000)]
Cleanup a little more:
 - Remove whitespace at the end of lines
 - Use a tab after instructions, not spaces

9 years agoFix the style of locore-v4.S and locore-v6.S to help find any common code.
Andrew Turner [Sun, 26 Apr 2015 16:18:41 +0000 (16:18 +0000)]
Fix the style of locore-v4.S and locore-v6.S to help find any common code.

9 years agoRemove the armv6 code from locore-v4.S, it's not needed there.
Andrew Turner [Sun, 26 Apr 2015 15:57:02 +0000 (15:57 +0000)]
Remove the armv6 code from locore-v4.S, it's not needed there.

9 years agoImprove smb(4) man page.
Michael Gmelin [Sun, 26 Apr 2015 12:24:42 +0000 (12:24 +0000)]
Improve smb(4) man page.

Differential Revision: https://reviews.freebsd.org/D2368
Reviewed by: wblock
Approved by: wblock

9 years agoUse ARMv7 style unaligned access on ARMv6. We set this bit in locore, but
Andrew Turner [Sun, 26 Apr 2015 11:54:25 +0000 (11:54 +0000)]
Use ARMv7 style unaligned access on ARMv6. We set this bit in locore, but
it was missing from here.

9 years agomdoc: fix rendering issues
Baptiste Daroussin [Sun, 26 Apr 2015 11:39:25 +0000 (11:39 +0000)]
mdoc: fix rendering issues

9 years agoAllow DSP basename cloning to be disabled or enabled at boot and
Hans Petter Selasky [Sun, 26 Apr 2015 11:39:13 +0000 (11:39 +0000)]
Allow DSP basename cloning to be disabled or enabled at boot and
runtime. This is useful when implementing OSS sound stacks in
userspace via libcuse for example.

MFC after: 2 weeks

9 years agomdoc: fix function declaration
Baptiste Daroussin [Sun, 26 Apr 2015 11:35:36 +0000 (11:35 +0000)]
mdoc: fix function declaration

9 years agomdoc: remove empty line
Baptiste Daroussin [Sun, 26 Apr 2015 11:35:07 +0000 (11:35 +0000)]
mdoc: remove empty line

9 years agoMerge upstream r3375 and r3376 which fix a segfault on startup when the
Dag-Erling Smørgrav [Sun, 26 Apr 2015 11:33:01 +0000 (11:33 +0000)]
Merge upstream r3375 and r3376 which fix a segfault on startup when the
user specified in the configuration file does not exist.

PR: 197534

9 years agoRemove end of line whitespace
Baptiste Daroussin [Sun, 26 Apr 2015 11:30:27 +0000 (11:30 +0000)]
Remove end of line whitespace

9 years agoimport unbound 1.5.3
Dag-Erling Smørgrav [Sun, 26 Apr 2015 11:25:07 +0000 (11:25 +0000)]
import unbound 1.5.3

9 years agoimport unbound 1.5.2
Dag-Erling Smørgrav [Sun, 26 Apr 2015 11:23:26 +0000 (11:23 +0000)]
import unbound 1.5.2

9 years agomdoc: remove end of line whitespace
Baptiste Daroussin [Sun, 26 Apr 2015 10:56:06 +0000 (10:56 +0000)]
mdoc: remove end of line whitespace