]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoUse the 'Virtual Interrupt Delivery' feature of Intel VT-x if supported by
neel [Tue, 7 Jan 2014 21:04:49 +0000 (21:04 +0000)]
Use the 'Virtual Interrupt Delivery' feature of Intel VT-x if supported by
hardware. It is possible to turn this feature off and fall back to software
emulation of the APIC by setting the tunable hw.vmm.vmx.use_apic_vid to 0.

We now start handling two new types of VM-exits:

APIC-access: This is a fault-like VM-exit and is triggered when the APIC
register access is not accelerated (e.g. apic timer CCR). In response to
this we do emulate the instruction that triggered the APIC-access exit.

APIC-write: This is a trap-like VM-exit which does not require any instruction
emulation but it does require the hypervisor to emulate the access to the
specified register (e.g. icrlo register).

Introduce 'vlapic_ops' which are function pointers to vector the various
vlapic operations into processor-dependent code. The 'Virtual Interrupt
Delivery' feature installs 'ops' for setting the IRR bits in the virtual
APIC page and to return whether any interrupts are pending for this vcpu.

Tested on an "Intel Xeon E5-2620 v2" courtesy of Allan Jude at ScaleEngine.

10 years agoReserve an event type for the upcoming EVENT_SENDFILE and
adrian [Tue, 7 Jan 2014 20:24:25 +0000 (20:24 +0000)]
Reserve an event type for the upcoming EVENT_SENDFILE and
extend the event struct pointer union to allow for 'other' types.

Sponsored by: Netflix, Inc.

10 years agoAllow delete_method sysctl to be set to "DISABLE".
mav [Tue, 7 Jan 2014 20:12:10 +0000 (20:12 +0000)]
Allow delete_method sysctl to be set to "DISABLE".

10 years agoMFV r260399:
delphij [Tue, 7 Jan 2014 19:58:45 +0000 (19:58 +0000)]
MFV r260399:

Apply vendor commits:

197e0ea Fix for TLS record tampering bug.  (CVE-2013-4353).
3462896 For DTLS we might need to retransmit messages from the
previous session so keep a copy of write context in DTLS
retransmission buffers instead of replacing it after
sending CCS.  (CVE-2013-6450).
ca98926 When deciding whether to use TLS 1.2 PRF and record hash
algorithms use the version number in the corresponding
SSL_METHOD structure instead of the SSL structure.  The
SSL structure version is sometimes inaccurate.
Note: OpenSSL 1.0.2 and later effectively do this already.
(CVE-2013-6449).

Security: CVE-2013-4353
Security: CVE-2013-6449
Security: CVE-2013-6450

10 years agoRemove aicasm as a build dependency. It made sense when the ahc and ahd
scottl [Tue, 7 Jan 2014 19:33:17 +0000 (19:33 +0000)]
Remove aicasm as a build dependency.  It made sense when the ahc and ahd
drivers and their firmware were under active development, but those days
have passed.  The firmware now exists in pre-compiled form, no longer
dependent on it's sources or on aicasm.  If you wish to rebuild the
firmware from source, the glue still exists under the 'make firmware'
target in sys/modules/aic7xxx.

This also fixes the problem introduced with r257777 et al with building
kernels the old fashioned way in sys/$arch/compile/$CONFIG when the
ahc/ahd drivers were included.

10 years agoRemove dead code.
melifaro [Tue, 7 Jan 2014 19:00:40 +0000 (19:00 +0000)]
Remove dead code.

Reported by: Coverity
Coverity CID: 1018057
MFC after: 2 weeks

10 years agoFix a bug introduced in r260167 related to VM-exit tracing.
neel [Tue, 7 Jan 2014 18:53:14 +0000 (18:53 +0000)]
Fix a bug introduced in r260167 related to VM-exit tracing.

Keep a copy of the 'rip' and the 'exit_reason' and use that when calling
vmx_exit_trace(). This is because both the 'rip' and 'exit_reason' can
be changed by 'vmx_exit_process()' and can lead to very misleading traces.

10 years agoTeach every SIOCGIFSTATUS provider to fill in ifs->ascii anyway.
melifaro [Tue, 7 Jan 2014 15:59:33 +0000 (15:59 +0000)]
Teach every SIOCGIFSTATUS provider to fill in ifs->ascii anyway.
Remove old bits of data concat for 'ascii' field.
Remove special SIOCGIFSTATUS handling from if.c (which Coverity yells at).

Reported by: Coverity
Coverity CID: 1147174
MFC after: 2 weeks

10 years agoUse __predict_false() on sensitive lock paths as most of the times,
attilio [Tue, 7 Jan 2014 14:03:42 +0000 (14:03 +0000)]
Use __predict_false() on sensitive lock paths as most of the times,
when PMC-soft feature is not used the check will be false.

Sponsored by: EMC / Isilon storage division
Submitted by: Anton Rang <anton.rang@isilon.com>

10 years agoFix the geom mappings for WR1043ND.
loos [Tue, 7 Jan 2014 13:09:35 +0000 (13:09 +0000)]
Fix the geom mappings for WR1043ND.

The uboot mapping is only 128KiB (0x20000) and not 2MiB (0x200000).

Dynamically adjust kernel and rootfs mappings based on the
geom_uncompress(4) magic.

This makes the built images more reliable by accepting changes on kernel
size transparently and matches the images built with zrouter and
freebsd-wifi-build.

Tested by: gjb
Approved by: adrian (mentor)
Obtained from: Zrouter

10 years agoFix off-by-one error in r260229.
mav [Tue, 7 Jan 2014 11:43:51 +0000 (11:43 +0000)]
Fix off-by-one error in r260229.

Coverity CID: 1148955

10 years agoFix a rare "truncated checksums" problem, which manifested like this:
trasz [Tue, 7 Jan 2014 11:03:57 +0000 (11:03 +0000)]
Fix a rare "truncated checksums" problem, which manifested like this:

WARNING: icl_pdu_check_data_digest: data digest check failed; got 0xf23b,
    should be 0xdb7f23b

Tested by: Darcy Birkbeck
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoCheck the XHCI event ring regardless of the XHCI status register
hselasky [Tue, 7 Jan 2014 09:52:26 +0000 (09:52 +0000)]
Check the XHCI event ring regardless of the XHCI status register
value. The "Intel Lynx Point" XHCI controller found in the MBP2013 has
been observed to not always set the event interrupt bit while there
are events to consume in the event ring.

MFC after: 1 week
Tested by: Huang Wen Hui <huanghwh@gmail.com>

10 years agogperf: reverse size_type patch from r258115.
pfg [Tue, 7 Jan 2014 01:40:49 +0000 (01:40 +0000)]
gperf: reverse size_type patch from r258115.

Silencing the broken warning as done in r258139 renders the
code unreacheable. An option could've been to turn off the
warnings in gperf but given that the code is not being used
it is better to just revert the original change altogether.

This code was never MFC'd.

10 years agoAdd a compile-time control over the size of KN_HASHSIZE.
adrian [Tue, 7 Jan 2014 01:17:27 +0000 (01:17 +0000)]
Add a compile-time control over the size of KN_HASHSIZE.

This is needed for applications that use a lot of non-filedescriptor
knotes.

MFC after: 1 week
Sponsored by: Netflix, Inc.

10 years agoAllow vlapic_set_intr_ready() to return a value that indicates whether or not
neel [Tue, 7 Jan 2014 00:38:22 +0000 (00:38 +0000)]
Allow vlapic_set_intr_ready() to return a value that indicates whether or not
the vcpu should be kicked to process a pending interrupt. This will be useful
in the implementation of the Posted Interrupt APICv feature.

Change the return value of 'vlapic_pending_intr()' to indicate whether or not
an interrupt is available to be delivered to the vcpu depending on the value
of the PPR.

Add KTR tracepoints to debug guest IPI delivery.

10 years agoFor IDENTIFY passthrough commands to Chatham prototype controllers, copy
jimharris [Mon, 6 Jan 2014 23:51:26 +0000 (23:51 +0000)]
For IDENTIFY passthrough commands to Chatham prototype controllers, copy
the spoofed identify data into the user buffer rather than issuing the
command to the controller, since Chatham IDENTIFY data is always spoofed.

While here, fix a bug in the spoofed data for Chatham submission and
completion queue entry sizes.

Sponsored by: Intel
MFC after: 3 days

10 years agoFor "nvmecontrol devlist", show namespace sizes in terms of MB instead of
jimharris [Mon, 6 Jan 2014 23:48:47 +0000 (23:48 +0000)]
For "nvmecontrol devlist", show namespace sizes in terms of MB instead of
GB to improve granularity of the reporting - especially for namespaces
that are on the order of 1 or 2 GB.

Submitted by: Tony Beltran <anthony.beltran@emc.com>
MFC after: 3 days

10 years agoSplit the VMCS setup between 'vmcs_init()' that does initialization and
neel [Mon, 6 Jan 2014 23:16:39 +0000 (23:16 +0000)]
Split the VMCS setup between 'vmcs_init()' that does initialization and
'vmx_vminit()' that does customization.

This makes it easier to turn on optional features (e.g. APICv) without
having to keep adding new parameters to 'vmcs_set_defaults()'.

Reviewed by: grehan@

10 years agoPartially fix IPv4 interface routes deletion in RADIX_MPATH.
melifaro [Mon, 6 Jan 2014 22:36:20 +0000 (22:36 +0000)]
Partially fix IPv4 interface routes deletion in RADIX_MPATH.

Noticed by: Nikolay Denev <ndenev at gmail.com>
MFC after: 1 month

10 years agoWhen pf_get_translation() fails, it should leave *sn pointer pristine,
glebius [Mon, 6 Jan 2014 19:05:04 +0000 (19:05 +0000)]
When pf_get_translation() fails, it should leave *sn pointer pristine,
otherwise we will panic in pf_test_rule().

PR: 182557

10 years agoCorrect a grammo in a comment; remove white space at EOL.
schweikh [Mon, 6 Jan 2014 17:23:22 +0000 (17:23 +0000)]
Correct a grammo in a comment; remove white space at EOL.

10 years agoFix arm build.
andreast [Mon, 6 Jan 2014 17:16:27 +0000 (17:16 +0000)]
Fix arm build.

Reviewed by: ian, zbb

10 years agoSwitch to using arm_devmap_add_entry() to set up static device mapping.
ian [Mon, 6 Jan 2014 16:57:22 +0000 (16:57 +0000)]
Switch to using arm_devmap_add_entry() to set up static device mapping.
This eliminates the hard-coded max kva and roughly doubles the available
kva space.

10 years agoDon't try to find a static mapping before calling pmap_mapdev(), that logic
ian [Mon, 6 Jan 2014 16:33:16 +0000 (16:33 +0000)]
Don't try to find a static mapping before calling pmap_mapdev(), that logic
is now part of pmap_mapdev() and doesn't need to be duplicated here.
Likewise for unmapping.

10 years agoAllow 'no static device mappings' to potentially work. It's not clear that
ian [Mon, 6 Jan 2014 16:07:27 +0000 (16:07 +0000)]
Allow 'no static device mappings' to potentially work.  It's not clear that
every arm system must have some static mappings to work correctly (although
currently they all do), so remove some panic() calls (which would never
been seen anyway, because they would happen before a console is available).

10 years agoSwitch to using arm_devmap_add_entry() to set up static device mapping.
ian [Mon, 6 Jan 2014 15:48:16 +0000 (15:48 +0000)]
Switch to using arm_devmap_add_entry() to set up static device mapping.
This eliminates the hard-coded max kva and roughly doubles the available
kva space.

10 years agoApply band-aid for 32-bit compat libs failures after r260334: put back
dim [Mon, 6 Jan 2014 14:39:10 +0000 (14:39 +0000)]
Apply band-aid for 32-bit compat libs failures after r260334: put back
-Qunused-arguments for clang for now, until I can figure out a way to
make it unneeded in all scenarios.  Sorry about the breakage.

10 years agoIt is 2014 and we have a new version of netmap.
luigi [Mon, 6 Jan 2014 12:53:15 +0000 (12:53 +0000)]
It is 2014 and we have a new version of netmap.
Most relevant features:

- netmap emulation on any NIC, even those without native netmap support.

  On the ixgbe we have measured about 4Mpps/core/queue in this mode,
  which is still a lot more than with sockets/bpf.

- seamless interconnection of VALE switch, NICs and host stack.

  If you disable accelerations on your NIC (say em0)

        ifconfig em0 -txcsum -txcsum

  you can use the VALE switch to connect the NIC and the host stack:

        vale-ctl -h valeXX:em0

  allowing sharing the NIC with other netmap clients.

- THE USER API HAS SLIGHTLY CHANGED (head/cur/tail pointers
  instead of pointers/count as before). This was unavoidable to support,
  in the future, multiple threads operating on the same rings.
  Netmap clients require very small source code changes to compile again.
      On the plus side, the new API should be easier to understand
  and the internals are a lot simpler.

The manual page has been updated extensively to reflect the current
features and give some examples.

This is the result of work of several people including Giuseppe Lettieri,
Vincenzo Maffione, Michio Honda and myself, and has been financially
supported by EU projects CHANGE and OPENLAB, from NetApp University
Research Fund, NEC, and of course the Universita` di Pisa.

10 years agoFix NULL dereference panic on UDP requests introduced in r260229.
mav [Mon, 6 Jan 2014 12:40:46 +0000 (12:40 +0000)]
Fix NULL dereference panic on UDP requests introduced in r260229.

10 years agodo not use capsicum when building picobsd images
luigi [Mon, 6 Jan 2014 08:09:19 +0000 (08:09 +0000)]
do not use capsicum when building picobsd images

10 years agoIn atomic_or_8_nv() load 1 and not 8 bytes from the address
marcel [Mon, 6 Jan 2014 05:00:58 +0000 (05:00 +0000)]
In atomic_or_8_nv() load 1 and not 8 bytes from the address
given. Note that atomic_or_8_nv() is not used at this time.

10 years agoCorrectly remove entries from the relevant receive ath_buf list before
adrian [Mon, 6 Jan 2014 03:48:32 +0000 (03:48 +0000)]
Correctly remove entries from the relevant receive ath_buf list before
freeing them.

The current code would walk the list and call the buffer free, which
didn't remove it from any lists before pushing it back on the free list.

Tested: AR9485, STA mode

Noticed by: dillon@apollo.dragonflybsd.org

10 years agoFix optimization bug.
pfg [Mon, 6 Jan 2014 00:52:39 +0000 (00:52 +0000)]
Fix optimization bug.

GCC-PR rtl-optimization/34628
* combine.c (try_combine): Stop and undo after the first combination
if an autoincrement side-effect on the first insn has effectively
been lost.

The issue was detected in OpenBSD but their fix was not very good. Huge
thanks to the upstream author, Eric Botcazou, for permitting the use of
this patch under GPLv2.

MFC after: 5 days

10 years agoFix a cut and paste error.
wblock [Sun, 5 Jan 2014 23:28:03 +0000 (23:28 +0000)]
Fix a cut and paste error.

PR: docs/184791
Submitted by: Jamie Landeg Jones <jamie@dyslexicfish.net>
MFC after: 3 days

10 years agofind: Fix two more problems with -lname and -ilname:
jilles [Sun, 5 Jan 2014 23:01:28 +0000 (23:01 +0000)]
find: Fix two more problems with -lname and -ilname:

* Do not match symlinks that are followed because of -H or -L. This is
  explicitly documented in GNU find's info file and is like -type l.

* Fix matching symlinks in subdirectories when fts changes directories.

Also, avoid some readlink() calls on files that are obviously not symlinks
(because of fts(3) restrictions, not all of them).

MFC after: 1 week

10 years agoRemove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs,
ian [Sun, 5 Jan 2014 22:36:34 +0000 (22:36 +0000)]
Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs,
related to setting up static device mappings.  Since it was only used by
arm/mv/mv_pci.c, it's now just static functions within that file, plus
one public function that gets called only from arm/mv/mv_machdep.c.

10 years agofind: Fix -lname and -ilname.
jilles [Sun, 5 Jan 2014 21:44:04 +0000 (21:44 +0000)]
find: Fix -lname and -ilname.

The code did not take into account that readlink() does not add a
terminating '\0', and therefore did not work reliably.

As before, symlinks of length PATH_MAX or more are not handled correctly.
(These can only be created on other operating systems.)

PR: bin/185393
Submitted by: Ben Reser (original version)
MFC after: 1 week

10 years agoWrap SUBDIRs over several lines.
gavin [Sun, 5 Jan 2014 21:35:07 +0000 (21:35 +0000)]
Wrap SUBDIRs over several lines.

10 years agoSplit the last gcc-specific flags off into CFLAGS.gcc. This also
dim [Sun, 5 Jan 2014 21:03:49 +0000 (21:03 +0000)]
Split the last gcc-specific flags off into CFLAGS.gcc.  This also
removes the need to use -Qunused-arguments for clang throughout the
tree.

MFC after: 3 days

10 years agoEnable the cesa security/crypto device by providing the required property
ian [Sun, 5 Jan 2014 20:44:10 +0000 (20:44 +0000)]
Enable the cesa security/crypto device by providing the required property
in the dts source, and adding the right devices to the kernel config. Also
generally bring the kernel config into line with what we have for other
Marvell/Kirkwood systems (add lots of useful devices and options).

One particularly notable addition amongst the kernel config changes is
USB_HOST_ALIGN=32, which may help eliminate data corruption on USB drives.

PR: kern/181975 arm/162159

10 years agogcc: backport some fixes from llvm-gcc
pfg [Sun, 5 Jan 2014 20:33:44 +0000 (20:33 +0000)]
gcc: backport some fixes from llvm-gcc

llvm-gcc backported some patches from gcc trunk:

http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00662.html
http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00019.html
http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00240.html
http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00493.html

The first two were always GPL2. The last two were
added after the GPL3 transition, but were written
by aaw@google.com and Rafael Espíndola got permission
to relicense them under the GPL2 for inclusion in
llvm-gcc.

This fixes GCC-PR c++/31749

Obtained from: llvm-gcc (rev. 75463; GPLv2)
MFC after: 2 weeks

10 years agoAdd #include <machine/fdt.h> to a few files that used to get it via
ian [Sun, 5 Jan 2014 20:09:51 +0000 (20:09 +0000)]
Add #include <machine/fdt.h> to a few files that used to get it via
pollution from other headers.

10 years agoFix build after r260234 by converting ddi_get_lbolt64() from inline into
mav [Sun, 5 Jan 2014 19:07:42 +0000 (19:07 +0000)]
Fix build after r260234 by converting ddi_get_lbolt64() from inline into
a macro.  Otherwise compiler complains that hz variable used there either
undefined or defined twice, thanks to header mess caused by compat shims.

10 years agoRetire machine/fdt.h as a header used by MI code, as its function is now
nwhitehorn [Sun, 5 Jan 2014 18:46:58 +0000 (18:46 +0000)]
Retire machine/fdt.h as a header used by MI code, as its function is now
obsolete. This involves the following pieces:
- Remove it entirely on PowerPC, where it is not used by MD code either
- Remove all references to machine/fdt.h in non-architecture-specific code
  (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat
  non-arch-specific).
- Fix code relying on header pollution from machine/fdt.h includes
- Legacy fdtbus.c (still used on x86 FDT systems) now passes resource
  requests to its parent (nexus). This allows x86 FDT devices to allocate
  both memory and IO requests and removes the last notionally MI use of
  fdtbus_bs_tag.
- On those architectures that retain a machine/fdt.h, unused bits like
  FDT_MAP_IRQ and FDT_INTR_MAX have been removed.

10 years agoConvert from using fdt_immr style to arm_devmap_add_entry() to make
ian [Sun, 5 Jan 2014 18:40:06 +0000 (18:40 +0000)]
Convert from using fdt_immr style to arm_devmap_add_entry() to make
static device mappings.

This SoC relied heavily on the fact that all devices were static-mapped
at a fixed address, and it (rather bogusly) used bus_space read and write
calls passing hard-coded virtual addresses instead of proper bus handles,
relying on the fact that the virtual addresses of the mappings were known
at compile time, and relying on the implementation details of arm
bus_space never changing.  All such usage was replaced with calls to
bus_space_map() to obtain a proper bus handle for the read/write calls.

This required adjusting some of the #define values that map out hardware
registers, and some of them were renamed in the process to make it clear
which were defining absolute physical addresses and which were defining
offsets.  (The ones that just define offsets don't appear to be referenced
and probably serve no value other than perhaps documentation.)

10 years agoEliminate use of fdt_immr_addr(), it's not needed for this SoC. Convert
ian [Sun, 5 Jan 2014 16:45:34 +0000 (16:45 +0000)]
Eliminate use of fdt_immr_addr(), it's not needed for this SoC.  Convert
to the newer arm_devmap_add_entry() routine for creating device mappings.

10 years agoIn addition to r260102, also define GCC_MS_EXTENSIONS in bsd.sys.mk,
dim [Sun, 5 Jan 2014 16:40:41 +0000 (16:40 +0000)]
In addition to r260102, also define GCC_MS_EXTENSIONS in bsd.sys.mk,
since kernel module builds do not use kern.pre.mk.

MFC after: 3 days
X-MFC-With: r260102

10 years agoUse the common armv6 fdt_bus_tag defintion instead of an essentially
ian [Sun, 5 Jan 2014 15:33:33 +0000 (15:33 +0000)]
Use the common armv6 fdt_bus_tag defintion instead of an essentially
identical local copy of it.

10 years agoImplement two new libusb API functions.
hselasky [Sun, 5 Jan 2014 10:41:43 +0000 (10:41 +0000)]
Implement two new libusb API functions.

PR: usb/185454
MFC after: 2 weeks

10 years agoAdd firmware version 18.168.6.1 (API version 6) for Intel Centrino
gavin [Sun, 5 Jan 2014 01:07:14 +0000 (01:07 +0000)]
Add firmware version 18.168.6.1 (API version 6) for Intel Centrino
Wireless-N 135 wireless adapters, soon to be supported by iwn(4).

Committed using: Laptop with Centrino 135 chipset
Obtained from: wireless.kernel.org firmware downloads

10 years agoMove the retune notification print to a debug print.
adrian [Sun, 5 Jan 2014 00:46:31 +0000 (00:46 +0000)]
Move the retune notification print to a debug print.

Yes, I still have to do the retune.  But I'm giving in to many people
pestering me (very gently!) about this.

Tested:

* Intel Centrino 6205

10 years agogcc: Add support for Apple's Block extension
pfg [Sun, 5 Jan 2014 00:43:28 +0000 (00:43 +0000)]
gcc: Add support for Apple's Block extension

Block objects [1] are a C-level syntactic and runtime feature. They
are similar to standard C functions, but in addition to executable
code they may also contain variable bindings to automatic (stack)
or managed (heap) memory. A block can therefore maintain a set of
state (data) that it can use to impact behavior when executed.

This port is based on Apple's GCC 5646 with some bugfixes from
Apple GCC 5666.3. It has some small differences with the support
in clang, which remains the recommended compiler.

Perhaps the most notable difference is that in GCC that __block
is not actually a keyword, but a macro. There will be workaround
for this issue in a near future. Other issues can be consulted in
the clang documentation [2]

For better compatiblity with Apple's GCC and llvm-gcc some related
fixes and features from Apple have been included. Support for the
non-standard nested functions in GCC is now off by default.

No effort was made to update the ObjC support since FreeBSD doesn't
carry ObjC in the base system, but some of the code crept in and
was more difficult to remove than to adjust.

Reference:
[1]
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html
[2]
http://clang.llvm.org/compatibility.html#block-variable-initialization

Obtained from: Apple GCC 4.2
MFC after: 3 weeks

10 years agolibcpp: misc fixes from Apple's GCC.
pfg [Sun, 5 Jan 2014 00:32:38 +0000 (00:32 +0000)]
libcpp: misc fixes from Apple's GCC.

Fixes some bugs detected by Apple:
#error with unmatched quotes
pragma mark

Obtained from: Apple GCC 4.2 - 5553
MFC after: 1 week

10 years agoMore NAND IDs of some really old Samsung parts, also list the part
imp [Sat, 4 Jan 2014 22:30:18 +0000 (22:30 +0000)]
More NAND IDs of some really old Samsung parts, also list the part
number that we're matching...

10 years agoChange semantics for rnh_lookup() function: now
melifaro [Sat, 4 Jan 2014 22:25:26 +0000 (22:25 +0000)]
Change semantics for rnh_lookup() function: now
it performs exact match search, regardless of netmask existance.
This simplifies most of rnh_lookup() consumers.

Fix panic triggered by deleting non-existent host route.

PR: kern/185092
Submitted by: Nikolay Denev <ndenev at gmail.com>
MFC after: 1 month

10 years agoDoh! Use C comments, not C++.
ian [Sat, 4 Jan 2014 22:14:59 +0000 (22:14 +0000)]
Doh!  Use C comments, not C++.

10 years agoConvert static device mapping to use the new arm_devmap_add_entry(),
ian [Sat, 4 Jan 2014 22:09:53 +0000 (22:09 +0000)]
Convert static device mapping to use the new arm_devmap_add_entry(),
and add static mappings that cover most of the on-chip peripherals with
1MB section mappings.  This adds about 220MB or so available kva space
by not using a hard-coded 0xF0000000 as the mapping address.

10 years agoBring back the old size of the kinfo_file structure to preserve ABI.
pjd [Sat, 4 Jan 2014 21:55:06 +0000 (21:55 +0000)]
Bring back the old size of the kinfo_file structure to preserve ABI.
Keep only one uint64_t spare for further cap_rights_t expension.

Add a comment clarifying that if the size of this structure changes,
a new sysctl MIB has to be allocate for it and the old structure has
to be returned by the old sysctl MIB.

Requested by: re
MFC after: 3 days

10 years agoIn pmap_mapdev(), first check whether a static mapping exists, and if so
ian [Sat, 4 Jan 2014 21:38:41 +0000 (21:38 +0000)]
In pmap_mapdev(), first check whether a static mapping exists, and if so
use it rather than allocating kva space and making another mapping.  In
pmap_unmapdev(), don't unmap/free if the mapping is static.

10 years agoRemove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer
nwhitehorn [Sat, 4 Jan 2014 21:19:20 +0000 (21:19 +0000)]
Remove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer
used by anything. The equivalent functionality is provided by the PIC drivers
themselves on PowerPC and this is a no-op on MIPS and x86.

10 years agoUse bus_space_map() rather than pmap_mapdev() in nexus_activate_resource(),
ian [Sat, 4 Jan 2014 21:18:22 +0000 (21:18 +0000)]
Use bus_space_map() rather than pmap_mapdev() in nexus_activate_resource(),
when running on FDT systems.  Unmap memory in nexus_deactivate_resource().

Also, call rman_activate_resource() before mapping device memory, and only
do the mapping if it returns success.

Reviewed by: nwhitehorn

10 years agoReimplement fdt_intr_to_rl() in terms of OFW_BUS_MAP_INTR() and
nwhitehorn [Sat, 4 Jan 2014 21:14:33 +0000 (21:14 +0000)]
Reimplement fdt_intr_to_rl() in terms of OFW_BUS_MAP_INTR() and
OFW_BUS_CONFIG_INTR(). This function is only used by simplebus, so will
likely be moved there in the future.

10 years agoImplement OFW_BUS_MAP_INTR() in terms of the FDT PIC table, which will
nwhitehorn [Sat, 4 Jan 2014 20:59:03 +0000 (20:59 +0000)]
Implement OFW_BUS_MAP_INTR() in terms of the FDT PIC table, which will
become an ARM-specific quirk.

10 years agoCorrect short delete issue in SCSI UNMAP support
smh [Sat, 4 Jan 2014 17:52:43 +0000 (17:52 +0000)]
Correct short delete issue in SCSI UNMAP support
Correct missing \n's in xpt_print's
Correct incorrect count being passed to short delete xpt_print

MFC after: 1 week

10 years agoAllow bsdinstall to use WPA-Enterprise networks when installing. This
gavin [Sat, 4 Jan 2014 17:09:41 +0000 (17:09 +0000)]
Allow bsdinstall to use WPA-Enterprise networks when installing.  This
only allows basic username/password config, and does not provide the
ability to set any of the other WPA options.  Regardless, this is
generally sufficient to associate.

Perhaps in the future this could allow full configuring (e.g. being able
to set "anonymous identity", and perhaps some of the more obscure WPA
options), though perhaps that will better belong in bsdconfig when that
grows wlan config ability.

MFC after: 1 week

10 years agoLower the priority of the "connect to any open wireless network" network
gavin [Sat, 4 Jan 2014 16:44:05 +0000 (16:44 +0000)]
Lower the priority of the "connect to any open wireless network" network
description, so guaranteeing that any other defined network will be tried
first.

MFC after: 1 week

10 years agoRemove what appears to be a stray debugging printf.
gavin [Sat, 4 Jan 2014 16:41:43 +0000 (16:41 +0000)]
Remove what appears to be a stray debugging printf.

MFC after: 1 week

10 years agoThe whois() function is called in a loop so make sure we close the
kevlo [Sat, 4 Jan 2014 15:51:52 +0000 (15:51 +0000)]
The whois() function is called in a loop so make sure we close the
socket to the whois server before returning.

Obtained from: OpenBSD

10 years agoReplace locks added in r260229 to protect sequence counters with atomics.
mav [Sat, 4 Jan 2014 15:51:31 +0000 (15:51 +0000)]
Replace locks added in r260229 to protect sequence counters with atomics.

New algorithm does not create additional lock congestion, while some races
it includes should not be a problem.  Those races may keep requests in DRC
cache for some more time by returning ACK position smaller then actual,
but it still should be able to drop thems when proper ACK finally read.

Races of the original algorithm based on TCP seq number were worse because
they happened when reply sequence number were recorded. After that even
correctly read ACKs could not clean DRC sometimes.

10 years agoFix several bugs in sctp_bindx():
tuexen [Sat, 4 Jan 2014 11:39:59 +0000 (11:39 +0000)]
Fix several bugs in sctp_bindx():
* Set errno to EAFNOSUPPORT if an address is provided which is neither
  AF_INET nor AF_INET6.
* Don't modify the arguments.
* Don't smash the stack when provided with a non-zero port.
* Handle the case correctly where the first address provided is
  an IPv6 address.

MFC after: 3 days

10 years agoENET on Vybrid Family SoC don't advertise its media capabilities
br [Sat, 4 Jan 2014 10:19:21 +0000 (10:19 +0000)]
ENET on Vybrid Family SoC don't advertise its media capabilities
themselves properly, so force auto-negotiation.

Tested on mvf600.

Reviewed by: ian

10 years agoProperly document -u and -s.
trasz [Sat, 4 Jan 2014 09:57:23 +0000 (09:57 +0000)]
Properly document -u and -s.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoDon't allow to create GELI providers with a sector size, which is no a
pjd [Sat, 4 Jan 2014 09:27:49 +0000 (09:27 +0000)]
Don't allow to create GELI providers with a sector size, which is no a
power of 2.

Noticed by: rwatson
MFC after: 3 days

10 years agoMFp4 @1189766:
pjd [Sat, 4 Jan 2014 09:25:27 +0000 (09:25 +0000)]
MFp4 @1189766:

- Compile the tests with .t suffix, so prove can use them directly.
- The CHECKX() macro should increment ntest just like the CHECK() macro.
- For consistency remove # from the pwd.t output.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

10 years agoMake a copy instead using constant string directly when assigning to char *.
delphij [Sat, 4 Jan 2014 01:12:28 +0000 (01:12 +0000)]
Make a copy instead using constant string directly when assigning to char *.

While I'm there also remove a few prototypes that are unused.

10 years agoUse prototype.
delphij [Sat, 4 Jan 2014 01:08:10 +0000 (01:08 +0000)]
Use prototype.

10 years agoRevert r258254: Alias WCHAR_T to UCS-4-INTERNAL.
peter [Fri, 3 Jan 2014 23:35:01 +0000 (23:35 +0000)]
Revert r258254: Alias WCHAR_T to UCS-4-INTERNAL.

10 years agoUse rnh_matchaddr instead of rnh_lookup for longest-prefix match.
melifaro [Fri, 3 Jan 2014 23:11:26 +0000 (23:11 +0000)]
Use rnh_matchaddr instead of rnh_lookup for longest-prefix match.
rnh_lookup is effectively the same as rnh_matchaddr if called with
empy network mask.

MFC after: 2 weeks

10 years agosh(1): Discourage use of -e.
jilles [Fri, 3 Jan 2014 22:56:23 +0000 (22:56 +0000)]
sh(1): Discourage use of -e.

Also, do not say that ! before a pipeline is an operator, because it is
syntactically a keyword.

10 years agoFix a typo that caused a loop to run beyond the end of the array it was
ian [Fri, 3 Jan 2014 21:38:33 +0000 (21:38 +0000)]
Fix a typo that caused a loop to run beyond the end of the array it was
searching.  If you didn't configure a timer capture pin you'd get a data
abort as it wandered into the weeds, now you get a nice warning message
about your config, as originally intended.

10 years agoWrap this debug statement in debug defines. Else, this driver
sbruno [Fri, 3 Jan 2014 20:45:56 +0000 (20:45 +0000)]
Wrap this debug statement in debug defines.  Else, this driver
will refuse to load.

MFC after: 2 weeks
Sponsored by: Yahoo! Inc.

10 years agoCosmetic change - switch over to vertical SRCS to make it
grehan [Fri, 3 Jan 2014 19:31:40 +0000 (19:31 +0000)]
Cosmetic change - switch over to vertical SRCS to make it
easier to keep files in alpha order.

Reviewed by: neel

10 years agoUse the same label name for ENTRY() and END() macros for 'vmx_enter_guest'.
neel [Fri, 3 Jan 2014 19:29:33 +0000 (19:29 +0000)]
Use the same label name for ENTRY() and END() macros for 'vmx_enter_guest'.

Pointed out by: rmh@

10 years agoFix a bug in the HPET emulation where a timer interrupt could be lost when the
neel [Fri, 3 Jan 2014 19:25:52 +0000 (19:25 +0000)]
Fix a bug in the HPET emulation where a timer interrupt could be lost when the
guest disables the HPET.

The HPET timer interrupt is triggered from the callout handler associated with
the timer. It is possible for the callout handler to be delayed before it gets
a chance to execute. If the guest disables the HPET during this window then the
handler never gets a chance to execute and the timer interrupt is lost.

This is now fixed by injecting a timer interrupt into the guest if the callout
time is detected to be in the past when the HPET is disabled.

10 years agoIn dmu_zfetch_stream_reclaim() replace division with multiplication and
mav [Fri, 3 Jan 2014 18:44:37 +0000 (18:44 +0000)]
In dmu_zfetch_stream_reclaim() replace division with multiplication and
move it out of the loop and lock.

10 years agoUpdate the dockstar DTS to reflect just NAND flash (no SPI NOR flash, and
ian [Fri, 3 Jan 2014 18:36:19 +0000 (18:36 +0000)]
Update the dockstar DTS to reflect just NAND flash (no SPI NOR flash, and
the LED specification was just misplaced).  The rather odd memory mappings
that were in place used an undocumented attribute value (0x0f) that caused
problems with the system.

Submitted by: Markus Pfeiffer <markus.pfeiffer@morphism.de>

10 years agoRemove extra conversion to nanoseconds from ddi_get_lbolt64().
mav [Fri, 3 Jan 2014 18:08:31 +0000 (18:08 +0000)]
Remove extra conversion to nanoseconds from ddi_get_lbolt64().

As result this uses one multiplication and shifts instead of one division
and two multiplications.

10 years agoPlug a memory leak in dup2 when both old and new fd have ioctl caps.
mjg [Fri, 3 Jan 2014 16:36:55 +0000 (16:36 +0000)]
Plug a memory leak in dup2 when both old and new fd have ioctl caps.

Reviewed by: pjd
MFC after: 3 days

10 years agoDon't check for fd limits in fdgrowtable_exp.
mjg [Fri, 3 Jan 2014 16:34:16 +0000 (16:34 +0000)]
Don't check for fd limits in fdgrowtable_exp.

Callers do that already and additional check races with process
decreasing limits and can result in not growing the table at all, which
is currently not handled.

MFC after: 3 days

10 years agoRework NFS Duplicate Request Cache cleanup logic.
mav [Fri, 3 Jan 2014 15:09:59 +0000 (15:09 +0000)]
Rework NFS Duplicate Request Cache cleanup logic.

 - Introduce additional hash to group requests by hash of sockref.  This
allows to process TCP acknowledgements without looping though all the cache,
and as result allows to do it every time.
 - Indroduce additional callbacks to notify application layer about sockets
disconnection.  Without this last few requests processed just before socket
disconnection never processed their ACKs and stuck in cache for many hours.
 - Implement transport-specific method for tracking reply acknowledgements.
New implementation does not cross multiple stack layers to get the data and
does not have race conditions that previously made some requests stuck
in cache.  This could be done more efficiently at sockbuf layer, but that
would broke some KBIs, while I don't know other consumers for it aside NFS.
 - Instead of traversing all DRC twice per request, run cleaning only once
per request, and except in some conditions traverse only single hash slot
at a time.

Together this limits NFS DRC growth only to situations of real connectivity
problems.  If network is working well, and so all replies are acknowledged,
cache remains almost empty even after hours of heavy load.  Without this
change on the same test cache was growing to many thousand requests even
with perfectly working local network.

As another result this reduces CPU time spent on the DRC handling during
SPEC NFS benchmark from about 10% to 0.5%.

Sponsored by: iXsystems, Inc.

10 years agoRemove useless register variable modifiers.
melifaro [Fri, 3 Jan 2014 14:33:25 +0000 (14:33 +0000)]
Remove useless register variable modifiers.
Do some more style(9).

MFC after: 2 weeks

10 years agoFix circular math macro.
glebius [Fri, 3 Jan 2014 12:06:54 +0000 (12:06 +0000)]
Fix circular math macro.

Submitted by: Lutz Donnerhacke via Dmitry Luhtionov
German lesson at: http://lutz.donnerhacke.de/Blog/Der-Fluch-der-Stabilitaet
PR: 146082

10 years agoMake failure of ifpromisc() a non-fatal error. This makes it possible to
glebius [Fri, 3 Jan 2014 11:03:12 +0000 (11:03 +0000)]
Make failure of ifpromisc() a non-fatal error. This makes it possible to
run carp(4) on vtnet(4).

Sponsored by: Nginx, Inc.

10 years agoMFp4 @1189741:
pjd [Fri, 3 Jan 2014 09:10:04 +0000 (09:10 +0000)]
MFp4 @1189741:

- Add missing nvlist_destroy().
- Don't override nvlout.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after: 3 days

10 years agoMFp4 @1189711:
pjd [Fri, 3 Jan 2014 09:07:03 +0000 (09:07 +0000)]
MFp4 @1189711:

Fix resource leaks on nvlist_destroy().

Reported by: Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after: 3 days

10 years agoRegen.
kevlo [Fri, 3 Jan 2014 06:02:08 +0000 (06:02 +0000)]
Regen.

10 years agoAdd support for the MediaTek/Ralink RT3593 chipset.
kevlo [Fri, 3 Jan 2014 06:01:05 +0000 (06:01 +0000)]
Add support for the MediaTek/Ralink RT3593 chipset.
Committed over the ZyXEL NWD2705 on amd64 with WPA.

10 years agoUse pointer to struct sockaddr_in6 in lla_lookup() call.
ae [Fri, 3 Jan 2014 02:40:56 +0000 (02:40 +0000)]
Use pointer to struct sockaddr_in6 in lla_lookup() call.
This prevents from triggering KASSERT in in6_lltable_lookup.

10 years agoAdd IF_AFDATA_WLOCK_ASSERT() in case lla_lookup() is called with
ae [Fri, 3 Jan 2014 02:32:05 +0000 (02:32 +0000)]
Add IF_AFDATA_WLOCK_ASSERT() in case lla_lookup() is called with
LLE_CREATE flag.

MFC after: 1 week