]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoSet NO_WERROR for unbound until I can figure out how to unbreak the
Dag-Erling Smørgrav [Sun, 15 Sep 2013 16:27:25 +0000 (16:27 +0000)]
Set NO_WERROR for unbound until I can figure out how to unbreak the
non-clang build.

Approved by: re (blanket)

10 years agoMove libldns to the correct (ordered) library list.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 15:55:21 +0000 (15:55 +0000)]
Move libldns to the correct (ordered) library list.

Approved by: re (blanket)

10 years agoRemove duplicate function declaration.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 15:52:07 +0000 (15:52 +0000)]
Remove duplicate function declaration.

Approved by: re (blanket)

10 years agoThe Unbound developers have never met a pointer game they didn't like.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 15:49:17 +0000 (15:49 +0000)]
The Unbound developers have never met a pointer game they didn't like.
Fix needless deconsting.

Approved by: re (blanket)

10 years agoRegnerate.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 15:23:50 +0000 (15:23 +0000)]
Regnerate.

Approved by: re (blanket)

10 years agoBuild and install the Unbound caching DNS resolver daemon.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 14:51:23 +0000 (14:51 +0000)]
Build and install the Unbound caching DNS resolver daemon.

Approved by: re (blanket)

10 years agoAdd a kernel interface (OF_xref_phandle()) for systems where phandles
Nathan Whitehorn [Sun, 15 Sep 2013 14:19:17 +0000 (14:19 +0000)]
Add a kernel interface (OF_xref_phandle()) for systems where phandles
used as cross-references in the device tree and phandles as used by the
Open Firmware client interface are in different namespaces. This include
IBM pSeries hardware as well as FDT systems. FDT certainly abuses
ihandles for this purpose and should be modified to use this API
eventually. This changes no behavior on systems where FreeBSD already
worked.

Reviewed by: marius
Approved by: re (kib)
MFC after: 2 weeks

10 years agoPrevious commit accidentally left out the umask change.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 13:50:56 +0000 (13:50 +0000)]
Previous commit accidentally left out the umask change.

Approved by: re (blanket)

10 years agoSet the correct prefix and exec-prefix.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 13:49:43 +0000 (13:49 +0000)]
Set the correct prefix and exec-prefix.

Approved by: re (blanket)

10 years agoRegenerate.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 13:49:23 +0000 (13:49 +0000)]
Regenerate.

Approved by: re (blanket)

10 years agoThe unbound-control-setup script needs to be generated so it knows where
Dag-Erling Smørgrav [Sun, 15 Sep 2013 13:48:08 +0000 (13:48 +0000)]
The unbound-control-setup script needs to be generated so it knows where
to place the keys.  Also, the correct umask is 027, not 026, although it's
not likely to make any difference.

Approved by: re (blanket)

10 years agoTweak wording.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 13:11:13 +0000 (13:11 +0000)]
Tweak wording.

Approved by: re (blanket)

10 years agoComplete the OPENSSH and LDNS sections.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 13:07:30 +0000 (13:07 +0000)]
Complete the OPENSSH and LDNS sections.

Approved by: re (blanket)

10 years agoAdd unbound-control.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 12:41:05 +0000 (12:41 +0000)]
Add unbound-control.

Approved by: re (blanket)

10 years agoFinal #include tweak.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 11:58:07 +0000 (11:58 +0000)]
Final #include tweak.

Approved by: re (blanket)

10 years agodrm/radeon: Add missing "return false" after unmapping invalid BIOS
Jean-Sébastien Pédron [Sun, 15 Sep 2013 07:48:42 +0000 (07:48 +0000)]
drm/radeon: Add missing "return false" after unmapping invalid BIOS

Without that, we would try to copy the unmapped BIOS.

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Approved by: re (blanket)

10 years agoMassive constification + solve an alignment issue by using a union.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 01:44:07 +0000 (01:44 +0000)]
Massive constification + solve an alignment issue by using a union.

Approved by: re (blanket)

10 years agoAdd missing #includes and fix some incorrect definitions.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 01:32:32 +0000 (01:32 +0000)]
Add missing #includes and fix some incorrect definitions.

Approved by: re (blanket)

10 years agoWholesale constification.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 01:31:55 +0000 (01:31 +0000)]
Wholesale constification.

Approved by: re (blanket)

10 years agoMove more prototypes around, and remove one that wasn't used.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 01:29:00 +0000 (01:29 +0000)]
Move more prototypes around, and remove one that wasn't used.

Approved by: re (blanket)

10 years agoRegenerated lexer and parser
Dag-Erling Smørgrav [Sun, 15 Sep 2013 00:40:46 +0000 (00:40 +0000)]
Regenerated lexer and parser

Approved by: re (blanket)

10 years agoGenerated configuration and documentation
Dag-Erling Smørgrav [Sun, 15 Sep 2013 00:40:21 +0000 (00:40 +0000)]
Generated configuration and documentation

Approved by: re (blanket)

10 years agoForgotten in r255579: #include fixes.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 00:37:30 +0000 (00:37 +0000)]
Forgotten in r255579: #include fixes.

Approved by: re (blanket)

10 years agoNumerous fixes to make Unbound compile cleanly:
Dag-Erling Smørgrav [Sun, 15 Sep 2013 00:36:18 +0000 (00:36 +0000)]
Numerous fixes to make Unbound compile cleanly:

 - cast through void * to silence alignment warnings (presumably false
   positives resulting from poor API design)

 - constify a few function arguments

 - move prototypes for callbacks into a common header

 - now that the prototypes are in scope, fix instances of function
   definitions that don't match the prototype or what the caller
   actually passes

 - hide a conditionally unused global variable behind the same #ifdef
   that controls its use

Approved by: re (blanket)

10 years agoMove prototypes into header.
Dag-Erling Smørgrav [Sun, 15 Sep 2013 00:07:51 +0000 (00:07 +0000)]
Move prototypes into header.

Approved by: re (blanket)

10 years agoTwo helper scripts for porting Unbound:
Dag-Erling Smørgrav [Sun, 15 Sep 2013 00:05:16 +0000 (00:05 +0000)]
Two helper scripts for porting Unbound:

 - freebsd-configure.sh runs ./configure with the correct parameters
   and regenerates the lex and yacc code.

 - freebsd-sources.pl untangles the upstream Makefile and generates
   source lists for our Makefiles.

Approved by: re (blanket)

10 years agoProperly remove c++filt.
Ed Schouten [Sat, 14 Sep 2013 22:09:10 +0000 (22:09 +0000)]
Properly remove c++filt.

The c++filt binary is only installed if ${MK_GCC} == yes && ${MK_CXX} ==
yes. This means that it should be removed if ${MK_GCC} == no ||
${MK_CXX} == no. In its current form, it actually uses a conjunction
instead of a disjunction.

As there is already a separate block for ${MK_CXX} == no listing
c++filt, simply remove the conditional entirely.

Approved by: re (gjb)

10 years agoMinor mdoc fixes.
Joel Dahl [Sat, 14 Sep 2013 21:43:18 +0000 (21:43 +0000)]
Minor mdoc fixes.

Approved by: re (blanket)

10 years agoPull the hyperv drivers from GENERIC until the fix to the disengage
Peter Grehan [Sat, 14 Sep 2013 20:38:22 +0000 (20:38 +0000)]
Pull the hyperv drivers from GENERIC until the fix to the disengage
driver to make it only probe when running on hyperv is reviewed and
tested.

Approved by: re (rodrigc)

10 years agodrm/radeon: Fix usage of pci_save_state() and pci_restore_state()
Jean-Sébastien Pédron [Sat, 14 Sep 2013 17:24:41 +0000 (17:24 +0000)]
drm/radeon: Fix usage of pci_save_state() and pci_restore_state()

Calling those functions with the drmn device as argument causes a panic,
because it's not a direct child of pci$N. They must be called with the
vgapci device instead.

This fix is not enough to make suspend/resume work reliably.

Approved by: re (blanket)

10 years agodrm/radeon: Fix usage of vga_pci_map_bios()
Jean-Sébastien Pédron [Sat, 14 Sep 2013 17:22:34 +0000 (17:22 +0000)]
drm/radeon: Fix usage of vga_pci_map_bios()

vga_pci_(un)map_bios() takes a vgapci device as argument, not a drmn
one. This fixes a bug where the BIOS couldn't be mapped if the device
wasn't the boot display.

Approved by: re (kib; blanket for following drm2/radeon commits)

10 years agovgapci: Use vga_pci_alloc_resource() to map PCI Expansion ROM
Jean-Sébastien Pédron [Sat, 14 Sep 2013 17:17:32 +0000 (17:17 +0000)]
vgapci: Use vga_pci_alloc_resource() to map PCI Expansion ROM

This is cleaner and fixes Video BIOS mapping when the given device isn't
the boot display.

Submitted by: jhb@
Approved by: re (kib)

10 years agoBring in the new iSCSI target and initiator.
Edward Tomasz Napierala [Sat, 14 Sep 2013 15:29:06 +0000 (15:29 +0000)]
Bring in the new iSCSI target and initiator.

Reviewed by: ken (parts)
Approved by: re (delphij)
Sponsored by: FreeBSD Foundation

10 years agoIf the last page of the file is partially full and whole valid
Konstantin Belousov [Sat, 14 Sep 2013 10:11:38 +0000 (10:11 +0000)]
If the last page of the file is partially full and whole valid
portion is invalidated, invalidate the whole page.  Otherwise,
partially valid page appears on a page queue, which is wrong.  This
could only happen for the last page, because only then buffer which
triggered invalidation could not cover the whole page.

Reported and tested by: pho (previous version)
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
Approved by: re (delphij)
MFC after: 2 weeks

10 years agoFix module build when device ata is not in kernel config.
Konstantin Belousov [Sat, 14 Sep 2013 09:53:57 +0000 (09:53 +0000)]
Fix module build when device ata is not in kernel config.

Sponsored by: The FreeBSD Foundation
Build-tested by: gjb
Approved by: re (delphij)

10 years agoCorrect the svn:keywords value.
Konstantin Belousov [Sat, 14 Sep 2013 09:53:36 +0000 (09:53 +0000)]
Correct the svn:keywords value.

Approved by: re (gjb, implicit)

10 years agoAdd svn:keywords property to Makefile.
Konstantin Belousov [Sat, 14 Sep 2013 09:50:45 +0000 (09:50 +0000)]
Add svn:keywords property to Makefile.

Approved by: re (gjb)

10 years agoCorrect my inability to do math and provide a GOOD example.
Sean Bruno [Fri, 13 Sep 2013 21:23:04 +0000 (21:23 +0000)]
Correct my inability to do math and provide a GOOD example.

Approved by: re (implicit)

10 years agoAdd gpio(4) man page to attempt to document the current hints based setup of
Sean Bruno [Fri, 13 Sep 2013 19:55:40 +0000 (19:55 +0000)]
Add gpio(4) man page to attempt to document the current hints based setup of
pin outputs, functions and setup.

Add cross reference in gpioctl(8) for people to find.

This is by no means complete and really only covers gpioled(4) and the
Atheros based systems who expose a few extra hints at boot time.

This should be updated by developers who know more about this system than
I and viewed as the beginning of documentation, not the end.

Reviewed by: adrian
Approved by: re (joel)
MFC after: 2 weeks

10 years agoUse TAILQ instead of STAILQ for kqeueue filedescriptors to ensure constant
Konstantin Belousov [Fri, 13 Sep 2013 19:50:50 +0000 (19:50 +0000)]
Use TAILQ instead of STAILQ for kqeueue filedescriptors to ensure constant
time removal on kqueue close.

Reported and tested by: pho
Reviewed by: jmg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (delphij)

10 years agomdoc: remove EOL whitespace.
Joel Dahl [Fri, 13 Sep 2013 19:19:21 +0000 (19:19 +0000)]
mdoc: remove EOL whitespace.

Approved by: re (blanket)

10 years agomdoc: fix list width.
Joel Dahl [Fri, 13 Sep 2013 19:08:10 +0000 (19:08 +0000)]
mdoc: fix list width.

Approved by: re (blanket)

10 years agoImport Hyper-V paravirtualized drivers from projects/hyperv
Peter Grehan [Fri, 13 Sep 2013 18:47:58 +0000 (18:47 +0000)]
Import Hyper-V paravirtualized drivers from projects/hyperv
branch into head.

Approved by: re@ (hrs)
Obtained from: Microsoft, NetApp, and Citrix.

10 years agoUnregister inet/inet6 pfil hooks on vnet destroy.
Mikolaj Golub [Fri, 13 Sep 2013 18:45:10 +0000 (18:45 +0000)]
Unregister inet/inet6 pfil hooks on vnet destroy.

Discussed with: andre
Approved by: re (rodrigc)

10 years agoImprove readelf notes output for Linux ELF files
Ed Maste [Fri, 13 Sep 2013 18:21:31 +0000 (18:21 +0000)]
Improve readelf notes output for Linux ELF files

Add four ELF note constants:
- NT_FILE and NT_SIGINFO (core file notes output by recent Linux kernels)
- NT_GNU_ABI_TAG (was incorrectly reported as NT_VERSION)
- NT_GNU_BUILD_ID (used for locating standalone debug files)

Approved by: re (kib)

10 years agoadd support for writing the pid of the daemon program to a pid file so
John-Mark Gurney [Fri, 13 Sep 2013 16:57:28 +0000 (16:57 +0000)]
add support for writing the pid of the daemon program to a pid file so
that daemon can be used w/ rc.subr and ports can use the additional
functionality, such as keeping the ldap daemon up and running, and have
the proper program to signal to exit..

PR: bin/181341
Submitted by: feld
Approved by: re (glebius)

10 years agoNote about the OpenSSH change.
Dag-Erling Smørgrav [Fri, 13 Sep 2013 10:37:24 +0000 (10:37 +0000)]
Note about the OpenSSH change.

Approved by: re (gjb)

10 years agoWhen opening or closing fifo, ensure that the vnode is locked
Konstantin Belousov [Fri, 13 Sep 2013 06:52:23 +0000 (06:52 +0000)]
When opening or closing fifo, ensure that the vnode is locked
exclusively.  Filesystems are assumed to disable shared locking for
the fifo vnode locks, but some do not.

Reported and tested by: olgeni
Discussed with: avg
Sponsored by:   The FreeBSD Foundation
MFC after: 1 week
Approved by: re (glebius)

10 years agoReduce the scope of the proctree_lock. If several processes cause
Konstantin Belousov [Fri, 13 Sep 2013 06:39:10 +0000 (06:39 +0000)]
Reduce the scope of the proctree_lock. If several processes cause
continuous calls to the uprintf(9), the proctree_lock could be
shared-locked for indefinite amount of time, starving exclusive
requests. Since proctree_lock is needed for fork() and exit(), this
effectively stops the machine.

While there, do the similar reduction for tprintf(9).

Reported and tested by: pho
Reviewed by:    ed
Sponsored by:   The FreeBSD Foundation
MFC after: 1 week
Approved by: re (glebius)

10 years agoDo not install freebsd-update.conf.5 manual if WITHOUT_FREEBSD_UPDATE is
Glen Barber [Fri, 13 Sep 2013 03:39:19 +0000 (03:39 +0000)]
Do not install freebsd-update.conf.5 manual if WITHOUT_FREEBSD_UPDATE is
set.

MFC after: 3 days
Approved by: re (delphij)
Sponsored by: The FreeBSD Foundation

10 years agoChange VM object lock assertion to match locking higher in the call
Nathan Whitehorn [Fri, 13 Sep 2013 01:12:45 +0000 (01:12 +0000)]
Change VM object lock assertion to match locking higher in the call
chain. This repairs a panic observed during pageout on some 64-bit
PowerPC systems.

Submitted by: grehan
Approved by: re (kib)
MFC after: 2 weeks
Revisit after: 10.0

10 years agoFix an issue that caused Integrated RAID volumes on LSI mps(4) controllers
Kenneth D. Merry [Thu, 12 Sep 2013 22:06:12 +0000 (22:06 +0000)]
Fix an issue that caused Integrated RAID volumes on LSI mps(4) controllers
to not get scanned on boot.

The problem originated in change 253549.  With the change to the mps(4)
driver to scan only targets that it knows it has (as opposed to scanning
the entire bus), scanning RAID volumes on boot was omitted.

So, for versions of FreeBSD that have the scanning changes
(__FreeBSD_version 1000039 and higher), scan RAID volumes that are added
whether or not we're booting.

PR: kern/181784
Reported by: Xiguang Wang <kurapica@gmail.com>
Tested by: Dennis Glatting <dg@pki2.com>
Sponsored by: Spectra Logic
Approved by: re (delphij)
MFC After: 3 days

10 years agoAfter r255321, clang uses libc++ by default. This leads to a lot of
Dimitry Andric [Thu, 12 Sep 2013 21:24:59 +0000 (21:24 +0000)]
After r255321, clang uses libc++ by default.  This leads to a lot of
errors when you enable WITH_GNUCXX to build libstdc++, since it will
include C++ headers from the libc++ installation under ${WORLDTMP}, and
those are not compatible with libstdc++ at all.

To fix this, add -stdlib=libstdc++ to CXXFLAGS when building libstdc++
(and its companion libsupc++) with clang.

Approved by: re (delphij)

10 years agoAfter r255294, building lib/msun's symbol map (using clang as the
Dimitry Andric [Thu, 12 Sep 2013 20:51:48 +0000 (20:51 +0000)]
After r255294, building lib/msun's symbol map (using clang as the
preprocessor) gives the following error:

--- Version.map ---
<stdin>:287:4: error: invalid preprocessing directive
        # Implemented as weak aliases for imprecise versions
          ^
1 error generated.

Change the comment to a C-style one, to prevent this error.

Approved by: re (hrs)

10 years ago- Document the UQUAD sysctl variants.
John Baldwin [Thu, 12 Sep 2013 20:49:20 +0000 (20:49 +0000)]
- Document the UQUAD sysctl variants.
- Clarify that exactly one of the "access" flags is required and
  list the optional flags in a separate list.  Prefer bundling
  CTLFLAG_TUN into the access flag by not documenting it as an
  optional flag to set.

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

10 years agoFix an off-by-one error when populating mincore(2) entries for
John Baldwin [Thu, 12 Sep 2013 20:46:32 +0000 (20:46 +0000)]
Fix an off-by-one error when populating mincore(2) entries for
skipped entries.  lastvecindex references the last valid byte,
so the new bytes should come after it.

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

10 years agoFix a typo.
John Baldwin [Thu, 12 Sep 2013 19:52:23 +0000 (19:52 +0000)]
Fix a typo.

Approved by: re (gjb)

10 years agoDocument several recent changes to vm_map_find(9):
John Baldwin [Thu, 12 Sep 2013 19:51:40 +0000 (19:51 +0000)]
Document several recent changes to vm_map_find(9):
- Document the max_addr parameter that restricts mappings to a subset of
  the map's address space.
- Document VMFS_ALIGNED_SPACE and update for the rename of VMFS_SUPER_SPACE.
  In addition, use a table that describes the different find space
  strategies in more detail.

Reviewed by: alc
Approved by: re (kib)

10 years ago- Decode the idtype argument passed to wait6() in kdump and truss.
John Baldwin [Thu, 12 Sep 2013 18:08:25 +0000 (18:08 +0000)]
- Decode the idtype argument passed to wait6() in kdump and truss.
- Don't treat an options argument of 0 to wait4() as an error in
  kdump.
- Decode the wait options passed to wait4() and wait6() in truss
  and decode the returned rusage and exit status.

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

10 years agoRegen.
John Baldwin [Thu, 12 Sep 2013 18:03:51 +0000 (18:03 +0000)]
Regen.

Approved by: re (kib)

10 years agoFix the type of the idtype argument to wait6() in syscalls.master.
John Baldwin [Thu, 12 Sep 2013 18:01:13 +0000 (18:01 +0000)]
Fix the type of the idtype argument to wait6() in syscalls.master.

(Accidentally missed this in the previous commit)

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

10 years agoFix the type of the idtype argument to wait6() in syscalls.master.
John Baldwin [Thu, 12 Sep 2013 17:52:18 +0000 (17:52 +0000)]
Fix the type of the idtype argument to wait6() in syscalls.master.

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

10 years agoUpdate head/ to -ALPHA1 status, as part of the 10.0-RELEASE
Glen Barber [Thu, 12 Sep 2013 17:51:18 +0000 (17:51 +0000)]
Update head/ to -ALPHA1 status, as part of the 10.0-RELEASE
cycle.

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

10 years agoDon't issue USB resume signalling in USB device mode, if the USB power
Hans Petter Selasky [Thu, 12 Sep 2013 10:39:38 +0000 (10:39 +0000)]
Don't issue USB resume signalling in USB device mode, if the USB power
mode is ON and suspend is detected. This confuses iPads running in USB
host mode at least.

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

10 years agoWe are exceeding default limit (256) of bracket nesting and clang does not like
Hiren Panchasara [Thu, 12 Sep 2013 02:31:32 +0000 (02:31 +0000)]
We are exceeding default limit (256) of bracket nesting and clang does not like
it. We should probably fix the code but appeasing clang with this fix for now.
gcc does not have such limit.

Reviewed by: jmg
Approved by: re (hrs), sbruno (mentor, implicit)

10 years agoConsistently reference file descriptors as "fd". 55 other manpages
Bryan Drewery [Thu, 12 Sep 2013 00:53:38 +0000 (00:53 +0000)]
Consistently reference file descriptors as "fd". 55 other manpages
used "fd", while these used "d" and "filedes".

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

10 years agoFix make bootstrapping with WITH_DEBUG_FILES=
Ed Maste [Thu, 12 Sep 2013 00:23:09 +0000 (00:23 +0000)]
Fix make bootstrapping with WITH_DEBUG_FILES=

A HEAD buildworld on 9.x first bootstraps bmake, but this failed when
building with standalone debug.  Pass in the PROGNAME override to the
'make all' stage as well as 'make install' so that the .debug file is
created with the correct name.

Reviewed by: sjg
Sponsored by: The FreeBSD Foundation
Approved by: re (rodrigc)

10 years agoDo not emit size for non-regular files. There is nothing that
Xin LI [Thu, 12 Sep 2013 00:14:25 +0000 (00:14 +0000)]
Do not emit size for non-regular files.  There is nothing that
mtree(1) can do in this situation and would cause confusion.

MFC candidate.

Approved by: re (hrs)

10 years agoProvide pr_ctloutput method for AF_LOCAL/SOCK_SEQPACKET sockets.
Gleb Smirnoff [Wed, 11 Sep 2013 18:22:30 +0000 (18:22 +0000)]
Provide pr_ctloutput method for AF_LOCAL/SOCK_SEQPACKET sockets.
This makes setsockopt() on them working.

Reported by: Yuri <yuri rawbw.com>
Approved by: re (kib)

10 years agoFix build with gcc.
Konstantin Belousov [Wed, 11 Sep 2013 17:31:22 +0000 (17:31 +0000)]
Fix build with gcc.

Build-tested by: gjb
Approved by: re (glebius)

10 years agoPrior to r254304, we only began scanning the active page queue when the
Alan Cox [Wed, 11 Sep 2013 17:23:42 +0000 (17:23 +0000)]
Prior to r254304, we only began scanning the active page queue when the
amount of free memory was close to the point at which we would begin
reclaiming pages.  Now, we continuously scan the active page queue,
regardless of the amount of free memory.  Consequently, we are continuously
calling pmap_ts_referenced() on active pages.

Prior to this change, pmap_ts_referenced() would always demote superpage
mappings in order to obtain finer-grained reference information.  This made
sense because we were coming under memory pressure and would soon have to
begin reclaiming pages.  Now, however, with continuous scanning of the
active page queue, these demotions are taking a toll on performance.  To
address this problem, I have replaced the demotion with a heuristic for
periodically clearing the reference flag on superpage mappings.

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

10 years agoClear correct data structure.
Hans Petter Selasky [Wed, 11 Sep 2013 10:18:36 +0000 (10:18 +0000)]
Clear correct data structure.

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

10 years ago Clean up SIOCSIFDSTADDR usage from ifnet drivers. The ioctl itself is
Gleb Smirnoff [Wed, 11 Sep 2013 09:19:44 +0000 (09:19 +0000)]
  Clean up SIOCSIFDSTADDR usage from ifnet drivers. The ioctl itself is
extremely outdated, and I doubt that it was ever used for ifnet drivers.
It was used for AF_INET sockets in pre-FreeBSD time.

Approved by: re (hrs)
Sponsored by: Nginx, Inc.

10 years agoFix a limitation in bhyve that would limit the number of virtual machines to
Neel Natu [Wed, 11 Sep 2013 07:11:14 +0000 (07:11 +0000)]
Fix a limitation in bhyve that would limit the number of virtual machines to
the maximum number of VT-d domains (256 on a Sandybridge). We now allocate a
VT-d domain for a guest only if the administrator has explicitly configured
one or more PCI passthru device(s).

If there are no PCI passthru devices configured (the common case) then the
number of virtual machines is no longer limited by the maximum number of
VT-d domains.

Reviewed by: grehan@
Approved by: re@

10 years agoCleanup elf macros
Baptiste Daroussin [Wed, 11 Sep 2013 06:42:55 +0000 (06:42 +0000)]
Cleanup elf macros

Only define EF_MIPS_ABI when not already supplied
Remove old now unused ARM macros

Reported by: imp
Approved by: re (kib)

10 years agoImplement sendfile(2) for the posix shared memory segment file descriptor,
Konstantin Belousov [Wed, 11 Sep 2013 06:41:15 +0000 (06:41 +0000)]
Implement sendfile(2) for the posix shared memory segment file descriptor,
in addition to the regular files.

Requested by: alc
Discussed with: emaste
Tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
Approved by: re (hrs)

10 years agoIFC @ r255459
Peter Grehan [Wed, 11 Sep 2013 00:19:16 +0000 (00:19 +0000)]
IFC @ r255459

10 years agoStick to traditional DEFAULT_SYS_PATH (/usr/share/mk)
Simon J. Gerraty [Tue, 10 Sep 2013 23:31:38 +0000 (23:31 +0000)]
Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)

Reviewed by: obrien
Approved by: re

10 years agoMissed in r255386: libssh is more than just the .so file itself.
Dag-Erling Smørgrav [Tue, 10 Sep 2013 22:40:38 +0000 (22:40 +0000)]
Missed in r255386: libssh is more than just the .so file itself.

Approved by: re (blanket)

10 years agoChange the default value of VerifyHostKeyDNS to "yes" if compiled with
Dag-Erling Smørgrav [Tue, 10 Sep 2013 22:30:22 +0000 (22:30 +0000)]
Change the default value of VerifyHostKeyDNS to "yes" if compiled with
LDNS.  With that setting, OpenSSH will silently accept host keys that
match verified SSHFP records.  If an SSHFP record exists but could not
be verified, OpenSSH will print a message and prompt the user as usual.

Approved by: re (blanket)

10 years agoClean up the OpenSSH build. It is now possible to build most components
Dag-Erling Smørgrav [Tue, 10 Sep 2013 22:26:11 +0000 (22:26 +0000)]
Clean up the OpenSSH build.  It is now possible to build most components
as static binaries, if desired.  The one exception is sshd, which runs
into trouble due to libpam.a's includion of pam_ssh.

Make OpenSSH use LDNS if available.  This allows it to verify signed
SSHFP records.

Approved by: re (blanket)

10 years agoRemove documentation describing functionality which geom(4) does not,
Colin Percival [Tue, 10 Sep 2013 21:16:18 +0000 (21:16 +0000)]
Remove documentation describing functionality which geom(4) does not,
in fact, provide.

Reviewed by: phk
MFC after: 3 days
Approved by: re (gjb)

10 years agoAdd support to detect arm vs armv6
Baptiste Daroussin [Tue, 10 Sep 2013 20:56:01 +0000 (20:56 +0000)]
Add support to detect arm vs armv6

There are two different versions of the ARM ABI depending on the
TARGET_ARCH. As these are sligntly different a package built for
one may not work on another. We need to detect which one we are on
by parsing the .ARM.attributes section.

This will only work on the ARM EABI as this section is part of the
ABI definition. As armv6 only supports the ARM EABI this is not a
problem for the oabi.

Older versions of libelf in FreeBSD fail to read the
.ARM.attributes section needed. As armv6 is unsupported on these
versions we can assume we are running on arm.

Submitted by: andrew
Approved by: re (delphij)
Obtained from: pkgng git

10 years agoClean up the Kerberos build by turning libheimipcc and libheimipcs into
Dag-Erling Smørgrav [Tue, 10 Sep 2013 18:40:43 +0000 (18:40 +0000)]
Clean up the Kerberos build by turning libheimipcc and libheimipcs into
private shared libraries, instead of hacked-together archives of PIC
objects.  This makes it possible to build a static libkrb5 that works.

Reviewed by: stas
Approved by: re (gjb)

10 years agoMake this more deterministic by sorting the libraries before processing
Dag-Erling Smørgrav [Tue, 10 Sep 2013 18:34:38 +0000 (18:34 +0000)]
Make this more deterministic by sorting the libraries before processing
them and ensuring that we always use the samme collation rules.

Approved by: re (gjb)

10 years agoadd note about gcc and aesni...
John-Mark Gurney [Tue, 10 Sep 2013 17:26:09 +0000 (17:26 +0000)]
add note about gcc and aesni...

Approved by: re (gjb, kib)

10 years agoBack out r255440. /usr/bin/gcc @r255185 (2013-09-03) can build this.
David E. O'Brien [Tue, 10 Sep 2013 16:50:13 +0000 (16:50 +0000)]
Back out r255440.  /usr/bin/gcc @r255185 (2013-09-03) can build this.

Approved by: re (kib)

10 years agoAdd a sendfile regression test for transmit length > file size.
Ed Maste [Tue, 10 Sep 2013 13:51:19 +0000 (13:51 +0000)]
Add a sendfile regression test for transmit length > file size.

This test identified the issue fixed in FreeBSD-SA-13:11.sendfile.

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

10 years agoipfilter 5.1.2 no longer supports sysctl. Use ipf -V to determine if
Cy Schubert [Tue, 10 Sep 2013 13:48:33 +0000 (13:48 +0000)]
ipfilter 5.1.2 no longer supports sysctl. Use ipf -V to determine if
available (the kernel module is loaded or compiled into the kernel).

Approved by: glebius (mentor)
Approved by: re (blanket)

10 years agoMake a bump for r255426.
Gleb Smirnoff [Tue, 10 Sep 2013 10:38:15 +0000 (10:38 +0000)]
Make a bump for r255426.

Approved by: re (gjb)

10 years agoFix the length calculation for the final block of a sendfile(2)
Dag-Erling Smørgrav [Tue, 10 Sep 2013 10:05:59 +0000 (10:05 +0000)]
Fix the length calculation for the final block of a sendfile(2)
transmission which could be tricked into rounding up to the nearest
page size, leaking up to a page of kernel memory.  [13:11]

In IPv6 and NetATM, stop SIOCSIFADDR, SIOCSIFBRDADDR, SIOCSIFDSTADDR
and SIOCSIFNETMASK at the socket layer rather than pass them on to the
link layer without validation or credential checks.  [SA-13:12]

Prevent cross-mount hardlinks between different nullfs mounts of the
same underlying filesystem.  [SA-13:13]

Security: CVE-2013-5666
Security: FreeBSD-SA-13:11.sendfile
Security: CVE-2013-5691
Security: FreeBSD-SA-13:12.ifioctl
Security: CVE-2013-5710
Security: FreeBSD-SA-13:13.nullfs
Approved by: re

10 years agoOnly use a clang'ism if ${CC} is clang.
David E. O'Brien [Tue, 10 Sep 2013 05:49:31 +0000 (05:49 +0000)]
Only use a clang'ism if ${CC} is clang.

Reviewed by: sjg
Approved by: re (kib)

10 years agoCall free() on the pointer returned from malloc().
Konstantin Belousov [Tue, 10 Sep 2013 05:17:53 +0000 (05:17 +0000)]
Call free() on the pointer returned from malloc().

Reported and tested by: Oliver Pinter <oliver.pntr@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Approved by: re (delphij)

10 years agoGo way past 11 and bump bhyve's max vCPUs to 16.
Peter Grehan [Tue, 10 Sep 2013 03:48:18 +0000 (03:48 +0000)]
Go way past 11 and bump bhyve's max vCPUs to 16.

This should be sufficient for 10.0 and will do
until forthcoming work to avoid limitations
in this area is complete.

Thanks to Bela Lubkin at tidalscale for the
headsup on the apic/cpu id/io apic ASL parameters
that are actually hex values and broke when
written as decimal when 11 vCPUs were configured.

Approved by: re@

10 years agoMFV r247844 (illumos-gate 13975:ef6409bc370f)
Xin LI [Tue, 10 Sep 2013 01:46:47 +0000 (01:46 +0000)]
MFV r247844 (illumos-gate 13975:ef6409bc370f)

Illumos ZFS issues:
  3582 zfs_delay() should support a variable resolution
  3584 DTrace sdt probes for ZFS txg states

Provide a compatibility shim for Solaris's cv_timedwait_hires
to help aid future porting.

Approved by: re (ZFS blanket)

10 years agoFix the aborting of association with the iterator using an empty
Michael Tuexen [Mon, 9 Sep 2013 21:40:07 +0000 (21:40 +0000)]
Fix the aborting of association with the iterator using an empty
user initiated error cause (using SCTP_ABORT|SCTP_SENDALL).

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

10 years agoEmit the correct standard library dependency line for C++ programs. In
Dag-Erling Smørgrav [Mon, 9 Sep 2013 21:18:16 +0000 (21:18 +0000)]
Emit the correct standard library dependency line for C++ programs.  In
the CLANG_IS_CC case, the default is now libc++.  Only use libstdc++ if
!CLANG_IS_CC or it was explicitly requested in CXXFLAGS.

Submitted by: theraven
Approved by: re (gjb)

10 years agoPass -n (do not emit comments) when saving mtree information for future
Xin LI [Mon, 9 Sep 2013 20:36:28 +0000 (20:36 +0000)]
Pass -n (do not emit comments) when saving mtree information for future
mergemaster(8) runs.

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

10 years agoRevert the kvp code - there's still some work that
Peter Grehan [Mon, 9 Sep 2013 19:27:44 +0000 (19:27 +0000)]
Revert the kvp code - there's still some work that
needs to be done for that.

Discussed with: Microsoft hyper-v devs

10 years agoAdd a mmap flag (MAP_32BIT) on 64-bit platforms to request that a mapping use
John Baldwin [Mon, 9 Sep 2013 18:11:59 +0000 (18:11 +0000)]
Add a mmap flag (MAP_32BIT) on 64-bit platforms to request that a mapping use
an address in the first 2GB of the process's address space.  This flag should
have the same semantics as the same flag on Linux.

To facilitate this, add a new parameter to vm_map_find() that specifies an
optional maximum virtual address.  While here, fix several callers of
vm_map_find() to use a VMFS_* constant for the findspace argument instead of
TRUE and FALSE.

Reviewed by: alc
Approved by: re (kib)