]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agopf_map_addr() can fail and in this case we should drop the packet,
Gleb Smirnoff [Fri, 15 Aug 2014 14:02:24 +0000 (14:02 +0000)]
pf_map_addr() can fail and in this case we should drop the packet,
otherwise bad consequences including a routing loop can occur.

Move pf_set_rt_ifp() earlier in state creation sequence and
inline it, cutting some extra code.

PR: 183997
Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

10 years agoRemove bogus ; at the end of the if condition in order to unbreak gcc builds
Bjoern A. Zeeb [Fri, 15 Aug 2014 10:01:33 +0000 (10:01 +0000)]
Remove bogus ; at the end of the if condition in order to unbreak gcc builds
after r270004.

MFC after: 4 days
X-MFX with: r270004

10 years agoImplement 'fast path' for the vm page fault handler. Or, it could be
Konstantin Belousov [Fri, 15 Aug 2014 07:30:14 +0000 (07:30 +0000)]
Implement 'fast path' for the vm page fault handler.  Or, it could be
called a scalable path.  When several preconditions hold, the vm
object lock for the object containing the faulted page is taken in
read mode, instead of write, which allows parallel faults processing
in the region.

Namely, the fast path is taken when the faulted page already exists
and does not need copy on write, is already fully valid, and not busy.
For technical reasons, fast path is avoided when the fault is the
first write on the vnode object, or when the fault is for wiring or
debugger read or write.

On the fast path, pmap_enter(9) is passed the PMAP_ENTER_NOSLEEP flag,
since object lock is kept.  Pmap might fail to create the entry, in
which case the fallback to slow path is performed.

Reviewed by: alc
Tested by: pho (previous version)
Hardware provided and hosted by: The FreeBSD Foundation and
 Sentex Data Communications
Sponsored by: The FreeBSD Foundation
MFC after: 2 week

10 years agoFix synproxy with IPv6. pf_test6() was missing a check for M_SKIP_FIREWALL.
Gleb Smirnoff [Fri, 15 Aug 2014 04:35:34 +0000 (04:35 +0000)]
Fix synproxy with IPv6. pf_test6() was missing a check for M_SKIP_FIREWALL.

PR: 127920
Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

10 years agoChange pr_output's prototype to avoid the need for explicit casts.
Kevin Lo [Fri, 15 Aug 2014 02:43:02 +0000 (02:43 +0000)]
Change pr_output's prototype to avoid the need for explicit casts.
This is a follow up to r269699.

Phabric: D564
Reviewed by: jhb

10 years agoPrint the symbolic bit names for the status when we get a timeout.
Warner Losh [Thu, 14 Aug 2014 23:17:33 +0000 (23:17 +0000)]
Print the symbolic bit names for the status when we get a timeout.

10 years agoTry to clarify how file systems are exported for NFSv4.
Rick Macklem [Thu, 14 Aug 2014 22:52:05 +0000 (22:52 +0000)]
Try to clarify how file systems are exported for NFSv4.

Suggested by: rcarter@pinyon.org
MFC after: 1 week

10 years agoConvert devd's client socket to type SOCK_SEQPACKET.
Alan Somers [Thu, 14 Aug 2014 22:33:56 +0000 (22:33 +0000)]
Convert devd's client socket to type SOCK_SEQPACKET.

This change consists of two merges from projects/zfsd/head along with the
addition of an ATF test case for the new functionality.

sbin/devd/tests/Makefile
sbin/devd/tests/client_test.c
Add ATF test cases for reading events from both devd socket types.

r266519:
sbin/devd/devd.8
sbin/devd/devd.cc
Create a new socket, of type SOCK_SEQPACKET, for communicating with
clients. SOCK_SEQPACKET sockets preserve record boundaries,
simplying code in the client. The old SOCK_STREAM socket is retained
for backwards-compatibility with existing clients.

r269993:
sbin/devd/devd.8
Fix grammar bug.

CR: https://reviews.freebsd.org/rS266519
MFC after: 5 days
Sponsored by: Spectra Logic

10 years agoSync list of supported devices in the man page with the driver.
Gavin Atkinson [Thu, 14 Aug 2014 19:15:20 +0000 (19:15 +0000)]
Sync list of supported devices in the man page with the driver.

MFC after: 1 week

10 years agoUpdate iwn(4) and iwnfw(4) man pages to reflect all available firmware.
Gavin Atkinson [Thu, 14 Aug 2014 19:14:24 +0000 (19:14 +0000)]
Update iwn(4) and iwnfw(4) man pages to reflect all available firmware.

MFC after: 1 week

10 years ago- Count global pf(4) statistics in counter(9).
Gleb Smirnoff [Thu, 14 Aug 2014 18:57:46 +0000 (18:57 +0000)]
- Count global pf(4) statistics in counter(9).
- Do not count global number of states and of src_nodes,
  use uma_zone_get_cur() to obtain values.
- Struct pf_status becomes merely an ioctl API structure,
  and moves to netpfil/pf/pf.h with its constants.
- V_pf_status is now of type struct pf_kstatus.

Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

10 years agosbin/devd/devd.8
Alan Somers [Thu, 14 Aug 2014 18:39:13 +0000 (18:39 +0000)]
sbin/devd/devd.8
Fix grammar bug.

Reported by: ian
Sponsored by: Spectra Logic Corporation

10 years agoUpdate i386/NOTES and amd64/NOTES files to contain the complete list of
Gavin Atkinson [Thu, 14 Aug 2014 18:29:55 +0000 (18:29 +0000)]
Update i386/NOTES and amd64/NOTES files to contain the complete list of
firmwares for iwn(4) and sort them.

MFC after: 1 week

10 years agoAllow iwn105fw and iwn135 firmwares to be compiled into the kernel.
Gavin Atkinson [Thu, 14 Aug 2014 18:16:27 +0000 (18:16 +0000)]
Allow iwn105fw and iwn135 firmwares to be compiled into the kernel.

MFC after: 1 week

10 years agoReword comment to match the interrupt mode names from the MPtable spec.
Neel Natu [Thu, 14 Aug 2014 18:03:38 +0000 (18:03 +0000)]
Reword comment to match the interrupt mode names from the MPtable spec.

Reviewed by: tychon

10 years agoUpdate the URL to the phabricator instance.
Glen Barber [Thu, 14 Aug 2014 16:25:43 +0000 (16:25 +0000)]
Update the URL to the phabricator instance.

Sponsored by: The FreeBSD Foundation

10 years agocreate_$ARCH_diskimage never really took off. Collapse back down to
Warner Losh [Thu, 14 Aug 2014 16:17:30 +0000 (16:17 +0000)]
create_$ARCH_diskimage never really took off. Collapse back down to
just one.

10 years agoOnly install the boot loader if it actually exists. This is a stop-gap
Warner Losh [Thu, 14 Aug 2014 16:17:23 +0000 (16:17 +0000)]
Only install the boot loader if it actually exists. This is a stop-gap
change, since larger changes to use geom more exclusively to create
partitions is in th works.

10 years agoins is only set and unused, but only when we're not doing software
Warner Losh [Thu, 14 Aug 2014 16:01:51 +0000 (16:01 +0000)]
ins is only set and unused, but only when we're not doing software
single stepping. Only set it when we're doing that by bending
style(9) rules a little to avoid even worse #ifdef soup.

10 years agoDisable all inline warnings on gcc >= 4.3. Not sure exactly where the
Warner Losh [Thu, 14 Aug 2014 16:01:46 +0000 (16:01 +0000)]
Disable all inline warnings on gcc >= 4.3. Not sure exactly where the
cutover is, but we need better tools to cope with inline tuning per
compiler version than we have. This is a quick bandaid until such
tools are around.

10 years agoDelete pp_isadma. It isn't use, and the code that used it has been
Warner Losh [Thu, 14 Aug 2014 16:01:38 +0000 (16:01 +0000)]
Delete pp_isadma. It isn't use, and the code that used it has been
commented out (temporarily) since 1998 when this driver hit the
tree. Also, no need to compute the ethernet header and then never use
it.

10 years agoStreamline format extensions. Either the compiler supports them, and
Warner Losh [Thu, 14 Aug 2014 16:01:33 +0000 (16:01 +0000)]
Streamline format extensions. Either the compiler supports them, and
we enable them and format wordings. Or it doesn't, and we disable
format warnings because the kernel uses the extensions pervasively.

10 years agoAvoid pointless (but harmless) actions on unmanaged pages.
Alan Cox [Thu, 14 Aug 2014 15:46:15 +0000 (15:46 +0000)]
Avoid pointless (but harmless) actions on unmanaged pages.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

10 years agoSkip pgrep-j and pkill-j if jail or jls is not installed.
Alan Somers [Thu, 14 Aug 2014 14:59:40 +0000 (14:59 +0000)]
Skip pgrep-j and pkill-j if jail or jls is not installed.

Even though jail is part of the base system, it can be disabled by src.conf
settings. Therefore, it should be listed as a required program for tests
that use it.

CR: D603
MFC after: 3 days
Sponsored by: Spectra Logic

10 years agoAdd support for NEWCONS to kbdmap and vidfont.
Stefan Eßer [Thu, 14 Aug 2014 14:22:12 +0000 (14:22 +0000)]
Add support for NEWCONS to kbdmap and vidfont.

The path to keymaps and fonts is selected based on the existence and value
of "sysctl kern.vty".

MFC after: 1 week

10 years agoAdded 4K quirks for Corsair Force GT and Samsung 840 SSDs
Steven Hartland [Thu, 14 Aug 2014 13:57:17 +0000 (13:57 +0000)]
Added 4K quirks for Corsair Force GT and Samsung 840 SSDs

MFC after: 1 week
Sponsored by: Multiplay

10 years agoFix euro symbol in copied keymaps
Ed Maste [Thu, 14 Aug 2014 13:45:02 +0000 (13:45 +0000)]
Fix euro symbol in copied keymaps

These were copied from share/syscons/keymaps/??.iso.kbd.  They were
not actually ISO 8859-1 as assumed.  When interpreted as Unicode they
ended up with the generic currency sign (U+00A4) instead of the euro
(U+20AC).

Reported by: Claude Buisson, tijl@

10 years agoRenamed hw.ixgbe.unsupported_sfp -> hw.ix.unsupported_sfp
Steven Hartland [Thu, 14 Aug 2014 13:25:05 +0000 (13:25 +0000)]
Renamed hw.ixgbe.unsupported_sfp -> hw.ix.unsupported_sfp

This now matches all other ixgbe sysctl / tunables.

Sponsored by: Multiplay

10 years agoAdd a new loader tunable, vm.kmem_zmax which allows a system administrator
Xin LI [Thu, 14 Aug 2014 05:31:39 +0000 (05:31 +0000)]
Add a new loader tunable, vm.kmem_zmax which allows a system administrator
to limit the maximum allocation size that malloc(9) would consider using
the UMA cache allocator as backend.

Suggested by: alfred
MFC after: 2 weeks

10 years agoRe-instate UMA cached backend for 4K - 64K allocations. New consumers
Xin LI [Thu, 14 Aug 2014 05:13:24 +0000 (05:13 +0000)]
Re-instate UMA cached backend for 4K - 64K allocations.  New consumers
like geli(4) uses malloc(9) to allocate temporary buffers that gets
free'ed shortly, causing frequent TLB shootdown as observed in hwpmc
supported flame graph.

Discussed with: jeff, alfred
MFC after: 1 week

10 years agoUse the max guest memory address when creating its iommu domain.
Neel Natu [Thu, 14 Aug 2014 05:00:45 +0000 (05:00 +0000)]
Use the max guest memory address when creating its iommu domain.

Also, assert that the GPA being mapped in the domain is less than its maxaddr.

Reviewed by: grehan
Pointed out by: Anish Gupta (akgupt3@gmail.com)

10 years agoBump version because challenge buffer size changed
Andrey A. Chernov [Thu, 14 Aug 2014 04:42:09 +0000 (04:42 +0000)]
Bump version because challenge buffer size changed

MFC after:      1 week

10 years agoAdd AIC to at91sam9260 support, now that it is needed for multipass to
Warner Losh [Thu, 14 Aug 2014 04:21:31 +0000 (04:21 +0000)]
Add AIC to at91sam9260 support, now that it is needed for multipass to
work. This gets my AT91SAM9260-based boards almost booting with
current in multi pass. The MCI driver is broken, but it is equally
broken before multi-pass.

10 years agoAdd support for multipass to Atmel, for both FDT and !FDT cases.
Warner Losh [Thu, 14 Aug 2014 04:21:25 +0000 (04:21 +0000)]
Add support for multipass to Atmel, for both FDT and !FDT cases.

10 years agoStart to add FDT support.
Warner Losh [Thu, 14 Aug 2014 04:21:20 +0000 (04:21 +0000)]
Start to add FDT support.

10 years agoAdd support for FDT and !FDT configs on Atmel, though FDT isn't
Warner Losh [Thu, 14 Aug 2014 04:21:14 +0000 (04:21 +0000)]
Add support for FDT and !FDT configs on Atmel, though FDT isn't
working yet.
Bump rev on arm Makefile since files.at91 uses new '!' operator.

10 years agoFrom https://sourceware.org/ml/newlib/2014/msg00113.html
Warner Losh [Thu, 14 Aug 2014 04:20:13 +0000 (04:20 +0000)]
From https://sourceware.org/ml/newlib/2014/msg00113.html
By Richard Earnshaw at ARM
>
>GCC has for a number of years provides a set of pre-defined macros for
>use with determining the ISA and features of the target during
>pre-processing.  However, the design was always somewhat cumbersome in
>that each new architecture revision created a new define and then
>removed the previous one.  This meant that it was necessary to keep
>updating the support code simply to recognise a new architecture being
>added.
>
>The ACLE specification (ARM C Language Extentions)
>(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html)
>provides a much more suitable interface and GCC has supported this
>since gcc-4.8.
>
>This patch makes use of the ACLE pre-defines to map to the internal
>feature definitions.  To support older versions of GCC a compatibility
>header is provided that maps the traditional pre-defines onto the new
>ACLE ones.

Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in the
couple of places in tree. clang already implements ACLE. Add a define
that says we implement version 1.1, even though the implementation
isn't quite complete.

10 years agoStop telling people to directly report llvm or clang bugs upstream,
Dimitry Andric [Wed, 13 Aug 2014 21:38:29 +0000 (21:38 +0000)]
Stop telling people to directly report llvm or clang bugs upstream,
point them to the FreeBSD bug tracker instead, since we use our own
patches.

MFC after: 3 days

10 years agoUse "NO NAME" as the default unnamed label.
Pedro F. Giffuni [Wed, 13 Aug 2014 21:18:31 +0000 (21:18 +0000)]
Use "NO NAME" as the default unnamed label.

Microsoft recommends avoiding the use of spaces in the
string structures for FAT. Unfortunately they do just
that by default in the case of unlabeled filesystems.

Follow the default MS behavior to avoid confusion in
common tools like file(1). This was actually the
default behavior before r203868.

Obtained from: NetBSD (CVS rev. 1.39)
MFC after: 3 days

10 years agoRemove trailing whitespace
Ed Maste [Wed, 13 Aug 2014 19:55:14 +0000 (19:55 +0000)]
Remove trailing whitespace

10 years agoMake the libbsdstat useful again.
Adrian Chadd [Wed, 13 Aug 2014 19:43:22 +0000 (19:43 +0000)]
Make the libbsdstat useful again.

10 years agoCopy country-code .iso syscons keymaps for vt(4)
Ed Maste [Wed, 13 Aug 2014 19:06:29 +0000 (19:06 +0000)]
Copy country-code .iso syscons keymaps for vt(4)

Existing syscons ISO 8859-1 keymaps (??.iso.kbd) are usable without
change as Unicode keymaps for vt(4).

Sponsored by: The FreeBSD Foundation

10 years agoSupplement r259111 by also using correct casts in gcc's emmintrin.h for
Dimitry Andric [Wed, 13 Aug 2014 16:42:44 +0000 (16:42 +0000)]
Supplement r259111 by also using correct casts in gcc's emmintrin.h for
the first argument of the following builtin function:

* __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

This should fix the following errors when building the graphics/webp
port with base gcc:

lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

Reported by: Jos Chrispijn <ports@webrz.net>
MFC after: 3 days

10 years agoAdd support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
Michael Tuexen [Wed, 13 Aug 2014 15:50:16 +0000 (15:50 +0000)]
Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
socket options. This includes managing the correspoing stat counters.
Add the SCTP_DETAILED_STR_STATS kernel option to control per policy
counters on every stream. The default is off and only an aggregated
counter is available. This is sufficient for the RTCWeb usecase.

MFC after: 1 week

10 years agoFixed ENOMEM description.
Sergey Kandaurov [Wed, 13 Aug 2014 14:49:51 +0000 (14:49 +0000)]
Fixed ENOMEM description.

MFC after: 1 week
Sponsored by: Nginx, Inc.

10 years agoAdd a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave
Konstantin Belousov [Wed, 13 Aug 2014 05:53:41 +0000 (05:53 +0000)]
Add a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave
the whole RLIMIT_STACK-sized region of the kernel-allocated stack as
the stack of main thread.

By default, the main thread stack is clamped at 2MB (4MB on 64bit
ABIs) and the rest is used for other threads stack allocation.  Since
there is no programmatic way to adjust the size of the main thread
stack, pthread_attr_setstacksize() is too late, the knob allows user
to manage the main stack size both for single-threaded and
multi-threaded processes with the rlimit.

Reported by: "Ivan A. Kosarev" <ivan@ivan-labs.com>
Tested by: dim
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoStyle.
Konstantin Belousov [Wed, 13 Aug 2014 05:47:49 +0000 (05:47 +0000)]
Style.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoIf vm_page_grab() allocates a new page, the page is not inserted into
Konstantin Belousov [Wed, 13 Aug 2014 05:44:08 +0000 (05:44 +0000)]
If vm_page_grab() allocates a new page, the page is not inserted into
page queue even when the allocation is not wired.  It is
responsibility of the vm_page_grab() caller to ensure that the page
does not end on the vm_object queue but not on the pagedaemon queue,
which would effectively create unpageable unwired page.

In exec_map_first_page() and vm_imgact_hold_page(), activate the page
immediately after unbusying it, to avoid leak.

In the uiomove_object_page(), deactivate page before the object is
unlocked.  There is no leak, since the page is deactivated after
uiomove_fromphys() finished.  But allowing non-queued non-wired page
in the unlocked object queue makes it impossible to assert that leak
does not happen in other places.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoAdd missing BSD.tests.dist entry for lib/libutil to unbreak installworld with
Enji Cooper [Wed, 13 Aug 2014 05:15:28 +0000 (05:15 +0000)]
Add missing BSD.tests.dist entry for lib/libutil to unbreak installworld with
MK_TESTS == no

Phabric: D555
X-MFC with: r269904
Approved by: jmmv (mentor, implicit)
Pointyhat to: ngie

10 years agoIntegrate lib/libutil into the build/kyua
Enji Cooper [Wed, 13 Aug 2014 04:56:27 +0000 (04:56 +0000)]
Integrate lib/libutil into the build/kyua

Remove the .t wrappers

Rename all of the TAP test applications from test-<test> to
<test>_test to match the convention described in the TestSuite
wiki page

humanize_number_test.c:

- Fix -Wformat warnings with counter variables
- Fix minor style(9) issues:
-- Header sorting
-- Variable declaration alignment/sorting in main(..)
-- Fit the lines in <80 columns
- Fix an off by one index error in the testcase output [*]
- Remove unnecessary `extern char * optarg;` (this is already provided by
  unistd.h)

Phabric: D555
Approved by: jmmv (mentor)
MFC after: 2 weeks
Obtained from: EMC / Isilon Storage Division [*]
Submitted by: Casey Peel <cpeel@isilon.com> [*]
Sponsored by: EMC / Isilon Storage Division

10 years agoPort date/bin/tests to ATF
Enji Cooper [Wed, 13 Aug 2014 04:43:29 +0000 (04:43 +0000)]
Port date/bin/tests to ATF

Phabric: D545
Approved by: jmmv (mentor)
Submitted by: keramida (earlier version)
MFC after: 2 weeks
Sponsored by: Google, Inc
Sponsored by: EMC / Isilon Storage Division

10 years agoConvert bin/sh/tests to ATF
Enji Cooper [Wed, 13 Aug 2014 04:14:50 +0000 (04:14 +0000)]
Convert bin/sh/tests to ATF

The new code uses a "test discovery mechanism" to determine
what tests are available for execution

The test shell can be specified via:

  kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh

Sponsored by: EMC / Isilon Storage Division
Approved by: jmmv (mentor)
Reviewed by: jilles (maintainer)

10 years agoMinor style tweaks.
Pedro F. Giffuni [Wed, 13 Aug 2014 03:44:30 +0000 (03:44 +0000)]
Minor style tweaks.

Obtained from: OpenBSD (CVS rev. 1.7)
MFC after: 3 days

10 years agoMake sure the DTrace header files are built before depend and before
Rui Paulo [Wed, 13 Aug 2014 01:27:51 +0000 (01:27 +0000)]
Make sure the DTrace header files are built before depend and before
the build starts.

This adds a new variable DHDRS that contains a list of all DTrace
header files.  Then, we use the beforedepend hook to make sure the
heaeder files are built.

Introduce a beforebuild dependency (from projects/bmake) based on
feedback from Simon J. Gerraty.  This lets us generate the header
files without running make depend.

Reviewed by: sjg, imp
MFC after: 3 days

10 years agoFix typo when displaying the HPET timer unit number.
Neel Natu [Wed, 13 Aug 2014 00:18:16 +0000 (00:18 +0000)]
Fix typo when displaying the HPET timer unit number.

10 years agoMinor cleanup:
Neel Natu [Wed, 13 Aug 2014 00:14:26 +0000 (00:14 +0000)]
Minor cleanup:
- Set 'pirq_cold' to '0' on the first PIRQ allocation.
- Make assertions stronger.

Reviewed by: jhb
CR: https://phabric.freebsd.org/D592

10 years agoTruncate the ctfmerge command line, like we do with SYSTEM_LD.
Warner Losh [Tue, 12 Aug 2014 23:48:37 +0000 (23:48 +0000)]
Truncate the ctfmerge command line, like we do with SYSTEM_LD.

10 years agoFix a typo in a comment: s/interprete/interpret/
Glen Barber [Tue, 12 Aug 2014 19:37:49 +0000 (19:37 +0000)]
Fix a typo in a comment: s/interprete/interpret/

Submitted by: Sam Fourman Jr.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoCorrect a comment brought over from amd64. i386 doesn't use long
John Baldwin [Tue, 12 Aug 2014 18:22:57 +0000 (18:22 +0000)]
Correct a comment brought over from amd64.  i386 doesn't use long
mode.

10 years agoComplete the usr.bin/yacc kyua integration work I originally
Enji Cooper [Tue, 12 Aug 2014 17:51:26 +0000 (17:51 +0000)]
Complete the usr.bin/yacc kyua integration work I originally
submitted via r268811

- Install the Kyuafile by adding FILES to FILESGROUPS
- Run the testcases with an unprivileged user

  Some of the testcases depend upon behavior that's broken when
  run as root on FreeBSD because of how permissions are treated
  with access(2) vs eaccess(2), open(2), etc

- Simplify the test driver to just inspect the exit code from
  run_test because it now exits with 0 if successful and exits
  with !0 if unsuccessful
- Don't do ad hoc temporary directory creation/deletion; let Kyua
  handle that
- Add entries for files removed in r268811 to
  OptionalObsoleteFiles.inc

PR: 191020
X-MFC with: r268811
Approved by: jmmv (mentor)
Reviewed by: bapt
Sponsored by: EMC / Isilon Storage Division

10 years ago(belatedly) Document FreeBSD 9.3-R
Dmitry Morozovsky [Tue, 12 Aug 2014 16:51:37 +0000 (16:51 +0000)]
(belatedly) Document FreeBSD 9.3-R

MFC after: 1 week

M    misc/bsd-family-tree

10 years agoAdd Dan Langille (myself) to committers-ports.dot file with mat and wg as mentors.
Dan Langille [Tue, 12 Aug 2014 14:37:33 +0000 (14:37 +0000)]
Add Dan Langille (myself) to committers-ports.dot file with mat and wg as mentors.

Approved by: wg (mentor)

10 years agoAccording to opie code and even direct mention in opie(4) challenge buffer
Andrey A. Chernov [Tue, 12 Aug 2014 13:28:46 +0000 (13:28 +0000)]
According to opie code and even direct mention in opie(4) challenge buffer
size must be OPIE_CHALLENGE_MAX + 1, not OPIE_CHALLENGE_MAX

Reviewed by:    des
MFC after:      1 week

10 years agoChange SCTP sysctl from auth_disable to auth_enable. This is
Michael Tuexen [Tue, 12 Aug 2014 13:13:11 +0000 (13:13 +0000)]
Change SCTP sysctl from auth_disable to auth_enable. This is
consistent with other similar sysctl variable used in SCTP.

10 years agoFix broken pointer overflow check ns_name_unpack()
Hajimu UMEMOTO [Tue, 12 Aug 2014 13:09:32 +0000 (13:09 +0000)]
Fix broken pointer overflow check ns_name_unpack()

Many compilers may optimize away the overflow check `msg + l < msg',
where `msg' is a pointer and `l' is an integer, because pointer
overflow is undefined behavior in C.

Use a safe precondition test `l >= eom - msg' instead.

Reference:
https://android-review.googlesource.com/#/c/50570/

Requested by: pfg
Obtained from: NetBSD (CVS rev. 1.10)

10 years agoClarify descriptions of pthread_cond_wait() and pthread_cond_timedwait()
Gavin Atkinson [Tue, 12 Aug 2014 12:44:52 +0000 (12:44 +0000)]
Clarify descriptions of pthread_cond_wait() and pthread_cond_timedwait()

Requested by: Malcolm Douglas via freebsd-doc
Reviewed by: jhb
MFC after: 1 week

10 years agoUpdate our stub resolver to final version of libbind.
Hajimu UMEMOTO [Tue, 12 Aug 2014 12:36:06 +0000 (12:36 +0000)]
Update our stub resolver to final version of libbind.

Obtained from: ISC

10 years agoBring the md5 functions into libc for internal use only.
Hajimu UMEMOTO [Tue, 12 Aug 2014 12:25:56 +0000 (12:25 +0000)]
Bring the md5 functions into libc for internal use only.
It is required to support ID randomization for our stub
resolver.

10 years ago- Fix radix tree memory leakage when unloading modules using radix
Hans Petter Selasky [Tue, 12 Aug 2014 11:45:57 +0000 (11:45 +0000)]
- Fix radix tree memory leakage when unloading modules using radix
trees. This happens because the logic inserting items into the radix
tree is allocating empty radix levels, when index zero does not
contain any items.
- Add proper error case handling, so that the radix tree does not end
up in a bad state, if memory cannot be allocated during insertion of
an item.
- Add check for inserting NULL items into the radix tree.
- Add check for radix tree getting too big.

MFC after: 1 week
Sponsored by: Mellanox Technologies

10 years agoAdd support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED
Michael Tuexen [Tue, 12 Aug 2014 11:30:16 +0000 (11:30 +0000)]
Add support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED
socket options. Add also a sysctl to control the support of ASCONF.

MFC after: 1 week

10 years agoTurn off kern.geom.part.mbr.enforce_chs by default.
Andrey V. Elsukov [Tue, 12 Aug 2014 10:31:31 +0000 (10:31 +0000)]
Turn off kern.geom.part.mbr.enforce_chs by default.

10 years agoRemove duplicate entry.
Andrey V. Elsukov [Tue, 12 Aug 2014 09:34:53 +0000 (09:34 +0000)]
Remove duplicate entry.

10 years agoRevision r269457 removed the Giant around mount and unmount code, but
Konstantin Belousov [Tue, 12 Aug 2014 09:33:00 +0000 (09:33 +0000)]
Revision r269457 removed the Giant around mount and unmount code, but
r269533, which was tested before r269457 was committed, implicitely
relied on the Giant to protect the manipulations of the softdepmounts
list.  Use softdep global lock consistently to guarantee the list
structure now.

Insert the new struct mount_softdeps into the softdepmounts only after
it is sufficiently initialized, to prevent softdep_speedup() from
accessing bare memory.  Similarly, remove struct mount_softdeps for
the unmounted filesystem from the tailq before destroying structure
rwlock.

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

10 years agoAdd sysctl and loader tunable kern.geom.part.mbr.enforce_chs that is set
Andrey V. Elsukov [Tue, 12 Aug 2014 09:10:13 +0000 (09:10 +0000)]
Add sysctl and loader tunable kern.geom.part.mbr.enforce_chs that is set
by default. It can be used to disable automatic alignment to CHS geometry,
that GEOM_PART_MBR does.

Reviewed by: wblock
MFC after: 1 week

10 years agoUpdate sqlite-3.7.17 -> 3.8.5
Peter Wemm [Tue, 12 Aug 2014 02:09:00 +0000 (02:09 +0000)]
Update sqlite-3.7.17 -> 3.8.5

10 years agoVendor import sqlite-3.8.5 (sqlite-autoconf-3080500), minus tea/*
Peter Wemm [Tue, 12 Aug 2014 02:03:24 +0000 (02:03 +0000)]
Vendor import sqlite-3.8.5 (sqlite-autoconf-3080500), minus tea/*

10 years agoRevert r269839.
Rui Paulo [Mon, 11 Aug 2014 22:43:44 +0000 (22:43 +0000)]
Revert r269839.

This doesn't work like I expected and the if clause is never matched.
It turns out that the problem with the older make is unrelated.

MFC after: 3 days

10 years agoAdd .d files to the reverse matching pattern in bsd.dep.mk to account
Rui Paulo [Mon, 11 Aug 2014 21:42:06 +0000 (21:42 +0000)]
Add .d files to the reverse matching pattern in bsd.dep.mk to account
for source file dependencies.

This follows the .y and .l behaviour.

MFC after: 3 days

10 years agoFix another typoe in the definition of DTrace SOBJS.
Rui Paulo [Mon, 11 Aug 2014 21:14:08 +0000 (21:14 +0000)]
Fix another typoe in the definition of DTrace SOBJS.

MFC after: 3 days

10 years agobsd.dep.mk: use the empty() function with the check for .d files.
Rui Paulo [Mon, 11 Aug 2014 20:44:57 +0000 (20:44 +0000)]
bsd.dep.mk: use the empty() function with the check for .d files.

Seems to work better with the old make.

MFC after: 3 days

10 years agoFix an error in the dependency of the DTrace object file.
Rui Paulo [Mon, 11 Aug 2014 20:41:14 +0000 (20:41 +0000)]
Fix an error in the dependency of the DTrace object file.

MFC after: 3 days

10 years agoUpdate serf-1.3.6 -> 1.3.7
Peter Wemm [Mon, 11 Aug 2014 19:41:01 +0000 (19:41 +0000)]
Update serf-1.3.6 -> 1.3.7
Update subversion-1.8.9 -> 1.8.10

Security: CVE-2014-3504, CVE-2014-3522, CVE-2014-3528

10 years agoImport svn-1.8.10
Peter Wemm [Mon, 11 Aug 2014 19:19:17 +0000 (19:19 +0000)]
Import svn-1.8.10

10 years agoadd myself as opencrypto maintainer as I'm doing some work in the
John-Mark Gurney [Mon, 11 Aug 2014 19:03:20 +0000 (19:03 +0000)]
add myself as opencrypto maintainer as I'm doing some work in the
area...

Note that documentation is requires for commits to what I maintain...

10 years agoFix a typo.
John Baldwin [Mon, 11 Aug 2014 18:26:57 +0000 (18:26 +0000)]
Fix a typo.

PR: 192294
Submitted by: Conrad Meyer <conrad.meyer@isilon.com>

10 years agoChange {_,}pmap_allocpte() so that they look for the flag PMAP_ENTER_NOSLEEP
Alan Cox [Mon, 11 Aug 2014 17:45:41 +0000 (17:45 +0000)]
Change {_,}pmap_allocpte() so that they look for the flag PMAP_ENTER_NOSLEEP
instead of M_NOWAIT/M_WAITOK when deciding whether to sleep on page table
page allocation.  (The same functions in the i386/xen and mips pmap
implementations already use PMAP_ENTER_NOSLEEP.)

X-MFC with: r269728
Sponsored by: EMC / Isilon Storage Division

10 years agoSimilar to r250143, optimize MODULES_OVERRIDE such that SUBDIR isn't
Enji Cooper [Mon, 11 Aug 2014 17:04:04 +0000 (17:04 +0000)]
Similar to r250143, optimize MODULES_OVERRIDE such that SUBDIR isn't
automatically defined if MODULES_OVERRIDE is defined

Approved by: jmmv (mentor)
Reviewed by: imp
Phabric: D578
Sponsored by: EMC / Isilon Storage Division

10 years agoIn arm/release.sh, continue if 'xdev-links' target fails
Glen Barber [Mon, 11 Aug 2014 16:31:28 +0000 (16:31 +0000)]
In arm/release.sh, continue if 'xdev-links' target fails
where the target is not valid (stable/10), instead of doing
per-branch evaluation on if xdev-links needs to be invoked.

Sponsored by: The FreeBSD Foundation

10 years agoAdd otp-sha
Andrey A. Chernov [Mon, 11 Aug 2014 15:41:55 +0000 (15:41 +0000)]
Add otp-sha

MFC after:      1 week

10 years agoblkfront: add support for unmapped IO
Roger Pau Monné [Mon, 11 Aug 2014 15:37:02 +0000 (15:37 +0000)]
blkfront: add support for unmapped IO

Using unmapped IO is really beneficial when running inside of a VM,
since it avoids IPIs to other vCPUs in order to invalidate the
mappings.

This patch adds unmapped IO support to blkfront. The following tests
results have been obtained when running on a Xen host without HAP:

PVHVM
     3165.84 real      6354.17 user      4483.32 sys
PVHVM with unmapped IO
     2099.46 real      4624.52 user      2967.38 sys

This is because when running using shadow page tables TLB flushes and
range invalidations are much more expensive, so using unmapped IO
provides a very important performance boost.

Sponsored by: Citrix Systems R&D
Tested by: robak
MFC after: 1 week
PR: 191173

dev/xen/blkfront/blkfront.c:
 - Add and announce support for unmapped IO.

10 years agoMove KASSERT into locked region.
Gleb Smirnoff [Mon, 11 Aug 2014 15:06:07 +0000 (15:06 +0000)]
Move KASSERT into locked region.

Submitted by: kib

10 years agoRemove dependence on source tree options. Move all kernel module
Warner Losh [Mon, 11 Aug 2014 14:50:49 +0000 (14:50 +0000)]
Remove dependence on source tree options. Move all kernel module
options into kern.opts.mk and change all the places where we use
src.opts.mk to pull in the options. Conditionally define SYSDIR and
use SYSDIR/conf/kern.opts.mk instead of a CURDIR path. Replace all
instances of CURDIR/../../etc with STSDIR, but only in the affected
files.

As a special compatibility hack, include bsd.owm.mk at the top of
kern.opts.mk to allow the bare build of sys/modules to work on older
systems. If the defaults ever change between 9.x, 10.x and current for
these options, however, you'll wind up with the host OS' defaults
rather than the -current defaults. This hack will be removed when
we no longer need to support this build scenario.

Reviewed by: jhb
Differential Revision: https://phabric.freebsd.org/D529

10 years agoLast '/' for program name, not first one
Andrey A. Chernov [Mon, 11 Aug 2014 14:46:09 +0000 (14:46 +0000)]
Last '/' for program name, not first one

MFC after:      1 week

10 years agoLink otp-sha1 to match real challenge prompt, not otp-sha
Andrey A. Chernov [Mon, 11 Aug 2014 14:37:57 +0000 (14:37 +0000)]
Link otp-sha1 to match real challenge prompt, not otp-sha

MFC after:      1 week

10 years agoWhen sha1 support was added, they forget to increase OPIE_HASHNAME_MAX
Andrey A. Chernov [Mon, 11 Aug 2014 13:36:02 +0000 (13:36 +0000)]
When sha1 support was added, they forget to increase OPIE_HASHNAME_MAX

MFC after:      1 week

10 years agoUse M_WAITOK in sf_buf_init().
Gleb Smirnoff [Mon, 11 Aug 2014 13:12:18 +0000 (13:12 +0000)]
Use M_WAITOK in sf_buf_init().

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoProvide sf_buf_ref() to optimize refcounting of already allocated
Gleb Smirnoff [Mon, 11 Aug 2014 12:59:55 +0000 (12:59 +0000)]
Provide sf_buf_ref() to optimize refcounting of already allocated
sendfile(2) buffers.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoFix too long (seed length >12 chars) challenge handling.
Andrey A. Chernov [Mon, 11 Aug 2014 12:26:48 +0000 (12:26 +0000)]
Fix too long (seed length >12 chars) challenge handling.
1) " ext" length should be included into OPIE_CHALLENGE_MAX (as all places
of opie code expects that).
2) Overflow check in challenge.c is off by 1 even with corrected
OPIE_CHALLENGE_MAX
3) When fallback to randomchallenge() happens and rval is 0 (i.e.
challenge is too long), its value should be set to error state too.

To demonstrate the bug, run opiepasswd with valid seed:
opiepasswd -s 1234567890123456
and notice that it falls back to randomchallenge() (i.e. no
1234567890123456 in the prompt).

PR:             191511
Submitted by:   mitsururike@gmail.com (partially)
MFC after:      1 week

10 years ago- Remove unneeded include.
Marcelo Araujo [Mon, 11 Aug 2014 03:04:16 +0000 (03:04 +0000)]
- Remove unneeded include.

Phabric: D563
Reviewed by: kevlo
Approved by: kevlo

10 years agoAdd some more OS_MARK() probes to the AR9300 HAL.
Adrian Chadd [Mon, 11 Aug 2014 00:03:50 +0000 (00:03 +0000)]
Add some more OS_MARK() probes to the AR9300 HAL.