]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMove the arm call to intr_pic_init_secondary earlier in the secondary CPU
Andrew Turner [Tue, 14 Jun 2016 16:41:39 +0000 (16:41 +0000)]
Move the arm call to intr_pic_init_secondary earlier in the secondary CPU
initialisation. This ensures it will complete before signalling to the boot
CPU it has booted. This fixes a race with the GIC where the arm_gic_map may
not be populated before it is used to bind interrupts leading to some
interrupts becoming bound to no CPUs.

Approved by: re (kib)
Sponsored by: ABT Systems Ltd

8 years agoWITH_META_MODE: Enable printing of some of make's environment on error.
Bryan Drewery [Tue, 14 Jun 2016 16:20:25 +0000 (16:20 +0000)]
WITH_META_MODE: Enable printing of some of make's environment on error.

This will print a set of variables from make on error using
MAKE_PRINT_VAR_ON_ERROR.  It is already enabled for the DIRDEPS_BUILD.
It may make sense to enable this in the non-meta mode as well once
people are more used to its more verbose error output.

This makes it much simpler to see which .meta file is used when a
command files so that it may be inspected for the build command.

Suggested by: sjg
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Lessen the filemon(4) requirement scope.
Bryan Drewery [Tue, 14 Jun 2016 16:20:19 +0000 (16:20 +0000)]
WITH_META_MODE: Lessen the filemon(4) requirement scope.

- Move the sys.mk filemon requirement to bsd.init.mk as a warning.
  This is intended only to show when building directly in a subdirectory
  without filemon loaded.
- Move the error into Makefile and only apply it when building
  from the META_TGT_WHITELIST target list.

-DNO_FILEMON can be used to suppress both the warning and the error but
makes WITH_META_MODE less useful.  It will only compare build commands
in this mode rather than track all dependencies.

This fixes installing from a jail which doesn't need filemon in this
phase [1].

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com> [1]
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Whitelist targets that are meta-mode-safe.
Bryan Drewery [Tue, 14 Jun 2016 16:20:14 +0000 (16:20 +0000)]
WITH_META_MODE: Whitelist targets that are meta-mode-safe.

META_TGT_WHITELIST is added to define which build targets are safe for
meta mode.  See comments for more details.

This fixes 'make delete-old-libs' to properly show the interactive
prompt.

Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Set MK_META_MODE=no with -B.
Bryan Drewery [Tue, 14 Jun 2016 16:20:11 +0000 (16:20 +0000)]
WITH_META_MODE: Set MK_META_MODE=no with -B.

Using -B already sets .MAKE.MODE=compat but it was leaving
MK_META_MODE set which could still cause other MK_META_MODE==yes
checks to trigger.

Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd more missing .PHONY
Bryan Drewery [Tue, 14 Jun 2016 16:20:08 +0000 (16:20 +0000)]
Add more missing .PHONY

Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Fix rebuilding maketab outside of build-tools.
Bryan Drewery [Tue, 14 Jun 2016 16:20:05 +0000 (16:20 +0000)]
WITH_META_MODE: Fix rebuilding maketab outside of build-tools.

The bsd.dep.mk yacc targets rely on only the .c file getting a .meta
file.  However the previous code here relying on only the .h file meant
that it would be generated with a .meta file.  r301285 made it so that
the .h file is never expected to get a .meta file.  To keep this
restriction in place add in an extra dependency on the .c file so that
it is generated at this time.  It's a hack but the best for the patterns
we have at the moment for handling build-tools and side-effect-generated
files.

Reported by: Mark Millard
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division

8 years agoDefine targets in same order as .ORDER
Bryan Drewery [Tue, 14 Jun 2016 16:19:59 +0000 (16:19 +0000)]
Define targets in same order as .ORDER

This is a NOP but is done for style and to reduce confusion.

Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Fix rescue rebuilding build-tools.
Bryan Drewery [Tue, 14 Jun 2016 16:19:54 +0000 (16:19 +0000)]
WITH_META_MODE: Fix rescue rebuilding build-tools.

This is the same issue as r297997.

Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Fix bin/csh rebuilding tc.const.h
Bryan Drewery [Tue, 14 Jun 2016 16:19:49 +0000 (16:19 +0000)]
WITH_META_MODE: Fix bin/csh rebuilding tc.const.h

This is the same issue as r297997, but was missed in it.

The WARNS value changes between 'build-tools' (MK_WARNS=no) and
'everything' resulting in a rebuild of this file.

Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE+WITH_DEBUG_FILES: Fix library symlinks causing bogus rebuilds.
Bryan Drewery [Tue, 14 Jun 2016 16:19:44 +0000 (16:19 +0000)]
WITH_META_MODE+WITH_DEBUG_FILES: Fix library symlinks causing bogus rebuilds.

A simplified example of the library targets with WITH_DEBUG_FILES is:

  libgeom.so.5: libgeom.so.5.full
     cp libgeom.so.5.full libgeom.so.5

  libgeom.so.5.full:
     ln -s libgeom.so.5 libgeom.so
     cc -o libgeom.so.5.full *.o

Before, or without, WITH_DEBUG_FILES it is:

  libgeom.so.5:
     ln -s libgeom.so.5 libgeom.so
     cc -o libgeom.so.5 *.o

The problem is that bmake considers the link source for the libgeom.so
link in the libgeom.so.5.full target as being a dependency for
libgeom.so.5.full.  That resolves to libgeom.so.5.  Thus a cyclic
dependency is created.  The result of this is that if libgeom.so.5 is
created with a newer timestamp than libgeom.so.5.full, then
libgeom.so.5.full will be rebuilt on the next build.  This causes a
chain reaction of everything in the build relinking, or hitting the
problem itself.

Moving the link creation to the target that actually creates
libgeom.so.5 fixes the problem.  The simplest fix here is to just
duplicate the logic.

Submitted by: sjg
Approved by: re (implicit)

8 years agomakefs: Provide a -T option to set timestamps to a consistent value
Ed Maste [Tue, 14 Jun 2016 14:03:28 +0000 (14:03 +0000)]
makefs: Provide a -T option to set timestamps to a consistent value

This is taken from the NetBSD versions listed below and adapted to the
makefs version in FreeBSD, along with a bug fix from cem@ that will be
sent to NetBSD.

Reviewed by: pfg
Approved by: re (gjb)
Obtained from: NetBSD
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D6835

8 years ago[mips] Tidy up setting/clearing the hardfloat flag.
Adrian Chadd [Tue, 14 Jun 2016 06:21:51 +0000 (06:21 +0000)]
[mips] Tidy up setting/clearing the hardfloat flag.

Submitted by: kan
Approved by: re (delphij)

8 years agoAdd a missing error check for a malloc() call in idr_get().
Mark Johnston [Tue, 14 Jun 2016 03:57:00 +0000 (03:57 +0000)]
Add a missing error check for a malloc() call in idr_get().

Submitted by: Matt Joras <mjoras@isilon.com>
Approved by: re (gjb)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd myself (mahrens) to calendar.freebsd
Matthew Ahrens [Mon, 13 Jun 2016 23:36:15 +0000 (23:36 +0000)]
Add myself (mahrens) to calendar.freebsd

Approved by: mckusick
Approved by: re (gjb)

8 years agoRemove the SIOCSIFALIFETIME_IN6 ioctl.
Pedro F. Giffuni [Mon, 13 Jun 2016 22:31:16 +0000 (22:31 +0000)]
Remove the SIOCSIFALIFETIME_IN6 ioctl.

The SIOCSIFALIFETIME_IN6 provided by the kame project is unused,
it can't really be used safely and has been completely removed from
NetBSD and OpenBSD.

Obtained from: NetBSD (kern/35897)
PR: 210148 (exp-run)
Reviewed by: ae, hrs
Relnotes: yes
Approved by: re (glebius)
Differential Revision: https://reviews.freebsd.org/D5491

8 years agoFix usr.sbin/extattr testcases on tmpfs
Alan Somers [Mon, 13 Jun 2016 22:00:44 +0000 (22:00 +0000)]
Fix usr.sbin/extattr testcases on tmpfs

Skip the usr.sbin/extattr testscases if $TMPDIR is tmpfs, which doesn't
support extended attributes

PR: 210184
Reported by: ngie
Reviewed by: ngie
Approved by: re (glebius)
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D6802
Sponsored by: Spectra Logic Corp

8 years agol2arc: reset b_tmp_cdata to NULL in the case of unset b_daddr
Andriy Gapon [Mon, 13 Jun 2016 18:39:13 +0000 (18:39 +0000)]
l2arc: reset b_tmp_cdata to NULL in the case of unset b_daddr

The change is in arc_buf_l2_cdata_free().
Without this we can trip the assertion in arc_hdr_realloc()
if INVARIANTS option is enabled.

Approved by: re (kib)
MFC after: 1 week

8 years agoDo not define __NO_STRICT_ALIGNMENT for armv6. While the requirements
Ian Lepore [Mon, 13 Jun 2016 16:48:27 +0000 (16:48 +0000)]
Do not define __NO_STRICT_ALIGNMENT for armv6.  While the requirements
are no longer natural-alignment strict, there are still some restrictions.

FreeBSD network code assumes data is naturally-aligned or is running
on a platform with no restrictions; pointers are not annotated to
indicate the data pointed to may be packed or unaligned.  The clang
optimizer can sometimes combine the load or store of a pair of adjacent
32-bit values into a single doubleword load/store, and that operation
requires at least 4-byte alignment.  __NO_STRICT_ALIGNMENT can lead
to tcp headers being only 2-byte aligned.

Note that alignment faults remain disabled on armv6, this change reverts
only the defining of the symbol which leads to some overly-agressive code
shortcuts when building common/shared drivers and network code for arm.

Approved by: re(kib)

8 years agoAdd missing break in lock_partialfilelock(..) with NFS_RESERR
Enji Cooper [Mon, 13 Jun 2016 11:19:06 +0000 (11:19 +0000)]
Add missing break in lock_partialfilelock(..) with NFS_RESERR

This will help ensure that the right error is trickled up when the
function is called if the lock status is NFS_RESERR

Differential Revision: https://reviews.freebsd.org/D6622
Reviewed by: rmacklem
Approved by: re (gjb)
Tested with: fsx; svn info/svnversion (uses bdb locking); locktests from Bull http://nfsv4.bullopensource.org/tools/tests/locktest.php
MFC after: 2 weeks
Reported by: Coverity
CID: 10081611304956
Sponsored by: EMC / Isilon Storage Division

8 years agozfs_vptocnp: check for an invalid znode
Andriy Gapon [Mon, 13 Jun 2016 10:53:34 +0000 (10:53 +0000)]
zfs_vptocnp: check for an invalid znode

... which can arise after the receive or rollback
and failed zfs_rezget().

Approved by: re (kib)
MFC after: 1 week

8 years agoChange my given name from "Garrett" to "Ngie"
Enji Cooper [Mon, 13 Jun 2016 10:35:11 +0000 (10:35 +0000)]
Change my given name from "Garrett" to "Ngie"

A legal name change from "Garrett" to "Ngie", as well as a FreeBSD
account name change, is pending.

Approved by: re (hrs)

8 years agoChange my given name from "Garrett" to "Ngie"
Enji Cooper [Mon, 13 Jun 2016 10:30:49 +0000 (10:30 +0000)]
Change my given name from "Garrett" to "Ngie"

A legal name change from "Garrett" to "Ngie", as well as a FreeBSD
account name change, is pending.

Approved by: re (hrs)

8 years agoImplement AUE_PREAD and AUE_PWRITE BSM conversion support, eliminating
Robert Watson [Mon, 13 Jun 2016 09:22:20 +0000 (09:22 +0000)]
Implement AUE_PREAD and AUE_PWRITE BSM conversion support, eliminating
console warnings when pread(2) and pwrite(2) are used with full
system-call auditing enabled.  We audit the same file-descriptor data
for these calls as we do read(2) and write(2).

Approved by: re (kib)
MFC after: 3 days
Sponsored by: DARPA, AFRL

8 years agoDo not access pv_table array for fictitious pages, since the array
Konstantin Belousov [Mon, 13 Jun 2016 03:45:08 +0000 (03:45 +0000)]
Do not access pv_table array for fictitious pages, since the array
does not cover the dynamically registered ficititious ranges, and
fictitious pages mappings are not promoted.  Offer a dummy struct
md_page to fetch constant superpage pv list generation to satisfy
logic.  Also, by initializing the pv_dummy pv_list to empty, we can
remove several explicit PG_FICTITIOUS tests.

Reported and tested by: Michael Butler <imb@protected-networks.net>
(previous version)
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D6728
Approved by: re (hrs)

8 years agoFix inconsistent locking of the swap pager named objects list.
Konstantin Belousov [Mon, 13 Jun 2016 03:42:46 +0000 (03:42 +0000)]
Fix inconsistent locking of the swap pager named objects list.

Right now, all modifications of the list are locked by sw_alloc_mtx.
But initial lookup of the object by the handle in swap_pager_alloc()
is not protected by sw_alloc_mtx, which means that
vm_pager_object_lookup() could follow freed pointer.

Create a new named swap object with the OBJT_SWAP type, instead
of OBJT_DEFAULT.  With this change, swp_pager_meta_build() never need
to upgrade named OBJT_DEFAULT to OBJT_SWAP (in the other place, we do
not forbid for client code to create named OBJT_DEFAULT objects at
all).

That change allows to remove sw_alloc_mtx and make the list locked by
sw_alloc_sx lock.  Update swap_pager_copy() to new locking mode.

Create helper swap_pager_alloc_init() to consolidate named and
anonymous swap objects creation, while a caller ensures that the
neccesary locks are held around the helper.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Approved by: re (hrs)

8 years agoExplicitely initialize sw_alloc_sx. Currently it is not initialized
Konstantin Belousov [Mon, 13 Jun 2016 03:39:16 +0000 (03:39 +0000)]
Explicitely initialize sw_alloc_sx.  Currently it is not initialized
but works due to zeroed out bss on startup.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (hrs)

8 years ago[mips] set hardfloat for fpu instruction generation for gcc/binutils 5.x
Adrian Chadd [Mon, 13 Jun 2016 03:17:00 +0000 (03:17 +0000)]
[mips] set hardfloat for fpu instruction generation for gcc/binutils 5.x

This allows -HEAD to be compiled again using the gcc-5 mips port compiler.

Reviewed by: imp
Approved by: re@

8 years agoFix compile warning.
Hans Petter Selasky [Mon, 13 Jun 2016 01:33:02 +0000 (01:33 +0000)]
Fix compile warning.

Approved by: re (delphij)
MFC after: 1 week

8 years ago[iwm] Fix up busdma use in the RX path
Adrian Chadd [Mon, 13 Jun 2016 00:13:20 +0000 (00:13 +0000)]
[iwm] Fix up busdma use in the RX path

When allocating a new mbuf or bus_dmamap_load()-ing it fails,
we can just keep the old mbuf since we are dropping that packet anyway.
Instead of doing bus_dmamap_create() and bus_dmamap_destroy() all the time,
create an extra bus_dmamap_t which we can use to safely try
bus_dmamap_load()-ing the new mbuf. On success we just swap the spare
bus_dmamap_t with the data->map of that ring entry.

Tested:

Tested with Intel AC7260, verified with vmstat -m that new kernel no
longer visibly leaks memory from the M_DEVBUF malloc type.
Before, leakage was 1KB every few seconds while ping(8)-ing over the wlan
connection.

Submitted by: Imre Vadasz <imre@vdsz.com>
Approved by: re@
Obtained from: DragonflyBSD.git cc440b26818b5dfdd9af504d71c1b0e6522b53ef
Differential Revision: https://reviews.freebsd.org/D6742

8 years agoDon't close fd if it's lower then stderr, otherwise we can close
Mariusz Zaborski [Mon, 13 Jun 2016 00:03:55 +0000 (00:03 +0000)]
Don't close fd if it's lower then stderr, otherwise we can close
one of the descriptor which we just set.

Pointed out by: jilles
Approved by: re (hrs)

8 years agoAdd ipfilter support to blacklistd-helper
Kurt Lidl [Sun, 12 Jun 2016 23:34:48 +0000 (23:34 +0000)]
Add ipfilter support to blacklistd-helper

In addition to adding initial support for the ipfilter
packet filtering system, wrap a few long lines, perform
whitespace cleanup and sync with upstream changes made
in NetBSD.

Submitted by: cy
Reviewed by: cy
Approved by: re (hrs)
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6823

8 years agoImplement code to stop all USB endpoints before executing a USB device
Hans Petter Selasky [Sun, 12 Jun 2016 23:26:38 +0000 (23:26 +0000)]
Implement code to stop all USB endpoints before executing a USB device
reset command, alternate setting command or set configuration
command. Else LibUSB v1.0 will not re-open the endpoints which the
kernel closes and the USB application might wait infinitely for
transfers to complete.

Approved by: re (hrs)
MFC after: 3 days

8 years agoFix an issue with multicast hash filters on Amlogic and Allwinner boards.
Jared McNeill [Sun, 12 Jun 2016 22:55:50 +0000 (22:55 +0000)]
Fix an issue with multicast hash filters on Amlogic and Allwinner boards.

For DWC_GMAC_ALT_DESC implementations, the multicast hash table has only
64 entries. Instead of 8 registers starting at 0x500, a pair of registers
at 0x08 and 0x0c are used instead.

Approved by: re (hrs)
Submitted by: Guy Yur <guyyur@gmail.com>

8 years agoswap_dev_info() does not require Giant, so Giant locking around
Konstantin Belousov [Sun, 12 Jun 2016 11:13:38 +0000 (11:13 +0000)]
swap_dev_info() does not require Giant, so Giant locking around
the loop in linprocfs_doswaps() is useless.
List of the registered filesystems is protected by vfsconf_sx,
not by the Giant.  Adjust linprocfs_dofilesystems() correspondingly.

Approved by: re (delphij), des (linprocfs maintainer)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoUpdate 11.0 to ALPHA3 in preparation for new snapshot builds.
Glen Barber [Fri, 10 Jun 2016 19:29:55 +0000 (19:29 +0000)]
Update 11.0 to ALPHA3 in preparation for new snapshot builds.

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

8 years agoChange the default build behavior so we don't compile extra TCP modules by
Jonathan T. Looney [Fri, 10 Jun 2016 19:06:11 +0000 (19:06 +0000)]
Change the default build behavior so we don't compile extra TCP modules by
default. At least initially, the feature to support multiple TCP stacks is
aimed at supporting advanced use cases and TCP development, but it is not
necessarily aimed at a wide audience. Therefore, there is no need to build
and install the extra TCP stacks by default. Instead, the people who are
using or developing this functionality can add the extra option to build/
install the extra TCP stacks.

However, we do want to build the extra TCP stacks as part of test builds
(e.g. LINT or tinderbox) to ensure that developers who are testing their
changes will know that their changes do not break the additional TCP
stack modules.

After this change, a user will need to add WITH_EXTRA_TCP_STACKS=1 to
make.conf or the kernel config in order to build the extra TCP modules.

Differential Revision: https://reviews.freebsd.org/D6795
Reviewed by: sjg
Approved by: re (kib)

8 years agoDeobfuscate cleanup path in clnt_bck_create(..)
Enji Cooper [Fri, 10 Jun 2016 17:53:28 +0000 (17:53 +0000)]
Deobfuscate cleanup path in clnt_bck_create(..)

Similar to r300836, cl and ct will always be non-NULL as they're allocated
using the mem_alloc routines, which always use `malloc(..., M_WAITOK)`.

Deobfuscating the cleanup path fixes a leak where if cl was NULL and
ct was not, ct would not be free'd, and also removes a duplicate test for
cl not being NULL.

Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D6801
MFC after: 1 week
Reported by: Coverity
CID: 1229999
Reviewed by: cem
Sponsored by: EMC / Isilon Storage Division

8 years agoRelnotes entries for blacklist project
Kurt Lidl [Fri, 10 Jun 2016 15:05:35 +0000 (15:05 +0000)]
Relnotes entries for blacklist project

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

8 years agoFix a miss merge in the services_mkdb(8) man page
Allan Jude [Fri, 10 Jun 2016 14:59:11 +0000 (14:59 +0000)]
Fix a miss merge in the services_mkdb(8) man page

Restore the cross reference to getservent(3) to the correct line

Approved by: re (gjb)
Sponsored by: BSDCan Hacker Lounge

8 years agoFix bsdinstall for root-on-zfs with MBR partitioning
Allan Jude [Fri, 10 Jun 2016 14:31:59 +0000 (14:31 +0000)]
Fix bsdinstall for root-on-zfs with MBR partitioning

Fix an error where vfs.root.mountfrom was not always set as required
when creating a bootpool. After the recent geliboot changes, it was only
set if the main pool was encrypted.

Also resolve an error where the bootpool was unmounted twice causing
bsdinstall to stop with an error message about the failed command.

Approved by: re (gjb)
Sponsored by: BSDCan Hacker Lounge

8 years ago- Add myself (tz / Torsten Zuehlsdorff) to ports commiters
Torsten Zuehlsdorff [Fri, 10 Jun 2016 08:33:15 +0000 (08:33 +0000)]
- Add myself (tz / Torsten Zuehlsdorff) to ports commiters
- Add mentors junovitch, pi, swills

Approved by: re (gjb), junovitch (mentor)

8 years agoCommit the bits of nda that were missed. This should fix the build.
Warner Losh [Fri, 10 Jun 2016 06:04:53 +0000 (06:04 +0000)]
Commit the bits of nda that were missed. This should fix the build.

Approved by: re@

8 years agoFix regression from r301461.
Pedro F. Giffuni [Fri, 10 Jun 2016 05:21:52 +0000 (05:21 +0000)]
Fix regression from r301461.

The fix to the __collate_range_cmp() ABI breakage missed some replacements
in libc's vfscanf().  Replace them with __wcollate_range_cmp() which
does what is expected.

This was breaking applications like xterm and pidgin when using wide
characters.

Reported by: Vitalij Satanivskij
Approved by: re

8 years agoClarify the wording to be more accurate.
Cy Schubert [Fri, 10 Jun 2016 01:10:48 +0000 (01:10 +0000)]
Clarify the wording to be more accurate.

Approved by: re@ (gjb)
MFC after: 1 week
X-MFC with: r301773

8 years agoUpdate the man ipf.8 man page to accurately reflect that the -6
Cy Schubert [Fri, 10 Jun 2016 00:06:58 +0000 (00:06 +0000)]
Update the man ipf.8 man page to accurately reflect that the -6
option is a noop and only here for backward compatibility.

MFC after: 1 week

8 years agoNew NVMe front end (nda).
Warner Losh [Thu, 9 Jun 2016 22:39:02 +0000 (22:39 +0000)]
New NVMe front end (nda).

8 years agorpcbind(8): Make use of some xdr_* macros.
Pedro F. Giffuni [Thu, 9 Jun 2016 22:25:00 +0000 (22:25 +0000)]
rpcbind(8): Make use of some xdr_* macros.

xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
versions of FreeBSD but fixed in r296394.  Give them some use
hoping they help make the code somewhat more readable.

8 years agolibc/rpc: Make use of some xdr_* macros. (part 2)
Pedro F. Giffuni [Thu, 9 Jun 2016 22:18:25 +0000 (22:18 +0000)]
libc/rpc: Make use of some xdr_* macros. (part 2)

xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
versions of FreeBSD but fixed in r296394.  Give them some use
hoping they help make the code somewhat more readable.

8 years agoutimes(2),utime(3): Add deprecation in favour of utimensat(2) and futimens(2).
Jilles Tjoelker [Thu, 9 Jun 2016 22:14:58 +0000 (22:14 +0000)]
utimes(2),utime(3): Add deprecation in favour of utimensat(2) and futimens(2).

Setting time by seconds or microseconds may cause unexpected effects
especially if sysctl vfs.timestamp_precision=3 (not default).

Calling the obsolete functions with NULL timestamps is acceptable.

8 years ago[ath] add a placeholder event for debuggin EDMA TX FIFO push events.
Adrian Chadd [Thu, 9 Jun 2016 22:01:05 +0000 (22:01 +0000)]
[ath] add a placeholder event for debuggin EDMA TX FIFO push events.

Some later code I'll commit pushes lists of frames into the EDMA TX
FIFO, rather than a single frame at a time.  The CABQ code already
pushes frame lists, but it turns out we should actually be doing it
in general or performance tanks. :(

8 years ago[ath] report node queue overflows.
Adrian Chadd [Thu, 9 Jun 2016 21:59:36 +0000 (21:59 +0000)]
[ath] report node queue overflows.

I need to also update athstats to report this too.

8 years agoinstall: When preserving timestamps, also copy the nanoseconds part.
Jilles Tjoelker [Thu, 9 Jun 2016 21:59:35 +0000 (21:59 +0000)]
install: When preserving timestamps, also copy the nanoseconds part.

Now that we have utimensat in -legacy, install(1) can use it.

This is a revert of r299942 which is itself a revert of r299850.

8 years agoFix a vnode leak when giving a child jail a too-long path when
Jamie Gritton [Thu, 9 Jun 2016 21:59:11 +0000 (21:59 +0000)]
Fix a vnode leak when giving a child jail a too-long path when
debug.disablefullpath=1.

8 years agobuild: Add legacy support for futimens() and utimensat().
Jilles Tjoelker [Thu, 9 Jun 2016 21:57:34 +0000 (21:57 +0000)]
build: Add legacy support for futimens() and utimensat().

In order to allow using utimensat() in install(1), add futimens() and
utimensat() to -legacy.

The files futimens.c and utimensat.c are modified copies of the files under
lib/libc/sys/ since the libc versions use symbols that do not exist in the
libc on the build system (sys_futimens and sys_utimensat) . I expect the
next non-sweeping change to both sets of files to be to delete them, anyway.

This will allow reverting r299942 (which is a revert of r299850) enabling
nanosecond timestamps in install(1).

Reviewed by: bdrewery

8 years agourtwn: reinstall group keys on every device startup.
Andriy Voskoboinyk [Thu, 9 Jun 2016 21:19:46 +0000 (21:19 +0000)]
urtwn: reinstall group keys on every device startup.

Since key table is cleared on every device shutdown,
static WEP keys (which are set only once) need to be
reinstalled manually every time when device starts running.

Tested with RTL8188EU, STA (all ciphers) / IBSS (WPA-none) modes.

8 years agoFix frexpl() declaration to not include the field name.
Edward Tomasz Napierala [Thu, 9 Jun 2016 20:49:26 +0000 (20:49 +0000)]
Fix frexpl() declaration to not include the field name.

MFC after: 1 month

8 years agoRe-order some jail parameter reading to prevent a vnode leak.
Jamie Gritton [Thu, 9 Jun 2016 20:43:14 +0000 (20:43 +0000)]
Re-order some jail parameter reading to prevent a vnode leak.

8 years agoUpdate to latest upstream version
Dag-Erling Smørgrav [Thu, 9 Jun 2016 20:40:12 +0000 (20:40 +0000)]
Update to latest upstream version

PR: 209177
Reported by: Vitaly Magerya
MFC after: 1 week

8 years agoClean up some logic in jail error messages, replacing a missing test and
Jamie Gritton [Thu, 9 Jun 2016 20:39:57 +0000 (20:39 +0000)]
Clean up some logic in jail error messages, replacing a missing test and
a redundant test with a single correct test.

8 years agoDefine tunable instead of using CTLFLAG_RWTUN flag with kern.corefile.
Mariusz Zaborski [Thu, 9 Jun 2016 20:23:30 +0000 (20:23 +0000)]
Define tunable instead of using CTLFLAG_RWTUN flag with kern.corefile.

The allproc_lock lock used in the sysctl_kern_corefile function is initialized
in the procinit function which is called after setting sysctl values at boot.
That means if we set kern.corefile at boot we will be trying to use
lock with is uninitialized and machine will crash.

If we define kern.corefile as tunable instead of using CTFLAG_RWTUN we will
not call the sysctl_kern_corefile function and we will not use an uninitialized
lock. When machine will boot then we will start using function depending on
the lock.

Reviewed by: pjd

8 years agoupstream hg 0289cde234a0
Dag-Erling Smørgrav [Thu, 9 Jun 2016 20:02:31 +0000 (20:02 +0000)]
upstream hg 0289cde234a0

8 years agolibc/rpc: Make use of some xdr_* macros.
Pedro F. Giffuni [Thu, 9 Jun 2016 19:44:47 +0000 (19:44 +0000)]
libc/rpc: Make use of some xdr_* macros.

xdr_rpcprog and xdr_rpcvers were broken in older versions of FreeBSD
but were fixed in r296394. Give them some use hoping they help make
the code somewhat more readable.

8 years agoFix up r274061
Enji Cooper [Thu, 9 Jun 2016 19:12:51 +0000 (19:12 +0000)]
Fix up r274061

Detect /usr/share/dict/words the "right way" by using require.files instead of
the hacked up attempt in the dict(..) function, which didn't work properly on
systems where MK_DICT == no.

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

8 years agoUpdate `goodResult` after recent changes made to the PRNG in libc
Enji Cooper [Thu, 9 Jun 2016 18:35:37 +0000 (18:35 +0000)]
Update `goodResult` after recent changes made to the PRNG in libc

The PRNG was changed in r300953/r300956, and subsequently, the numbers
generated have changed. This is expected ABI breakage per ache

X-MFC with: r300953, r300956
Tested with: amd64, i386
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd DDB command "kldstat"
Conrad Meyer [Thu, 9 Jun 2016 18:27:41 +0000 (18:27 +0000)]
Add DDB command "kldstat"

It prints much the same information as kldstat(8) without any arguments.

Suggested by: jhibbits
Sponsored by: EMC / Isilon Storage Division

8 years agokvprintf: Pad %*c to width, like %*s
Conrad Meyer [Thu, 9 Jun 2016 18:24:51 +0000 (18:24 +0000)]
kvprintf: Pad %*c to width, like %*s

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd debug output to aid in determining why `goodResult` != `result`
Enji Cooper [Thu, 9 Jun 2016 18:11:42 +0000 (18:11 +0000)]
Add debug output to aid in determining why `goodResult` != `result`

MFC after: 1 week
PR: 210619 (for diagnosis)
Sponsored by: EMC / Isilon Storage Division

8 years agourtwn(4): refresh manpage.
Andriy Voskoboinyk [Thu, 9 Jun 2016 17:26:54 +0000 (17:26 +0000)]
urtwn(4): refresh manpage.

Mention URTWN_WITHOUT_UCODE option (r295871), hardware encryption support
(r292175), IBSS (r290651) and HOSTAP (r290631) mode support;
cleanup CAVEATS section (some 11n support was added in r297175 + add a
note about current rate control issues).

8 years agoAdd PCDuino3b dts. It uses the pcduino3 dts from upstream and adds the hdmi node...
Emmanuel Vadot [Thu, 9 Jun 2016 17:10:19 +0000 (17:10 +0000)]
Add PCDuino3b dts. It uses the pcduino3 dts from upstream and adds the hdmi node, axp gpio and changes the phy mode to rgmii.

Approved by: andrew (mentor)
Differential Revision: https://reviews.freebsd.org/D6775

8 years agoUse -L to specify compat32 library paths instead of -Y
Ed Maste [Thu, 9 Jun 2016 17:03:03 +0000 (17:03 +0000)]
Use -L to specify compat32 library paths instead of -Y

-Y is an uncommon linker option that is rather similar to -L.  In
discussion with Peter it seems early amd64 development might have
required the -Y-specific behaviour, but it is no longer necessary.

Switch to -L which is more widely supported and much more commonly
used, to make it easier to link the FreeBSD base system with linkers
other than ld.bfd.

Submitted by: Rafael Ávila de Espíndola
Differential Revision: https://reviews.freebsd.org/D6681

8 years agoMake sure the OSD methods for jail set and remove can't run concurrently,
Jamie Gritton [Thu, 9 Jun 2016 16:41:41 +0000 (16:41 +0000)]
Make sure the OSD methods for jail set and remove can't run concurrently,
by holding allprison_lock exclusively (even if only for a moment before
downgrading) on all paths that call PR_METHOD_REMOVE.  Since they may run
on a downgraded lock, it's still possible for them to run concurrently
with PR_METHOD_GET, which will need to use the prison lock.

8 years agoxen/timer: re-introduce the inittodr call in the resume path
Roger Pau Monné [Thu, 9 Jun 2016 16:15:01 +0000 (16:15 +0000)]
xen/timer: re-introduce the inittodr call in the resume path

r298930 removed the inittodr call, but it seems like this prevents
"calcru: runtime went backwards ..." messages from occasionally appearing
when resuming from migration.

Reported by: Karl Pielorz <kpielorz@tdx.co.uk>
Sponsored by: Citrix Systems R&D

8 years agoAdd place holder for SDIO CAM stuff for CCB XPT type.
Warner Losh [Thu, 9 Jun 2016 16:05:56 +0000 (16:05 +0000)]
Add place holder for SDIO CAM stuff for CCB XPT type.

Sponsored by: Netflix

8 years agoAdd NVME IO type.
Warner Losh [Thu, 9 Jun 2016 16:05:49 +0000 (16:05 +0000)]
Add NVME IO type.

8 years agoImprove debugging of xpt.
Warner Losh [Thu, 9 Jun 2016 16:05:40 +0000 (16:05 +0000)]
Improve debugging of xpt.

Sponsored by: Netflix

8 years agoRemove a comment that was part of copied code, and is misleading in
Jamie Gritton [Thu, 9 Jun 2016 15:34:33 +0000 (15:34 +0000)]
Remove a comment that was part of copied code, and is misleading in
the new location.

8 years agoAdd IPFW support to blacklistd-helper
Kurt Lidl [Thu, 9 Jun 2016 15:19:48 +0000 (15:19 +0000)]
Add IPFW support to blacklistd-helper

Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6753

8 years agoRevert previous commit, until issue with sparc64 resolved.
Simon J. Gerraty [Thu, 9 Jun 2016 14:44:05 +0000 (14:44 +0000)]
Revert previous commit, until issue with sparc64 resolved.

Approved by: so (implicit)

8 years agoFix the rpcb_getaddr() definition to match its declaration.
Kevin Lo [Thu, 9 Jun 2016 14:33:00 +0000 (14:33 +0000)]
Fix the rpcb_getaddr() definition to match its declaration.

Submitted by: Sebastian Huber <sebastian dot huber at embedded-brains dot de>

8 years agorum(4): refresh manpage.
Andriy Voskoboinyk [Thu, 9 Jun 2016 14:18:12 +0000 (14:18 +0000)]
rum(4): refresh manpage.

Add a note about hardware encryption support (r288633),
adhoc-demo mode (r288622) and remove BUGS section (fixed in r288632).

8 years agoSwitch from console="comconsole" to boot_multicons="YES" in EC2.
Colin Percival [Thu, 9 Jun 2016 13:58:31 +0000 (13:58 +0000)]
Switch from console="comconsole" to boot_multicons="YES" in EC2.

Amazon recently introduced an API for capturing screenshots of an
emulated VGA device; this commit makes that (somewhat) useful.

MFC after: 3 weeks

8 years agonet80211: discard an injected frame if it is smaller than header length.
Andriy Voskoboinyk [Thu, 9 Jun 2016 13:42:18 +0000 (13:42 +0000)]
net80211: discard an injected frame if it is smaller than header length.

Do not try to pass such frames; a correct frame cannot be smaller than
(the corresponding) header size.
(for wpi(4) an additional check was added in r289012).

PR: 144987

8 years agoDocument 292432, OpenBSM updated to version 1.2 alpha 4.
Steven Kreuzer [Thu, 9 Jun 2016 13:36:31 +0000 (13:36 +0000)]
Document 292432, OpenBSM updated to version 1.2 alpha 4.

Approved by: re (gjb, implicit, relnotes)

8 years agoDocument 300879, acpica updated to version 20160527
Steven Kreuzer [Thu, 9 Jun 2016 13:33:13 +0000 (13:33 +0000)]
Document 300879, acpica updated to version 20160527

Approved by: re (gjb, implicit, relnotes)

8 years agoDocument 291125, xz updated to version 5.2.2
Steven Kreuzer [Thu, 9 Jun 2016 13:23:13 +0000 (13:23 +0000)]
Document 291125, xz updated to version 5.2.2

Approved by: re (gjb, implicit, relnotes)

8 years agoFix some cosmetic issues in kern_fail.c omitted from r296927.
Mark Johnston [Thu, 9 Jun 2016 13:17:08 +0000 (13:17 +0000)]
Fix some cosmetic issues in kern_fail.c omitted from r296927.

Obtained from: Matthew Bryan <matthew.bryan@isilon.com>

8 years agoConsistently use 'unsigned int' for session IDs.
Edward Tomasz Napierala [Thu, 9 Jun 2016 13:04:57 +0000 (13:04 +0000)]
Consistently use 'unsigned int' for session IDs.

MFC after: 1 month

8 years agosfxge(4): bump version to the closest out-of-tree driver version
Andrew Rybchenko [Thu, 9 Jun 2016 12:33:53 +0000 (12:33 +0000)]
sfxge(4): bump version to the closest out-of-tree driver version

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): handle negative ticks difference correctly
Andrew Rybchenko [Thu, 9 Jun 2016 12:29:03 +0000 (12:29 +0000)]
sfxge(4): handle negative ticks difference correctly

ticks are signed int and if statistics is not updated for a long time
(more than INT_MAX ticks, but less than UINT_MAX) difference becomes
negative and less than hz for a long time.

Other option to repeat is simply load driver (which initializes
timestamps to 0) when ticks are negative.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6777

8 years agoAdd some spares to structs used by iscsi(4), to avoid ABI problems
Edward Tomasz Napierala [Thu, 9 Jun 2016 11:39:50 +0000 (11:39 +0000)]
Add some spares to structs used by iscsi(4), to avoid ABI problems
during 11-STABLE.

MFC after: 1 month

8 years agonet80211: fix duplicate packet counter incrementation.
Andriy Voskoboinyk [Thu, 9 Jun 2016 08:19:42 +0000 (08:19 +0000)]
net80211: fix duplicate packet counter incrementation.

Remove 'if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);' from raw xmit
and apbridge path; it will be incremented by ieee80211_tx_complete()
after packet transmission.

Noticed by: Imre Vadasz <imre@vdsz.com>

8 years agoDecouple MaxBurstLength and FirstBurstLength from MaxRecvDataSegmentLength
Edward Tomasz Napierala [Thu, 9 Jun 2016 07:49:20 +0000 (07:49 +0000)]
Decouple MaxBurstLength and FirstBurstLength from MaxRecvDataSegmentLength
reported by the ICL module in iscsid(8).  This harmed performance and was
just wrong.

MFC after: 1 month

8 years agoDon't cap FirstBurstLength to maximum MaxRecvDataSegmentLength claimed
Edward Tomasz Napierala [Thu, 9 Jun 2016 07:19:02 +0000 (07:19 +0000)]
Don't cap FirstBurstLength to maximum MaxRecvDataSegmentLength claimed
by the offload driver; there is no reason to do so, and it actually
harms performance.

MFC after: 1 month

8 years agoFix a bunch of "xref refers to *this* page" igor(1) warnings.
Edward Tomasz Napierala [Thu, 9 Jun 2016 06:55:00 +0000 (06:55 +0000)]
Fix a bunch of "xref refers to *this* page" igor(1) warnings.

MFC after: 1 month

8 years agoUpdate jemalloc to 4.2.1.
Jason Evans [Thu, 9 Jun 2016 06:10:20 +0000 (06:10 +0000)]
Update jemalloc to 4.2.1.

8 years agoCleanup unneded include "opt_ipfw.h".
Andrey V. Elsukov [Thu, 9 Jun 2016 05:48:34 +0000 (05:48 +0000)]
Cleanup unneded include "opt_ipfw.h".

It was used for conditional build IPFIREWALL_FORWARD support.
But IPFIREWALL_FORWARD option was removed a long time ago.

8 years agoAdd 'env - PATH=$$PATH' to bsdec2-image-upload make command, in order to
Colin Percival [Thu, 9 Jun 2016 03:54:25 +0000 (03:54 +0000)]
Add 'env - PATH=$$PATH' to bsdec2-image-upload make command, in order to
avoid environment pollution problems.  That port uses <bsd.prog.mk> but
is not compatible with the latest mk bits in HEAD.

Reported by: gjb
No rush, but make sure it's in the tree before tomorrow by: gjb

8 years agoAdd support for truss'ing Linux/x86_64 binaries under amd64.
John Baldwin [Thu, 9 Jun 2016 02:21:07 +0000 (02:21 +0000)]
Add support for truss'ing Linux/x86_64 binaries under amd64.

Prodding by: xmj

8 years agoPrint a message when the efi disk isn't a logical partition.
Emmanuel Vadot [Thu, 9 Jun 2016 02:02:50 +0000 (02:02 +0000)]
Print a message when the efi disk isn't a logical partition.

Approved by: andrew (mentor)
Differential Revision: https://reviews.freebsd.org/D6782