]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoAccording to opie code and even direct mention in opie(4) challenge buffer
ache [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

9 years agoChange SCTP sysctl from auth_disable to auth_enable. This is
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.

9 years agoFix broken pointer overflow check ns_name_unpack()
ume [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)

9 years agoClarify descriptions of pthread_cond_wait() and pthread_cond_timedwait()
gavin [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

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

Obtained from: ISC

9 years agoBring the md5 functions into libc for internal use only.
ume [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.

9 years ago- Fix radix tree memory leakage when unloading modules using radix
hselasky [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

9 years agoAdd support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED
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

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

9 years agoRemove duplicate entry.
ae [Tue, 12 Aug 2014 09:34:53 +0000 (09:34 +0000)]
Remove duplicate entry.

9 years agoRevision r269457 removed the Giant around mount and unmount code, but
kib [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

9 years agoAdd sysctl and loader tunable kern.geom.part.mbr.enforce_chs that is set
ae [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

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

9 years agoRevert r269839.
rpaulo [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

9 years agoAdd .d files to the reverse matching pattern in bsd.dep.mk to account
rpaulo [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

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

MFC after: 3 days

9 years agobsd.dep.mk: use the empty() function with the check for .d files.
rpaulo [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

9 years agoFix an error in the dependency of the DTrace object file.
rpaulo [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

9 years agoUpdate serf-1.3.6 -> 1.3.7
peter [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

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

9 years agoadd myself as opencrypto maintainer as I'm doing some work in the
jmg [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...

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

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

9 years agoChange {_,}pmap_allocpte() so that they look for the flag PMAP_ENTER_NOSLEEP
alc [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

9 years agoSimilar to r250143, optimize MODULES_OVERRIDE such that SUBDIR isn't
ngie [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

9 years agoIn arm/release.sh, continue if 'xdev-links' target fails
gjb [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

9 years agoAdd otp-sha
ache [Mon, 11 Aug 2014 15:41:55 +0000 (15:41 +0000)]
Add otp-sha

MFC after:      1 week

9 years agoblkfront: add support for unmapped IO
royger [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.

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

Submitted by: kib

9 years agoRemove dependence on source tree options. Move all kernel module
imp [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

9 years agoLast '/' for program name, not first one
ache [Mon, 11 Aug 2014 14:46:09 +0000 (14:46 +0000)]
Last '/' for program name, not first one

MFC after:      1 week

9 years agoLink otp-sha1 to match real challenge prompt, not otp-sha
ache [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

9 years agoWhen sha1 support was added, they forget to increase OPIE_HASHNAME_MAX
ache [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

9 years agoUse M_WAITOK in sf_buf_init().
glebius [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.

9 years agoProvide sf_buf_ref() to optimize refcounting of already allocated
glebius [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.

9 years agoFix too long (seed length >12 chars) challenge handling.
ache [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

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

Phabric: D563
Reviewed by: kevlo
Approved by: kevlo

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

9 years agoFix two files forgotten in r269783 (vt_generate_cons_palette)
dumbbell [Sun, 10 Aug 2014 22:24:14 +0000 (22:24 +0000)]
Fix two files forgotten in r269783 (vt_generate_cons_palette)

Reported by: bz
MFC after: 1 week
MFC with: 269783

9 years agoDocument the use of the vfs.nfsd sysctls that control the size of
rmacklem [Sun, 10 Aug 2014 20:05:13 +0000 (20:05 +0000)]
Document the use of the vfs.nfsd sysctls that control the size of
the NFS server's DRC for TCP.
This is a content change.

MFC after: 1 week

9 years agovt(4): Colors are indexed against a console palette, not a VGA palette
dumbbell [Sun, 10 Aug 2014 17:04:10 +0000 (17:04 +0000)]
vt(4): Colors are indexed against a console palette, not a VGA palette

Rename vt_generate_vga_palette() to vt_generate_cons_palette() and
change it to build a palette where the color index is the same than in
terminal escape codes, not the VGA index. That's what TCHAR_CREATE()
uses and passes to vt(4).

The main differences between both orders are:
    o  Blue and red are swapped (1 <-> 4)
    o  Yellow and cyan are swapped (3 <-> 6)

The problem remained unnoticed, because the RGB bit indexes passed to
vt_generate_vga_palette() were reversed. This inversion was cancelled
by the colors inversions in the generated palette. For instance, red
(0xff0000) and blue (0x0000ff) have bytes in opposite order, but were
swapped in the palette. But after changing the value of blue (see last
paragraph), the modified color was in fact the red one.

This commit includes a fix to creator_vt.c, submitted by Nathan
Whitehorn: fb_cmsize is set to 16. Before this, the generated palette
would be overwritte. This fixes colors on sparc64 with a Creator3D
adapter.

While here, tune the palette to better match console colors and improve
the readability (especially the dark blue).

Submitted by: nwhitehorn (fix to creator_vt.c)
MFC after: 1 week

9 years agoOn sparc64, do not keep mappings for the destroyed sf_bufs. Sparc64
kib [Sun, 10 Aug 2014 16:59:39 +0000 (16:59 +0000)]
On sparc64, do not keep mappings for the destroyed sf_bufs.  Sparc64
pmap, unlike i386, and similar to i386/xen pv, does not tolerate
abandoned mappings for the freed pages.

Reported and tested by: dumbbell
Diagnosed and reviewed by: alc
Sponsored by: The FreeBSD Foundation

9 years agovt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice
dumbbell [Sun, 10 Aug 2014 15:02:51 +0000 (15:02 +0000)]
vt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice

In several functions, vtbuf_putchar() in particular, the lock on vtbuf
is acquired twice:
    1. once by the said functions;
    2. once in vtbuf_dirty().

Now, vtbuf_dirty_locked() and vtbuf_dirty_cell_locked() allow to
acquire that lock only once.

This improves the input speed of vt(4). To measure the gain, a
50,000-lines file was displayed on the console using cat(1). The time
taken by cat(1) is reported below:
    o  On amd64, with vt_vga:
        - before: 1.0"
- after:  0.5"
    o  On sparc64, with creator_vt:
        - before: 13.6"
- after:  10.5"

MFC after: 1 week

9 years agofbd: Fix a bug where vt_fb_attach() success would be considered a failure
dumbbell [Sun, 10 Aug 2014 14:55:39 +0000 (14:55 +0000)]
fbd: Fix a bug where vt_fb_attach() success would be considered a failure

vt_fb_attach() currently always returns 0, but it could return a code
defined in errno.h. However, it doesn't return a CN_* code. So checking
its return value against CN_DEAD (which is 0) is incorrect, and in this
case, a success becomes a failure.

The consequence was unimportant, because the caller (drm_fb_helper.c)
would only log an error message in this case. The console would still
work.

Approved by: nwhitehorn

9 years agoUndo r195846 for now - allow raw frame transmit in monitor mode.
adrian [Sun, 10 Aug 2014 08:35:42 +0000 (08:35 +0000)]
Undo r195846 for now - allow raw frame transmit in monitor mode.

The original commit was supposed to stop the ability to do raw frame
injection in monitor mode to arbitrary channels (whether supported
by regulatory or not) however it doesn't seem to have been followed
by any useful way of doing it.

Apparently AHDEMO is supposed to be that way, but it seems to require
too much fiddly things (disable scanning, set a garbage SSID, etc)
for it to actually be useful for spoofing things.

So for now let's just disable it and instead look to filter transmit
in the output path if the channel isn't allowed by regulatory.
That way monitor RX works fine but TX will be blocked.

I don't plan on MFC'ing this to -10 until the regulatory enforcement
bits are written.

9 years agoFix string length argument passed to "sysctl_handle_string()" so that
hselasky [Sun, 10 Aug 2014 07:51:55 +0000 (07:51 +0000)]
Fix string length argument passed to "sysctl_handle_string()" so that
the complete string is returned by the function and not just only one
byte.

PR: 192544
MFC after: 2 weeks

9 years agoRemove the BROKEN_LIBELF section.
rpaulo [Sun, 10 Aug 2014 06:56:43 +0000 (06:56 +0000)]
Remove the BROKEN_LIBELF section.

This problem was fixed by Kai Wang in 2011.

MFC after: 3 days

9 years agoFix a few problems with the USDT probes:
rpaulo [Sun, 10 Aug 2014 06:43:40 +0000 (06:43 +0000)]
Fix a few problems with the USDT probes:

* Include OBJDIR to make sure the generated file is found;
* Simplify the definition of OBJS;
* Add targets for shared objects and for profiled objects.

MFC after: 3 days

9 years agoFix paths.
adrian [Sun, 10 Aug 2014 03:09:35 +0000 (03:09 +0000)]
Fix paths.

9 years agoChange the NFS server's printf related to hitting
rmacklem [Sun, 10 Aug 2014 01:13:32 +0000 (01:13 +0000)]
Change the NFS server's printf related to hitting
the DRC cache's flood level so that it suggests
increasing vfs.nfsd.tcphighwater.

Suggested by: h.schmalzbauer@omnilan.de

9 years agoHandle various ways that interrupt config data can be malformed by
ian [Sun, 10 Aug 2014 00:30:12 +0000 (00:30 +0000)]
Handle various ways that interrupt config data can be malformed by
warning and assuming more or less reasonable values.

9 years agoUse a separate variable for resource id, because 'i' may increment at a
ian [Sun, 10 Aug 2014 00:23:57 +0000 (00:23 +0000)]
Use a separate variable for resource id, because 'i' may increment at a
rate greater than 1 on each iteration.

9 years agoPer discussion on arm@, the compiler generates misaligned
imp [Sat, 9 Aug 2014 22:51:26 +0000 (22:51 +0000)]
Per discussion on arm@, the compiler generates misaligned
relocations. Cope with memcpy when needed.

Submitted by: fabient@ (plus changes suggested by thread)

9 years agoImprove comments by listing a criteria for automatic increment of receive socket
hiren [Sat, 9 Aug 2014 21:01:24 +0000 (21:01 +0000)]
Improve comments by listing a criteria for automatic increment of receive socket
buffer.

Reviewed by: jmg

9 years agoadd my scripts to measure io latency per disk...
jmg [Sat, 9 Aug 2014 20:40:03 +0000 (20:40 +0000)]
add my scripts to measure io latency per disk...

9 years agomake the README a bit more clearer...
jmg [Sat, 9 Aug 2014 20:25:17 +0000 (20:25 +0000)]
make the README a bit more clearer...

Sort the scripts, and remove the trailing backslash...

We really should install more of the toolkit scripts than just 5 of them..

9 years agoAdd more tools to the build.
adrian [Sat, 9 Aug 2014 18:17:49 +0000 (18:17 +0000)]
Add more tools to the build.

9 years agoUpdate athpoke/athregs to use the modified register read diagnostic API.
adrian [Sat, 9 Aug 2014 18:17:16 +0000 (18:17 +0000)]
Update athpoke/athregs to use the modified register read diagnostic API.

9 years agoBump the HAL_REGRANGE fields from 16 bit to 32 bit.
adrian [Sat, 9 Aug 2014 18:15:28 +0000 (18:15 +0000)]
Bump the HAL_REGRANGE fields from 16 bit to 32 bit.

The AR9380 and later chips have a 128KiB register window, so the register
read diag api needs changing.

The tools are about to be updated as well.  No, they're not backwards
compatible.

9 years agoUpdate the text of a KASSERT() to reflect the changes in r269728.
alc [Sat, 9 Aug 2014 17:13:02 +0000 (17:13 +0000)]
Update the text of a KASSERT() to reflect the changes in r269728.

9 years agoWhen r255294 was committed, it exposed the symbols lgammal, powl,
kargl [Sat, 9 Aug 2014 15:53:40 +0000 (15:53 +0000)]
When r255294 was committed, it exposed the symbols lgammal, powl,
and tgammal in libm.  These functions are part of ISO/IEC 9899:1999
and their prototypes should have been moved into the appropriate
__ISO_C_VISIBLE >= 1999 section.  After moving the prototypes,
remnants of r236148 can be removed.

PR: standards/191754
Reviewed by: bde

9 years agoSmall modification of the sctp_input() cleanup to avoid having
tuexen [Sat, 9 Aug 2014 14:33:44 +0000 (14:33 +0000)]
Small modification of the sctp_input() cleanup to avoid having
code between declariations.

9 years agoIn r268463, I misplaced a return in demangle(), causing the function to
dim [Sat, 9 Aug 2014 12:25:06 +0000 (12:25 +0000)]
In r268463, I misplaced a return in demangle(), causing the function to
erroneously skip symbols that were not mangled at all.  Fix this by
moving the return into the preceding if block.

While here, simplify the code by letting __cxa_demangle() allocate the
needed space for the demangled symbol.  This also fixes a memory leak,
which would occur whenever __cxa_demangle() failed.

Reported by: pgj
MFC after: 3 days

9 years agoAdd two new debug mark entries for chip power configuration.
adrian [Sat, 9 Aug 2014 09:13:10 +0000 (09:13 +0000)]
Add two new debug mark entries for chip power configuration.

9 years agoWork around some rather annoying chip hangs in the AR9331 chip.
adrian [Sat, 9 Aug 2014 09:12:25 +0000 (09:12 +0000)]
Work around some rather annoying chip hangs in the AR9331 chip.

If powersave is enabled and there are any transitions to network
or full sleep - even if they're pretty damned brief - eventually
something messes up somewhere and the bus glue between the AR9331
SoC and the AR9331 wifi stops working.  It shows up as stuck DMA
and LOCAL_TIMEOUT interrupts.

Both ath9k and the reference driver does a full chip reset if things
get stuck.

So:

* teach the AR9330 HAL about the force_full_reset option I added a
  couple of years ago;
* if the chip is currently in full-sleep, do a full-reset;
* if TX DMA and/or RX DMA are still enabled (eg, they did get
  stuck during reset) then do a full-reset.

Tested:

* AR9331 SoC, STA mode

9 years agoAdapt vm_page_aflag_set(PGA_WRITEABLE) to the locking of
kib [Sat, 9 Aug 2014 05:00:34 +0000 (05:00 +0000)]
Adapt vm_page_aflag_set(PGA_WRITEABLE) to the locking of
pmap_enter(PMAP_ENTER_NOSLEEP).  The PGA_WRITEABLE flag can be set
when either the page is busied, or the owner object is locked.

Update comments, move all assertions about page state when
PGA_WRITEABLE flag is set, into new helper
vm_page_assert_pga_writeable().

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoCreate a redundant grain directory and table. Previously we were
marcel [Sat, 9 Aug 2014 04:47:12 +0000 (04:47 +0000)]
Create a redundant grain directory and table. Previously we were
cheating by assigning the same sector offset to both directories,
but it seems that VirtualBox doesn't like that. Neither does
qemu from the looks of it.  We now actually write the directory
and table twice.

MFC after: 3 days

9 years agoRun dtrace in 32-bit mode when compiling 32-bit libraries.
rpaulo [Fri, 8 Aug 2014 23:55:22 +0000 (23:55 +0000)]
Run dtrace in 32-bit mode when compiling 32-bit libraries.

MFC after: 3 days

9 years agoUpdate the comments in exec.h with help from jilles.
wblock [Fri, 8 Aug 2014 22:30:41 +0000 (22:30 +0000)]
Update the comments in exec.h with help from jilles.

PR: 180970
Submitted by: Carlos Jacobo Puga Medina <cjpugmed@gmail.com>
Reviewed by: jilles
MFC after: 1 week

9 years agoQuiesce warning about discarding a const qualifier in assignement.
sbruno [Fri, 8 Aug 2014 21:47:47 +0000 (21:47 +0000)]
Quiesce warning about discarding a const qualifier in assignement.

Phabric: https://phabric.freebsd.org/D445
Reviewed by: neel

9 years agoPull in r214736 from upstream libc++ trunk (by Marshall Clow):
dim [Fri, 8 Aug 2014 21:27:33 +0000 (21:27 +0000)]
Pull in r214736 from upstream libc++ trunk (by Marshall Clow):

  Fix PR#20520 - predicate called too many times in list::remove_if.
  Add tests for list, forward_list, and the std::remove_if algorithm

This fixes an issue where std::list<>::remove_if() and remove() could
erroneously visit elements twice.

Reported by: Dominic Fandrey <kamikaze@bsdforen.de>
PR: 192303
MFC after: 3 days

9 years agocxgbe(4): Do not poke T4-only registers on a T5 (and vice versa).
np [Fri, 8 Aug 2014 18:36:53 +0000 (18:36 +0000)]
cxgbe(4): Do not poke T4-only registers on a T5 (and vice versa).

Obtained from: Chelsio Communications
MFC after: 1 week

9 years agoQuiesce a printf warning from clang, %ul -> %lu
sbruno [Fri, 8 Aug 2014 18:00:23 +0000 (18:00 +0000)]
Quiesce a printf warning from clang, %ul -> %lu

Phabric: https://phabric.freebsd.org/D472
Reviewed by: mahrens delphij

9 years agosed(1): Don't force a newline on last line, if input stream doesn't have one
dumbbell [Fri, 8 Aug 2014 17:29:01 +0000 (17:29 +0000)]
sed(1): Don't force a newline on last line, if input stream doesn't have one

While here, change how we check if the current line is the last one.
Before, we just checked if there were more files after the current one.
Now, we check the actual content of those files: they files may not have
a line at all. This matches the definition of the "last line" by the
Open Group.

The new behavior is closer to GNU sed.

PR: 160745
Phabric: https://phabric.freebsd.org/D431
Reviewed by: jilles
Approved by: jilles
Exp-run by: antoine

9 years agoChange pmap_enter(9) interface to take flags parameter and superpage
kib [Fri, 8 Aug 2014 17:12:03 +0000 (17:12 +0000)]
Change pmap_enter(9) interface to take flags parameter and superpage
mapping size (currently unused).  The flags includes the fault access
bits, wired flag as PMAP_ENTER_WIRED, and a new flag
PMAP_ENTER_NOSLEEP to indicate that pmap should not sleep.

For powerpc aim both 32 and 64 bit, fix implementation to ensure that
the requested mapping is created when PMAP_ENTER_NOSLEEP is not
specified, in particular, wait for the available memory required to
proceed.

In collaboration with: alc
Tested by: nwhitehorn (ppc aim32 and booke)
Sponsored by: The FreeBSD Foundation and EMC / Isilon Storage Division
MFC after: 2 weeks

9 years agoUpdate vmstat usage for last-argument count/wait parameters
bjk [Fri, 8 Aug 2014 16:32:06 +0000 (16:32 +0000)]
Update vmstat usage for last-argument count/wait parameters

Correct the usage in both the manpage and in usage() to indicate
that the wait interval and repetition count may be given either
with the respective -w/-c arguments, or as the final positional
arguments. [0]

The corresponding code to implement the positional arguments has
been conditional on the (always-enabled) BACKWARD_COMPATIBILITY
macro since the original 4.4-lite import.  It's no longer reasonable
to remove the functionality, so remove the macro and conditional
instead.

Note that multiple disks may be given on the command line.

While here, sort arguments and apply minor mdoc fixes.

PR: 184755 [0]
Approved by: hrs (mentor, src committer)

9 years agoFix one more compiler warning, m is not initialized.
kib [Fri, 8 Aug 2014 15:50:02 +0000 (15:50 +0000)]
Fix one more compiler warning, m is not initialized.

9 years agoan isn't used, so eliminate it.
imp [Fri, 8 Aug 2014 11:47:23 +0000 (11:47 +0000)]
an isn't used, so eliminate it.

9 years agoerr set but not used. Eliminate it.
imp [Fri, 8 Aug 2014 11:47:18 +0000 (11:47 +0000)]
err set but not used. Eliminate it.

9 years agolast is set and not used, most likely a cut and paste error from other
imp [Fri, 8 Aug 2014 11:47:14 +0000 (11:47 +0000)]
last is set and not used, most likely a cut and paste error from other
sysctl setting functions in this module.

9 years agoSet but not used variables eliminated.
imp [Fri, 8 Aug 2014 11:47:09 +0000 (11:47 +0000)]
Set but not used variables eliminated.

9 years agoshared_scb_data set, but never used, remove it.
imp [Fri, 8 Aug 2014 11:47:04 +0000 (11:47 +0000)]
shared_scb_data set, but never used, remove it.

9 years agois_full_id is set to 0 and then not used. remove it.
imp [Fri, 8 Aug 2014 11:46:45 +0000 (11:46 +0000)]
is_full_id is set to 0 and then not used. remove it.

9 years agoVOP_LOOKUP() may relock the directory vnode for some reasons. Since
kib [Fri, 8 Aug 2014 11:39:05 +0000 (11:39 +0000)]
VOP_LOOKUP() may relock the directory vnode for some reasons.  Since
nullfs vnode shares vnode lock with lower vnode, this allows the
reclamation of nullfs directory vnode in null_lookup().  In this
situation, VOP must return ENOENT.

More, since after the reclamation, the locks of nullfs directory vnode
and lower vnode are no longer shared, the relock of the ldvp does not
restore the correct locking state of dvp, and leaks ldvp lock.
Correct this by unlocking ldvp and locking dvp.

Use cached value of dvp->v_mount.

Reported by: bdrewery
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoFix argument to KTR after r269699 to unbreak LINT builds.
bz [Fri, 8 Aug 2014 09:17:02 +0000 (09:17 +0000)]
Fix argument to KTR after r269699 to unbreak LINT builds.

9 years agoRemove unnecessary inclusion of FDT headers.
nwhitehorn [Fri, 8 Aug 2014 06:30:17 +0000 (06:30 +0000)]
Remove unnecessary inclusion of FDT headers.

9 years agoUse OF_getencprop() in preference to OF_getprop() and manual byte-swapping.
nwhitehorn [Fri, 8 Aug 2014 06:29:30 +0000 (06:29 +0000)]
Use OF_getencprop() in preference to OF_getprop() and manual byte-swapping.

9 years agoSet the si_code appropriately for exception-caused signals.
jhibbits [Fri, 8 Aug 2014 06:22:32 +0000 (06:22 +0000)]
Set the si_code appropriately for exception-caused signals.

LLDB checks the si_code, and aborts if a code isn't known.

MFC after: 2 weeks
Relnotes: yes

9 years agoSupport PCI extended config space in bhyve.
neel [Fri, 8 Aug 2014 03:49:01 +0000 (03:49 +0000)]
Support PCI extended config space in bhyve.

Add the ACPI MCFG table to advertise the extended config memory window.

Introduce a new flag MEM_F_IMMUTABLE for memory ranges that cannot be deleted
or moved in the guest's address space. The PCI extended config space is an
example of an immutable memory range.

Add emulation for the "movzw" instruction. This instruction is used by FreeBSD
to read a 16-bit extended config space register.

CR: https://phabric.freebsd.org/D505
Reviewed by: jhb, grehan
Requested by: tychon

9 years agoMerge 'struct ip6protosw' and 'struct protosw' into one. Now we have
kevlo [Fri, 8 Aug 2014 01:57:15 +0000 (01:57 +0000)]
Merge 'struct ip6protosw' and 'struct protosw' into one.  Now we have
only one protocol switch structure that is shared between ipv4 and ipv6.

Phabric: D476
Reviewed by: jhb

9 years agoAdd a missing clock register definition.
ian [Fri, 8 Aug 2014 01:23:43 +0000 (01:23 +0000)]
Add a missing clock register definition.

9 years agoAdd the dts include directory to the -I list when doing arm builds.
ian [Fri, 8 Aug 2014 01:21:52 +0000 (01:21 +0000)]
Add the dts include directory to the -I list when doing arm builds.

9 years agoConst-ify character string
pfg [Thu, 7 Aug 2014 22:14:37 +0000 (22:14 +0000)]
Const-ify character string

Obtained from:  Apple Inc. (Libc 997.90.3)
MFC after: 3 days

9 years agoCast queue length because q_len isn't really an enum in the same sense
imp [Thu, 7 Aug 2014 21:56:46 +0000 (21:56 +0000)]
Cast queue length because q_len isn't really an enum in the same sense
that clang wants it to be (a value that can only have values inside
the enum range), but rather an unsigned count of bytes.

9 years agocswitch is unsigned, so don't compare it < 0. Any negative numbers
imp [Thu, 7 Aug 2014 21:56:42 +0000 (21:56 +0000)]
cswitch is unsigned, so don't compare it < 0. Any negative numbers
will look huge and be caught by > 100.

9 years agoUnsigned values can never be less than 0.
imp [Thu, 7 Aug 2014 21:56:37 +0000 (21:56 +0000)]
Unsigned values can never be less than 0.

9 years agotarget is unsigned, so don't compare it < 0 for range test.
imp [Thu, 7 Aug 2014 21:56:32 +0000 (21:56 +0000)]
target is unsigned, so don't compare it < 0 for range test.

9 years agom4 now requires libohash, ensure it gets built when bootstrapping.
ian [Thu, 7 Aug 2014 21:37:03 +0000 (21:37 +0000)]
m4 now requires libohash, ensure it gets built when bootstrapping.

9 years agoRetire vd_maskbitbltchr. The same functionality can be obtained by testing
nwhitehorn [Thu, 7 Aug 2014 21:00:16 +0000 (21:00 +0000)]
Retire vd_maskbitbltchr. The same functionality can be obtained by testing
for mask != NULL in vd_bitbltchr, which all implementations of vd_bitbltchr()
were doing anyway.

9 years agoMerge OpenSSL 1.0.1i.
jkim [Thu, 7 Aug 2014 18:56:10 +0000 (18:56 +0000)]
Merge OpenSSL 1.0.1i.

9 years agoatpic: make sure atpic_init is called after IO APIC initialization
royger [Thu, 7 Aug 2014 17:00:50 +0000 (17:00 +0000)]
atpic: make sure atpic_init is called after IO APIC initialization

After r269510 the IO APIC and ATPIC initialization is done at the same
order, which means atpic_init can be called before the IO APIC has
been initalized. In that case the ATPIC will take over the interrupt
sources, preventing the IO APIC from registering them.

Reported by: David Wolfskill <david@catwhisker.org>
Tested by: David Wolfskill <david@catwhisker.org>,
           Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no>
Sponsored by: Citrix Systems R&D