]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoDo some style(9) not done in r260851 to improve readability.
melifaro [Sat, 18 Jan 2014 15:57:43 +0000 (15:57 +0000)]
Do some style(9) not done in r260851 to improve readability.

MFC after: 2 weeks

10 years agoSplit in6_update_ifa() into smaller pieces leaving functionality intact.
melifaro [Sat, 18 Jan 2014 15:52:52 +0000 (15:52 +0000)]
Split in6_update_ifa() into smaller pieces leaving functionality intact.

Discussed with: ae
MFC after: 2 weeks

10 years agoCorrect value of LIBCOMPILER_RT.
ed [Sat, 18 Jan 2014 14:47:34 +0000 (14:47 +0000)]
Correct value of LIBCOMPILER_RT.

Caught by: Luca Bayer

10 years agoReplace LIBGCC by LIBCOMPILER_RT.
ed [Sat, 18 Jan 2014 14:22:56 +0000 (14:22 +0000)]
Replace LIBGCC by LIBCOMPILER_RT.

We now use libcompiler_rt on all platforms now. Instead of referring
directly to -lgcc and LIBGCC, use -lcompiler_rt and LIBCOMPILER_RT.

10 years agoAdd very simple virtio_random(4) driver to harvest entropy from host
bryanv [Sat, 18 Jan 2014 06:14:38 +0000 (06:14 +0000)]
Add very simple virtio_random(4) driver to harvest entropy from host

Reviewed by: markm (random bits only)

10 years agoFor ia64, add _bswapsi2 & _bswapdi2. The audio/flac port uses the
marcel [Sat, 18 Jan 2014 04:09:39 +0000 (04:09 +0000)]
For ia64, add _bswapsi2 & _bswapdi2. The audio/flac port uses the
bswap32 builtin and the compiler emits a call to the libgcc function
rather than generating inline code.

10 years agoIf the guest exits due to a fault while it is executing IRET then restore
neel [Sat, 18 Jan 2014 02:20:10 +0000 (02:20 +0000)]
If the guest exits due to a fault while it is executing IRET then restore
the state of "Virtual NMI blocking" in the guest's interruptibility-state
field before resuming the guest.

10 years agoMFV r260834:
delphij [Sat, 18 Jan 2014 01:45:39 +0000 (01:45 +0000)]
MFV r260834:

Fix memory leak of compressed buffers in l2arc_write_done (Illumos
#3995).

10 years agoBring back r226403, the fix for bin/161526, which was (accidentally?)
trociny [Fri, 17 Jan 2014 21:45:25 +0000 (21:45 +0000)]
Bring back r226403, the fix for bin/161526, which was (accidentally?)
reverted in r238896.

PR: bin/161526
Reported by: Karli.Sjoberg slu.se
MFC after: 3 days

10 years agogcc: Drop useless objc change from r260311.
pfg [Fri, 17 Jan 2014 21:21:28 +0000 (21:21 +0000)]
gcc: Drop useless objc change from r260311.

Among some of the objc changes from Apple that crept into r260311,
Radar 5355344 is incomplete and is not used since we don't carry
ObjC in the base system.

The dead code seems to have caused issues in some Tinderboxes so
get rid of it altogether.

Reported by: luigi
MFC after: 9 days

10 years agoAdd ID for one more ASMedia AHCI-compatible controller.
mav [Fri, 17 Jan 2014 17:16:49 +0000 (17:16 +0000)]
Add ID for one more ASMedia AHCI-compatible controller.

Reported by: ignace.peeters@gmail.com
MFC after: 2 weeks

10 years agoFix comment.
glebius [Fri, 17 Jan 2014 11:09:05 +0000 (11:09 +0000)]
Fix comment.

10 years agoFix a possible memory use after free and leak situation associated
hselasky [Fri, 17 Jan 2014 10:35:18 +0000 (10:35 +0000)]
Fix a possible memory use after free and leak situation associated
with USB device detach when using character device handles. This also
includes LibUSB. It turns out that "usb_close()" cannot always get a
reference to clean up its USB transfers and such, if called during the
kernel USB device detach.

Analysis by: hselasky @
Reported by: Juergen Lock <nox@jelal.kn-bremen.de>
MFC after: 1 week

10 years agotraverse_visitbp: visit DMU_GROUPUSED_OBJECT before DMU_USERUSED_OBJECT
avg [Fri, 17 Jan 2014 10:23:46 +0000 (10:23 +0000)]
traverse_visitbp: visit DMU_GROUPUSED_OBJECT before DMU_USERUSED_OBJECT

This is done to ensure that visited object IDs are always increasing.
Also, pass correct object ID to prefetch_dnode_metadata for
os_groupused_dnode.

Without this change we would hit an assert if traversal was paused on
a GROUPUSED object, which is unlikely but possible.

Apparently the same change was independently developed by Deplhix.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
MFC after: 10 days
Sponsored by: HybridCluster

10 years agozdb -R: do not treat numeric parameters to a flag as more flags
avg [Fri, 17 Jan 2014 10:18:45 +0000 (10:18 +0000)]
zdb -R: do not treat numeric parameters to a flag as more flags

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
MFC after: 1 week

10 years agoPrint the ktr(4) format line that caused a failure.
glebius [Fri, 17 Jan 2014 09:11:44 +0000 (09:11 +0000)]
Print the ktr(4) format line that caused a failure.

Sponsored by: Nginx, Inc.

10 years agoClose a minor deadlock.
hselasky [Fri, 17 Jan 2014 08:21:09 +0000 (08:21 +0000)]
Close a minor deadlock.

MFC after: 1 week

10 years agoImplement a kqueue notification path for sendfile.
adrian [Fri, 17 Jan 2014 05:26:55 +0000 (05:26 +0000)]
Implement a kqueue notification path for sendfile.

This fires off a kqueue note (of type sendfile) to the configured kqfd
when the sendfile transaction has completed and the relevant memory
backing the transaction is no longer in use by this transaction.
This is analogous to SF_SYNC waiting for the mbufs to complete -
except now you don't have to wait.

Both SF_SYNC and SF_KQUEUE should work together, even if it
doesn't necessarily make any practical sense.

This is designed for use by applications which use backing cache/store
files (eg Varnish) or POSIX shared memory (not sure anything is using
it yet!) to know when a region of memory is free for re-use.  Note
it doesn't mark the region as free overall - only free from this
transaction.  The application developer still needs to track which
ranges are in the process of being recycled and wait until all
pending transactions are completed.

TODO:

* documentation, as always

Sponsored by: Netflix, Inc.

10 years agoAdd in a default initialiser for the EVOPS_SENDFILE kqueue filterops.
adrian [Fri, 17 Jan 2014 05:15:44 +0000 (05:15 +0000)]
Add in a default initialiser for the EVOPS_SENDFILE kqueue filterops.

Sponsored by: Netflix, Inc.

10 years agoImplement the extension api for sendfile to allow for kqueue notifications.
adrian [Fri, 17 Jan 2014 05:13:08 +0000 (05:13 +0000)]
Implement the extension api for sendfile to allow for kqueue notifications.

This is still under a bit of flux, as the final API hasn't been nailed
down.  It's also unclear whether we should define the two new types in the
header or not - it may allow bad code to compile that shouldn't (ie,
since uintX's are defined, the developer may not include sys/types.h.)

Reviewed by: peter, imp, bde
Sponsored by: Netflix, Inc.

10 years agoforgot to update this file in 2607000
luigi [Fri, 17 Jan 2014 04:38:58 +0000 (04:38 +0000)]
forgot to update this file in 2607000

10 years agoIf a VM-exit happens during an NMI injection then clear the "NMI Blocking" bit
neel [Fri, 17 Jan 2014 04:21:39 +0000 (04:21 +0000)]
If a VM-exit happens during an NMI injection then clear the "NMI Blocking" bit
in the Guest Interruptibility-state VMCS field.

If we fail to do this then a subsequent VM-entry will fail because it is an
error to inject an NMI into the guest while "NMI Blocking" is turned on. This
is described in "Checks on Guest Non-Register State" in the Intel SDM.

Submitted by: David Reed (david.reed@tidalscale.com)

10 years agoRe-work r260800 to include other signals which start with 'I'
csjp [Fri, 17 Jan 2014 04:16:39 +0000 (04:16 +0000)]
Re-work r260800 to include other signals which start with 'I'
such as ILL, INFO etc..

Submitted by: delphij
MFC after: 2 weeks

10 years agofix a regression introduced in r237618 that would result in
csjp [Fri, 17 Jan 2014 03:30:24 +0000 (03:30 +0000)]
fix a regression introduced in r237618 that would result in
killall confusing killall -INT with killall -I (interactive
confirmation) which resulted in the wrong signal (TERM)
being delivered to the process(s).

Discussed with: delphij
MFC after: 2 weeks

10 years agoFix various places where we don't properly release a lock
gnn [Thu, 16 Jan 2014 22:14:54 +0000 (22:14 +0000)]
Fix various places where we don't properly release a lock

PR: 185043
Submitted by: Michael Bentkofsky
MFC after: 2 weeks

10 years agoAdd a command line argument to turn off blocking waiting for the user
gnn [Thu, 16 Jan 2014 21:46:43 +0000 (21:46 +0000)]
Add a command line argument to turn off blocking waiting for the user
to press Ctrl-C (-b).  This allows tests with tight loops of mcgrabs
that can stress the multicast tables.

MFC after: 2 weeks

10 years agoRemove two redundantly repetitive assignments.
imp [Thu, 16 Jan 2014 20:40:02 +0000 (20:40 +0000)]
Remove two redundantly repetitive assignments.

10 years ago-h and -H options backwards in manual page.
wblock [Thu, 16 Jan 2014 17:06:02 +0000 (17:06 +0000)]
-h and -H options backwards in manual page.

PR: bin/183681 docs/183681
Submitted by: Robin Hahling <robin.hahling@gw-computing.net>
MFC after: 3 days

10 years agoUpdate the pkg-stage target to be more compatible with pkg-1.2:
gjb [Thu, 16 Jan 2014 16:12:09 +0000 (16:12 +0000)]
Update the pkg-stage target to be more compatible with pkg-1.2:

 - Add a release-dvd.conf pkg(8) configuration file to override
   the default FreeBSD.conf configuration.
 - Remove architecture-specific pkg-stage.conf files, consolidate,
   and move their contents to scripts/pkg-stage.sh.
 - Use 'pkg -vv' to determine the ABI, which is used as the
   cache directory.

Prior to these changes, it would be possible for pkg-stage to fetch
conflicting binary packages from multiple repositories.

Tested against: head@r260522, stable/10@r260522

MFC after: 3 days
X-Insta-MFC: possibly
Sponsored by: The FreeBSD Foundation

10 years agoFix build after FDT changes.
ray [Thu, 16 Jan 2014 14:48:23 +0000 (14:48 +0000)]
Fix build after FDT changes.

Sponsored by: The FreeBSD Foundation

10 years agoRemove notes about historical mbuf(9) allocator flags from documentation.
glebius [Thu, 16 Jan 2014 13:58:55 +0000 (13:58 +0000)]
Remove notes about historical mbuf(9) allocator flags from documentation.

Sponsored by: Nginx, Inc.

10 years agoSimplify wait/nowait code, eventually killing last remnant of
glebius [Thu, 16 Jan 2014 13:45:41 +0000 (13:45 +0000)]
Simplify wait/nowait code, eventually killing last remnant of
historical mbuf(9) allocator flag.

Sponsored by: Nginx, Inc.

10 years agoAnother round of removing historical mbuf(9) allocator flags.
glebius [Thu, 16 Jan 2014 13:44:47 +0000 (13:44 +0000)]
Another round of removing historical mbuf(9) allocator flags.
They are breeding! New ones arouse since last round.

Sponsored by: Nginx, Inc.

10 years agofix a build problem with INVARIANTS enabled introduced in r260704
avg [Thu, 16 Jan 2014 13:44:37 +0000 (13:44 +0000)]
fix a build problem with INVARIANTS enabled introduced in r260704

Reported by: glebius
MFC after: 5 days
X-MFC with: r260704

10 years agoRemove historical macro.
glebius [Thu, 16 Jan 2014 13:42:50 +0000 (13:42 +0000)]
Remove historical macro.

Sponsored by: Nginx, Inc.

10 years agoSubstitute flags from historical mbuf(9) allocator with modern ones.
glebius [Thu, 16 Jan 2014 13:42:14 +0000 (13:42 +0000)]
Substitute flags from historical mbuf(9) allocator with modern ones.

Sponsored by: Nginx, Inc.

10 years agofix a bug in ZFS mirror code for handling multiple DVAa
avg [Thu, 16 Jan 2014 13:24:10 +0000 (13:24 +0000)]
fix a bug in ZFS mirror code for handling multiple DVAa

The bug was introduced in r256956 "Improve ZFS N-way mirror read
performance".
The code in vdev_mirror_dva_select erroneously considers already
tried DVAs for the next attempt.  Thus, it is possible that a failing DVA
would be retried forever.
As a secondary effect, if the attempts fail with checksum error, then
checksum error reports are accumulated until the original request
ultimately fails or succeeds.  But because retrying is going on indefinitely
the cheksum reports accumulation will effectively be a memory leak.

Reviewed by: gibbs
MFC after: 13 days
Sponsored by: HybridCluster

10 years agoRevert r260705: wrong patch committed by accident
avg [Thu, 16 Jan 2014 13:20:20 +0000 (13:20 +0000)]
Revert r260705: wrong patch committed by accident

An earlier, less efficient version was committed by accident.

10 years agoCleanup comments and whitespace. No functional changes.
glebius [Thu, 16 Jan 2014 12:58:03 +0000 (12:58 +0000)]
Cleanup comments and whitespace. No functional changes.

10 years agoFix refcount leak on netinet ifa.
melifaro [Thu, 16 Jan 2014 12:35:18 +0000 (12:35 +0000)]
Fix refcount leak on netinet ifa.

Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Yandex LLC

10 years agozfs_deleteextattr: name buffer from namei is needed by zfs_rename
avg [Thu, 16 Jan 2014 12:31:27 +0000 (12:31 +0000)]
zfs_deleteextattr: name buffer from namei is needed by zfs_rename

If we prematurely free the name buffer and it gets quickly recycled,
then zfs_rename may see data from another lookup or even unmapped memory
via cn_nameptr.

MFC after: 6 days
Sponsored by: HybridCluster

10 years agofix a bug in ZFS mirror code for handling multiple DVAa
avg [Thu, 16 Jan 2014 12:26:54 +0000 (12:26 +0000)]
fix a bug in ZFS mirror code for handling multiple DVAa

The bug was introduced in r256956 "Improve ZFS N-way mirror read
performance".
The code in vdev_mirror_dva_select erroneously considers already
tried DVAs for the next attempt.  Thus, it is possible that a failing DVA
would be retried forever.
As a secondary effect, if the attempts fail with checksum error, then
checksum error reports are accumulated until the original request
ultimately fails or succeeds.  But because retrying is going on indefinitely
the cheksum reports accumulation will effectively be a memory leak.

Reviewed by: gibbs
MFC after: 13 days
Sponsored by: HybridCluster

10 years agozfs: getnewvnode_reserve must be called outside of a zfs transaction
avg [Thu, 16 Jan 2014 12:22:46 +0000 (12:22 +0000)]
zfs: getnewvnode_reserve must be called outside of a zfs transaction

Otherwise we could run into the following deadlock.
A thread has a transaction open and assigned to a transaction group.
That would prevent the transaction group from be quiesced and synced.
The thread is blocked in getnewvnode_reserve waiting for a vnode to
a be reclaimed.  vnlru thread is blocked trying to enter ZFS VOP because
a filesystem is suspended by an ongoing rollback or receive operation.
In its turn the operation is waiting for the current transaction group
to be synced.

zfs_zget is always used outside of active transactions, but zfs_mknode
is always used in a transaction context.  Thus, we hoist
getnewvnode_reserve from zfs_mknode to its callers.

While there, assert that ZFS always calls getnewvnode while having
a vnode reserved.

Reported by: adrian
Tested by: adrian
MFC after: 17 days
Sponsored by: HybridCluster

10 years agozinject must use ioctl(2) compatibility wrapper
avg [Thu, 16 Jan 2014 12:21:21 +0000 (12:21 +0000)]
zinject must use ioctl(2) compatibility wrapper

MFC after: 8 days
Sponsored by: HybridCluster

10 years agoFix ipfw fwd for IPv4 traffic broken by r249894.
melifaro [Thu, 16 Jan 2014 11:50:00 +0000 (11:50 +0000)]
Fix ipfw fwd for IPv4 traffic broken by r249894.

Problem case:
Original lookup returns route with GW set, so gw points to
rte->rt_gateway.
After that we're changing dst and performing lookup another time.
Since fwd host is most probably directly reachable, resulting
rte does not contain rt_gateway, so gw is not set. Finally, we
end with packet transmitted to proper interface but wrong
link-layer address.

Found by: lstewart
Discussed with: ae,lstewart
MFC after: 2 weeks
Sponsored by: Yandex LLC

10 years agoHandle truncation of the size returned by _kvm_kvatop(). Cores can have
marcel [Thu, 16 Jan 2014 06:26:03 +0000 (06:26 +0000)]
Handle truncation of the size returned by _kvm_kvatop(). Cores can have
segments larger than INT_MAX.

10 years agonetmap_user.h:
luigi [Thu, 16 Jan 2014 00:20:42 +0000 (00:20 +0000)]
netmap_user.h:
   add separate rx/tx ring indexes
   add ring specifier in nm_open device name

netmap.c, netmap_vale.c
   more consistent errno numbers

netmap_generic.c
   correctly handle failure in registering interfaces.

tools/tools/netmap/
   massive cleanup of the example programs
   (a lot of common code is now in netmap_user.h.)

nm_util.[ch] are going away soon.
pcap.c will also go when i commit the native netmap support for libpcap.

10 years agoAdd data so we can convert a PIO unit number into a base address.
imp [Wed, 15 Jan 2014 19:53:36 +0000 (19:53 +0000)]
Add data so we can convert a PIO unit number into a base address.

10 years agoProvide a simplified way to specify GPIO pins for the Atmel port.
imp [Wed, 15 Jan 2014 19:49:12 +0000 (19:49 +0000)]
Provide a simplified way to specify GPIO pins for the Atmel port.

10 years ago- Fix indent.
hrs [Wed, 15 Jan 2014 17:34:21 +0000 (17:34 +0000)]
- Fix indent.
- Minor clean up after DB5 migration.

10 years agoRemove reference to FreeBSD 6.2-RELEASE from 'Upgrading from
skreuzer [Wed, 15 Jan 2014 15:16:11 +0000 (15:16 +0000)]
Remove reference to FreeBSD 6.2-RELEASE from 'Upgrading from
previous releases' paragraph since all supported version of FreeBSD
now support binary upgrades

Remove 'of course,' from foot note reminding to create a backup
before attempting a binary update

Approved by:    hrs (mentor)

10 years agoUpdate xboxfb driver to actual state.
ray [Wed, 15 Jan 2014 12:35:28 +0000 (12:35 +0000)]
Update xboxfb driver to actual state.
NOTE: Not tested.

Sponsored by: The FreeBSD Foundation

10 years agoIn the nested TLB fault handler, for a direct-mapped address, make
marcel [Wed, 15 Jan 2014 03:57:41 +0000 (03:57 +0000)]
In the nested TLB fault handler, for a direct-mapped address, make
sure to clear the lower 12 bits. We're adding the translation
attributes to the physical address and non-zero bits in the first
12 bits would give us something unexpected, including invalid bit
values. Those trigger nested general protection faults.
We do not have to clear the region bits, because they are ignored
anyway, so we can replace an existing dep instruction with the one
we need.

This fixes GP faults for the swapper thread, as it's the only thread
that has a direct-mapped stack. Since the bug is in the nested TLB
fault handler, the frequency of hitting the GP is in the order of
hours/days under load.

10 years agoAdd missing arch= and revision= support.
hrs [Tue, 14 Jan 2014 23:04:31 +0000 (23:04 +0000)]
Add missing arch= and revision= support.

10 years agosh: Remove SIGWINCH handler and just check for resize before every read.
jilles [Tue, 14 Jan 2014 22:56:25 +0000 (22:56 +0000)]
sh: Remove SIGWINCH handler and just check for resize before every read.

The SIGWINCH handler triggers breakage in libedit which is hard to fix; see
PR bin/169773.

Also, window size changes while a program is in foreground (and it rather
than sh will receive SIGWINCH) will now be picked up automatically.

Downside: it is now certain that a resize is only processed after pressing
<Enter>. If libedit is fixed, sh will most likely have to be changed also.

PR: bin/180146

10 years ago- Purge old translations.
hrs [Tue, 14 Jan 2014 22:46:23 +0000 (22:46 +0000)]
- Purge old translations.
- Add missing footer due to DSSSL->XSLT migration and use XML catalog to
  resolve URI[*].

Based on the work by: gabor [*]

10 years agolibc/resolv: Use poll() instead of kqueue().
jilles [Tue, 14 Jan 2014 22:05:33 +0000 (22:05 +0000)]
libc/resolv: Use poll() instead of kqueue().

The resolver in libc creates a kqueue for watching a single file descriptor.
This can be done using poll() which should be lighter on the kernel and
reduce possible problems with rlimits (file descriptors, kqueues).

Reviewed by: jhb

10 years agoFix lock leak in purely hypothetical case of TCP connection without SVC_ACK
mav [Tue, 14 Jan 2014 20:18:38 +0000 (20:18 +0000)]
Fix lock leak in purely hypothetical case of TCP connection without SVC_ACK
method.  This change should be NOP now, but it is better to be future safe.

Reported by: rmacklem

10 years agoDisable 'monitor' feature in ntpd by default.
delphij [Tue, 14 Jan 2014 18:59:00 +0000 (18:59 +0000)]
Disable 'monitor' feature in ntpd by default.

Security: FreeBSD-SA-14:02.ntpd
Approved by: so

10 years agoFix bsnmpd remote denial of service vulnerability.
delphij [Tue, 14 Jan 2014 18:58:57 +0000 (18:58 +0000)]
Fix bsnmpd remote denial of service vulnerability.

Reported by: dinoex
Submitted by: harti
Security: FreeBSD-SA-14:01.bsnmpd
Security: CVE-2014-1452

10 years agoReplace hand-crafted Kyuafiles with automatic generation.
jmmv [Tue, 14 Jan 2014 18:45:32 +0000 (18:45 +0000)]
Replace hand-crafted Kyuafiles with automatic generation.

Redo r260506 by using the new TEST_METADATA functionality of bsd.test.mk
to mark the sh(1) and test(1) tests as not supporting root.  This is to
get rid of hand-crafted Kyuafiles for these very simple cases.

MFC after: 5 days

10 years agoUse TAP_TESTS_PERL to register the legacy_test in bin/pax.
jmmv [Tue, 14 Jan 2014 18:39:30 +0000 (18:39 +0000)]
Use TAP_TESTS_PERL to register the legacy_test in bin/pax.

Redo r260586 by using the new functionality in tap.test.mk to transparently
support perl-based test programs.

As a side-effect, we get rid of an explicit path to /usr/bin/perl by
replacing it with /usr/local/bin/perl (or as defined in tap.test.mk).

This also fixes the name of the legacy_test source file because this should
have always been legacy_test.pl and not legacy_test.sh.  My mistake when
originally moving the code around without realizing that this was a perl
script.

MFC after: 5 days

10 years agoSupport perl-based TAP-compliant test programs.
jmmv [Tue, 14 Jan 2014 18:35:56 +0000 (18:35 +0000)]
Support perl-based TAP-compliant test programs.

Introduce a TAP_TESTS_PERL primitive to list test programs written in perl.
Only do this in tap.test.mk because I only expect perl-based test programs
with this interface.

This is very similar to TAP_TESTS_SH but the difference is that we record
in the Kyuafile that the test program requires a perl interpreter.  This
in turn makes Kyua mark the test as skipped if the perl package is not yet
installed, instead of mysteriously failing to run the program.

MFC after: 5 days

10 years agoSupport defining test program metadata from the Makefiles.
jmmv [Tue, 14 Jan 2014 18:32:47 +0000 (18:32 +0000)]
Support defining test program metadata from the Makefiles.

Introduce a new, per-test-program TEST_METADATA.<program> variable that
contains a list of key/value paris describing metadata properties for
that test program.  These properties are later written into the
auto-generated Kyuafile when using the KYUAFILE=auto functionality.

This is to avoid having to supply hand-crafted Kyuafiles when the needs
for metadata overrides are trivial.

While doing this, and because I am documenting TEST_METADATA, take the
chance to document the TEST_INTERFACE setting as well.

MFC after: 5 days

10 years agoDon't output any modifier keys before we see a valid
hselasky [Tue, 14 Jan 2014 08:43:38 +0000 (08:43 +0000)]
Don't output any modifier keys before we see a valid
non-modifier key press. This prevents so-called "ghost
keyboards" keeping modifier keys pressed while not
actually seen as a real keyboard.

MFC after: 2 weeks

10 years agoAdd missing EM_PPC64 to e_machine header display.
jhibbits [Tue, 14 Jan 2014 04:28:41 +0000 (04:28 +0000)]
Add missing EM_PPC64 to e_machine header display.

MFC after: 1 week

10 years agoAdd an API to rendezvous all active vcpus in a virtual machine. The rendezvous
neel [Tue, 14 Jan 2014 01:55:58 +0000 (01:55 +0000)]
Add an API to rendezvous all active vcpus in a virtual machine. The rendezvous
can be initiated in the context of a vcpu thread or from the bhyve(8) control
process.

The first use of this functionality is to update the vlapic trigger-mode
register when the IOAPIC pin configuration is changed.

Prior to this change we would update the TMR in the virtual-APIC page at
the time of interrupt delivery. But this doesn't work with Posted Interrupts
because there is no way to program the EOI_exit_bitmap[] in the VMCS of
the target at the time of interrupt delivery.

Discussed with: grehan@

10 years agoANSI-fy prototype.
delphij [Tue, 14 Jan 2014 01:52:34 +0000 (01:52 +0000)]
ANSI-fy prototype.

MFC after: 2 weeks

10 years agoMove myself from ports alumni to active ports committer section.
bmah [Mon, 13 Jan 2014 23:27:24 +0000 (23:27 +0000)]
Move myself from ports alumni to active ports committer section.
Add an edge indicating mat as my ports mentor.

Approved by: mat (mentor)

10 years agoDescribed in the man page but not implemented. Here it comes,
andreast [Mon, 13 Jan 2014 22:21:29 +0000 (22:21 +0000)]
Described in the man page but not implemented. Here it comes,
atomic_swap_32/64. The latter only for powerpc64.

MFC after: 1 month

10 years agoThe onyx codec works also as module, so add it.
andreast [Mon, 13 Jan 2014 21:44:17 +0000 (21:44 +0000)]
The onyx codec works also as module, so add it.

MFC after: 1 month

10 years agoRemove scary comment about this being a test key.
bdrewery [Mon, 13 Jan 2014 20:55:15 +0000 (20:55 +0000)]
Remove scary comment about this being a test key.

There has been no need to regenerate the signing key.

Reported by: mat
Approved by: bapt (mentor)
MFC after: 3 days

10 years agoWhen building a cross-kgdb, suppress the registration of the
marcel [Mon, 13 Jan 2014 19:08:25 +0000 (19:08 +0000)]
When building a cross-kgdb, suppress the registration of the
standard core target by declaring coreops_suppress_target with
initializer. This is also happening for non-cross kgdb, by
virtue of having fbsd-threads.c in libgdb and having it do the
exact same thing. Since fbsd-threads.c is not included in in
libgdb when building a cross debugger, we ended up with more
than 1 core file targets (the standard gdb core file target and
kgdb's libkvm based core file target) and this behaves the same
as not having a core target at all.

10 years agoWe don't have to worry about page sizes when working on virtual
marcel [Mon, 13 Jan 2014 19:02:31 +0000 (19:02 +0000)]
We don't have to worry about page sizes when working on virtual
cores (i.e. minidumps). Every segment is virtually contiguous.

10 years agoRe-apply the part of r260022 that was reverted by r260030 with
marcel [Mon, 13 Jan 2014 19:01:14 +0000 (19:01 +0000)]
Re-apply the part of r260022 that was reverted by r260030 with
one significant difference: for LIB32 builds both TARGET_ARCH
and MACHINE_ARCH are defined. TARGET_ARCH confusingly holds the
architecture of the host (e.g. amd64), while MACHINE_ARCH holds
the architecture were trying to build (e.g. i386). With both
set and different, r260022 changed the behaviour to interpret
the condition as building a cross-amd64 libkvm on i386, when
obviously we're trying to build an i386 version on amd64. When
COMPAT_32BIT is defined, we're building LIB32 and ignore the
value of TARGET_ARCH as we did before.

10 years agoFix dmesg(1) -> dmesg(8)
bapt [Mon, 13 Jan 2014 17:14:10 +0000 (17:14 +0000)]
Fix dmesg(1) -> dmesg(8)

Reported by: trasz

10 years agoFix typo
bapt [Mon, 13 Jan 2014 16:47:25 +0000 (16:47 +0000)]
Fix typo

Reported by: dumbbell

10 years agoUpdate the BUGS section according the recent changes in kldload(8)
bapt [Mon, 13 Jan 2014 16:45:43 +0000 (16:45 +0000)]
Update the BUGS section according the recent changes in kldload(8)

Reviewed by: bdrewery
MFC after: 1 week

10 years agoPoint the user to dmesg(1) to get informations about why loading a module did fail
bapt [Mon, 13 Jan 2014 16:23:09 +0000 (16:23 +0000)]
Point the user to dmesg(1) to get informations about why loading a module did fail
instead of printing the cryptic "Exec format error"

MFC after: 1 week

10 years agoImplement better error recovery for Transaction Translators, TTs,
hselasky [Mon, 13 Jan 2014 15:21:11 +0000 (15:21 +0000)]
Implement better error recovery for Transaction Translators, TTs,
found in High Speed USB HUBs which translate from High Speed USB into
FULL or LOW speed USB. In some rare cases SPLIT transactions might get
lost, which might leave the TT in an unknown state. Whenever we detect
such an error try to issue either a clear TT buffer request, or if
that is not possible reset the whole TT.

MFC after: 1 week

10 years agoSeparate I/O errors from reception of STALL PID.
hselasky [Mon, 13 Jan 2014 15:06:03 +0000 (15:06 +0000)]
Separate I/O errors from reception of STALL PID.

MFC after: 1 week

10 years agoAdd new testcase for USB mass storage.
hselasky [Mon, 13 Jan 2014 13:27:00 +0000 (13:27 +0000)]
Add new testcase for USB mass storage.

10 years agoMark the bin/pax tests as requiring perl.
jmmv [Mon, 13 Jan 2014 12:17:41 +0000 (12:17 +0000)]
Mark the bin/pax tests as requiring perl.

The effect of this is that the test program is marked as skipped when perl
is missing, instead of marking it as broken due to an execution failure.

MFC after: 3 days

10 years agoPrevent misc_helpers from running as a test.
jmmv [Mon, 13 Jan 2014 10:47:26 +0000 (10:47 +0000)]
Prevent misc_helpers from running as a test.

Do this by generating misc_helpers explicitly, without using the
ATF_TESTS_SH functionality.

While this script is technically an atf-sh test program, it is not intended
to be run as a test and therefore it mustn't end up in the Kyuafile.  Using
ATF_TESTS_SH means that misc_helpers ended up registered in the Kyuafile
and then failed to run as a test.

The alternative would be to supply an explicit Kyuafile from this directory
that lists the known test files, but doing it the way described above will
be easier to maintain.

MFC after: 3 days

10 years agoAdd unmapped IO support to virtio_scsi(4)
bryanv [Mon, 13 Jan 2014 04:46:48 +0000 (04:46 +0000)]
Add unmapped IO support to virtio_scsi(4)

10 years agoAdd unmapped IO support to virtio_blk(4)
bryanv [Mon, 13 Jan 2014 04:43:01 +0000 (04:43 +0000)]
Add unmapped IO support to virtio_blk(4)

10 years agoAdd sglist_append_bio(9) to append a struct bio's data to a sglist
bryanv [Mon, 13 Jan 2014 04:41:08 +0000 (04:41 +0000)]
Add sglist_append_bio(9) to append a struct bio's data to a sglist

Reviewed by: jhb, kib (long ago)

10 years agoAdd atf pkg-config files from the vendor branch.
jmmv [Sun, 12 Jan 2014 22:17:10 +0000 (22:17 +0000)]
Add atf pkg-config files from the vendor branch.

These were originally deleted by mistake (because they were not yet being
installed) and are actually necessary.

This should have been part of r260576 but I missed committing this
directory.

MFC after: 5 days

10 years agoGenerate and install pkg-config files for atf.
jmmv [Sun, 12 Jan 2014 21:56:26 +0000 (21:56 +0000)]
Generate and install pkg-config files for atf.

These files are required to get packages in ports to build against atf and
also to get a couple of currently-failing tests to pass.

I'm following the approach already used by the libusb pkg-config files
installed by the system regarding the location and the install rules.

MFC after: 5 days

10 years agofts(3): Remove stray mentions of the obsolete fts_bignum.
jilles [Sun, 12 Jan 2014 20:47:08 +0000 (20:47 +0000)]
fts(3): Remove stray mentions of the obsolete fts_bignum.

10 years agofts: Stat things relative to the directory fd, if possible.
jilles [Sun, 12 Jan 2014 20:30:55 +0000 (20:30 +0000)]
fts: Stat things relative to the directory fd, if possible.

As a result, the kernel needs to process shorter pathnames if fts is not
changing directories (if fts follows symlinks (-L option to utilities), fts
cannot open "." or FTS_NOCHDIR was specified).

Side effect: If pathnames exceed PATH_MAX, [ENAMETOOLONG] is not hit at the
stat stage but later (opendir or application fts_accpath) or not at all.

10 years agoCorrectly update the count of stuck pages, "addl_page_shortage", in
alc [Sun, 12 Jan 2014 19:04:20 +0000 (19:04 +0000)]
Correctly update the count of stuck pages, "addl_page_shortage", in
vm_pageout_scan().  There were missing increments in two less common cases.

Don't conflate the count of stuck pages and the pageout deficit provided by
vm_page_alloc{,_contig}().  (A proposed fix to the OOM code depends on this.)

Handle held pages consistently in the inactive queue scan.  In the more
common case, we did not move the page to the tail of the queue.  Whereas, in
the less common case, we did.  There's no particular reason to move the page
in the less common case, so remove it.

Perform the calculation of the page shortage for the active queue scan a
little earlier, before the active queue lock is acquired.  The correctness
of this calculation doesn't depend on the active queue lock being held.

Eliminate a redundant variable, "pcount".  Use the more descriptive
variable, "maxscan", in its place.

Apply a few nearby style fixes, e.g., eliminate stray whitespace and excess
parentheses.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

10 years agoRemove incorrect bit shift when assigning the LUN request field
bryanv [Sun, 12 Jan 2014 17:40:47 +0000 (17:40 +0000)]
Remove incorrect bit shift when assigning the LUN request field

This caused duplicate targets appearing on Google Compute Engine
instances.

PR: kern/185626
Submitted by: Venkatesh Srinivas <venkateshs@google.com>
MFC after: 3 days

10 years agoFix gcc with EABI on big-endian ARM by setting the endian correctly.
andrew [Sun, 12 Jan 2014 15:35:03 +0000 (15:35 +0000)]
Fix gcc with EABI on big-endian ARM by setting the endian correctly.
Without this gcc would generate byte loads for a little-endian core.

MFC after: 1 week

10 years agoMake sure reserved fields of the EHCI DMA descriptors are not dirty
hselasky [Sun, 12 Jan 2014 13:16:25 +0000 (13:16 +0000)]
Make sure reserved fields of the EHCI DMA descriptors are not dirty
after previous transfers.

MFC after: 1 week

10 years agoDon't do synchronous USB requests inside USB transfer callbacks. It is
hselasky [Sun, 12 Jan 2014 11:44:28 +0000 (11:44 +0000)]
Don't do synchronous USB requests inside USB transfer callbacks. It is
technically OK, but not recommended.

MFC after: 1 weeks

10 years agoRemove spaces from boot messages when we print the CPU ID/Family/Stepping
gavin [Sat, 11 Jan 2014 22:41:10 +0000 (22:41 +0000)]
Remove spaces from boot messages when we print the CPU ID/Family/Stepping
to match the rest of the CPU identification lines, and once again fit
into 80 columns in the usual case.

10 years agoAdd some missing .Nm for newer syscalls in existing man pages.
jilles [Sat, 11 Jan 2014 22:00:16 +0000 (22:00 +0000)]
Add some missing .Nm for newer syscalls in existing man pages.

MFC after: 1 week

10 years agofind: Allow -type d without statting everything.
jilles [Sat, 11 Jan 2014 21:12:27 +0000 (21:12 +0000)]
find: Allow -type d without statting everything.

fts(3) detects directories even in FTS_NOSTAT mode (so it can descend into
them).

No functional change is intended, but find commands that use -type d but no
primaries that still require stat/lstat calls make considerably fewer system
calls.

10 years agouse a real uint64_t instead of writing code to emulate one..
jmg [Sat, 11 Jan 2014 20:49:22 +0000 (20:49 +0000)]
use a real uint64_t instead of writing code to emulate one..

I verified w/ a:
dd if=/dev/zero bs=1m count=5000 | sha256
a33351fafd00e4c4bcdee2a1c5d019026500f8cdfeaf91a9b8dbbb2619429659

Reviewed by: cperciva
MFC after: 1 week