]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoExplicitely mention that inactivated or reclaimed vnode is locked
kib [Sun, 27 Jul 2014 20:55:47 +0000 (20:55 +0000)]
Explicitely mention that inactivated or reclaimed vnode is locked
exclusively.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoRemove man page for non-existent VOPs.
kib [Sun, 27 Jul 2014 20:48:56 +0000 (20:48 +0000)]
Remove man page for non-existent VOPs.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoCorrect the locking statement.
kib [Sun, 27 Jul 2014 20:47:06 +0000 (20:47 +0000)]
Correct the locking statement.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoUpdate from mav@ - don't break the input switching.
adrian [Sun, 27 Jul 2014 20:14:22 +0000 (20:14 +0000)]
Update from mav@ - don't break the input switching.

9 years agoForced commit - testing commit mail etc pipelines.
peter [Sun, 27 Jul 2014 17:34:49 +0000 (17:34 +0000)]
Forced commit - testing commit mail etc pipelines.

9 years ago1. Suppress output for the TFTP-based PXE loader, but leave it in
marcel [Sun, 27 Jul 2014 16:29:57 +0000 (16:29 +0000)]
1.  Suppress output for the TFTP-based PXE loader, but leave it in
    place for the NFS-based PXE loader. Information like rootpath
    or rootip aren't that useful for TFTP and the gateway IP is
    typically already printed by the firmware.
2.  Only set boot.nfsroot.* environment variables for NFS. This
    makes it possible for the OS to work either way by checking
    for the presence or absence of environment variables.
3.  Set boot.netif.server when using TFTP so that the OS can fetch
    files as well. A typical use case for this is network-based
    installations with the installation process implemented on
    top of FreeBSD.
4.  The pxelinux loader has a set of alternative names it tries
    for configuration files. Make it easier to do something
    similar in Forth by providing the IP address as a 32-bit hex
    number in the pxeboot.ip variable and the MAC address with
    dashes in the pxeboot.hwaddr environment variable.

Obtained from: Juniper Networks, Inc.

9 years agoGive loaders more control over the Forth initialization process. In
marcel [Sun, 27 Jul 2014 16:12:51 +0000 (16:12 +0000)]
Give loaders more control over the Forth initialization process. In
particular, allow loaders to define the name of the RC script the
interpreter needs to use. Use this new-found control to have the
PXE loader (when compiled with TFTP support and not NFS support)
read from ${bootfile}.4th, where ${bootfile} is the name of the
file fetched by the PXE firmware.

The normal startup process involves reading the following files:
1.  /boot/boot.4th
2.  /boot/loader.rc or alternatively /boot/boot.conf

When these come from a FreeBSD-defined file system, this is all
good. But when we boot over the network, subdirectories and fixed
file names are often painful to administrators and there's really
no way for them to change the behaviour of the loader.

Obtained from: Juniper Networks, Inc.

9 years agoAdd support for my Lenovo T400.
adrian [Sun, 27 Jul 2014 08:44:15 +0000 (08:44 +0000)]
Add support for my Lenovo T400.

Tested:

* Lenovo T400, model w/ P8700 Intel CPU on-board

9 years agoFix several cases of NULL dereference when INQUIRY sent to absent LUN.
mav [Sun, 27 Jul 2014 06:49:55 +0000 (06:49 +0000)]
Fix several cases of NULL dereference when INQUIRY sent to absent LUN.

MFC after: 3 days

9 years agoCommit some sins in the name of "oh god oh god I don't really want to
adrian [Sun, 27 Jul 2014 05:44:42 +0000 (05:44 +0000)]
Commit some sins in the name of "oh god oh god I don't really want to
be able to claim I know how the UART code works."

* Just return 115200 as the current baud rate. I should cache it in the
  device struct and return that but I'm lazy right now.
* don't error out on other ioctl settings for now, just silently ignore them.
* remove some code that was copied from the 8250 driver that isn't needed
  any longer.

Tested:

* AR9331, Carambola-2 board.

9 years agoAdd another revision of the AR8327.
adrian [Sat, 26 Jul 2014 21:33:17 +0000 (21:33 +0000)]
Add another revision of the AR8327.

9 years agostore the AR9300 interrupts away when doing interrupt debugging.
adrian [Sat, 26 Jul 2014 21:32:03 +0000 (21:32 +0000)]
store the AR9300 interrupts away when doing interrupt debugging.

9 years agoUpdate the header printing to match the rest of the output.
gnn [Sat, 26 Jul 2014 20:42:54 +0000 (20:42 +0000)]
Update the header printing to match the rest of the output.

Pointed out by: mdf

9 years agoSince we cannot yet display the name print the file descriptor so that
gnn [Sat, 26 Jul 2014 20:11:36 +0000 (20:11 +0000)]
Since we cannot yet display the name print the file descriptor so that
it can be looked up manually using procstat(1).

9 years agoFurther improvements on elfdump, to follow up r269092:
andreast [Sat, 26 Jul 2014 19:44:45 +0000 (19:44 +0000)]
Further improvements on elfdump, to follow up r269092:

- Add ARM specific section header types.
- Add SHT_GNU_HASH section header type.
- Improve reporting of undefined tags in d_tags.
- Add DT_GNU_HASH tag.

Reviewed by: emaste

9 years agoThe accept filter code is not specific to the FreeBSD IPv4 network stack,
marcel [Sat, 26 Jul 2014 19:27:34 +0000 (19:27 +0000)]
The accept filter code is not specific to the FreeBSD IPv4 network stack,
so it really should not be under "optional inet". The fact that uipc_accf.c
lives under kern/ lends some weight to making it a "standard" file.

Moving kern/uipc_accf.c from "optional inet" to "standard" eliminates the
need for #ifdef INET in kern/uipc_socket.c.

Also, this meant the net.inet.accf.unloadable sysctl needed to move, as
net.inet does not exist without networking compiled in (as it lives in
netinet/in_proto.c.) The new sysctl has been named net.accf.unloadable.

In order to support existing accept filter sysctls, the net.inet.accf node
has been added netinet/in_proto.c.

Submitted by: Steve Kiernan <stevek@juniper.net>
Obtained from: Juniper Networks, Inc.

9 years agoRemove debugging options from the rwsnoop script.
gnn [Sat, 26 Jul 2014 19:25:52 +0000 (19:25 +0000)]
Remove debugging options from the rwsnoop script.

9 years agoPort the rwsnoop DTrace Toolkit script to FreeBSD.
gnn [Sat, 26 Jul 2014 19:21:53 +0000 (19:21 +0000)]
Port the rwsnoop DTrace Toolkit script to FreeBSD.
Remove dependency on the Korn Shell.
Remove Zones in favor of Jails.
Remove support (for now) for filename printing.

9 years agoSplit the XHCI TRB allocations into smaller parts, so that we don't
hselasky [Sat, 26 Jul 2014 19:08:52 +0000 (19:08 +0000)]
Split the XHCI TRB allocations into smaller parts, so that we don't
end up allocating contiguous busdma buffers above PAGE_SIZE bytes.

MFC after: 1 week
Tested by: Ruslan Bukin <br@bsdpad.com>

9 years agoAdd two sysctls for newly added tunables.
delphij [Sat, 26 Jul 2014 19:07:08 +0000 (19:07 +0000)]
Add two sysctls for newly added tunables.

MFC after: 2 weeks

9 years agoAdd missing definition of ELF_MACHINE_OK, now used by gcore(1).
marcel [Sat, 26 Jul 2014 18:52:23 +0000 (18:52 +0000)]
Add missing definition of ELF_MACHINE_OK, now used by gcore(1).

9 years agoPull in the armv4 "fast out" code for checking whether busdma can bounce
ian [Sat, 26 Jul 2014 18:19:43 +0000 (18:19 +0000)]
Pull in the armv4 "fast out" code for checking whether busdma can bounce
due to an excluded region of physical memory.

9 years agoRemove completely bogus alignment check -- it's the physical address that
ian [Sat, 26 Jul 2014 18:14:16 +0000 (18:14 +0000)]
Remove completely bogus alignment check -- it's the physical address that
needs to be aligned, not the virtual, and it doesn't seem worth the cost
of a vtophys() call just to see if kmem_alloc_contig() works properly.

9 years agoWhen unwiring a region of an address space, do not assume that the
alc [Sat, 26 Jul 2014 18:10:18 +0000 (18:10 +0000)]
When unwiring a region of an address space, do not assume that the
underlying physical pages are mapped by the pmap.  If, for example, the
application has performed an mprotect(..., PROT_NONE) on any part of the
wired region, then those pages will no longer be mapped by the pmap.
So, using the pmap to lookup the wired pages in order to unwire them
doesn't always work, and when it doesn't work wired pages are leaked.

To avoid the leak, introduce and use a new function vm_object_unwire()
that locates the wired pages by traversing the object and its backing
objects.

At the same time, switch from using pmap_change_wiring() to the recently
introduced function pmap_unwire() for unwiring the region's mappings.
pmap_unwire() is faster, because it operates a range of virtual addresses
rather than a single virtual page at a time.  Moreover, by operating on
a range, it is superpage friendly.  It doesn't waste time performing
unnecessary demotions.

Reported by: markj
Reviewed by: kib
Tested by: pho, jmg (arm)
Sponsored by: EMC / Isilon Storage Division

9 years agoBuild tsec(4) as a module.
marcel [Sat, 26 Jul 2014 17:59:25 +0000 (17:59 +0000)]
Build tsec(4) as a module.

Obtained from: Juniper Networks, Inc.

9 years agoRemove bogus module dependencies.
marcel [Sat, 26 Jul 2014 17:57:13 +0000 (17:57 +0000)]
Remove bogus module dependencies.

9 years agoDo not fail the low-level device probe simply because the kernel
marcel [Sat, 26 Jul 2014 17:49:40 +0000 (17:49 +0000)]
Do not fail the low-level device probe simply because the kernel
doesn't have support for the Z8530. Embedded PowerPC platforms
typically don't. Fail when the device class we actually need is
not present.

Obtained from: Juniper Networks, Inc.

9 years agoAvoid using ${.CURDIR} so that the module can be built from multiple
marcel [Sat, 26 Jul 2014 17:24:58 +0000 (17:24 +0000)]
Avoid using ${.CURDIR} so that the module can be built from multiple
directories.

Obtained from: Juniper Networks, Inc.

9 years agoFix relocations related to dpcpu and vnet sets. The address is
marcel [Sat, 26 Jul 2014 17:07:32 +0000 (17:07 +0000)]
Fix relocations related to dpcpu and vnet sets. The address is
rebased to point to the allocated memory, but for architectures
that have non-zero relocation addends, the address comparison
happens on the "unfinalized" address.
After the addend is taken into account, call elf_relocaddr() to
make sure we rebase properly.

9 years agoCreate 32-bit core files for 32-bit processes on 64-bit machines.
marcel [Sat, 26 Jul 2014 16:45:11 +0000 (16:45 +0000)]
Create 32-bit core files for 32-bit processes on 64-bit machines.
The 64-bit machine supported right now is amd64, but it's not too
hard to add powerpc64.

Obtained from: Juniper Networks, Inc.

9 years agoFix for division by zero.
hselasky [Sat, 26 Jul 2014 16:06:01 +0000 (16:06 +0000)]
Fix for division by zero.

MFC after: 3 days

9 years agoDon't return ERESTART when the device is gone. In ttydev_leave() ERESTART
marcel [Sat, 26 Jul 2014 15:46:41 +0000 (15:46 +0000)]
Don't return ERESTART when the device is gone. In ttydev_leave() ERESTART
is the indication that draining got interrupted due to a revoke(2) and
that tty_drain() is to be called again for draining to complete. If the
device is flagged as gone, then waiting/draining is not possible. Only
return ERESTART when waiting is still possible.

Obtained from: Juniper Networks, Inc.

9 years agoIn r232153, libarchive 3.0.3 was imported, replacing the archive_hash.h
dim [Sat, 26 Jul 2014 15:33:20 +0000 (15:33 +0000)]
In r232153, libarchive 3.0.3 was imported, replacing the archive_hash.h
header with archive_crypto_private.h, and its ARCHIVE_HASH_xxx macros
were renamed to ARCHIVE_CRYPTO_xxx.

Rename these macros in lib/libarchive/config_freebsd.h, to re-enable the
hashes for libarchive again.  This affects the mtree format writer, and
the xar format reader and writer modules.

This also requires changes in the library order for statically linking
rescue, otherwise ld would complain about redefined symbols.  Thanks to
jkim for pointing out the solution.

Reviewed by: kientzle
MFC after: 1 week

9 years agostrftime() xlocale cleanups.
pfg [Sat, 26 Jul 2014 14:24:13 +0000 (14:24 +0000)]
strftime() xlocale cleanups.

Replace fprintf_l with fputs when output is unformatted.
Use locale_t in _conv() since it was using sprintf (now sprintf_l)
Use locale_t on _yconv() sinci it calls _conv()

Obtained from: Apple Inc. (Libc 997.90.3)
CR: D482
Reviewed by: theraven
MFC after: 1 week

9 years agoImplement separate I/O dispatch method for ZVOLs in "dev" mode.
mav [Sat, 26 Jul 2014 13:56:50 +0000 (13:56 +0000)]
Implement separate I/O dispatch method for ZVOLs in "dev" mode.

Unlike disk devices ZVOLs process all requests synchronously.  That makes
impossible sending multiple requests to them from single thread.  From the
other side ZVOLs have real d_read/d_write methods, which unlike d_strategy
can handle uio scatter/gather and have no strict I/O size limitations.

So, if ZVOL in "dev" mode is detected, use of d_read/d_write methods instead
of d_strategy allows to avoid pointless splitting of large requests into
MAXPHYS (128K) sized chunks.

MFC after: 1 week

9 years agoFix infinite loop, when doing WRITE SAME on file-backed LUN.
mav [Sat, 26 Jul 2014 13:43:25 +0000 (13:43 +0000)]
Fix infinite loop, when doing WRITE SAME on file-backed LUN.

MFC after: 3 days

9 years agoThe previous commit (r269119) introduced a regression: It removed the
se [Sat, 26 Jul 2014 13:14:28 +0000 (13:14 +0000)]
The previous commit (r269119) introduced a regression: It removed the
ability to specify the the full path name of the keymap file.

Instead leave the original search order intact, but insert the path for
newcons-specific fonts (if run on a system using newcons):

- KEYMAP_PATH in environment
- full path name
- /usr/share/vt/keymaps (only if newcons is in use!)
- /usr/share/syscons/keymaps (also as fall-back for newcons)

MFC after: 1 week

9 years agoFix obvious off by one error: prefix[1] should be set to the path of the
se [Sat, 26 Jul 2014 12:17:26 +0000 (12:17 +0000)]
Fix obvious off by one error: prefix[1] should be set to the path of the
newcons specific keymap files, not prefix[2]. The result of this bug was
that kbdcontrol ignored the files in the syscons keymap directory, which
apparently still work under newcons, for most locales.

MFC after: 1 week

9 years agoMFV r269010:
delphij [Sat, 26 Jul 2014 10:20:48 +0000 (10:20 +0000)]
MFV r269010:

Import Illumos changes to address the following Illumos issues:
  4976 zfs should only avoid writing to a failing non-redundant
       top-level vdev
  4978 ztest fails in get_metaslab_refcount()
  4979 extend free space histogram to device and pool
  4980 metaslabs should have a fragmentation metric
  4981 remove fragmented ops vector from block allocator
  4982 space_map object should proactively upgrade when feature
       is enabled
  4984 device selection should use fragmentation metric

MFC after: 2 weeks

9 years agoMake sysctls under vfs.zfs.zfetch writeable.
mav [Sat, 26 Jul 2014 09:09:14 +0000 (09:09 +0000)]
Make sysctls under vfs.zfs.zfetch writeable.

I don't see any reason for them to be read-only, while tuning them without
reboot is much more convenient for experiments.

MFC after: 2 weeks

9 years agoIn the "Too many open files" edge cases don't try to preserve old
ache [Sat, 26 Jul 2014 08:41:03 +0000 (08:41 +0000)]
In the "Too many open files" edge cases don't try to preserve old
number for non-std* descriptors, but close old file and retry.

Obtained from:  inspired by Apple's change from pfg@
MFC after:      2 weeks

9 years agoRemove useless getpwnam() call.
des [Sat, 26 Jul 2014 07:40:31 +0000 (07:40 +0000)]
Remove useless getpwnam() call.

Submitted by: Arthur Mesh <amesh@juniper.net>
MFC after: 1 week

9 years agoReviewed by: imp
sjg [Sat, 26 Jul 2014 04:38:09 +0000 (04:38 +0000)]
Reviewed by: imp

LDFLAGS is supposed to be given to CC not LD.
Define _LDFLAGS as a filtered version of LDFLAGS safe to give to LD

9 years agoEnable at91 systems to boot from high capacity SD cards.
ian [Sat, 26 Jul 2014 04:16:04 +0000 (04:16 +0000)]
Enable at91 systems to boot from high capacity SD cards.

This also fixes a few minor violations of the SD protocol, such as running
the bus at high speed during the card identification sequence.

The sdcard_init() routine now probes for SDHC cards so that later read
requests can make needed adjustments between block and byte offsets based
on card type.

There is a new MCI_readblocks() function that takes block number and block
count parameters instead of byte-offset values.  Using this routine, boot
loader code can load a kernel from any location on an SDHC or standard SD.

The old MCI_read() interface remains unchanged so that existing customized
boot loader code will still keep working without changes.  Using this
routine, boot loaders can load a kernel from anywhere in the first 4GB of
an SDHC card (or of course any location on a standard SD card).

A new sdcard_use4wire() routine allows boot loaders to request 4-bit
transfers; it should be called after sdcard_init().  The sdcard_init()
routine no longer assumes the hardware is 4-wire capable and by default
sets things up for 1-bit transfers.  (4-wire mode is unreliable on
at91rm9200, works on later SoCs.)

PR: 155894
Submitted by: me.  years ago.

9 years agoThe 'flags' variable is conflicting with some inline code in a header file
ian [Sat, 26 Jul 2014 04:09:43 +0000 (04:09 +0000)]
The 'flags' variable is conflicting with some inline code in a header file
("variable flags shadows a global..."), just rename this variable to
wish away the problem.

9 years agoEliminate "no previous prototype for main" warnings.
ian [Sat, 26 Jul 2014 03:33:19 +0000 (03:33 +0000)]
Eliminate "no previous prototype for main" warnings.

9 years agoSilence a clang warning about a while loop with an empty body.
ian [Sat, 26 Jul 2014 03:19:13 +0000 (03:19 +0000)]
Silence a clang warning about a while loop with an empty body.

9 years agoIf a vcpu has issued a HLT instruction with interrupts disabled then it sleeps
neel [Sat, 26 Jul 2014 02:53:51 +0000 (02:53 +0000)]
If a vcpu has issued a HLT instruction with interrupts disabled then it sleeps
forever in vm_handle_hlt().

This is usually not an issue as long as one of the other vcpus properly resets
or powers off the virtual machine. However, if the bhyve(8) process is killed
with a signal the halted vcpu cannot be woken up because it's sleep cannot be
interrupted.

Fix this by waking up periodically and returning from vm_handle_hlt() if
TDF_ASTPENDING is set.

Reported by: Leon Dang
Sponsored by: Nahanni Systems

9 years agoDon't return -1 from the push emulation handler. Negative return values are
neel [Sat, 26 Jul 2014 02:51:46 +0000 (02:51 +0000)]
Don't return -1 from the push emulation handler. Negative return values are
interpreted specially on return from sys_ioctl() and may cause undesirable
side-effects like restarting the system call.

9 years agoAdd a 'raw' parameter to the 'modinfo' subcommand. This is handy when
np [Sat, 26 Jul 2014 00:51:45 +0000 (00:51 +0000)]
Add a 'raw' parameter to the 'modinfo' subcommand.  This is handy when
trying to figure out why a QSFP+/SFP+ connector or cable wasn't
identified correctly by cxgbe(4).  Its output looks like this:

# cxgbetool t5nex0 modinfo 0 raw
00:  03 04 21 00  00 00 00 00  ..!. ....
08:  04 00 00 00  67 00 00 00  .... g...
10:  00 00 05 00  41 6d 70 68  .... Amph
18:  65 6e 6f 6c  20 20 20 20  enol
20:  20 20 20 20  00 41 50 48       .APH
28:  35 37 31 35  34 30 30 30  5715 4000
30:  33 20 20 20  20 20 20 20  3
38:  4b 20 20 20  01 00 00 fa  K    ....
40:  00 00 00 00  41 50 46 31  .... APF1
48:  30 30 34 30  30 33 30 30  0040 0300
50:  30 33 20 20  31 30 30 31  03   1001
58:  33 30 20 20  00 00 00 97  30   ....

MFC after: 3 days

9 years agoAdd error return to dumpsys(), and use it in doadump().
gavin [Fri, 25 Jul 2014 23:52:53 +0000 (23:52 +0000)]
Add error return to dumpsys(), and use it in doadump().

This commit does not add error returns to minidumpsys() or
textdump_dumpsys(); those can also be added later.

Submitted by: Conrad Meyer (EMC / Isilon storage division)

9 years agoDiff reduction against Illumos.
delphij [Fri, 25 Jul 2014 22:58:55 +0000 (22:58 +0000)]
Diff reduction against Illumos.

MFC after: 2 weeks

9 years agoDocument an important, but easy to overlook without grepping the
imp [Fri, 25 Jul 2014 21:10:30 +0000 (21:10 +0000)]
Document an important, but easy to overlook without grepping the
entire tree, detail about LDFLAGS.

9 years agoUse the right lengths.
delphij [Fri, 25 Jul 2014 20:54:10 +0000 (20:54 +0000)]
Use the right lengths.

Submitted by: Sascha Wildner
MFC after: 2 weeks

9 years agoUse the right length.
delphij [Fri, 25 Jul 2014 20:49:59 +0000 (20:49 +0000)]
Use the right length.

Submitted by: Sascha Wildner
MFC after: 2 weeks

9 years agoInsert new threads at the end of the thread list in the process
deischen [Fri, 25 Jul 2014 20:21:02 +0000 (20:21 +0000)]
Insert new threads at the end of the thread list in the process
instead of at the beginning.  This allows an intra process signal
to be sent to the oldest thread with the signal unmasked - which,
if it still exists, is the main thread.  This mimics behavior
found in Linux and Solaris.

9 years agoSimplify the meaning of return values from the inout handlers. After this
neel [Fri, 25 Jul 2014 20:18:35 +0000 (20:18 +0000)]
Simplify the meaning of return values from the inout handlers. After this
change 0 means success and non-zero means failure.

This also helps to eliminate VMEXIT_POWEROFF and VMEXIT_RESET as return values
from VM-exit handlers.

CR: D480
Reviewed by: grehan, jhb

9 years agoTransform the I/O when vdev_physical_ashift is greater than
delphij [Fri, 25 Jul 2014 18:41:56 +0000 (18:41 +0000)]
Transform the I/O when vdev_physical_ashift is greater than
SPA_MINBLOCKSHIFT.

MFC after: 2 weeks

9 years agoelfdump: Improve section type reporting
emaste [Fri, 25 Jul 2014 18:20:56 +0000 (18:20 +0000)]
elfdump: Improve section type reporting

The SHT range 0x70000000-0x7fffffff is processor-specific.  Pass the
ELF machine type header to sh_types so the section header type name can
be reported correctly for the given processor.

For all ranges report the actual value for unknown types.

Add MIPS-specific type SHT_MIPS_OPTIONS.

CR: D483
Reviewed by: sbruno, marcel
Sponsored by: DARPA, AFRL

9 years agoFix spelling of Camellia algorithm. While here, replace blank lines
wblock [Fri, 25 Jul 2014 17:09:48 +0000 (17:09 +0000)]
Fix spelling of Camellia algorithm.  While here, replace blank lines
between examples with actual .Pp breaks.

PR: 192067
Submitted by: dmitry2004@yandex.ru
MFC after: 1 week

9 years agoUpdate the freebsd-tips example to use drill instead of dig since bind is no longer...
allanjude [Fri, 25 Jul 2014 14:47:44 +0000 (14:47 +0000)]
Update the freebsd-tips example to use drill instead of dig since bind is no longer in base

CR: D460
Approved by: bcr (mentor)

9 years agoFix ctl(4) kldload failure that manifested like this:
trasz [Fri, 25 Jul 2014 11:29:45 +0000 (11:29 +0000)]
Fix ctl(4) kldload failure that manifested like this:

link_elf_obj: symbol icl_pdu_new_bhs undefined

PR: 192031
Submitted by: Nils Beyer (earlier version)
MFC after: 3 days
Sponsored by: FreeBSD Foundation

9 years agoAdd net80211 and minor cleanup.
kevlo [Fri, 25 Jul 2014 10:27:36 +0000 (10:27 +0000)]
Add net80211 and minor cleanup.

9 years agoAs of r268075, the responsibility of rounding up buffer to optimal size have
delphij [Fri, 25 Jul 2014 06:53:20 +0000 (06:53 +0000)]
As of r268075, the responsibility of rounding up buffer to optimal size have
been transferred from zio_compress_data to its caller.  Therefore, passing
the 'minblocksize' down will be a no-op.

Eliminate the parameter to reduce diff against upstream.

MFC after: 2 weeks

9 years agoFix structure of new tests (r268794) for usr.bin/units.
jmmv [Fri, 25 Jul 2014 01:29:22 +0000 (01:29 +0000)]
Fix structure of new tests (r268794) for usr.bin/units.

- Make sure the tests go into the right directory.  The location was
  wrong so they were overwriting the bin/chown tests!
- Use the right naming scheme for the test program.
- Remove the svn:executable property from the shell script.

9 years agoFix typo.
kib [Thu, 24 Jul 2014 23:14:03 +0000 (23:14 +0000)]
Fix typo.

MFC after: 3 days

9 years agoFix a couple of issues in the PUSH emulation:
neel [Thu, 24 Jul 2014 23:01:53 +0000 (23:01 +0000)]
Fix a couple of issues in the PUSH emulation:

It is not possible to PUSH a 32-bit operand on the stack in 64-bit mode. The
default operand size for PUSH is 64-bits and the operand size override prefix
changes that to 16-bits.

vm_copy_setup() can return '1' if it encounters a fault when walking the
guest page tables. This is a guest issue and is now handled properly by
resuming the guest to handle the fault.

9 years agoPOSIX says that passing a location returned by telldir() to seekdir()
jhb [Thu, 24 Jul 2014 20:44:30 +0000 (20:44 +0000)]
POSIX says that passing a location returned by telldir() to seekdir()
after an intervening call to rewinddir() is undefined, so reclaim any
pending telldir() cookies in the directory when rewinddir() is called.

CR: D459
Reviewed by: jilles
MFC after: 1 week

9 years agolibstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not
sbruno [Thu, 24 Jul 2014 19:06:15 +0000 (19:06 +0000)]
libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not
true on amd64 I'm not quite positive this is the "correct" solution for
this but it does seem to compile and shut up the spew of warnings when
compiling libstand for userboot.

Add two _Static_asserts() so that in the future somebody will get a compile
failure if an architecture develops that violates the assumptions of this
code. (strongly suggested by jmg)

Change commetns to indicate int types instead of long.  (noted by ian in
phabric review)

Phabric: https://phabric.freebsd.org/D443

9 years agoSome hooks in cxgbe(4) for the offloaded iSCSI driver.
np [Thu, 24 Jul 2014 18:39:08 +0000 (18:39 +0000)]
Some hooks in cxgbe(4) for the offloaded iSCSI driver.

(I'm committing this on behalf of my colleagues in the Storage team
at Chelsio).

Submitted by: Sreenivasa Honnur <shonnur at chelsio dot com>
Sponsored by: Chelsio Communications.

9 years agoInitialize notification strucuture. This was missed in an earlier commit
tuexen [Thu, 24 Jul 2014 18:06:18 +0000 (18:06 +0000)]
Initialize notification strucuture. This was missed in an earlier commit

MFC after: 3 days

9 years agoStrip the patch level from the release name before trying to fetch the
des [Thu, 24 Jul 2014 17:43:42 +0000 (17:43 +0000)]
Strip the patch level from the release name before trying to fetch the
distribution.

PR: 170264
Approved by: nathanw
MFC after: 1 week

9 years agovtfontcvt will first ship in FreeBSD 10.1
emaste [Thu, 24 Jul 2014 15:16:03 +0000 (15:16 +0000)]
vtfontcvt will first ship in FreeBSD 10.1

9 years agoFix a typo in a comment
bapt [Thu, 24 Jul 2014 14:11:33 +0000 (14:11 +0000)]
Fix a typo in a comment

Reported by: jhb

9 years agoFix build with QUEUE_MACRO_DEBUG.
mav [Thu, 24 Jul 2014 14:10:58 +0000 (14:10 +0000)]
Fix build with QUEUE_MACRO_DEBUG.

Submitted by: benno@
MFC after: 3 days

9 years agoFix EtherIP. TOS field must be initialized when the inner protocol is
hrs [Thu, 24 Jul 2014 10:42:47 +0000 (10:42 +0000)]
Fix EtherIP.  TOS field must be initialized when the inner protocol is
PF_LINK, and multicast/broadcast flag should always be dropped because
the outer protocol uses unicast even when the inner address is not for
unicast.  It had been broken since r236951 when gif_output() started to
use IFQ_HANDOFF().

9 years agoCorrect assertion. The shadowing object cannot be tmpfs vm object,
kib [Thu, 24 Jul 2014 10:25:42 +0000 (10:25 +0000)]
Correct assertion.  The shadowing object cannot be tmpfs vm object,
and tmpfs object cannot shadow.  In other words, tmpfs vm object is
always at the bottom of the shadow chain.

Reported and tested by: bdrewery
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoIntel desktop Haswell CPUs may report benign corrected parity errors (see
marius [Thu, 24 Jul 2014 10:14:51 +0000 (10:14 +0000)]
Intel desktop Haswell CPUs may report benign corrected parity errors (see
HSD131 erratum in [1]) at a considerable rate. So filter these (default),
unless logging is enabled. Unfortunately, there really is no better way to
reasonably implement suppressing these errors than to just skipping them
in mca_log(). Given that they are reported for bank 0, they'd need to be
masked in MSR_MC0_CTL. However, P6 family processors require that register
to be set to either all 0s or all 1s, disabling way more than the one error
in question when using all 0s there. Alternatively, it could be masked for
the corresponding CMCI, but that still wouldn't keep the periodic scanner
from detecting these spurious errors. Apart from that, register contents of
MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel
Architectures Developer's Manual nor in the Haswell datasheets.

Note that while HSD131 actually is only about C0-stepping as of revision
014 of the Intel desktop 4th generation processor family specification
update, these corrected errors also have been observed with D0-stepping
aka "Haswell Refresh".

1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf

Reviewed by: jhb
MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

9 years agoCopying pages via temporary mappings in the !DMAP case of pmap_copy_pages()
marius [Thu, 24 Jul 2014 10:12:22 +0000 (10:12 +0000)]
Copying pages via temporary mappings in the !DMAP case of pmap_copy_pages()
involves updating the corresponding page tables followed by accesses to the
pages in question. This sequence is subject to the situation exactly described
in the "AMD64 Architecture Programmer's Manual Volume 2: System Programming"
rev. 3.23, "7.3.1 Special Coherency Considerations" [1, p. 171 f.]. Therefore,
issuing the INVLPG right after modifying the PTE bits is crucial (see also
r269050).
For the amd64 PMAP code, the order of instructions was already correct. The
above fact still is worth documenting, though.

1: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf

Reviewed by: alc
Sponsored by: Bally Wulff Games & Entertainment GmbH

9 years ago- Copying and zeroing pages via temporary mappings involves updating the
marius [Thu, 24 Jul 2014 10:08:02 +0000 (10:08 +0000)]
- Copying and zeroing pages via temporary mappings involves updating the
  corresponding page tables followed by accesses to the pages in question.
  This sequence is subject to the situation exactly described in the "AMD64
  Architecture Programmer's Manual Volume 2: System Programming" rev. 3.23,
  "7.3.1 Special Coherency Considerations" [1, p. 171 f.]. Therefore, issuing
  the INVLPG right after modifying the PTE bits is crucial.
  For pmap_copy_page(), this has been broken in r124956 and later on carried
  over to pmap_copy_pages() derived from the former, while all other places
  in the i386 PMAP code use the correct order of instructions in this regard.
  Fixing the latter breakage solves the problem of data corruption seen with
  unmapped I/O enabled when running at least bare metal on AMD R-268D APUs.
  However, this might also fix similar corruption reported for virtualized
  environments.
- In pmap_copy_pages(), correctly set the cache bits on the source page being
  copied. This change is thought to be a NOP for the real world, though. [2]

1: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf

Submitted by: kib [2]
Reviewed by: alc, kib
MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

9 years agoAdd compat shims for XDEV and XDEV_ARCH so we don't break all the
imp [Thu, 24 Jul 2014 06:16:51 +0000 (06:16 +0000)]
Add compat shims for XDEV and XDEV_ARCH so we don't break all the
users of them. Also, add a note to updating. We'll keep these shims at
least until the 12 branch.

9 years agoReduce the proliferation of VMEXIT_RESTART in task_switch.c.
neel [Thu, 24 Jul 2014 05:31:57 +0000 (05:31 +0000)]
Reduce the proliferation of VMEXIT_RESTART in task_switch.c.

This is in preparation for further simplification of the return values from
VM exit handlers in bhyve(8).

9 years agoFix fault injection in bhyve.
neel [Thu, 24 Jul 2014 01:38:11 +0000 (01:38 +0000)]
Fix fault injection in bhyve.

The faulting instruction needs to be restarted when the exception handler
is done handling the fault. bhyve now does this correctly by setting
'vmexit[vcpu].inst_length' to zero so the %rip is not advanced.

A minor complication is that the fault injection APIs are used by instruction
emulation code that is shared by vmm.ko and bhyve. Thus the argument that
refers to 'struct vm *' in kernel or 'struct vmctx *' in userspace needs to
be loosely typed as a 'void *'.

9 years agoClean symlinks created in sys/modules dirs when a make clean is invoked.
sbruno [Thu, 24 Jul 2014 00:25:25 +0000 (00:25 +0000)]
Clean symlinks created in sys/modules dirs when a make clean is invoked.

Phabric: https://phabric.freebsd.org/D474
Reviewed by: grehan sjg

9 years agoWhen producing fmake(1), `make clean' should remove fmake.1 (a copy of
dteske [Wed, 23 Jul 2014 23:01:54 +0000 (23:01 +0000)]
When producing fmake(1), `make clean' should remove fmake.1 (a copy of
make.1). Introduced initially via SVN r250699 (sjg).

Reviewed by: sjg, gjb
MFC after: 3 days
X-MFC-to: stable/10

9 years agoDelete the entire cleandepend/cleanmachine target thing now that its been
sbruno [Wed, 23 Jul 2014 22:58:00 +0000 (22:58 +0000)]
Delete the entire cleandepend/cleanmachine target thing now that its been
cleared out in r269029

Reviewed by: emaste@freebsd.org

9 years agoFake out the deprecation of XDEV and XDEV_ARCH by
gjb [Wed, 23 Jul 2014 22:35:23 +0000 (22:35 +0000)]
Fake out the deprecation of XDEV and XDEV_ARCH by
continuing to use the variables in the configuration
file, but switch XDEV= and XDEV_ARCH= to TARGET= and
TARGET_ARCH= appropriately.

Sponsored by: The FreeBSD Foundation

9 years agocxgbe(4): Keep track of the clusters that have to be freed by the
np [Wed, 23 Jul 2014 22:29:22 +0000 (22:29 +0000)]
cxgbe(4):  Keep track of the clusters that have to be freed by the
custom free routine (rxb_free) in the driver.  Fail MOD_UNLOAD with
EBUSY if any such cluster has been handed up to the kernel but hasn't
been freed yet.  This prevents a panic later when the cluster finally
needs to be freed but rxb_free is gone from the kernel.

MFC after: 1 week

9 years agoDeprecate the use of XDEV and XDEV_ARCH and just use TARGET/TARGET_ARCH
sbruno [Wed, 23 Jul 2014 22:18:43 +0000 (22:18 +0000)]
Deprecate the use of XDEV and XDEV_ARCH and just use TARGET/TARGET_ARCH
for the xdev build target, which is awesome and totally works.

Reapply svn R268377 with correct name of libsupc++ here as this does
resolve one dependancy race when building the xdev target.

the xdev target builds for amd64, i386, mips, mips64 and armv6 with this commit,
must be built as root, must be built from /usr/src, must not have a /usr/obj and
places the xdev tools in /usr/$TARGET_ARCH-freebsd

the xdev target still leaves some assorted files strewn about your /usr/src when
this is done and needs to be investigated further.

Phabric: https://phabric.freebsd.org/D385
Submitted by: bsdimp

9 years agoAdd .NOPATH to the machine target so that builds in sys/boot work and don't
sbruno [Wed, 23 Jul 2014 22:12:05 +0000 (22:12 +0000)]
Add .NOPATH to the machine target so that builds in sys/boot work and don't
error out building zfs loader.

Submitted by: sjg@freebsd.org

9 years agoUpdate so that clean target in sys/boot will delete the symlink
sbruno [Wed, 23 Jul 2014 22:11:04 +0000 (22:11 +0000)]
Update so that clean target in sys/boot will delete the symlink
created for machine

Reviewed by: emaste

9 years agoFix a bug where include file `networking/services.subr' was not being
dteske [Wed, 23 Jul 2014 21:08:04 +0000 (21:08 +0000)]
Fix a bug where include file `networking/services.subr' was not being
properly clustered.

Change `fixedsize' to `fixedsize = true' to satisfy newer versions of dot(1)
generating error "Warning: <stdin>: syntax error in line 27 near ','".

Remove bounding cluster surrounding various include-groupings, allowing
groups of include files to float freely to the greatest consumer (reducing
the density of rendered diagrams).

While here, change the bgcolor of include clusters from white to X11 color
`thistle' (a light purple).

Also, add the word "Subroutines" after include cluster labels.

Do not terminate the digraph definition with a semi-colon [;] after the
ending brace to satisfy newer versions of dot(1) generating error "Warning:
<stdin>: syntax error in line 940 near ';'".

MFC after: 3 days
X-MFC-to: stable/10, stable/9

9 years agoPrepare fget_unlocked for reading fd table only once.
mjg [Wed, 23 Jul 2014 19:33:49 +0000 (19:33 +0000)]
Prepare fget_unlocked for reading fd table only once.

Some capsicum functions accept fdp + fd and lookup fde based on that.
Add variants which accept fde.

Reviewed by: pjd
MFC after: 1 week

9 years ago- Use Rs/Re mdoc macros.
pluknet [Wed, 23 Jul 2014 18:54:18 +0000 (18:54 +0000)]
- Use Rs/Re mdoc macros.
- Remove duplicate and/or redundant content.

9 years agoFix builds on older FreeBSD versions and/or non-FreeBSD machines:
marcel [Wed, 23 Jul 2014 18:05:39 +0000 (18:05 +0000)]
Fix builds on older FreeBSD versions and/or non-FreeBSD machines:
don't use _Static_assert unconditionally.

9 years agoCosmetic changes to unp_internalize
mjg [Wed, 23 Jul 2014 18:04:52 +0000 (18:04 +0000)]
Cosmetic changes to unp_internalize

Don't throw away the result of fget_unlocked.
Move fdp increment to for loop to make it consistent with similar code
elsewhere.

MFC after: 1 week

9 years agoSimplify comment to remove multiple negative and passive voice.
imp [Wed, 23 Jul 2014 16:18:54 +0000 (16:18 +0000)]
Simplify comment to remove multiple negative and passive voice.

9 years agoFix typo in comment: noone -> no one.
imp [Wed, 23 Jul 2014 16:18:51 +0000 (16:18 +0000)]
Fix typo in comment: noone -> no one.
Fix minor style(9) nits.

9 years agodon't set CR4 PSE bit on amd64
royger [Wed, 23 Jul 2014 15:53:29 +0000 (15:53 +0000)]
don't set CR4 PSE bit on amd64

Setting PSE together with PAE or in long mode just makes the PSE bit
completely ignored, so don't set it.

Sponsored by: Citrix Systems R&D
Reviewed by: kib

9 years agoFix mismatch.
pfg [Wed, 23 Jul 2014 15:12:17 +0000 (15:12 +0000)]
Fix mismatch.

MFC after: 3 days