]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoMFH@260917.
kaiw [Mon, 20 Jan 2014 19:38:44 +0000 (19:38 +0000)]
MFH@260917.

10 years agoANSIfy declarations.
glebius [Mon, 20 Jan 2014 18:47:56 +0000 (18:47 +0000)]
ANSIfy declarations.

Ok'ed by: alc

10 years agoIn pmap_set_pte(), make sure to enforce ordering by inserting a memory
marcel [Mon, 20 Jan 2014 18:37:35 +0000 (18:37 +0000)]
In pmap_set_pte(), make sure to enforce ordering by inserting a memory
fence. Under system load, the CPU has been found to change the order
by which the stores are made visible. When the tag is made visible
before the other TLB values, other CPUs may use the invalid TLB values
and do bad things.

While here (i.e. not a fix) don't return errors from pmap_remove_vhpt()
to callers of pmap_remove_pte(). Those callers don't check the return
value and as such don't do what is needed to keep a consistent state.
More importantly, pmap_remove_vhpt() can't really have an error without
it indicating something unintended. Using KASSERT is therefore better.

PR: 182999, 183227

10 years agoAdd a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the
nwhitehorn [Mon, 20 Jan 2014 18:15:06 +0000 (18:15 +0000)]
Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the
device is an active kernel console and "off" otherwise. This is designed to
allow serial-booting x86 systems to provide a login prompt on the serial line
by default without providing one on all systems by default.

Comments and suggestions by: grehan, dteske, jilles
MFC after: 1 month

10 years ago- Only check the ivars for direct descendants.
jhb [Mon, 20 Jan 2014 17:55:22 +0000 (17:55 +0000)]
- Only check the ivars for direct descendants.
- A couple of whitespace fixes.

10 years agoDon't lock in the generic grab just to lock again in the specific grabs.
imp [Mon, 20 Jan 2014 17:45:36 +0000 (17:45 +0000)]
Don't lock in the generic grab just to lock again in the specific grabs.
(I committed the wrong version of uart_core.c, which still had this).

Pointy hat: imp

10 years ago- Allow PCI devices that are attached to a driver to be identified by their
jhb [Mon, 20 Jan 2014 15:51:02 +0000 (15:51 +0000)]
- Allow PCI devices that are attached to a driver to be identified by their
  device name instead of just the selector.
- Accept an optional device argument to -l to restrict the output to only
  listing details about a single device.  This is mostly useful in
  conjunction with other flags like -e or -c to allow a user to query
  details about a single device.

MFC after: 1 week

10 years agoFix format string.
des [Mon, 20 Jan 2014 11:13:05 +0000 (11:13 +0000)]
Fix format string.

Submitted by: Jörg Sonnenberger <joerg@NetBSD.org>
MFC after: 1 week

10 years agoAdd support for GPS ports to UHSO driver.
hselasky [Mon, 20 Jan 2014 07:09:19 +0000 (07:09 +0000)]
Add support for GPS ports to UHSO driver.

Submitted by: Lundberg, Johannes <johannes@brilliantservice.co.jp>
MFC after: 1 week

10 years agoDummy commit (whitespace changes and style nits) to show previous commit
dteske [Mon, 20 Jan 2014 03:39:08 +0000 (03:39 +0000)]
Dummy commit (whitespace changes and style nits) to show previous commit
(SVN r260866) was [in-part] Submitted-by: Christoph Mallon ...
<christoph.mallon@gmx.de>

MFC After: 3 days
X-MFC-With: r260866

10 years agoDummy commit (s/__num/__number/) in f_expand_number() to describe that the
dteske [Mon, 20 Jan 2014 03:31:16 +0000 (03:31 +0000)]
Dummy commit (s/__num/__number/) in f_expand_number() to describe that the
previous commit here (SVN r260894) was [in-part] from Submitted-by:
Christoph Mallon <christoph.mallon@gmx.de>

MFC after: 3 days

10 years agoBump up WITNESS_COUNT from 1024 to 1536 so there are sufficient entries for
neel [Mon, 20 Jan 2014 01:59:35 +0000 (01:59 +0000)]
Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient entries for
WITNESS to actually work.

Reviewed by: jhb@

10 years agoClang 3.4 will sometimes emit DIE for struct/union member before
kaiw [Mon, 20 Jan 2014 01:35:14 +0000 (01:35 +0000)]
Clang 3.4 will sometimes emit DIE for struct/union member before
emitting the DIE for the type of that member. ctfconvert can not
handle this properly and will calculate a wrong member bit offset.
Same struct/union type from different .o file will be treated as
different types when their member bit offsets are different, and
gets added/merged multiple times. This will in turn cause many other
structs/pointers/typedefs that refer to the duplicated struct/union
gets added/merged multiple times and eventually causes numerous
duplicated CTF types in the kernel.debug file.

The simple workaround here is to make use of DW_AT_byte_size attribute
of the member DIE to calculate the bits occupied by the member's type,
without actually resolving the type.

10 years agoOptimize f_expand_number(), improving performance.
dteske [Sun, 19 Jan 2014 21:02:24 +0000 (21:02 +0000)]
Optimize f_expand_number(), improving performance.

MFC After: 3 days

10 years agoFree the dma memory from the dma map before destroying the dma map.
imp [Sun, 19 Jan 2014 20:32:20 +0000 (20:32 +0000)]
Free the dma memory from the dma map before destroying the dma map.

10 years agoIntroduce grab and ungrab upcalls. When the kernel desires to grab the
imp [Sun, 19 Jan 2014 19:39:13 +0000 (19:39 +0000)]
Introduce grab and ungrab upcalls. When the kernel desires to grab the
console, it calls the grab functions. These functions should turn off
the RX interrupts, and any others that interfere. This makes mountroot
prompt work again. If there's more generalized need other than
prompting, many of these routines should be expanded to do those new
things.

Should have been part of r260889, but waasn't due to command line typo.

Reviewed by: bde (with reservations)

10 years agoIntroduce grab and ungrab upcalls. When the kernel desires to grab the
imp [Sun, 19 Jan 2014 19:36:11 +0000 (19:36 +0000)]
Introduce grab and ungrab upcalls. When the kernel desires to grab the
console, it calls the grab functions. These functions should turn off
the RX interrupts, and any others that interfere. This makes mountroot
prompt work again. If there's more generalized need other than
prompting, many of these routines should be expanded to do those new
things.

Reviewed by: bde (with reservations)

10 years agoAdd VT kernel configuration to ease testing of vt(9), aka Newcons
emaste [Sun, 19 Jan 2014 18:46:38 +0000 (18:46 +0000)]
Add VT kernel configuration to ease testing of vt(9), aka Newcons

10 years agoAdd nand device and NANDFS into the mix for those boards that have
imp [Sun, 19 Jan 2014 18:09:00 +0000 (18:09 +0000)]
Add nand device and NANDFS into the mix for those boards that have
support for it at the moment.

10 years agoConnect NAND for the SAM9260EK eval board, as well as the HotE HL-201.
imp [Sun, 19 Jan 2014 17:59:34 +0000 (17:59 +0000)]
Connect NAND for the SAM9260EK eval board, as well as the HotE HL-201.
# expect more refinement as do more boards.

10 years agoGeneralize AT91 NAND support a bit. Be more flexible about ALE and CLE
imp [Sun, 19 Jan 2014 17:53:51 +0000 (17:53 +0000)]
Generalize AT91 NAND support a bit. Be more flexible about ALE and CLE
address line assignment. Provide convenince function to set these things.

10 years agoAdd standard memory controller helper functions.
imp [Sun, 19 Jan 2014 17:45:13 +0000 (17:45 +0000)]
Add standard memory controller helper functions.

10 years agoRemoved unneeded and dangerous assignment. It would probably cause NULL
mav [Sun, 19 Jan 2014 16:37:57 +0000 (16:37 +0000)]
Removed unneeded and dangerous assignment.  It would probably cause NULL
refererence panic if compiler not optimize it out.

Found with: Clang static analyzer
MFC after: 2 weeks

10 years agoFurther rework netinet6 address handling code:
melifaro [Sun, 19 Jan 2014 16:07:27 +0000 (16:07 +0000)]
Further rework netinet6 address handling code:
* Set ia address/mask values BEFORE attaching to address lists.
Inet6 address assignment is not atomic, so the simplest way to
do this atomically is to fill in ia before attach.
* Validate irfa->ia_addr field before use (we permit ANY sockaddr in old code).
* Do some renamings:
  in6_ifinit -> in6_notify_ifa (interaction with other subsystems is here)
  in6_setup_ifa -> in6_broadcast_ifa (LLE/Multicast/DaD code)
  in6_ifaddloop -> nd6_add_ifa_lle
  in6_ifremloop -> nd6_rem_ifa_lle
* Split working with LLE and route announce code for last two.
Add temporary in6_newaddrmsg() function to mimic current rtsock behaviour.
* Call device SIOCSIFADDR handler IFF we're adding first address.
In IPv4 we have to call it on every address change since ARP record
is installed by arp_ifinit() which is called by given handler.
IPv6 stack, on the opposite is responsible to call nd6_add_ifa_lle() so
there is no reason to call SIOCSIFADDR often.

10 years ago* Make die_mem_offset() be able to handle DW_AT_data_member_location
kaiw [Sun, 19 Jan 2014 13:48:02 +0000 (13:48 +0000)]
* Make die_mem_offset() be able to handle DW_AT_data_member_location
  attributes generated by Clang 3.4.
* Document how different compilers generate DW_AT_data_member_location
  attributes differently.
* Document the quirks about DW_FORM_data[48].

10 years ago* Allow API dwarf_loclist_n() and dwarf_loclist() to be called with
kaiw [Sun, 19 Jan 2014 13:42:49 +0000 (13:42 +0000)]
* Allow API dwarf_loclist_n() and dwarf_loclist() to be called with
  attributes that have form DW_FORM_sec_offset.
* If the .debug_info section conforms to DWARF4, do not allow the value
  of attributes with form DW_FORM_data[48] to be used as section
  offset.

10 years agoAdd a sanity check: The provided offset for the desired location list
kaiw [Sun, 19 Jan 2014 13:38:40 +0000 (13:38 +0000)]
Add a sanity check: The provided offset for the desired location list
should not exceed the size of the .debug_loc section.

10 years agoEnable vt. This brings VGA-based console and terminal support to
marcel [Sun, 19 Jan 2014 04:45:52 +0000 (04:45 +0000)]
Enable vt. This brings VGA-based console and terminal support to
ia64 for the very first time. Only 9 years in the making...

Note that the vt/vga driver does not actually make sure there's
VGA hardware at the standard/legacy VGA I/O port and memory I/O
addresses. This can cause machine checks if the H/W does not have
a VGA controller.

10 years agoRevision 258428 changed gcc by virtue of having _bswapsi2 _bswapdi2 in
marcel [Sun, 19 Jan 2014 00:38:18 +0000 (00:38 +0000)]
Revision 258428 changed gcc by virtue of having _bswapsi2 _bswapdi2 in
libgcc, but this was not propagated to this file. Revision 260844 added
them here for ia64 unbeknownst revision 258428. Fix it for all...

Pointed out by: pfg

10 years agoThere's actually no data in the PMU_GET_VERSION command. Don't send any.
jhibbits [Sun, 19 Jan 2014 00:23:59 +0000 (00:23 +0000)]
There's actually no data in the PMU_GET_VERSION command.  Don't send any.
This change now allows the PMU to be used on PowerBook5,8.

MFC after: 1 week

10 years agoIf the flowid is available for the mbuf that finalised the creation
adrian [Sat, 18 Jan 2014 23:48:20 +0000 (23:48 +0000)]
If the flowid is available for the mbuf that finalised the creation
of a syncache connection, copy it into the inp_flowid field.

Without this, an incoming TCP connection won't have an inp_flowid marked
until some data comes in, and this means that things like the per-CPU
TCP timer option will choose a different CPU for the timer work.
(It also means that if one grabbed the flowid via an ioctl from userland,
it won't be available until some data has been received.)

Sponsored by: Netflix, Inc.

10 years agoSimplify filling sockaddr_dl structure for if_resolvemulti()
melifaro [Sat, 18 Jan 2014 23:24:51 +0000 (23:24 +0000)]
Simplify filling sockaddr_dl structure for if_resolvemulti()
callback providers. link_init_sdl() function can be used to
fill most of the parameters. Use caller stack instead of
allocation / freing memory for each request. Do not drop support
for extra-long (probably non-existing) link-layer protocols by
introducing link_alloc_sdl() (used by if_resolvemulti() callback)
and link_free_sdl() (used by caller).
Since this change breaks KBI, MFC requires slightly different approach
(link_init_sdl() auto-allocating buffer if necessary to handle cases
 with unmodified if_resolvemulti() callers).

MFC after: 2 weeks

10 years agoFix a bad comparison operator (s/==/=/), and address a use-case issue where-
dteske [Sat, 18 Jan 2014 22:33:49 +0000 (22:33 +0000)]
Fix a bad comparison operator (s/==/=/), and address a use-case issue where-
in the one-line comment associated with the dumpdev setting was not present
for the case where the user deselects the dumpdev service (restoring pre-
r256348 behaviour.

MFC After: 3 days

10 years agoSome processor's don't allow NMI injection if the STI_BLOCKING bit is set in
neel [Sat, 18 Jan 2014 21:47:12 +0000 (21:47 +0000)]
Some processor's don't allow NMI injection if the STI_BLOCKING bit is set in
the Guest Interruptibility-state field. However, there isn't any way to
figure out which processors have this requirement.

So, inject a pending NMI only if NMI_BLOCKING, MOVSS_BLOCKING, STI_BLOCKING
are all clear. If any of these bits are set then enable "NMI window exiting"
and inject the NMI in the VM-exit handler.

10 years agoUse in6_localip() instead of hand-rolled cycle.
melifaro [Sat, 18 Jan 2014 20:54:55 +0000 (20:54 +0000)]
Use in6_localip() instead of hand-rolled cycle.

MFC after: 2 weeks

10 years agoAdd in6_prepare_ifra() function to ease preparing in-kernel IPv6
melifaro [Sat, 18 Jan 2014 20:32:59 +0000 (20:32 +0000)]
Add in6_prepare_ifra() function to ease preparing in-kernel IPv6
address requests.

MFC after: 2 weeks

10 years agoStyle changes in vm_pageout_scan():
alc [Sat, 18 Jan 2014 20:02:59 +0000 (20:02 +0000)]
Style changes in vm_pageout_scan():

1. Be consistent in the style of "act_delta" manipulations between the
   inactive and active queue scans.

2. Explicitly compare to zero.

3. The deactivation of a page is based is based on its recent history
   and not just the current call to vm_pageout_scan().  The variable
   "act_delta" represents the current state of the page, and not its
   history.  Avoid possible confusion by not (ab)using "act_delta" for
   the making the deactivation decision.

Submitted by: kib [1]
Reviewed by: kib [2,3]

10 years agoAPI dwarf_attrval_flag() should properly handle an attribute with
kaiw [Sat, 18 Jan 2014 17:59:22 +0000 (17:59 +0000)]
API dwarf_attrval_flag() should properly handle an attribute with
(DWARF4) form DW_FORM_flag_present which implicitly indicates the
presence of the attribute. Manual page is updated to reflect this
change.

Note that this was previously fixed in the old libdwarf.

10 years agoFix typo: the public API dwarf_child() should return DW_DLV_NO_ENTRY
kaiw [Sat, 18 Jan 2014 17:49:32 +0000 (17:49 +0000)]
Fix typo: the public API dwarf_child() should return DW_DLV_NO_ENTRY
instead of DW_DLE_NO_ENTRY when a child DIE is not found.

10 years agoFix a warning in libdwarf found by -Wmissing-variable-declarations.
kaiw [Sat, 18 Jan 2014 17:47:06 +0000 (17:47 +0000)]
Fix a warning in libdwarf found by -Wmissing-variable-declarations.

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 agoApply r241720 by ed:
kaiw [Sat, 18 Jan 2014 10:13:04 +0000 (10:13 +0000)]
Apply r241720 by ed:

Fix warnings found by -Wmising-variable-declarations.

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 agoWe should not set the unnamed DIE's name to "__anon__" since that will
kaiw [Fri, 17 Jan 2014 08:44:12 +0000 (08:44 +0000)]
We should not set the unnamed DIE's name to "__anon__" since that will
bring back a known issue with DTrace regarding type name
comparison. Instead, we can set the name to an empty string.

Pointed out by:      avg

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 agoIf function die_name() finds a DIE without a name, set its name to
kaiw [Thu, 16 Jan 2014 22:28:33 +0000 (22:28 +0000)]
If function die_name() finds a DIE without a name, set its name to
"__anon__". This hack is used to workaround a issue that compilers
like GCC could generate DW_TAG_base_type DIE without a name.

Note that we didn't need this before because the old libdwarf
internally set all the unnamed DIE's name to "__anon__".

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 agoConvert ctfconvert to use the new libdwarf API.
kaiw [Thu, 16 Jan 2014 21:56:05 +0000 (21:56 +0000)]
Convert ctfconvert to use the new libdwarf API.

10 years agoRemove the old libdwarf and bring in the new libdwarf in contrib/.
kaiw [Thu, 16 Jan 2014 21:52:09 +0000 (21:52 +0000)]
Remove the old libdwarf and bring in the new libdwarf in contrib/.

10 years agoDefine SHT_GNU_LIBLIST and R_MIPS_64, which is needed for libelf and
kaiw [Thu, 16 Jan 2014 21:50:26 +0000 (21:50 +0000)]
Define SHT_GNU_LIBLIST and R_MIPS_64, which is needed for libelf and
libdwarf.

10 years agoUse FreeBSD's ELF headers instead of the elfdefinitions.h header which
kaiw [Thu, 16 Jan 2014 21:47:27 +0000 (21:47 +0000)]
Use FreeBSD's ELF headers instead of the elfdefinitions.h header which
comes with elftoolchain. This version of libelf doesn't need to be
portable; using FreeBSD's own ELF headers will avoid conflicts and
make integration easier.

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 agoSet CFLAGS in just one line.
kaiw [Wed, 15 Jan 2014 22:47:53 +0000 (22:47 +0000)]
Set CFLAGS in just one line.

10 years agoRemoved source code for the old libelf and build the new libelf from
kaiw [Wed, 15 Jan 2014 22:35:55 +0000 (22:35 +0000)]
Removed source code for the old libelf and build the new libelf from
contrib/ instead.

10 years agoCopy libelf, libdwarf and common files from vendor/ to contrib/.
kaiw [Wed, 15 Jan 2014 22:30:48 +0000 (22:30 +0000)]
Copy libelf, libdwarf and common files from vendor/ to contrib/.

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.