18 hours agoSet LCDC clock frequency to 2*148500 KHz master github/master
gonzo [Thu, 29 Jan 2015 01:59:42 +0000 (01:59 +0000)]
Set LCDC clock frequency to 2*148500 KHz

Minimum LCDC is 2 so clock freq shouild be 2*max_pixel_clock. Maximum pixel
clock for HDMI is 148500 (1920x1080). But AM335x can not run in this mode
due to bandwidth and clock limitations

18 hours agoMFV r277866
pfg [Thu, 29 Jan 2015 01:28:39 +0000 (01:28 +0000)]
MFV r277866
amd: Add extra check for NULL before deref.

CID: 274421
Obtained from: NetBSD
MFC after: 4 days

19 hours agoRevert r277814: It will be re-merged through the vendor area.
pfg [Thu, 29 Jan 2015 01:26:23 +0000 (01:26 +0000)]
Revert r277814: It will be re-merged through the vendor area.

21 hours agosem_post(): Fix and document semaphore value overflow error.
jilles [Wed, 28 Jan 2015 22:42:56 +0000 (22:42 +0000)]
sem_post(): Fix and document semaphore value overflow error.

The error code is per Austin Group issue #315.

I provided different wording for the manual page change.

Submitted by: pluknet
MFC after: 1 week

22 hours agoFix the following -Wcast-qual warnings in usr.sbin/sa/db.c:
dim [Wed, 28 Jan 2015 22:22:49 +0000 (22:22 +0000)]
Fix the following -Wcast-qual warnings in usr.sbin/sa/db.c:

usr.sbin/sa/db.c:82:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual] = (void*)&VERSION_KEY;
usr.sbin/sa/db.c:178:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual] = (void*)&VERSION_KEY;

Replace the VERSION_KEY define with a writable char array, so no const
qualifier needs to be dropped anymore.

Submitted by: rdivacky

22 hours agoFix multiple instances of the following clang 3.6.0 warning in ppp:
dim [Wed, 28 Jan 2015 21:33:49 +0000 (21:33 +0000)]
Fix multiple instances of the following clang 3.6.0 warning in ppp:

usr.sbin/ppp/command.c:2054:74: error: address of array 'arg->bundle->radius.cfg.file'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
      if (arg->bundle->radius.alive.interval && !arg->bundle->radius.cfg.file) {

In all cases, the file field of struct radius is a char array, but the
intent was to check whether the string is empty, so add an indirection
to achieve that.  Use a similar approach for the sockname field of
struct server.

23 hours agoFix the following clang 3.6.0 warnings in pciconf:
dim [Wed, 28 Jan 2015 21:21:35 +0000 (21:21 +0000)]
Fix the following clang 3.6.0 warnings in pciconf:

usr.sbin/pciconf/pciconf.c:237:12: error: address of array 'p->pd_name' will
always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                            (p->pd_name && *p->pd_name) ? p->pd_name :
                             ~~~^~~~~~~ ~~
usr.sbin/pciconf/pciconf.c:239:12: error: address of array 'p->pd_name' will
always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                            (p->pd_name && *p->pd_name) ? (int)p->pd_unit :
                             ~~~^~~~~~~ ~~

The pd_name field of struct pci_conf is an array, so it can never be null.
Remove the unnecessary check.

23 hours agoAdd allow.mount.fdescfs jail flag.
jamie [Wed, 28 Jan 2015 21:08:09 +0000 (21:08 +0000)]
Add allow.mount.fdescfs jail flag.

PR: 192951
Submitted by:
MFC after: 3 days

23 hours agoipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4
cy [Wed, 28 Jan 2015 21:01:55 +0000 (21:01 +0000)]
ipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4
and IPv6 rules in a single table. ipf -6 -Fa will flush the whole table,
including IPv4 rules. This patch removes the redundant ipf -I -6 -Fa

PR: 188318
MFC after: 2 weeks

24 hours agoCheck for invalid length or more than max length for the interpreter, instead
sbruno [Wed, 28 Jan 2015 20:22:48 +0000 (20:22 +0000)]
Check for invalid length or more than max length for the interpreter, instead
of the validity of the string pointer holding the interpreter.

Submitted by: sson
Reviewed by: dim
MFC after: 3 days

25 hours agoPreserve hard & symbolic links when modifying source file
emaste [Wed, 28 Jan 2015 18:37:09 +0000 (18:37 +0000)]
Preserve hard & symbolic links when modifying source file

Strip is often used to modify existing files, rather than creating new
files. If the existing file has hard links or is a symbolic link, act as
if editing the file in place and preserve the links.

Reported by: luigi
Reviewed by: imp, rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision:

26 hours agoFix the following clang 3.6.0 warning in contrib/amd/hlfsd/homedir.c:
dim [Wed, 28 Jan 2015 18:19:25 +0000 (18:19 +0000)]
Fix the following clang 3.6.0 warning in contrib/amd/hlfsd/homedir.c:

contrib/amd/hlfsd/homedir.c:497:8: error: address of array 'buf' will
always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
  if (!buf || buf[0] == '\0')

In the affected function, 'buf' is declared as an array of char, so it
can never be null.  Remove the unecessary check.

26 hours agoUpdate release(7) to reflect renaming the 'system' target
gjb [Wed, 28 Jan 2015 18:13:16 +0000 (18:13 +0000)]
Update release(7) to reflect renaming the 'system' target
to 'disc1'.

MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609, r277836
Sponsored by: The FreeBSD Foundation

26 hours agoFix a typo in a comment.
gjb [Wed, 28 Jan 2015 17:39:57 +0000 (17:39 +0000)]
Fix a typo in a comment.

MFC after: 1 week
X-MFC-with: r277837
Sponsored by: The FreeBSD Foundation

26 hours agoProvide a description for the 'tests.txz' distribution
gjb [Wed, 28 Jan 2015 17:34:27 +0000 (17:34 +0000)]
Provide a description for the 'tests.txz' distribution
in the MANIFEST file.

Turn off the test suite installation by default.

Tested with: head@r277834
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

26 hours agoRename the 'system' target to 'disc1', which is specific
gjb [Wed, 28 Jan 2015 17:32:45 +0000 (17:32 +0000)]
Rename the 'system' target to 'disc1', which is specific
to the disc1.iso installer image.

Replace 'system' with 'release' in CLEANFILES, and add
'disc1' to CLEANDIRS.

Ensure the 'dvd' target depends on 'packagesystem'.

Fix 'mini-memstick.img' prerequisite, which should be the
'bootonly' target, not 'disc1' (previously 'system').

Use .TARGET as the target installation directory for the
disc1.iso and bootonly.iso images, which now expand to
'disc1' and 'bootonly' respectively, mimicking the behavior
of the 'dvd' target.

Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer

Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with:     r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation

28 hours agoAdd ARMv7 performance monitoring counters.
br [Wed, 28 Jan 2015 16:08:07 +0000 (16:08 +0000)]
Add ARMv7 performance monitoring counters.

Differential Revision:
Reviewed by: rpaulo
Sponsored by: DARPA, AFRL

28 hours agoWhen there are no automounted filesystems, autounmountd(8) should wait
trasz [Wed, 28 Jan 2015 15:46:11 +0000 (15:46 +0000)]
When there are no automounted filesystems, autounmountd(8) should wait
for filesystem event, instead of looping on a timeout.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

32 hours agoRevert r277357 as expr has been enhanced to better detect overflow conditions,
ngie [Wed, 28 Jan 2015 11:38:12 +0000 (11:38 +0000)]
Revert r277357 as expr has been enhanced to better detect overflow conditions,
and now the tests pass

PR: 196867
X-MFC with: r277798
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

33 hours agoUpdate mtime for tmpfs files modified through memory mapping. Similar
kib [Wed, 28 Jan 2015 10:37:23 +0000 (10:37 +0000)]
Update mtime for tmpfs files modified through memory mapping.  Similar
to UFS, perform updates during syncer scans, which in particular means
that tmpfs now performs scan on sync.  Also, this means that a mtime
update may be delayed up to 30 seconds after the write.

The vm_object' OBJ_TMPFS_DIRTY flag for tmpfs swap object is similar
to the OBJ_MIGHTBEDIRTY flag for the vnode object, it indicates that
object could have been dirtied.  Adapt fast page fault handler and
vm_object_set_writeable_dirty() to handle OBJ_TMPFS_NODE same as

Reported by: Ronald Klop <>
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

34 hours agotmpfs does not use UVM on FreeBSD.
kib [Wed, 28 Jan 2015 10:25:35 +0000 (10:25 +0000)]
tmpfs does not use UVM on FreeBSD.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

35 hours agoMFV r255258:
delphij [Wed, 28 Jan 2015 08:56:48 +0000 (08:56 +0000)]
MFV r255258:

Diff reduction with upstream.  The actual change was merged in r272483

MFC after: 2 weeks

39 hours agoCast everything to something longer than 32 bits so the sample mask
adrian [Wed, 28 Jan 2015 04:44:42 +0000 (04:44 +0000)]
Cast everything to something longer than 32 bits so the sample mask
doesn't get truncated to 32 bits.

Without this, 3x3 NICs transmitting at an MCS rate whose rix (rate
index) in the rate table is > 31 end up returning errors, as the
sample rate code doesn't think the rate is set in the rate table.


* AR9380, STA, speaking 3x3 to an AP

39 hours agoPrint out the final_rix if there's a problem.
adrian [Wed, 28 Jan 2015 04:42:40 +0000 (04:42 +0000)]
Print out the final_rix if there's a problem.

40 hours agoAdd a new HAL capability - required to compile the updated AR9300
adrian [Wed, 28 Jan 2015 04:02:56 +0000 (04:02 +0000)]
Add a new HAL capability - required to compile the updated AR9300
HAL i have lying about.

46 hours agoWhitespace change.
tuexen [Tue, 27 Jan 2015 21:30:24 +0000 (21:30 +0000)]
Whitespace change.

47 hours agoamd: Add extra check for NULL before deref.
pfg [Tue, 27 Jan 2015 20:48:05 +0000 (20:48 +0000)]
amd: Add extra check for NULL before deref.

CID: 274421
Obtained from: NetBSD
MFC after: 5 days

2 days agosed: fix pasto from previous r277802.
pfg [Tue, 27 Jan 2015 19:46:19 +0000 (19:46 +0000)]
sed: fix pasto from previous r277802.

MFC after: 3 days

2 days agoUse unsigned int for index value.
delphij [Tue, 27 Jan 2015 19:35:41 +0000 (19:35 +0000)]
Use unsigned int for index value.

Without this change a local attacker could trigger a panic by
tricking the kernel into accessing undefined kernel memory.

We would like to acknowledge Francisco Falcon from CORE Security
Technologies who discovered the issue and reported to the
FreeBSD Security Team.

More information can be found at CORE Security's advisory at:

This is an errata candidate for releng/10.1 and releng/9.3.  Earlier
releases are not affected.

Reported by: Francisco Falcon from CORE Security Technologies
Security: CVE-2014-0998
Reviewed by: dumbbell
MFC after: 3 days

2 days agoFix SCTP stream reset vulnerability.
delphij [Tue, 27 Jan 2015 19:35:38 +0000 (19:35 +0000)]
Fix SCTP stream reset vulnerability.

We would like to acknowledge Gerasimos Dimitriadis who reported
the issue and Michael Tuexen who analyzed and provided the

Security: FreeBSD-SA-15:03.sctp
Security: CVE-2014-8613
Submitted by: tuexen

2 days agoFix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability.
delphij [Tue, 27 Jan 2015 19:35:36 +0000 (19:35 +0000)]
Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability.

We would like to acknowledge Clement LECIGNE from Google Security Team and
Francisco Falcon from Core Security Technologies who discovered the issue
independently and reported to the FreeBSD Security Team.

Security: FreeBSD-SA-15:02.kmem
Security: CVE-2014-8612
Submitted by: tuexen

2 days agoFix resource leak and dereference after NULL.
pfg [Tue, 27 Jan 2015 18:58:24 +0000 (18:58 +0000)]
Fix resource leak and dereference after NULL.

Protect access against NULL.

Prevent outfile overwrite resource leak.

CID: 271181
CID: 1006930

Obtained from: NetBSD
MFC after: 3 days

2 days agoConstify a struct savexmm pointer in pt_ucontext_to_fpreg(), to silence
dim [Tue, 27 Jan 2015 18:56:46 +0000 (18:56 +0000)]
Constify a struct savexmm pointer in pt_ucontext_to_fpreg(), to silence
a -Wcast-qual warning from clang 3.6.0.

2 days agoFix yet another coverty warning (missing io is NULL check) and in examining that
rrs [Tue, 27 Jan 2015 18:56:22 +0000 (18:56 +0000)]
Fix yet another coverty warning (missing io is NULL check) and in examining that
warning I see yet another issue where we should be pclosing the io in the event
of the error and its a command (not fclose only).

2 days agoFix sysctl name.
trasz [Tue, 27 Jan 2015 18:27:07 +0000 (18:27 +0000)]
Fix sysctl name.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

2 days agoFix overflow check for multiplication:
se [Tue, 27 Jan 2015 18:04:41 +0000 (18:04 +0000)]
Fix overflow check for multiplication:
- Add special test to detect the case of -1 * INTMAX_MIN
- Protect against elimination of the test division by the optimizer

Garrett Cooper noticed that the overflow checks were incomplete, and Bruce
Evans suggested the use of the "volatile" qualifier to counter the effect
of the undefined behaviour, when the prior multiplication caused overflow,
and he also suggested improvements to the comments.

Reviewed by: bde
MFC after: 1 week

2 days agokey_spdget uses key_setdumpsp() without SPTREE_RLOCK held (it uses
ae [Tue, 27 Jan 2015 17:46:55 +0000 (17:46 +0000)]
key_spdget uses key_setdumpsp() without SPTREE_RLOCK held (it uses
referenced pointer to sp). Remove SPTREE_RLOCK_ASSERT from
key_setdumpsp() to fix wrong assertion.

Reported by: Emeric POUPON
Obtained from: Yandex LLC
Sponsored by: Yandex LLC

2 days agohook userland threads suspend + resume into acpi suspend code
avg [Tue, 27 Jan 2015 17:33:18 +0000 (17:33 +0000)]
hook userland threads suspend + resume into acpi suspend code

Also, split power_suspend into power_suspend and power_suspend_early.

power_suspend_early is called before the userland is frozen.
power_suspend is called after the userland is frozen.

Currently only VT switching is hooked to power_suspend_early.
This is needed because switching away from X server requires its
cooperation, so obviously X server must not be frozen when that happens.

Freezing userland during ACPI suspend is useful because not all drivers
correctly handle suspension concurrent with other activity.  This is
especially applicable to drivers ported from other operating systems
that suspend all software activity between placing drivers and hardware
into suspended state.
In particular drm2/radeon (radeonkms) depends on the described
procedure.  The driver does not have any internal synchronization
between suspension activities and processing of userland requests.

Many thanks to kib for the code that allows to freeze and thaw all
userland threads.

Note that ideally we also need to park / inhibit (non-special) kernel
threads as well to ensure that they do not call into drivers.

MFC after: 17 days

2 days agovt(4): Use power_{suspend,resume} event handlers to implement
avg [Tue, 27 Jan 2015 15:28:46 +0000 (15:28 +0000)]
vt(4): Use power_{suspend,resume} event handlers to implement

The goal is to avoid that the vt(4) resume happens before the video
display is resumed. The original patch was provided by Andriy Gapon.

This new patch registers the handlers in vt_upgrade(). This is done
once, thanks to the VDF_ASYNC flag. I abused this flag because it was
already abused by the keyboard allocation. The event handlers then call
the backend if it provides callbacks for suspend/resume.

Differential Revision:
On behalf of: dumbbell
MFC after: 2 weeks

2 days agoThe sys_quotactl() contract demands that the mount point is
kib [Tue, 27 Jan 2015 10:32:49 +0000 (10:32 +0000)]
The sys_quotactl() contract demands that the mount point is
vfs_unbusy()ed when the cmd is Q_QUOTAON, regardless of other input
parameters or error return.

Submitted by: Conrad Meyer
Sponsored by: EMC / Isilon Storage Division
Differential Revision:
Tested by: pho
MFC after: 1 week

2 days agoRewrite pmap_enter(9) man page.
kib [Tue, 27 Jan 2015 09:48:02 +0000 (09:48 +0000)]
Rewrite pmap_enter(9) man page.

In collaboration with: alc
Differential Revision:
Sponsored by: The FreeBSD Foundation and EMC / Isilon Storage Division
MFC after: 1 week

2 days agoFix bug in mapppings of multiple pages exposed by updates to the VSCSI
nwhitehorn [Tue, 27 Jan 2015 07:20:00 +0000 (07:20 +0000)]
Fix bug in mapppings of multiple pages exposed by updates to the VSCSI
support in QEMU. Each page of a many page mapping was getting mapped to
the same physical address, which is not the desired behavior.

MFC after: 1 week

2 days agoRework vtblk dump handling of in flight requests
bryanv [Tue, 27 Jan 2015 05:34:46 +0000 (05:34 +0000)]
Rework vtblk dump handling of in flight requests

Previously, the driver resets the device and abandon the requests that
are caught in flight when the dump was initiated. This was problematic
if the system is resumed after the dump is completed.

While that is probably not the typical action, it is simple to rework
the driver to very likely have the device usable after the dump without
making it more likely for the dump to fail. The in flight requests are
simply queued for completion once the dump is finished.

Requested by: markj
MFC after: 1 month

2 days agoRemove build specific details from in support of
gshapiro [Tue, 27 Jan 2015 04:06:47 +0000 (04:06 +0000)]
Remove build specific details from in support of

The contrib/sendmail change will be made in the upstream source for a
future sendmail release.

Reviewed by: des
MFC after: 3 days

2 days agoMFV r277782:
pfg [Tue, 27 Jan 2015 01:45:47 +0000 (01:45 +0000)]
MFV r277782:

Merge some cherry-picked fixes originating in OpenBSD

Check whether the version field is available before looking at it.
While we're at it, use ND_TCHECK(), rather than a hand-rolled check, to
check whether we have the full fixed-length portion of the IPv4 header.

commit c67afe913011138a2504ec4d3d423b48e73b12f3

Do more length checking. From OpenBSD.

commit d7516761f9c4877bcb05bb6543be3543e165249

2 days agoAdd llvm and clang patches corresponding to r277774 and r277775.
dim [Mon, 26 Jan 2015 21:24:04 +0000 (21:24 +0000)]
Add llvm and clang patches corresponding to r277774 and r277775.

2 days agoPull in r227062 from upstream clang trunk (by Renato Golin):
dim [Mon, 26 Jan 2015 21:19:24 +0000 (21:19 +0000)]
Pull in r227062 from upstream clang trunk (by Renato Golin):

  Allows Clang to use LLVM's fixes-x18 option

  This patch allows clang to have llvm reserve the x18
  platform register on AArch64. FreeBSD will use this in the kernel for
  per-cpu data but has no need to reserve this register in userland so
  will need this flag to reserve it.

  This uses llvm r226664 to allow this register to be reserved.

  Patch by Andrew Turner.

Requested by: andrew

2 days agoPull in r226664 from upstream llvm trunk (by Tim Northover):
dim [Mon, 26 Jan 2015 21:17:14 +0000 (21:17 +0000)]
Pull in r226664 from upstream llvm trunk (by Tim Northover):

  AArch64: add backend option to reserve x18 (platform register)

  AAPCS64 says that it's up to the platform to specify whether x18 is
  reserved, and a first step on that way is to add a flag controlling

  From: Andrew Turner <>

Requested by: andrew

3 days agoRemove cruft; ICL_RDMA was never actually working, and will be redone
trasz [Mon, 26 Jan 2015 19:31:14 +0000 (19:31 +0000)]
Remove cruft; ICL_RDMA was never actually working, and will be redone
in a completely different manner.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

3 days agoRevert r277652
bapt [Mon, 26 Jan 2015 16:50:42 +0000 (16:50 +0000)]
Revert r277652

uid and gid are never and should never be negative. The pw(8) manpage clearly
states the -u and -g arguments are for uids/gids, hence using negative values is
abusing a bug in former versions of pw(8)

3 days agoLock the socket buffer before jumping to the 'out' label if sblock()
jhb [Mon, 26 Jan 2015 16:32:41 +0000 (16:32 +0000)]
Lock the socket buffer before jumping to the 'out' label if sblock()
fails in t4_soreceive_ddp().

3 days ago- Update a disabled KASSERT() to use sbused() instead of accessing
jhb [Mon, 26 Jan 2015 16:29:14 +0000 (16:29 +0000)]
- Update a disabled KASSERT() to use sbused() instead of accessing
  the no-longer existant sb_cc sockbuf member.
- Use sbavail() instead of sbused() in t4_soreceive_ddp() to match the
  usage in soreceive_stream() on which it is based.

Discussed with: glebius (2)

3 days agoFix a couple of panics when detaching from a cxgbe/cxl interface that was
jhb [Mon, 26 Jan 2015 16:26:28 +0000 (16:26 +0000)]
Fix a couple of panics when detaching from a cxgbe/cxl interface that was
never brought up:
- Allow NULL to be passed to sglist_free().
- Don't try to stop an interface that was never fully initialized.

Reviewed by: np

3 days agoFix several potential overflows in UNMAP code.
mav [Mon, 26 Jan 2015 15:47:08 +0000 (15:47 +0000)]
Fix several potential overflows in UNMAP code.

MFC after: 1 week

3 days agoAdd a generic way for hooking PMC interrupt.
br [Mon, 26 Jan 2015 10:31:17 +0000 (10:31 +0000)]
Add a generic way for hooking PMC interrupt.

3 days agoEnsure that _tmppt KVA is used exclusively by providing exclusive sx
kib [Mon, 26 Jan 2015 10:11:55 +0000 (10:11 +0000)]
Ensure that _tmppt KVA is used exclusively by providing exclusive sx
lock around the mapping and uiomove().  Before r277643, it was
partially protected by Giant (but potential sleeping in fault from
uiomove() would still allow other thread to reuse the mapping).

Noted by: ian
Reviewed by: alc, ian
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

3 days agoRespect MK_KERBEROS with etc/rc.d/ipropd_master and etc/rc.d/ipropd_slave
ngie [Mon, 26 Jan 2015 09:51:21 +0000 (09:51 +0000)]
Respect MK_KERBEROS with etc/rc.d/ipropd_master and etc/rc.d/ipropd_slave

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

3 days agoHonor MK_WIRELESS with etc/rc.d/hostapd and etc/rc.d/wpa_supplicant
ngie [Mon, 26 Jan 2015 09:43:08 +0000 (09:43 +0000)]
Honor MK_WIRELESS with etc/rc.d/hostapd and etc/rc.d/wpa_supplicant

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

3 days agoHonor MK_JAIL with etc/rc.d/jail
ngie [Mon, 26 Jan 2015 09:37:14 +0000 (09:37 +0000)]
Honor MK_JAIL with etc/rc.d/jail

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

3 days agoHonor MK_BLUETOOTH with etc/defaults/bluetooth.device.conf
ngie [Mon, 26 Jan 2015 09:31:48 +0000 (09:31 +0000)]
Honor MK_BLUETOOTH with etc/defaults/bluetooth.device.conf

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

3 days agoHonor MK_ACCT with etc/pam.d/atrun
ngie [Mon, 26 Jan 2015 08:50:12 +0000 (08:50 +0000)]
Honor MK_ACCT with etc/pam.d/atrun

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

3 days agoHonor MK_ACCT with etc/rc.d/accounting
ngie [Mon, 26 Jan 2015 08:46:26 +0000 (08:46 +0000)]
Honor MK_ACCT with etc/rc.d/accounting

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

3 days agoamd64: allow base memory segment to start at address different than 0
royger [Mon, 26 Jan 2015 08:42:47 +0000 (08:42 +0000)]
amd64: allow base memory segment to start at address different than 0

Current code requires that the first physical memory segment starts at 0,
but this is not really needed. We only need to make sure the bootstrap code
and page tables for APs are allocated below 4GB.

This patch removes this requirement and allows booting a Dell R710 from
UEFI, where the first physical memory segment starts at 0x10000.

Sponsored by: Citrix Systems R&D
Reviewed by: jhb
Differential Revision:

3 days agoRemove explicit inclusion of lpd from FILES
ngie [Mon, 26 Jan 2015 08:30:24 +0000 (08:30 +0000)]
Remove explicit inclusion of lpd from FILES

X-MFC with: 277731
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

3 days agoHonor MK_AMD with etc/rc.d/amd
ngie [Mon, 26 Jan 2015 08:28:51 +0000 (08:28 +0000)]
Honor MK_AMD with etc/rc.d/amd

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

3 days agoHonor MK_API in etc/rc.d
ngie [Mon, 26 Jan 2015 08:23:36 +0000 (08:23 +0000)]
Honor MK_API in etc/rc.d

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

3 days agoHonor MK_LPR with etc/rc.d/lpd
ngie [Mon, 26 Jan 2015 08:20:51 +0000 (08:20 +0000)]
Honor MK_LPR with etc/rc.d/lpd

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

3 days agoHonor MK_ACPI in etc/devd and etc/rc.d
ngie [Mon, 26 Jan 2015 08:04:38 +0000 (08:04 +0000)]
Honor MK_ACPI in etc/devd and etc/rc.d

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

3 days agoRegen src.conf(5)
ngie [Mon, 26 Jan 2015 07:24:18 +0000 (07:24 +0000)]
Regen src.conf(5)

3 days agoAdd MK_AUTOFS knob for building and installing autofs(4), et al
ngie [Mon, 26 Jan 2015 07:15:49 +0000 (07:15 +0000)]
Add MK_AUTOFS knob for building and installing autofs(4), et al

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

3 days agoAdd MK_BHYVE knob for building and installing bhyve(4), et al
ngie [Mon, 26 Jan 2015 06:44:48 +0000 (06:44 +0000)]
Add MK_BHYVE knob for building and installing bhyve(4), et al

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

3 days agoBuild sbin/iscontrol again if MK_ISCSI != no
ngie [Mon, 26 Jan 2015 06:29:07 +0000 (06:29 +0000)]
Build sbin/iscontrol again if MK_ISCSI != no

MFC after: 13 days
X-MFC with: r277675
Pointyhat to: me

3 days agoAdd MK_HAST knob for building and installing hastd(8), et al
ngie [Mon, 26 Jan 2015 06:27:07 +0000 (06:27 +0000)]
Add MK_HAST knob for building and installing hastd(8), et al

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

3 days agoCall WITNESS_WARN() in callout_drain() to check whether any locks are
adrian [Mon, 26 Jan 2015 04:04:57 +0000 (04:04 +0000)]
Call WITNESS_WARN() in callout_drain() to check whether any locks are
being held before sleeping.

This has bitten me (in ath(4)) once before and I'd like to see this
not bite anyone else.

Differential Revision: D1638
Reviewed by: jhb, hselasky
MFC after: 1 week

3 days ago- Increase default i2c bus timeout to 5 seconds from 1 second. Sometimes
gonzo [Sun, 25 Jan 2015 23:58:34 +0000 (23:58 +0000)]
- Increase default i2c bus timeout to 5 seconds from 1 second. Sometimes
    1 second is not enugh for TDA19988 HDMI framer (e.g. on Beaglebone Black)
- Add per-device i2c_timout sysctl (dev.iichb.X.i2c_timeout) to control
    I2C bus timeout manually
- Pass softc instead of device_t to all sysctl handlers

3 days agoFix the ioctl interface to properly support fetching the header of regular
scottl [Sun, 25 Jan 2015 22:29:23 +0000 (22:29 +0000)]
Fix the ioctl interface to properly support fetching the header of regular
and extended config pages.

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

3 days agoAdd vt(4) support to AM335x LCDC driver
gonzo [Sun, 25 Jan 2015 22:08:36 +0000 (22:08 +0000)]
Add vt(4) support to AM335x LCDC driver

3 days agonatd(8) will work with an unconfigured interface and effectively not do
jhb [Sun, 25 Jan 2015 20:37:32 +0000 (20:37 +0000)]
natd(8) will work with an unconfigured interface and effectively not do
anything until the interface is assigned an address.  This fixes
ipfw_nat to do the same by using an IP of INADDR_ANY instead of
aborting the nat setup if the requested interface is not yet configured.

Differential Revision:
Reviewed by: melifaro, glebius, gnn
MFC after: 1 week

4 days agoIf the boot-time memory test is enabled, output a dot ('.') for
jhb [Sun, 25 Jan 2015 20:16:45 +0000 (20:16 +0000)]
If the boot-time memory test is enabled, output a dot ('.') for
each GB of RAM tested so people watching the console can see that
the machine is making progress and not hung.

PR: 196650
Submitted by: Ravi Pokala <>
Suggestions from: Eric van Gyzen <>
MFC after: 2 weeks

4 days agoChange the default VFS timestamp precision from seconds to microseconds.
jhb [Sun, 25 Jan 2015 19:56:45 +0000 (19:56 +0000)]
Change the default VFS timestamp precision from seconds to microseconds.

Discussed on: arch@
MFC after: 2 weeks

4 days agoPass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume()
jhb [Sun, 25 Jan 2015 19:53:09 +0000 (19:53 +0000)]
Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume()
instead of NULL.

Submitted by: dchagin
MFC after: 2 weeks

4 days agoUse an sbuf to generate the output of the net.inet.tcp.hostcache.list
jhb [Sun, 25 Jan 2015 19:45:44 +0000 (19:45 +0000)]
Use an sbuf to generate the output of the net.inet.tcp.hostcache.list
sysctl to avoid a possible buffer overflow if the cache grows while the
text is being generated.

PR: 172675
MFC after: 2 weeks

4 days agoAllow the user to specify the location of control.conf.
des [Sun, 25 Jan 2015 15:44:46 +0000 (15:44 +0000)]
Allow the user to specify the location of control.conf.

4 days agoAllow tracing dlfunc() / dlsym() events.
des [Sun, 25 Jan 2015 12:11:50 +0000 (12:11 +0000)]
Allow tracing dlfunc() / dlsym() events.

MFC after: 1 week

4 days agoRemove ISA NICs. Anyone still using these on amd64 can build their
des [Sun, 25 Jan 2015 12:02:38 +0000 (12:02 +0000)]
Remove ISA NICs.  Anyone still using these on amd64 can build their
own kernel.

4 days agoFix the font in the text version. This has bothered me for a long time...
des [Sun, 25 Jan 2015 11:57:18 +0000 (11:57 +0000)]
Fix the font in the text version.  This has bothered me for a long time...

MFC after: 1 week

4 days agoBuild lib/libgpio if MK_GPIO != no
ngie [Sun, 25 Jan 2015 05:37:06 +0000 (05:37 +0000)]
Build lib/libgpio if MK_GPIO != no

Fill in corresponding entries for MK_GPIO == no in

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

4 days agoFill in entries for MK_BSNMP == no
ngie [Sun, 25 Jan 2015 05:30:45 +0000 (05:30 +0000)]
Fill in entries for MK_BSNMP == no

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

4 days agoInstall bsnmp rc.d script if MK_BSNMP != no
ngie [Sun, 25 Jan 2015 05:30:03 +0000 (05:30 +0000)]
Install bsnmp rc.d script if MK_BSNMP != no

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

4 days agoFill in some dtrace entries when MK_CDDL == no
ngie [Sun, 25 Jan 2015 05:23:22 +0000 (05:23 +0000)]
Fill in some dtrace entries when MK_CDDL == no

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

4 days agoFill in entries for MK_CUSE == no
ngie [Sun, 25 Jan 2015 05:15:45 +0000 (05:15 +0000)]
Fill in entries for MK_CUSE == no

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

4 days agoMake install cuse headers if MK_CUSE != no
ngie [Sun, 25 Jan 2015 05:15:06 +0000 (05:15 +0000)]
Make install cuse headers if MK_CUSE != no

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

4 days agoBuild cuse(4) if MK_CUSE != no
ngie [Sun, 25 Jan 2015 05:13:15 +0000 (05:13 +0000)]
Build cuse(4) if MK_CUSE != no

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

4 days agospl man page hasn't been relevant for a while, retire it.
imp [Sun, 25 Jan 2015 04:58:41 +0000 (04:58 +0000)]
spl man page hasn't been relevant for a while, retire it.

4 days agoRegen src.conf(5)
ngie [Sun, 25 Jan 2015 04:56:43 +0000 (04:56 +0000)]
Regen src.conf(5)

4 days agoAdd MK_CCD knob for building and installing ccd(4), ccdconfig, etc
ngie [Sun, 25 Jan 2015 04:52:48 +0000 (04:52 +0000)]
Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

4 days agoAdd MK_BSDINSTALL knob for building and installing bsdinstall
ngie [Sun, 25 Jan 2015 04:43:13 +0000 (04:43 +0000)]
Add MK_BSDINSTALL knob for building and installing bsdinstall

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

4 days agoAdd MK_TALK knob for building the talk and talkd
ngie [Sun, 25 Jan 2015 04:37:44 +0000 (04:37 +0000)]
Add MK_TALK knob for building the talk and talkd

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

4 days agoAdd MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel
ngie [Sun, 25 Jan 2015 04:20:11 +0000 (04:20 +0000)]
Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel
modules, etc

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

4 days agoFix building rcorder with -DDEBUG by using libutil.h instead of util.h from
ngie [Sun, 25 Jan 2015 03:08:21 +0000 (03:08 +0000)]
Fix building rcorder with -DDEBUG by using libutil.h instead of util.h from

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