]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoMerge ^/head r277858 through r277860.
Dimitry Andric [Wed, 28 Jan 2015 22:32:03 +0000 (22:32 +0000)]
Merge ^/head r277858 through r277860.

9 years agoFix the following -Wcast-qual warnings in usr.sbin/sa/db.c:
Dimitry Andric [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]
        key.data = (void*)&VERSION_KEY;
                          ^
usr.sbin/sa/db.c:178:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual]
        key.data = (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

9 years agoMerge ^/head r277844 through r277857.
Dimitry Andric [Wed, 28 Jan 2015 21:40:22 +0000 (21:40 +0000)]
Merge ^/head r277844 through r277857.

9 years agoFix multiple instances of the following clang 3.6.0 warning in ppp:
Dimitry Andric [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.

9 years agoFix the following clang 3.6.0 warnings in pciconf:
Dimitry Andric [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.

9 years agoAdd allow.mount.fdescfs jail flag.
Jamie Gritton [Wed, 28 Jan 2015 21:08:09 +0000 (21:08 +0000)]
Add allow.mount.fdescfs jail flag.

PR: 192951
Submitted by: ruben@verweg.com
MFC after: 3 days

9 years agoipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4
Cy Schubert [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
statement.

PR: 188318
MFC after: 2 weeks

9 years agoCheck for invalid length or more than max length for the interpreter, instead
Sean Bruno [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

9 years agoMerge ^/head r277804 through r277843.
Dimitry Andric [Wed, 28 Jan 2015 18:45:40 +0000 (18:45 +0000)]
Merge ^/head r277804 through r277843.

9 years agoPreserve hard & symbolic links when modifying source file
Ed Maste [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: https://reviews.freebsd.org/D1682

9 years agoSince clang 3.6.0 now implements the archetype 'freebsd_kprintf' for
Dimitry Andric [Wed, 28 Jan 2015 18:36:33 +0000 (18:36 +0000)]
Since clang 3.6.0 now implements the archetype 'freebsd_kprintf' for
__attribute__((format(...))), and the -fformat-extensions flag was
removed, introduce a new macro in bsd.sys.mk to choose the right variant
of compile flag for the used compiler, and use it.

Also add something similar to kern.mk, since including bsd.sys.mk from
that file will anger Warner. :-)

Note that bsd.sys.mk does not support the MK_FORMAT_EXTENSIONS knob used
in kern.mk, since that knob is only available in kern.opts.mk, not in
src.opts.mk.  We might want to add it later, to more easily support
external compilers for building world (in particular, sys/boot).

9 years agoFix the following clang 3.6.0 warning in contrib/amd/hlfsd/homedir.c:
Dimitry Andric [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.

9 years agoApply changeset 854 from upstream openpam (by Dag-Erling Smørgrav):
Dimitry Andric [Wed, 28 Jan 2015 18:13:52 +0000 (18:13 +0000)]
Apply changeset 854 from upstream openpam (by Dag-Erling Smørgrav):

  Silence all remaining qual-cast warnings except in the test suite.

9 years agoUpdate release(7) to reflect renaming the 'system' target
Glen Barber [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

9 years agoFix a typo in a comment.
Glen Barber [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

9 years agoProvide a description for the 'tests.txz' distribution
Glen Barber [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

9 years agoRename the 'system' target to 'disc1', which is specific
Glen Barber [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
medium.

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

9 years agoAdd ARMv7 performance monitoring counters.
Ruslan Bukin [Wed, 28 Jan 2015 16:08:07 +0000 (16:08 +0000)]
Add ARMv7 performance monitoring counters.

Differential Revision: https://reviews.freebsd.org/D1687
Reviewed by: rpaulo
Sponsored by: DARPA, AFRL

9 years agoWhen there are no automounted filesystems, autounmountd(8) should wait
Edward Tomasz Napierala [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

9 years agoRevert r277357 as expr has been enhanced to better detect overflow conditions,
Enji Cooper [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

9 years agoUpdate mtime for tmpfs files modified through memory mapping. Similar
Konstantin Belousov [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
OBJT_VNODE.

Reported by: Ronald Klop <ronald-lists@klop.ws>
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agotmpfs does not use UVM on FreeBSD.
Konstantin Belousov [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

9 years agoMFV r255258:
Xin LI [Wed, 28 Jan 2015 08:56:48 +0000 (08:56 +0000)]
MFV r255258:

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

MFC after: 2 weeks

9 years agoDisable the new -Wunused-local-typedef warning for WARNS <= 3, since it
Dimitry Andric [Wed, 28 Jan 2015 07:29:38 +0000 (07:29 +0000)]
Disable the new -Wunused-local-typedef warning for WARNS <= 3, since it
triggers way too many times for the version of libc++ we have in base at
this point.  While here, fix the compiler version check for
-Wno-unused-const-variable.

9 years agoCast everything to something longer than 32 bits so the sample mask
Adrian Chadd [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.

Tested:

* AR9380, STA, speaking 3x3 to an AP

9 years agoPrint out the final_rix if there's a problem.
Adrian Chadd [Wed, 28 Jan 2015 04:42:40 +0000 (04:42 +0000)]
Print out the final_rix if there's a problem.

9 years agoAdd a new HAL capability - required to compile the updated AR9300
Adrian Chadd [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.

9 years agoWhitespace change.
Michael Tuexen [Tue, 27 Jan 2015 21:30:24 +0000 (21:30 +0000)]
Whitespace change.

9 years agoamd: Add extra check for NULL before deref.
Pedro F. Giffuni [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

9 years agoInstead of hardcoding /usr/lib, as in r277803, use ${LIBDIR} for the
Dimitry Andric [Tue, 27 Jan 2015 19:58:02 +0000 (19:58 +0000)]
Instead of hardcoding /usr/lib, as in r277803, use ${LIBDIR} for the
private header location, since this Makefile (and everything under
lib/clang) is not processed for the 32-bit compat stages anyway.

Noticed by: bjk

9 years agosed: fix pasto from previous r277802.
Pedro F. Giffuni [Tue, 27 Jan 2015 19:46:19 +0000 (19:46 +0000)]
sed: fix pasto from previous r277802.

MFC after: 3 days

9 years agoMerging ^/head r277777 through r277803.
Dimitry Andric [Tue, 27 Jan 2015 19:40:08 +0000 (19:40 +0000)]
Merging ^/head r277777 through r277803.

9 years agoUse unsigned int for index value.
Xin LI [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:
http://www.coresecurity.com/content/freebsd-kernel-multiple-vulnerabilities

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

9 years agoFix SCTP stream reset vulnerability.
Xin LI [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
fix.

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

9 years agoFix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability.
Xin LI [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

9 years agoChange the path to clang's private headers. Upstream has always stored
Dimitry Andric [Tue, 27 Jan 2015 19:25:39 +0000 (19:25 +0000)]
Change the path to clang's private headers.  Upstream has always stored
these in $LIBDIR/clang/$VERSION/include, instead of our previous custom
location in /usr/include/clang/$VERSION.  This allows us to drop yet
another FreeBSD-specific patch.

9 years agoFix resource leak and dereference after NULL.
Pedro F. Giffuni [Tue, 27 Jan 2015 18:58:24 +0000 (18:58 +0000)]
Fix resource leak and dereference after NULL.

process.c:
Protect access against NULL.

main.c:
Prevent outfile overwrite resource leak.

CID: 271181
CID: 1006930

Obtained from: NetBSD
MFC after: 3 days

9 years agoConstify a struct savexmm pointer in pt_ucontext_to_fpreg(), to silence
Dimitry Andric [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.

9 years agoFix yet another coverty warning (missing io is NULL check) and in examining that
Randall Stewart [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).

9 years agoFix sysctl name.
Edward Tomasz Napierala [Tue, 27 Jan 2015 18:27:07 +0000 (18:27 +0000)]
Fix sysctl name.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoFix overflow check for multiplication:
Stefan Eßer [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

9 years agokey_spdget uses key_setdumpsp() without SPTREE_RLOCK held (it uses
Andrey V. Elsukov [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

9 years agohook userland threads suspend + resume into acpi suspend code
Andriy Gapon [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

9 years agovt(4): Use power_{suspend,resume} event handlers to implement
Andriy Gapon [Tue, 27 Jan 2015 15:28:46 +0000 (15:28 +0000)]
vt(4): Use power_{suspend,resume} event handlers to implement
suspend/resume

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: https://reviews.freebsd.org/D1004
On behalf of: dumbbell
MFC after: 2 weeks

9 years agoThe sys_quotactl() contract demands that the mount point is
Konstantin Belousov [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:  https://reviews.freebsd.org/D1684
Tested by: pho
MFC after: 1 week

9 years agoRewrite pmap_enter(9) man page.
Konstantin Belousov [Tue, 27 Jan 2015 09:48:02 +0000 (09:48 +0000)]
Rewrite pmap_enter(9) man page.

In collaboration with: alc
Differential Revision:  https://reviews.freebsd.org/D1531
Sponsored by: The FreeBSD Foundation and EMC / Isilon Storage Division
MFC after: 1 week

9 years agoFix bug in mapppings of multiple pages exposed by updates to the VSCSI
Nathan Whitehorn [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

9 years agoRework vtblk dump handling of in flight requests
Bryan Venteicher [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

9 years agoRemove build specific details from sendmail.cf/submit.cf in support of
Gregory Neil Shapiro [Tue, 27 Jan 2015 04:06:47 +0000 (04:06 +0000)]
Remove build specific details from sendmail.cf/submit.cf in support of
https://wiki.freebsd.org/ReproducibleBuilds

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

Reviewed by: des
MFC after: 3 days

9 years agoMFV r277782:
Pedro F. Giffuni [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

9 years agoMerge some cherry-picked fixes originating in OpenBSD
Pedro F. Giffuni [Tue, 27 Jan 2015 01:39:42 +0000 (01:39 +0000)]
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

9 years agoMerge ^/head r277719 through 277776.
Dimitry Andric [Mon, 26 Jan 2015 21:41:54 +0000 (21:41 +0000)]
Merge ^/head r277719 through 277776.

9 years agoAdd llvm and clang patches corresponding to r277774 and r277775.
Dimitry Andric [Mon, 26 Jan 2015 21:24:04 +0000 (21:24 +0000)]
Add llvm and clang patches corresponding to r277774 and r277775.

9 years agoPull in r227062 from upstream clang trunk (by Renato Golin):
Dimitry Andric [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

9 years agoPull in r226664 from upstream llvm trunk (by Tim Northover):
Dimitry Andric [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
  it.

  From: Andrew Turner <andrew@fubar.geek.nz>

Requested by: andrew

9 years agoAnticipate a __FreeBSD_version bump.
Dimitry Andric [Mon, 26 Jan 2015 19:42:39 +0000 (19:42 +0000)]
Anticipate a __FreeBSD_version bump.

9 years agoUpdate other build glue: ObsoleteFiles.inc, UPDATING, mtree files, and
Dimitry Andric [Mon, 26 Jan 2015 19:41:26 +0000 (19:41 +0000)]
Update other build glue: ObsoleteFiles.inc, UPDATING, mtree files, and
OptionalObsoleteFiles.inc.

9 years agoAdd new internal clang headers, relating to AVX2 and ADX intrinsics.
Dimitry Andric [Mon, 26 Jan 2015 19:37:02 +0000 (19:37 +0000)]
Add new internal clang headers, relating to AVX2 and ADX intrinsics.

9 years agoRemove cruft; ICL_RDMA was never actually working, and will be redone
Edward Tomasz Napierala [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

9 years agoUpdate llvm and clang library and binary Makefiles for 3.6.0 rc1.
Dimitry Andric [Mon, 26 Jan 2015 18:48:27 +0000 (18:48 +0000)]
Update llvm and clang library and binary Makefiles for 3.6.0 rc1.

9 years agoRevert r277652
Baptiste Daroussin [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)

9 years agoLock the socket buffer before jumping to the 'out' label if sblock()
John Baldwin [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().

9 years ago- Update a disabled KASSERT() to use sbused() instead of accessing
John Baldwin [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)

9 years agoFix a couple of panics when detaching from a cxgbe/cxl interface that was
John Baldwin [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

9 years agoFix several potential overflows in UNMAP code.
Alexander Motin [Mon, 26 Jan 2015 15:47:08 +0000 (15:47 +0000)]
Fix several potential overflows in UNMAP code.

MFC after: 1 week

9 years agoAdd a generic way for hooking PMC interrupt.
Ruslan Bukin [Mon, 26 Jan 2015 10:31:17 +0000 (10:31 +0000)]
Add a generic way for hooking PMC interrupt.

9 years agoEnsure that _tmppt KVA is used exclusively by providing exclusive sx
Konstantin Belousov [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

9 years agoRespect MK_KERBEROS with etc/rc.d/ipropd_master and etc/rc.d/ipropd_slave
Enji Cooper [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

9 years agoHonor MK_WIRELESS with etc/rc.d/hostapd and etc/rc.d/wpa_supplicant
Enji Cooper [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

9 years agoHonor MK_JAIL with etc/rc.d/jail
Enji Cooper [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

9 years agoHonor MK_BLUETOOTH with etc/defaults/bluetooth.device.conf
Enji Cooper [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

9 years agoHonor MK_ACCT with etc/pam.d/atrun
Enji Cooper [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

9 years agoHonor MK_ACCT with etc/rc.d/accounting
Enji Cooper [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

9 years agoamd64: allow base memory segment to start at address different than 0
Roger Pau Monné [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: https://reviews.freebsd.org/D1417

9 years agoRemove explicit inclusion of lpd from FILES
Enji Cooper [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

9 years agoHonor MK_AMD with etc/rc.d/amd
Enji Cooper [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

9 years agoHonor MK_API in etc/rc.d
Enji Cooper [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

9 years agoHonor MK_LPR with etc/rc.d/lpd
Enji Cooper [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

9 years agoHonor MK_ACPI in etc/devd and etc/rc.d
Enji Cooper [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

9 years agoRegen src.conf(5)
Enji Cooper [Mon, 26 Jan 2015 07:24:18 +0000 (07:24 +0000)]
Regen src.conf(5)

9 years agoAdd MK_AUTOFS knob for building and installing autofs(4), et al
Enji Cooper [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

9 years agoAdd MK_BHYVE knob for building and installing bhyve(4), et al
Enji Cooper [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

9 years agoBuild sbin/iscontrol again if MK_ISCSI != no
Enji Cooper [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

9 years agoAdd MK_HAST knob for building and installing hastd(8), et al
Enji Cooper [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

9 years agoCall WITNESS_WARN() in callout_drain() to check whether any locks are
Adrian Chadd [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

9 years ago- Increase default i2c bus timeout to 5 seconds from 1 second. Sometimes
Oleksandr Tymoshenko [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

9 years agoMerge ^/head r277327 through r277718.
Dimitry Andric [Sun, 25 Jan 2015 23:43:12 +0000 (23:43 +0000)]
Merge ^/head r277327 through r277718.

9 years agoMerge llvm 3.6.0rc1 from ^/vendor/llvm/dist, merge clang 3.6.0rc1 from
Dimitry Andric [Sun, 25 Jan 2015 23:36:55 +0000 (23:36 +0000)]
Merge llvm 3.6.0rc1 from ^/vendor/llvm/dist, merge clang 3.6.0rc1 from
^/vendor/clang/dist, resolve conflicts, and cleanup patches.

9 years agoFix the ioctl interface to properly support fetching the header of regular
Scott Long [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

9 years agoAdd vt(4) support to AM335x LCDC driver
Oleksandr Tymoshenko [Sun, 25 Jan 2015 22:08:36 +0000 (22:08 +0000)]
Add vt(4) support to AM335x LCDC driver

9 years agonatd(8) will work with an unconfigured interface and effectively not do
John Baldwin [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: https://reviews.freebsd.org/D1539
Reviewed by: melifaro, glebius, gnn
MFC after: 1 week

9 years agoIf the boot-time memory test is enabled, output a dot ('.') for
John Baldwin [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 <rpokala@panasas.com>
Suggestions from: Eric van Gyzen <eric@vangyzen.net>
MFC after: 2 weeks

9 years agoChange the default VFS timestamp precision from seconds to microseconds.
John Baldwin [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

9 years agoPass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume()
John Baldwin [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

9 years agoUse an sbuf to generate the output of the net.inet.tcp.hostcache.list
John Baldwin [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

9 years agoAllow the user to specify the location of control.conf.
Dag-Erling Smørgrav [Sun, 25 Jan 2015 15:44:46 +0000 (15:44 +0000)]
Allow the user to specify the location of control.conf.

9 years agoAllow tracing dlfunc() / dlsym() events.
Dag-Erling Smørgrav [Sun, 25 Jan 2015 12:11:50 +0000 (12:11 +0000)]
Allow tracing dlfunc() / dlsym() events.

MFC after: 1 week

9 years agoRemove ISA NICs. Anyone still using these on amd64 can build their
Dag-Erling Smørgrav [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.

9 years agoFix the font in the text version. This has bothered me for a long time...
Dag-Erling Smørgrav [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

9 years agoBuild lib/libgpio if MK_GPIO != no
Enji Cooper [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 OptionalObsoleteFiles.inc

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