]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoAdd a ugold(4) manpage, adapted from the OpenBSD one.
brueffer [Thu, 11 Jun 2015 19:06:58 +0000 (19:06 +0000)]
Add a ugold(4) manpage, adapted from the OpenBSD one.

9 years agoMerge OpenSSL 1.0.1n.
jkim [Thu, 11 Jun 2015 19:00:55 +0000 (19:00 +0000)]
Merge OpenSSL 1.0.1n.

9 years agopf: Remove frc_direction
kp [Thu, 11 Jun 2015 17:57:47 +0000 (17:57 +0000)]
pf: Remove frc_direction

We don't use the direction of the fragments for anything. The frc_direction
field is assigned, but never read.
Just remove it.

Differential Revision: https://reviews.freebsd.org/D2773
Approved by: philip (mentor)

9 years agoMFV r284276: Fix long options.
delphij [Thu, 11 Jun 2015 17:32:36 +0000 (17:32 +0000)]
MFV r284276: Fix long options.

Reported by: jkim
MFC after: 13 days

9 years agoRegen for r284274.
jkim [Thu, 11 Jun 2015 17:21:27 +0000 (17:21 +0000)]
Regen for r284274.

9 years agoEnable clang on armeb, it is now able to build targeting armeb. This is
andrew [Thu, 11 Jun 2015 16:49:14 +0000 (16:49 +0000)]
Enable clang on armeb, it is now able to build targeting armeb. This is
the last arm platform to move away from gcc.

Tested by: jmg

9 years agoAdd basic support for ACPI. It splits out the nexus driver to two new
andrew [Thu, 11 Jun 2015 15:45:33 +0000 (15:45 +0000)]
Add basic support for ACPI. It splits out the nexus driver to two new
drivers, one for fdt, one for acpi. It then uses this to decide if it will
use fdt or acpi.

The GICv2 (interrupt controller) and Generic Timer drivers have been
updated to handle both cases.

As this is early code we still need FDT to find the kernel console, and
some parts are still missing, including PCI support.

Differential Revision: https://reviews.freebsd.org/D2463
Reviewed by: jhb, jkim, emaste
Obtained from: ABT Systems Ltd
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

9 years agoImport ugold driver from OpenBSD supporting digital USB temperature
hselasky [Thu, 11 Jun 2015 15:23:47 +0000 (15:23 +0000)]
Import ugold driver from OpenBSD supporting digital USB temperature
meters. The driver is currently not part of the default kernel build.

Obtained from: OpenBSD
MFC after: 2 weeks

9 years agoUpdate tests after sizing changes to the fixed VHD format.
marcel [Thu, 11 Jun 2015 15:19:59 +0000 (15:19 +0000)]
Update tests after sizing changes to the fixed VHD format.

9 years agoHandle the case in which ncyls is 0.
marcel [Thu, 11 Jun 2015 15:18:54 +0000 (15:18 +0000)]
Handle the case in which ncyls is 0.
While here, update copyright.

9 years agoFor the fixed VHD format, round the raw image size to the next
marcel [Thu, 11 Jun 2015 14:30:31 +0000 (14:30 +0000)]
For the fixed VHD format, round the raw image size to the next
multiple of the cylinder size. This is what qemu-img seems to
be doing. Make sure to handle boundary cases where increasing
the image size by 1 cyclinder's worth would also result in a
change of geometry.

9 years agoUse INCLUDEDIR rather than hard coded /usr/include
sjg [Thu, 11 Jun 2015 14:25:53 +0000 (14:25 +0000)]
Use INCLUDEDIR rather than hard coded /usr/include

Differential Revision: D2748
Reviewed by: brooks imp

9 years agoPass the ACPI table pointer to the arm64 kernel from loader.efi.
andrew [Thu, 11 Jun 2015 14:02:23 +0000 (14:02 +0000)]
Pass the ACPI table pointer to the arm64 kernel from loader.efi.

Sponsored by: The FreeBSD Foundation

9 years agoStop using VFP in pcpu.h when we mean ARMv6 and later.
andrew [Thu, 11 Jun 2015 13:58:40 +0000 (13:58 +0000)]
Stop using VFP in pcpu.h when we mean ARMv6 and later.

9 years agoFix the spelling of __ARM_ARCH >= 6 in sys/arm/arm.
andrew [Thu, 11 Jun 2015 13:54:18 +0000 (13:54 +0000)]
Fix the spelling of __ARM_ARCH >= 6 in sys/arm/arm.

9 years agopf: Save the protocol number in the pf_fragment
kp [Thu, 11 Jun 2015 13:26:16 +0000 (13:26 +0000)]
pf: Save the protocol number in the pf_fragment

When we try to look up a pf_fragment with pf_find_fragment() we compare (see
pf_frag_compare()) addresses (and family), id but also protocol.  We failed to
save the protocol to the pf_fragment in pf_fragcache(), resulting in failing
reassembly.

Differential Revision: https://reviews.freebsd.org/D2772

9 years agodrop key_sa_stir_iv as it isn't used...
jmg [Thu, 11 Jun 2015 13:05:37 +0000 (13:05 +0000)]
drop key_sa_stir_iv as it isn't used...

Reviewed by: eri, ae

9 years agoConsider sorting.
br [Thu, 11 Jun 2015 13:00:20 +0000 (13:00 +0000)]
Consider sorting.

9 years agoSplit out db_unwind_frame() so it can be used by DTrace.
br [Thu, 11 Jun 2015 12:47:13 +0000 (12:47 +0000)]
Split out db_unwind_frame() so it can be used by DTrace.

Sponsored by: ARM Ltd.
Differential Revision: https://reviews.freebsd.org/D2741

9 years agoTweaks for r284178:
kib [Thu, 11 Jun 2015 04:41:54 +0000 (04:41 +0000)]
Tweaks for r284178:

Do not include machine/atomic.h explicitely, the header is already included
by sys/systm.h.

Force inlining of tc_getgen() and tc_setgen().  The functions are used
more than once, which causes compilers with non-aggressive inlining
policies to generate calls.

Suggested by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoRemove NO_OBJ
sjg [Thu, 11 Jun 2015 04:22:17 +0000 (04:22 +0000)]
Remove NO_OBJ

For meta mode we will want objdirs.

Differential Revision: D2748
Reviewed by: brooks imp

9 years agoMerge bmake-20150606
sjg [Thu, 11 Jun 2015 04:00:22 +0000 (04:00 +0000)]
Merge bmake-20150606

Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.
> Description of fields to fill in above:                     76 columns --|
> PR:                       If a GNATS PR is affected by the change.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Submitted by:             If someone else sent in the change.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Empty fields above will be automatically removed.

_M   contrib/bmake
M    contrib/bmake/ChangeLog
M    contrib/bmake/Makefile
M    contrib/bmake/bmake.1
M    contrib/bmake/bmake.cat1
M    contrib/bmake/make.1
M    contrib/bmake/mk/ChangeLog
M    contrib/bmake/mk/dirdeps.mk
M    contrib/bmake/mk/gendirdeps.mk
M    contrib/bmake/mk/install-mk
M    contrib/bmake/mk/meta.stage.mk
M    contrib/bmake/mk/meta.sys.mk
M    contrib/bmake/mk/mkopt.sh
M    contrib/bmake/targ.c
M    usr.bin/bmake/Makefile

9 years agoAdd accessor functions for iterating over segments. A segment
marcel [Thu, 11 Jun 2015 03:02:40 +0000 (03:02 +0000)]
Add accessor functions for iterating over segments. A segment
can be in bus address space, physical memory space or virtual
memory space.

9 years agor284198 seems to have left a null format string printf that gcc does *not*
sbruno [Thu, 11 Jun 2015 02:29:39 +0000 (02:29 +0000)]
r284198 seems to have left a null format string printf that gcc does *not*
like breaking mips builds.

Submitted by: Shawn Webb <shawn.webb@hardenedbsd.org>
Obtained from: HardenedBSD

9 years agoRemove unnecessary variable and fix the usage of sysctl(3).
araujo [Thu, 11 Jun 2015 01:22:27 +0000 (01:22 +0000)]
Remove unnecessary variable and fix the usage of sysctl(3).

Differential Revision: D2733
Reviewed by: ngie, kib

9 years agoConsistently use trailing whitespace in passphrase prompts.
brueffer [Thu, 11 Jun 2015 00:24:33 +0000 (00:24 +0000)]
Consistently use trailing whitespace in passphrase prompts.

PR: 193496
Submitted by: Fabian Keil
MFC after: 1 week

9 years agoCorrect Hawaii's admission day.
brueffer [Thu, 11 Jun 2015 00:12:33 +0000 (00:12 +0000)]
Correct Hawaii's admission day.

PR: 192651
MFC after: 1 week

9 years agoichsmb: add Intel Wellsburg device ID.
rpaulo [Wed, 10 Jun 2015 22:39:10 +0000 (22:39 +0000)]
ichsmb: add Intel Wellsburg device ID.

Submitted by: Michael Allen <mallen pi-coral.com>
MFC after: 1 week
Sponsored by: Pi-Coral, Inc.

9 years agoichsmb: remove whitespace.
rpaulo [Wed, 10 Jun 2015 22:37:09 +0000 (22:37 +0000)]
ichsmb: remove whitespace.

9 years agoLoad the allocated memory and return both the physical
marcel [Wed, 10 Jun 2015 22:33:56 +0000 (22:33 +0000)]
Load the allocated memory and return both the physical
address and the bus address to the application.

9 years agoFix a callout race condition introduced in TCP timers callouts with r281599.
jch [Wed, 10 Jun 2015 20:43:07 +0000 (20:43 +0000)]
Fix a callout race condition introduced in TCP timers callouts with r281599.
In TCP timer context, it is not enough to check callout_stop() return value
to decide if a callout is still running or not, previous callout_reset()
return values have also to be checked.

Differential Revision: https://reviews.freebsd.org/D2763
Reviewed by: hiren
Approved by: hiren
MFC after: 1 day
Sponsored by: Verisign, Inc.

9 years agoMFV r284234:
delphij [Wed, 10 Jun 2015 19:22:41 +0000 (19:22 +0000)]
MFV r284234:

Update file to 5.23.

MFC after: 2 weeks

9 years agoVendor import of file 5.23.
delphij [Wed, 10 Jun 2015 19:06:05 +0000 (19:06 +0000)]
Vendor import of file 5.23.

9 years agoBump FreeBSD_version due to lim_* API changes in r284215
mjg [Wed, 10 Jun 2015 19:00:54 +0000 (19:00 +0000)]
Bump FreeBSD_version due to lim_* API changes in r284215

9 years agoAdd support for '_' occurring at the beginning or end of a name
ume [Wed, 10 Jun 2015 16:15:22 +0000 (16:15 +0000)]
Add support for '_' occurring at the beginning or end of a name
component.

PR: 176093
Submitted by: landonf__at__bikemonkey.org
MFC after: 1 week

9 years agoRename bus_space to bus (i.e. drop _space). This makes the
marcel [Wed, 10 Jun 2015 16:00:09 +0000 (16:00 +0000)]
Rename bus_space to bus (i.e. drop _space). This makes the
API match the convenience macros in <sys/bus.h>. Bus space
can now reference both bus and busdma.

9 years agoAllow DTrace to be compiled-in to the kernel.
br [Wed, 10 Jun 2015 15:53:39 +0000 (15:53 +0000)]
Allow DTrace to be compiled-in to the kernel.
This will require for AArch64 as we dont have modules yet.

Sponsored by: HEIF5
Sponsored by: ARM Ltd.
Differential Revision: https://reviews.freebsd.org/D1997

9 years agolinux: make sure to grab all cow structs when creating a thread
mjg [Wed, 10 Jun 2015 15:34:43 +0000 (15:34 +0000)]
linux: make sure to grab all cow structs when creating a thread

This is a fixup for r284214.

Reported and tested by: Ivan Klymenko <fidaj ukr.net>

9 years agoList kinfo_getfile.c only once.
brooks [Wed, 10 Jun 2015 15:07:13 +0000 (15:07 +0000)]
List kinfo_getfile.c only once.

MFC after: 3 days
Sponsored by: DARPA, AFRL

9 years agopf: address family must be set when creating a pf_fragment
kp [Wed, 10 Jun 2015 13:44:04 +0000 (13:44 +0000)]
pf: address family must be set when creating a pf_fragment

Fix a panic when handling fragmented ip4 packets with 'drop-ovl' set.
In that scenario we take a different branch in pf_normalize_ip(), taking us to
pf_fragcache() (rather than pf_reassemble()). In pf_fragcache() we create a
pf_fragment, but do not set the address family. This leads to a panic when we
try to insert that into pf_frag_tree because pf_addr_cmp(), which is used to
compare the pf_fragments doesn't know what to do if the address family is not
set.

Simply ensure that the address family is set correctly (always AF_INET in this
path).

PR: 200330
Differential Revision: https://reviews.freebsd.org/D2769
Approved by: philip (mentor), gnn (mentor)

9 years agoFix build after converting ls(1) to use libxo(3).
marcel [Wed, 10 Jun 2015 13:17:41 +0000 (13:17 +0000)]
Fix build after converting ls(1) to use libxo(3).

9 years agoo Rework ARMv7 events list using aliases - same way as we have for arm64.
br [Wed, 10 Jun 2015 12:42:30 +0000 (12:42 +0000)]
o Rework ARMv7 events list using aliases - same way as we have for arm64.
o Extend it with Cortex A9-specific events.

9 years agoFixup the build after r284215.
mjg [Wed, 10 Jun 2015 12:39:01 +0000 (12:39 +0000)]
Fixup the build after r284215.

Submitted by: Ivan Klymenko <fidaj ukr.net> [slighly modified]

9 years agoImplement lockless resource limits.
mjg [Wed, 10 Jun 2015 10:48:12 +0000 (10:48 +0000)]
Implement lockless resource limits.

Use the same scheme implemented to manage credentials.

Code needing to look at process's credentials (as opposed to thred's) is
provided with *_proc variants of relevant functions.

Places which possibly had to take the proc lock anyway still use the proc
pointer to access limits.

9 years agoGeneralised support for copy-on-write structures shared by threads.
mjg [Wed, 10 Jun 2015 10:43:59 +0000 (10:43 +0000)]
Generalised support for copy-on-write structures shared by threads.

Thread credentials are maintained as follows: each thread has a pointer to
creds and a reference on them. The pointer is compared with proc's creds on
userspace<->kernel boundary and updated if needed.

This patch introduces a counter which can be compared instead, so that more
structures can use this scheme without adding more comparisons on the boundary.

9 years agoDon't re-define LOCORE when dtrace is built-in to the kernel.
br [Wed, 10 Jun 2015 09:59:26 +0000 (09:59 +0000)]
Don't re-define LOCORE when dtrace is built-in to the kernel.

9 years agofd: remove fdesc_mtx
mjg [Wed, 10 Jun 2015 09:40:07 +0000 (09:40 +0000)]
fd: remove fdesc_mtx

9 years agofd: use atomics to manage fd_refcnt and fd_holcnt
mjg [Wed, 10 Jun 2015 09:34:50 +0000 (09:34 +0000)]
fd: use atomics to manage fd_refcnt and fd_holcnt

This gets rid of fdesc_mtx.

9 years agoCorrect a type error in kmem_unback(). Previously, kmem_unback() did not
alc [Wed, 10 Jun 2015 05:17:14 +0000 (05:17 +0000)]
Correct a type error in kmem_unback().  Previously, kmem_unback() did not
correctly handle deallocation requests of two or more gigabytes in size.
Eventually, this would lead to a panic elsewhere in the kernel, such as
"vm_radix_insert: key <vm_pindex_t> is already present".

Reported by: Ilias Marinos
MFC after: 1 week

9 years agoConvert ls(1) to use libxo(3).
marcel [Wed, 10 Jun 2015 01:27:38 +0000 (01:27 +0000)]
Convert ls(1) to use libxo(3).

Obtained from: Phil Shafer <phil@juniper.net>
Sponsored by: Juniper Networks, Inc.

9 years agoAdd options to dmb() and dsb() macros on ARM64
zbb [Tue, 9 Jun 2015 23:54:20 +0000 (23:54 +0000)]
Add options to dmb() and dsb() macros on ARM64

Using plain dsb()/dmb() as full system barriers is usually to much.
Adding proper options to those barriers (instead of full system - sy)
will most likely reduce the cost of the instructions and will benefit
in performance improvement.
This commit adds options to barrier macro definitions.

Obtained from: Semihalf
Reviewed by:   andrew, ian
Sponsored by:  The FreeBSD Foundation

9 years agoCheck status of AcpiReadBitRegister() calls.
jkim [Tue, 9 Jun 2015 23:13:37 +0000 (23:13 +0000)]
Check status of AcpiReadBitRegister() calls.

Reported by: Coverity
CID: 1306132

9 years agoAdd support for reading MAM attributes to camcontrol(8) and libcam(3).
ken [Tue, 9 Jun 2015 21:39:38 +0000 (21:39 +0000)]
Add support for reading MAM attributes to camcontrol(8) and libcam(3).

MAM is Medium Auxiliary Memory and is most commonly found as flash
chips on tapes.

This includes support for reading attributes and decoding most
known attributes, but does not yet include support for writing
attributes or reporting attributes in XML format.

libsbuf/Makefile:
Add subr_prf.c for the new sbuf_hexdump() function.  This
function is essentially the same function.

libsbuf/Symbol.map:
Add a new shared library minor version, and include the
sbuf_hexdump() function.

libsbuf/Version.def:
Add version 1.4 of the libsbuf library.

libutil/hexdump.3:
Document sbuf_hexdump() alongside hexdump(3), since it is
essentially the same function.

camcontrol/Makefile:
Add attrib.c.

camcontrol/attrib.c:
Implementation of READ ATTRIBUTE support for camcontrol(8).

camcontrol/camcontrol.8:
Document the new 'camcontrol attrib' subcommand.

camcontrol/camcontrol.c:
Add the new 'camcontrol attrib' subcommand.

camcontrol/camcontrol.h:
Add a function prototype for scsiattrib().

share/man/man9/sbuf.9:
Document the existence of sbuf_hexdump() and point users to
the hexdump(3) man page for more details.

sys/cam/scsi/scsi_all.c:
Add a table of known attributes, text descriptions and
handler functions.

Add a new scsi_attrib_sbuf() function along with a number
of other related functions that help decode attributes.

scsi_attrib_ascii_sbuf() decodes ASCII format attributes.

scsi_attrib_int_sbuf() decodes binary format attributes, and
will pass them off to scsi_attrib_hexdump_sbuf() if they're
bigger than 8 bytes.

scsi_attrib_vendser_sbuf() decodes the vendor and drive
serial number attribute.

scsi_attrib_volcoh_sbuf() decodes the Volume Coherency
Information attribute that LTFS writes out.

sys/cam/scsi/scsi_all.h:
Add a number of attribute-related structure definitions and
other defines.

Add function prototypes for all of the functions added in
scsi_all.c.

sys/kern/subr_prf.c:
Add a new function, sbuf_hexdump().  This is the same as
the existing hexdump(9) function, except that it puts the
result in an sbuf.

This also changes subr_prf.c so that it can be compiled in
userland for includsion in libsbuf.

We should work to change this so that the kernel hexdump
implementation is a wrapper around sbuf_hexdump() with a
statically allocated sbuf with a drain.  That will require
a drain function that goes to the kernel printf() buffer
that can take a non-NUL terminated string as input.
That is because an sbuf isn't NUL-terminated until it is
finished, and we don't want to finish it while we're still
using it.

We should also work to consolidate the userland hexdump and
kernel hexdump implemenatations, which are currently
separate.  This would also mean making applications that
currently link in libutil link in libsbuf.

sys/sys/sbuf.h:
Add the prototype for sbuf_hexdump(), and add another copy
of the hexdump flag values if they aren't already defined.

Ideally the flags should be defined in one place but the
implemenation makes it difficult to do properly.  (See
above.)

Sponsored by: Spectra Logic Corporation
MFC after: 1 week

9 years ago"status_reg.acpwr ? 1 : 0" is now the same as just "status_reg.acpwr".
sobomax [Tue, 9 Jun 2015 19:22:13 +0000 (19:22 +0000)]
"status_reg.acpwr ? 1 : 0" is now the same as just "status_reg.acpwr".

9 years agoFix a typo in a comment that has been carried over from am335x_pmic.c.
sobomax [Tue, 9 Jun 2015 19:17:33 +0000 (19:17 +0000)]
Fix a typo in a comment that has been carried over from am335x_pmic.c.

9 years agoUse tab to do identation consistently.
sobomax [Tue, 9 Jun 2015 19:04:55 +0000 (19:04 +0000)]
Use tab to do identation consistently.

9 years agoExtend TPS65217 support to be able to pull and decode battery
sobomax [Tue, 9 Jun 2015 18:46:31 +0000 (18:46 +0000)]
Extend TPS65217 support to be able to pull and decode battery
charger configuration and provide some basic control knobs to
set charger voltage and dump config on boot. Two loader tunables
have been added:

 o hw.am335x_pmic.bootverbose set to 1 to get more info on the
   boot;

 o hw.am335x_pmic.vo: set to charger voltage to be applied on
   kernel initialization time, supported values are "4.10V",
   "4.15V", "4.20V" and "4.25V".

Cleanup code a bit in general, move TPS65217 register
definitions into a separate header, convert bit-banging
defines into bitmap structures.

Also threat the case when power source is neither "AC" nor "USB"
as "Battery", not "Unknown".

9 years agoAccount for superpage mappings that are created by pmap_copy().
alc [Tue, 9 Jun 2015 18:04:28 +0000 (18:04 +0000)]
Account for superpage mappings that are created by pmap_copy().

9 years agoSwitch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can
ambrisko [Tue, 9 Jun 2015 15:51:11 +0000 (15:51 +0000)]
Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can
gracefully fail if the /dev/megaraid_sas_ioctl_node symlink already exists.
This can happen if mfi(4) and mrsas(4) are both attached to cards and
providing Linux emulation support.  Let the first one win.  An equivalent
change needs to be done to mrsas(4).  Extra credit would be to pass the
Linux emulation call to the other driver when appropriate.  This will
probably be a rare case and the user can manually change where the symlink
points to.

MFC after: 3 days

9 years agoInclude opt_em.h now that there are actual kernel compile options for em(4).
sbruno [Tue, 9 Jun 2015 14:31:18 +0000 (14:31 +0000)]
Include opt_em.h now that there are actual kernel compile options for em(4).

Submitted by: jfv
MFC after: 2 week
Sponsored by: Limelight Networks

9 years agoWhen updating/accessing the timehands, barriers are needed to ensure
kib [Tue, 9 Jun 2015 11:49:56 +0000 (11:49 +0000)]
When updating/accessing the timehands, barriers are needed to ensure
that:
- th_generation update is visible after the parameters update is
  visible;
- the read of parameters is not reordered before initial read of
  th_generation.

On UP kernels, compiler barriers are enough.  For SMP machines, CPU
barriers must be used too, as was confirmed by submitter by testing on
the Freescale T4240 platform with 24 PowerPC processors.

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after: 1 week

9 years agoHandle X2APIC entries in the MADT for APICs with an ID < 255. At least one
jhb [Tue, 9 Jun 2015 10:49:40 +0000 (10:49 +0000)]
Handle X2APIC entries in the MADT for APICs with an ID < 255.  At least one
BIOS has been seen to include such entries even though the relevant specs
require that X2APIC entries only be used for CPUs with an APIC ID >= 255.

This was tested on a system with "plain" local APIC entries in the MADT
to ensure no regressions, but it has not yet been tested on a system with
X2APIC entries in the MADT.  Currently such systems do not boot at all,
and with this change they might now boot correctly.

Differential Revision: https://reviews.freebsd.org/D2521
Reviewed by: kib
MFC after: 2 weeks

9 years agoSupport guest writes to the TSC by enabling the "use TSC offsetting"
tychon [Tue, 9 Jun 2015 00:14:47 +0000 (00:14 +0000)]
Support guest writes to the TSC by enabling the "use TSC offsetting"
execution control and writing the difference between the host TSC and
the guest TSC into the TSC offset in the VMCS upon encountering a
write.

Reviewed by: neel

9 years agoMap the allocated DMA memory into the address space.
marcel [Mon, 8 Jun 2015 22:01:34 +0000 (22:01 +0000)]
Map the allocated DMA memory into the address space.

9 years agoImplement mmap(2) for the busdma resource.
marcel [Mon, 8 Jun 2015 21:47:44 +0000 (21:47 +0000)]
Implement mmap(2) for the busdma resource.

9 years agoMerge r283870 from amd64:
dim [Mon, 8 Jun 2015 20:12:44 +0000 (20:12 +0000)]
Merge r283870 from amd64:

Remove unneeded NULL checks in trap_fatal().

Since td_name is an array member of struct thread, it can never be NULL,
so the check can be removed.  In addition, curproc can never be NULL,
so remove the if statement, and splice the two printfs() together.

While here, remove the u_long cast, and use the correct printf format
specifier for curproc->p_pid.

Requested by: jhb
MFC after: 3 days

9 years agoProperly initialize flags for accept4(2) not to return spurious EINVAL.
jkim [Mon, 8 Jun 2015 20:03:15 +0000 (20:03 +0000)]
Properly initialize flags for accept4(2) not to return spurious EINVAL.
Note this fixes a Linuxulator regression introduced in r283490.

PR: 200662

9 years agoMove contrib/top/top.X to contrib/top/top.xs and move
marcel [Mon, 8 Jun 2015 19:45:24 +0000 (19:45 +0000)]
Move contrib/top/top.X to contrib/top/top.xs and move
contrib/top/top.local.H to contrib/top/top.local.hs.
This fixes a build breakage when src is on a case-
insensitive file system -- we never properly create
top.x nor top.local.h. Change the makefile accordingly.

MFC after: 3 days

9 years agoCleanup some style(9) issues.
bdrewery [Mon, 8 Jun 2015 19:24:18 +0000 (19:24 +0000)]
Cleanup some style(9) issues.

- Whitespace.
- Comments.
- Wrap long lines.

MFC after: 2 weeks
X-MFC-with: r284105,r284106
Sponsored by: EMC / Isilon Storage Division

9 years agoIt has been long time that when doing 'ls -G /path/to/a/symlink', instead of
delphij [Mon, 8 Jun 2015 19:13:04 +0000 (19:13 +0000)]
It has been long time that when doing 'ls -G /path/to/a/symlink', instead of
using the color of symbolic link, the color is determined by the link target.
This behavior was quite confusing.

Looking at the file history, it looks like that r203665 intends to fix this
but the issue was never actually fixed.

Fix this by not setting FTS_COMFOLLOW when color is requested like what was
done in r203665.

MFC after: 2 weeks

9 years agoRevert r284153, as I believe it breaks the dtrace sdt module. I will
jhb [Mon, 8 Jun 2015 18:06:00 +0000 (18:06 +0000)]
Revert r284153, as I believe it breaks the dtrace sdt module.  I will
fix the original issue a different way.

9 years agoFutex is an aligned 32-bit integer. Use the proper instruction and
dchagin [Mon, 8 Jun 2015 17:39:25 +0000 (17:39 +0000)]
Futex is an aligned 32-bit integer. Use the proper instruction and
operand when dereferencing futex pointer.

9 years agoAdd user facing errors for exceeding process memory limits
emaste [Mon, 8 Jun 2015 16:07:07 +0000 (16:07 +0000)]
Add user facing errors for exceeding process memory limits

Previously the process terminating with SIGABRT at startup was the
only notification.

PR: 200617
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2731

9 years agoAdd an internal "locked" variant of linker_file_lookup_set() and change
jhb [Mon, 8 Jun 2015 14:06:47 +0000 (14:06 +0000)]
Add an internal "locked" variant of linker_file_lookup_set() and change
the public function to acquire the global linker lock directly.  This
permits linker_file_lookup_set() to be safely used from other modules.

9 years agoAdd makefile to build geom_map kld. Document some GEOM_* options
ae [Mon, 8 Jun 2015 13:23:56 +0000 (13:23 +0000)]
Add makefile to build geom_map kld. Document some GEOM_* options
in NOTES and geom(4).

9 years agoTeach G_PART_GPT class to handle g_resize_provider event.
ae [Mon, 8 Jun 2015 12:52:41 +0000 (12:52 +0000)]
Teach G_PART_GPT class to handle g_resize_provider event.

MFC after: 10 days

9 years agobackout remove of -q option for pw [user|group] next
bapt [Mon, 8 Jun 2015 05:27:34 +0000 (05:27 +0000)]
backout remove of -q option for pw [user|group] next

While the return code is broken, some corner case usage depends on the
functionnality, so backout until we get better regression tests covering those
corner case usage.

9 years agoFix typo
bapt [Mon, 8 Jun 2015 05:06:17 +0000 (05:06 +0000)]
Fix typo

9 years agoRetire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages.
alc [Mon, 8 Jun 2015 04:59:32 +0000 (04:59 +0000)]
Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages.

Differential Revision: https://reviews.freebsd.org/D2712
Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd busdma_mem_alloc & busdma_mem_free.
marcel [Mon, 8 Jun 2015 03:23:20 +0000 (03:23 +0000)]
Add busdma_mem_alloc & busdma_mem_free.

9 years agoCope with .. less memory.
adrian [Mon, 8 Jun 2015 03:01:19 +0000 (03:01 +0000)]
Cope with .. less memory.

9 years agoAdd DMA memory allocation and freeing.
marcel [Mon, 8 Jun 2015 03:00:36 +0000 (03:00 +0000)]
Add DMA memory allocation and freeing.
Slightly rework the tag handling.

9 years agoBreak out the current 802.11 software scan methods into an indirect table.
adrian [Mon, 8 Jun 2015 02:35:43 +0000 (02:35 +0000)]
Break out the current 802.11 software scan methods into an indirect table.

In order for drivers to provide an alternate set of scan methods,
these have to finally use an indirection table and all of the calls
in ieee80211_scan.c need to use said table.

For all existing drivers - this is basically a glorified, KBI-breaking
functional no-op.

This is also not the final form - too much functionality is currently
hiding in ieee80211_scan_sw.c that should be in ieee80211_scan.c.
That'll be the target of some follow-up commits.

Note:

* You have to recompile your kernel/drivers after this - the net80211 KBI has
  changed.
* I'm not yet planning on bumping any versioning - I have a few more things
  to shuffle around.

Tested:

* urtwn(4) - STA mode
* Intel 7260 in local repo - overriding the methods and table at
  attach time has the desired effect (ie, all the methods are called,
  but nothing is ever performed.)

9 years agoRevert my previoius commit as it explicit pollute the ficl on other
araujo [Mon, 8 Jun 2015 02:31:46 +0000 (02:31 +0000)]
Revert my previoius commit as it explicit pollute the ficl on other
architectures. It will be reworked by GSoC students.

Requested by: ngie, bms and pfg.

9 years agoRemove the start-scan call and re-inline it for now.
adrian [Mon, 8 Jun 2015 00:30:58 +0000 (00:30 +0000)]
Remove the start-scan call and re-inline it for now.

9 years agoFix mistakes than came along with r284139
bapt [Sun, 7 Jun 2015 21:59:43 +0000 (21:59 +0000)]
Fix mistakes than came along with r284139

9 years agoRemove '-q' support for pw [user|group] next
bapt [Sun, 7 Jun 2015 21:57:20 +0000 (21:57 +0000)]
Remove '-q' support for pw [user|group] next

the intent of -q in this command is to return as exit status the value of the
next group/user id, which does not make sense given exit status are limited to
values between 0 and 255.

9 years agoFix setting uid/gid min/max via pw
bapt [Sun, 7 Jun 2015 20:59:59 +0000 (20:59 +0000)]
Fix setting uid/gid min/max via pw

9 years agoFix generating configuration file
bapt [Sun, 7 Jun 2015 20:44:06 +0000 (20:44 +0000)]
Fix generating configuration file

9 years agoFix duplicate checking
bapt [Sun, 7 Jun 2015 19:59:01 +0000 (19:59 +0000)]
Fix duplicate checking

9 years agoRemove uneeded code (already done by pw_make_v7)
bapt [Sun, 7 Jun 2015 19:39:06 +0000 (19:39 +0000)]
Remove uneeded code (already done by pw_make_v7)

9 years agoIn case of rename validate the length of the new name
bapt [Sun, 7 Jun 2015 19:33:25 +0000 (19:33 +0000)]
In case of rename validate the length of the new name

Check early that the new name fits MAXLOGNAME and store it in pwconf

9 years agoRefactor input validation
bapt [Sun, 7 Jun 2015 19:03:41 +0000 (19:03 +0000)]
Refactor input validation

Mutualize code to validate inputs of both 'user' and 'group' command
Test that the input name fits into MAXLOGNAME

9 years agowitness: don't warn about matrix inconsistencies without holding the mutex
markj [Sun, 7 Jun 2015 18:59:47 +0000 (18:59 +0000)]
witness: don't warn about matrix inconsistencies without holding the mutex

Lock order checking is done without the witness mutex held, so multiple
threads that are racing to establish a new lock order may read matrix
entries that are in an inconsistent state. Don't print a warning in this
case, but instead just redo the check after taking the witness lock.

Differential Revision: https://reviews.freebsd.org/D2713
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFinish converting -7 to pwconf
bapt [Sun, 7 Jun 2015 15:54:57 +0000 (15:54 +0000)]
Finish converting -7 to pwconf

9 years agoAdd new USB quirk.
hselasky [Sun, 7 Jun 2015 15:47:58 +0000 (15:47 +0000)]
Add new USB quirk.

PR: 200693
MFC after: 1 week

9 years agoHandle -7 via gloval pwconf
bapt [Sun, 7 Jun 2015 15:33:08 +0000 (15:33 +0000)]
Handle -7 via gloval pwconf

9 years agoInitialize conf using menset(3)
bapt [Sun, 7 Jun 2015 15:29:58 +0000 (15:29 +0000)]
Initialize conf using menset(3)

9 years agoHandle pretty print (-P) via global pwconf
bapt [Sun, 7 Jun 2015 15:27:17 +0000 (15:27 +0000)]
Handle pretty print (-P) via global pwconf

9 years agoHandle dryrun (-N) via global pwconf
bapt [Sun, 7 Jun 2015 15:09:53 +0000 (15:09 +0000)]
Handle dryrun (-N) via global pwconf