dim [Wed, 30 Dec 2015 13:34:49 +0000 (13:34 +0000)]
Update clang to trunk r256633.
dim [Wed, 30 Dec 2015 13:13:10 +0000 (13:13 +0000)]
Update llvm to trunk r256633.
dim [Wed, 30 Dec 2015 12:10:04 +0000 (12:10 +0000)]
Merge ^/head r292913 through r292935.
dim [Wed, 30 Dec 2015 11:49:41 +0000 (11:49 +0000)]
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
dim [Wed, 30 Dec 2015 11:46:15 +0000 (11:46 +0000)]
Vendor import of llvm trunk r256633:
https://llvm.org/svn/llvm-project/llvm/trunk@256633
ngie [Wed, 30 Dec 2015 11:15:07 +0000 (11:15 +0000)]
Integrate tools/regression/sockets/unix_passfd into the FreeBSD test
suite as tests/sys/kern/unix_passfd_test
- Convert testcases to ATF
- Fix an alignment issues
- Mark rights_creds_payload(..) as an expected failure (see PR # 181741)
Based [in part] on the following Differential Revision:
https://reviews.freebsd.org/D689
MFC after: 1 week
Submitted by: markj
Sponsored by: EMC / Isilon Storage Division
dim [Wed, 30 Dec 2015 09:15:02 +0000 (09:15 +0000)]
Add some more obsolete files, left over from the clang 3.7.0 -> 3.7.1
upgrade.
Noticed by: Nikolai Lifanov <lifanov@mail.lifanov.com>, jtl
jhibbits [Wed, 30 Dec 2015 03:43:25 +0000 (03:43 +0000)]
Add platform support for QorIQ SoCs.
This includes the following changes:
* SMP kickoff for QorIQ (tested on P5020)
* Errata fixes for some silicon revisions
* Enables L2 (and L3 if available) caches
Obtained from: Semihalf
Sponsored by: Alex Perez/Inertial Computing
imp [Wed, 30 Dec 2015 03:36:22 +0000 (03:36 +0000)]
Use __alignof__ instead of assuming int64_t to get the right
alignment.
Differential Revision: https://reviews.freebsd.org/D4708
jhibbits [Wed, 30 Dec 2015 02:26:04 +0000 (02:26 +0000)]
Optimize zero_page for book-e mmu.
Instead of indirectly calling bzero() through mmu_booke_zero_page_area, zero the
full page the same way as the AIM pmap logic does: using dcbz.
jhibbits [Wed, 30 Dec 2015 02:23:14 +0000 (02:23 +0000)]
Rewrite tid_flush() in C.
There's no need for it to be in asm. Also, by writing in C, and marking it
static in pmap.c, it saves a branch to the function itself, as it's only used in
one location. The generated asm is virtually identical to the handwritten code.
dteske [Wed, 30 Dec 2015 02:15:12 +0000 (02:15 +0000)]
Fix stack leak introduced by SVN r97201 (nextboot_conf support).
Fix erroneous error path in error messages when processing boot_conf.
Fixup stack comments for functions introduced by SVN r97201.
Remove a questioning stack comment introduced by SVN r186789.
NB: Comment removed because strdup usage here is correct/not a leak.
MFC after: 1 week
marius [Wed, 30 Dec 2015 00:17:37 +0000 (00:17 +0000)]
Adapt CATR() to r283283.
jhb [Wed, 30 Dec 2015 00:04:57 +0000 (00:04 +0000)]
Document the recently added support for ptrace(2) LWP events.
jhb [Tue, 29 Dec 2015 23:25:26 +0000 (23:25 +0000)]
Add ptrace(2) reporting for LWP events.
Add two new LWPINFO flags: PL_FLAG_BORN and PL_FLAG_EXITED for reporting
thread creation and destruction. Newly created threads will stop to report
PL_FLAG_BORN before returning to userland and exiting threads will stop to
report PL_FLAG_EXIT before exiting completely. Both of these events are
only enabled and reported if PT_LWP_EVENTS is enabled on a process.
jhb [Tue, 29 Dec 2015 23:16:20 +0000 (23:16 +0000)]
Call kern_thr_exit() instead of duplicating it.
This code is missing the racct_subr() call from kern_thr_exit() and would
require further code duplication in future changes.
Reviewed by: kib
MFC after: 1 week
ian [Tue, 29 Dec 2015 22:18:35 +0000 (22:18 +0000)]
Bring some of the recent locore-v4.S improvements into locore-V6...
- Map all 4GB as VA=PA so that args passed in from a bootloader can
be accessed regardless of where they are.
- Figure out the kernel load address by directly masking the PC rather
then by doing pc-relative math on the _start symbol.
- For EARLY_PRINTF support, map device memory as uncacheable (no-op for
ARM_NEW_PMAP because all TEX types resolve to uncacheable).
kib [Tue, 29 Dec 2015 22:14:21 +0000 (22:14 +0000)]
Add standard extended feature bit 6 from the Intel SDM rev. 57, which
indicates that data-pointer in the saved x87 FPU state is only updated
on FPU exceptions.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
ian [Tue, 29 Dec 2015 21:29:05 +0000 (21:29 +0000)]
Fix the error checking for the ubenv command. This moves the check for an
empty ldvar (which amounts to the varname string starting with '=') into
the if block that manipulates ldvar, which avoids later referencing ldvar
when it was never initialized.
Submitted by: Thomas Skibo
Pointy hat: ian
jilles [Tue, 29 Dec 2015 20:51:29 +0000 (20:51 +0000)]
sh: Split subevalvar() in #/##/%/%% and =/? parts.
ngie [Tue, 29 Dec 2015 20:17:40 +0000 (20:17 +0000)]
Fix getopt(3) argument after r290180; I forgot to change -r to -R
by accident
MFC after: 3 days
Pointyhat to: ngie
Reported by: vangyzen
Sponsored by: EMC / Isilon Storage Division
jtl [Tue, 29 Dec 2015 19:20:39 +0000 (19:20 +0000)]
When checking the inp_ip_minttl restriction for IPv6 packets, don't check
the IPv4 header.
CID: 1017920
Differential Revision: https://reviews.freebsd.org/D4727
Reviewed by: bz
MFC after: 2 weeks
Sponsored by: Juniper Networks
marius [Tue, 29 Dec 2015 17:07:28 +0000 (17:07 +0000)]
- Add entries for the more prominent members of the Digi International
Neo series, which are based on Exar PCI chips.
- Mark some unused parameters as such.
- Fix style
MFC after: 3 days
pfg [Tue, 29 Dec 2015 16:31:28 +0000 (16:31 +0000)]
pax: prevent possible buffer overflow
Or at least quiet down some static analyzers about it.
CID: 978835
MFC after: 1 week
Obtained from: OpenBSD
theraven [Tue, 29 Dec 2015 16:29:42 +0000 (16:29 +0000)]
Improvements to BSD-licensed DTC.
- Added an expression parser so that expressions from headers are now working
- Fixed missing null terminators on cross references
- Disabled exceptions / RTTI in the build for smaller binaries
- Changed phandle order generation to be identical to GPL'd dtc
miwi [Tue, 29 Dec 2015 15:54:34 +0000 (15:54 +0000)]
- Sort ports-secteam
pfg [Tue, 29 Dec 2015 15:51:52 +0000 (15:51 +0000)]
ext2: recognize ext4 INCOMPAT_RECOVER flag
This is a flag specific for journalling in ext4.
Add it to the list of ext4 features we ignore for
read-only purposes.
PR: 205668
MFC after: 1 week
miwi [Tue, 29 Dec 2015 15:36:46 +0000 (15:36 +0000)]
- Add myself to ports-secteam
Approved by: delphij (implicit)
ian [Tue, 29 Dec 2015 15:23:03 +0000 (15:23 +0000)]
Correct the code for sign-extending a 16 bit value. As near as I can tell
this is effectively a no-op -- the addend term in MOVT/MOVW relocations
always seems to be zero. But this is correct and the old code wasn't.
hselasky [Tue, 29 Dec 2015 11:53:13 +0000 (11:53 +0000)]
Update metadata for "tools/tools/bus_autoconf" after r292080. Use
BYTE_ORDER instead of _BYTE_ORDER due to 3rd party USB software for
now.
uqs [Tue, 29 Dec 2015 11:24:41 +0000 (11:24 +0000)]
Fix type mismatches for malloc(3) and Co.
This is rather pedantic, as for most architectures it holds that
sizeof(type *) == sizeof(type **)
Found by: clang static analyzer
Reviewed by: ed
Differential Revision: https://reviews.freebsd.org/D4722
uqs [Tue, 29 Dec 2015 11:24:35 +0000 (11:24 +0000)]
Fix type mismatches for malloc(3) and Co.
Found by: clang static analyzer
Reviewed by: ed
Differential Revision: https://reviews.freebsd.org/D4722
delphij [Tue, 29 Dec 2015 08:19:43 +0000 (08:19 +0000)]
hyperv: vmbus: run non-blocking message handlers in vmbus_msg_swintr()
We'll remove the per-channel control_work_queue because it can't properly
do serialization of message handling, e.g., when there are 2 NIC devices,
vmbus_channel_on_offer() -> hv_queue_work_item() has a race condition:
for an SMP VM, vmbus_channel_process_offer() can run concurrently on
different CPUs and if the second NIC's
vmbus_channel_process_offer() -> hv_vmbus_child_device_register() runs
first, the second NIC's name will be hn0 and the first NIC's name will
be hn1!
We can fix the race condition by removing the per-channel control_work_queue
and run all the message handlers in the global
hv_vmbus_g_connection.work_queue -- we'll do this in the next patch.
With the coming next patch, we have to run the non-blocking handlers
directly in the kernel thread vmbus_msg_swintr(), because the special
handling of sub-channel: when a sub-channel (e.g., of the storvsc driver)
is received and being handled in vmbus_channel_on_offer() running on the
global hv_vmbus_g_connection.work_queue, vmbus_channel_process_offer()
invokes channel->sc_creation_callback, i.e., storvsc_handle_sc_creation,
and the callback will invoke hv_vmbus_channel_open() -> hv_vmbus_post_message
and expect a further reply from the host, but the handling of the further
messag can't be done because the current message's handling hasn't finished
yet; as result, hv_vmbus_channel_open() -> sema_timedwait() will time out
and th device can't work.
Also renamed the handler type from hv_pfn_channel_msg_handler to
vmbus_msg_handler: the 'pfn' and 'channel' in the old name make no sense.
Submitted by: Dexuan Cui <decui microsoft com>
Reviewed by: royger
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4596
delphij [Tue, 29 Dec 2015 07:54:55 +0000 (07:54 +0000)]
hyperv: vmbus: remove the per-channel control_work_queue
Now vmbus_channel_on_offer() -> vmbus_channel_process_offer() can
safely run on the global hv_vmbus_g_connection.work_queue now.
We remove the per-channel control_work_queue to achieve the proper
serialization of the message handling.
I removed the bogus TODO in vmbus_channel_on_offer(): a vmbus offer
can only come from the parent partition, i.e., the host.
PR: kern/205156
Submitted by: Dexuan Cui <decui microsoft com>
Reviewed by: Howard Su <howard0su gmail com>, delphij
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4597
jhibbits [Tue, 29 Dec 2015 03:31:06 +0000 (03:31 +0000)]
Update capabilities of e500mc, e5500, e6500.
bapt [Tue, 29 Dec 2015 00:08:32 +0000 (00:08 +0000)]
Simplify code for parsing extra groups
bapt [Tue, 29 Dec 2015 00:02:08 +0000 (00:02 +0000)]
Remove useless assignement of linelen
bapt [Mon, 28 Dec 2015 23:57:22 +0000 (23:57 +0000)]
Restore dryrun support for pw groupmod
marius [Mon, 28 Dec 2015 20:24:08 +0000 (20:24 +0000)]
- Add an entry for the SIIG Cyber 2SP1 PCIe adapter, which is based
on an Oxford Semiconductor OX16PCI954 but uses only two ports and
a non-default clock rate.
- Fix style/whitespace
PR: 176407
MFC after: 3 days
dteske [Mon, 28 Dec 2015 19:29:05 +0000 (19:29 +0000)]
Add interests/maintainerships + notes
hselasky [Mon, 28 Dec 2015 18:50:18 +0000 (18:50 +0000)]
Add support for CQE zipping. CQE zipping reduces PCI overhead by
coalescing and zipping multiple CQEs into a single merged CQE. The
feature is enabled by default and can be disabled by a sysctl.
Implementing this feature mlx5_cqwq_pop() has been separated from
mlx5e_get_cqe().
MFC after: 1 week
Submitted by: Mark Bloch <markb@mellanox.com>
Differential Revision: https://reviews.freebsd.org/D4598
Sponsored by: Mellanox Technologies
hselasky [Mon, 28 Dec 2015 18:36:00 +0000 (18:36 +0000)]
Add support for sysctl tunables to 10-stable and older. Pushed through
head first to simplify driver maintenance.
MFC after: 1 week
Submitted by: Drew Gallatin <gallatin@freebsd.org>
Differential Revision: https://reviews.freebsd.org/D4552
Sponsored by: Mellanox Technologies
wollman [Mon, 28 Dec 2015 18:29:47 +0000 (18:29 +0000)]
in6_if2idlen: treat bridge(4) interfaces like other Ethernet interfaces
bridge(4) interfaces have an if_type of IFT_BRIDGE, rather than
IFT_ETHER, even though they only support Ethernet-style links. This
caused in6_if2idlen to emit an "unknown link type (209)" warning to
the console every time it was called. Add IFT_BRIDGE to the case
statement in the appropriate place, indicating that it uses the same
IPv6 address format as other Ethernet-like interfaces.
MFC after: 1 week
hselasky [Mon, 28 Dec 2015 18:28:18 +0000 (18:28 +0000)]
Make the eeprom dump function more readable and rename variables for
better clarity.
MFC after: 1 week
Submitted by: Daria Genzel <dariaz@mellanox.com>
Differential Revision: https://reviews.freebsd.org/D4551
Sponsored by: Mellanox Technologies
hselasky [Mon, 28 Dec 2015 18:20:05 +0000 (18:20 +0000)]
Reduce memory consumption when allocating kobject strings in the
LinuxKPI. Compute string length before allocating memory instead of
using fixed size allocations. Make kobject_set_name_vargs() global
instead of inline to save some bytes when compiling.
MFC after: 1 week
Sponsored by: Mellanox Technologies
dteske [Mon, 28 Dec 2015 17:27:20 +0000 (17:27 +0000)]
Explicitly set permissions on entropy files
Differential Revision: https://reviews.freebsd.org/D3933
Submitted by: jmg
Reviewed by: delphij, markm
Approved by: secteam (delphij)
MFC after: 3 days
X-MFC-to: stable/10 stable/9
melifaro [Mon, 28 Dec 2015 09:26:07 +0000 (09:26 +0000)]
Add SFF-8024 Extended Specification Compliance
Submitted by: markb_mellanox.com
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4666
delphij [Mon, 28 Dec 2015 08:53:31 +0000 (08:53 +0000)]
Eliminate unneeded includes.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D4716
araujo [Mon, 28 Dec 2015 05:48:22 +0000 (05:48 +0000)]
The sdp opens the database with PERM_SECURE mode and it is different than
dp that opens the database with PERM_INSECURE, so we need to check sdp->put
against sdp instead of use dp->put.
PR: bin/191720
Submitted by: Miles Ohlrich <turingsboy@yahoo.com>
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D4255
ngie [Mon, 28 Dec 2015 02:36:57 +0000 (02:36 +0000)]
Remove retval to fix a -Wunused-but-set-variable warning from gcc 4.9
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 28 Dec 2015 02:34:59 +0000 (02:34 +0000)]
- Remove unused but set ssize in shutdown_send_sigpipe
- Add #ifdef TEST_SEQ_PACKET_SOURCE_ADDRESS` for untestable code
because FreeBSD doesn't have a means to map source addresses for
SEQ_PACKET AF_UNIX sockets (paraphrased). Put pathname variable
under the #ifdef to mute another unused but set variable warning
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 28 Dec 2015 02:28:12 +0000 (02:28 +0000)]
Clean trailing whitespace
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 28 Dec 2015 02:21:36 +0000 (02:21 +0000)]
- Fix an improperly sized buffer for `pathname` [1]
- Fix a -Wunused-but-set-variable warning [2]
MFC after: 1 week
Reported by: cppcheck [1], gcc 4.9 [2]
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 28 Dec 2015 02:18:22 +0000 (02:18 +0000)]
Fix style(9) a bit and ensure that error from initializing kqueue(2) is
sane
- Push the kqueue(2) initialization down so the errno will correspond with
the failure instead of potentially being stomped on by functions called
by `PLAIN_REQUIRE_KERNEL_MODULE`
- Delete trailing whitespace
- Add spaces between braces for conditional and control blocks (for/if)
- Use err/errx instead of perror+printf+exit/printf+exit.
- Remove braces for single-line conditionals
Tested with and without -DDEBUG
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
araujo [Mon, 28 Dec 2015 02:07:56 +0000 (02:07 +0000)]
Add on systat -vm the ability to display the physical and kernel memory
percent usage.
PR: bin/203917
Submitted by: ota <ota@j.email.ne.jp>
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D4281
ngie [Mon, 28 Dec 2015 02:01:41 +0000 (02:01 +0000)]
Place cancel and error under #ifdef DEBUG to mute
-Wunused-but-set-variable warnings reported by gcc 4.9
Remove some trailing whitespace as well
Tested with and without -DDEBUG
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 28 Dec 2015 01:51:20 +0000 (01:51 +0000)]
Staticize several variables that are used exclusively in bsnmpd/main.c and
bsnmpd/trap.c
This fixes several -Wmissing-variable-declaration warnings noted by clang
Differential Revision: https://reviews.freebsd.org/D4718
MFC after: 1 week
Reported by: Jenkins
Reviewed by: araujo
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 28 Dec 2015 00:53:37 +0000 (00:53 +0000)]
- Explicitly initialize ch to 0
- Delete some spurious whitespace
- Use calloc instead of malloc in the last test to ensure that
sendspace is properly zero'ed out
Differential Revision: https://reviews.freebsd.org/D689 (part of a larger diff)
MFC after: 1 week
Reviewed by: asomers, ngie
Submitted by: markj
Sponsored by: EMC / Isilon Storage Division
cy [Mon, 28 Dec 2015 00:42:15 +0000 (00:42 +0000)]
Correct __FreeBSD__ check.
MFC after: 3 days
imp [Sun, 27 Dec 2015 23:04:12 +0000 (23:04 +0000)]
Use a macro to create the names for the library path names. This will
allow later substitution at run time instead of compile time of the
environment variable name prefix.
Differential Review: https://reviews.freebsd.org/D2718
imp [Sun, 27 Dec 2015 23:04:11 +0000 (23:04 +0000)]
The FILE structure has a mbstate_t in it. This structure needs to be
aligned on a int64_t boundary. However, when we allocate the array of
these structures, we use ALIGNBYTES which defaults to sizeof(int) on
arm, i386 and others. The i386 stuff can handle unaligned accesses
seemlessly. However, arm cannot. Take this into account when creating
the array of FILEs, and add some comments about why.
Differential Revision: https://reviews.freebsd.org/D4708
imp [Sun, 27 Dec 2015 23:04:10 +0000 (23:04 +0000)]
There's currently some issues with armv7-class of CPUs code generation
with our default toolchain. Turn it off here until that all gets
sorted out.
allanjude [Sun, 27 Dec 2015 18:12:13 +0000 (18:12 +0000)]
Add some additional GPT partition types
4 ChromeOS GPT types
2 Microsoft partition types
the new OpenBSD partition type
Approved by: marcel (mentor)
MFC after: 1 week
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3841
allanjude [Sun, 27 Dec 2015 17:33:59 +0000 (17:33 +0000)]
Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c
cperciva's libmd implementation is 5-30% faster
The same was done for SHA256 previously in r263218
cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation
Extend sbin/md5 to create sha384(1)
Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h}
Reviewed by: cperciva, des, delphij
Approved by: secteam, bapt (mentor)
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3929
allanjude [Sun, 27 Dec 2015 17:09:23 +0000 (17:09 +0000)]
Fix incorrect error message in geom map
If geom_map fails to find the end of a mapped partition based on a search, it would return the incorrect error message, stating it could not parse the START value
Reviewed by: adrian
Approved by: bapt (mentor)
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4187
dchagin [Sun, 27 Dec 2015 15:37:07 +0000 (15:37 +0000)]
Verify that tv_sec value specified in settimeofday() and clock_settime()
(CLOCK_REALTIME case) system calls is non negative.
This commit hides a kernel panic in atrtc_settime() as the clock_ts_to_ct()
does not properly convert negative tv_sec.
ps. in my opinion clock_ts_to_ct() should be rewritten to properly handle
negative tv_sec values.
Differential Revision: https://reviews.freebsd.org/D4714
Reviewed by: kib
MFC after: 1 week
kib [Sun, 27 Dec 2015 14:42:39 +0000 (14:42 +0000)]
Add missed relpbuf() for a smallfs page-in.
Reported by: Shawn Webb
Tested by: pho
Sponsored by: The FreeBSD Foundation
ed [Sun, 27 Dec 2015 07:50:11 +0000 (07:50 +0000)]
Replace implementation of hsearch() by one that scales.
Traditionally the hcreate() function creates a hash table that uses
chaining, using a fixed user-provided size. The problem with this
approach is that this often either wastes memory (table too big) or
yields bad performance (table too small). For applications it may not
always be easy to estimate the right hash table size. A fixed number
only increases performance compared to a linked list by a constant
factor.
This problem can be solved easily by dynamically resizing the hash
table. If the size of the hash table is at least doubled, this has no
negative on the running time complexity. If a dynamically sized hash
table is used, we can also switch to using open addressing instead of
chaining, which has the advantage of just using a single allocation for
the entire table, instead of allocating many small objects.
Finally, a problem with the existing implementation is that its
deterministic algorithm for hashing makes it possible to come up with
fixed patterns to trigger an excessive number of collisions. We can
easily solve this by using FNV-1a as a hashing algorithm in combination
with a randomly generated offset basis.
Measurements have shown that this implementation is about 20-25% faster
than the existing implementation (even if the existing implementation is
given an excessive number of buckets). Though it allocates more memory
through malloc() than the old implementation (between 4-8 pointers per
used entry instead of 3), process memory use is similar to the old
implementation as if the estimated size was underestimated by a factor
10. This is due to the fact that malloc() needs to perform less
bookkeeping.
Reviewed by: jilles, pfg
Obtained from: https://github.com/NuxiNL/cloudlibc
Differential Revision: https://reviews.freebsd.org/D4644
adrian [Sun, 27 Dec 2015 07:39:44 +0000 (07:39 +0000)]
Fix missing path conversion from the previous commit to shuffle mdio around.
It turns out the recent work to cut down the number of atheros kernels built
didnt include one with ARGE_MDIO defined..
mav [Sun, 27 Dec 2015 06:28:31 +0000 (06:28 +0000)]
Allocate separate scratch space for scanner purposes.
This space does not require DMA syncing. It reduces lock scope of the DMA
scratch space. It allows whole DMA scratch space to be used to I/O, so now
we can fetch up to ~1000 ports from SNS.
Due to the last fact, increase maximal number of ports from 256 to 1024.
mav [Sun, 27 Dec 2015 06:16:02 +0000 (06:16 +0000)]
Split DMA buffers for request, response and ATIO queues.
kib [Sun, 27 Dec 2015 01:14:42 +0000 (01:14 +0000)]
Typo.
jamie [Sat, 26 Dec 2015 23:01:34 +0000 (23:01 +0000)]
Let old-style (shell-based) jail configuration handle jail names that
contain characters not allowed in a shell variable (such as "-").
These will be replaced by an underscore in jail config variables,
e.g. for jail "foo-bar" you would set "jail_foo_bar_hostname".
This is separate from the current code that changes the jail names
if they contain "." or "/". It also doesn't apply to jails defined
in a jail.conf file.
PR: 191181
MFC after: 5 days
jilles [Sat, 26 Dec 2015 22:27:48 +0000 (22:27 +0000)]
sh: Add tests for #/##/%/%% on $* and $@.
Although POSIX leaves things like ${*#X} unspecified, it occasionally occurs
in practice. Add some tests that seem to work sensibly.
allanjude [Sat, 26 Dec 2015 19:48:36 +0000 (19:48 +0000)]
Fix includes in usr.sbin/fstyp/zfs.c
Approved by: bapt (mentor)
MFC after: 1 week
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4710
adrian [Sat, 26 Dec 2015 19:14:24 +0000 (19:14 +0000)]
Disable the firwmare licence check for rsu and urtwn.
The licence grant says something exactly the same as the atheros patent
grant, which is "As long as you use this firmware on our chips, everything
is totally okay." Now, I'm pretty sure if that we /have/ to have this,
we're going to have to have it for every other firmware for every other
device in the tree.
So, I'll flip this off in -HEAD for now so people stop asking about
why rsu/urtwn don't work out of the box, and I'll kick off a larger
discussion about this in the new year.
ian [Sat, 26 Dec 2015 18:21:32 +0000 (18:21 +0000)]
Enhance rc.d/netwait script to wait for late-attaching interfaces such as
USB NICs.
USB network hardware may not be enumerated and available when the rc.d
networking scripts run. Eventually the USB attachment completes and devd
events cause the network initialization to happen, but by then other rc.d
scripts have already failed, because services which depend on NETWORKING
(such as mountcritremote) may end up running before the network is actually
ready.
There is an existing netwait script, but because it is dependent on
NETWORKING it runs too late to prevent failure of some other rc
scripts. This change flips the order so that NETWORKING depends on netwait,
and netwait now depends on devd and routing (the former is needed to make
interfaces appear, and the latter is needed to run the ping tests in
netwait).
The netwait script used to be oriented primarily towards "as soon as any
host is reachable the network is fully functional", so you gave it a list of
IPs to try and you could optionally name an interface and it would wait for
carrier on that interface. That functionality still works the same, but now
you can provide a list of interfaces to wait for and it waits until each one
of them is available. The ping logic still completes as soon as the first IP
on the list responds.
These changes were submitted by Brenden Molloy <brendan+freebsd@bbqsrc.net>
in PR 205186, and lightly modified by me to allow a list of interfaces
instead of just one.
PR: 205186
Differential Revision: https://reviews.freebsd.org/D4608 (timeout w/o review)
bz [Sat, 26 Dec 2015 17:27:48 +0000 (17:27 +0000)]
Add missing #ifdef INET after r292674 to allow NOIP and NOINET kernels
to build.
adrian [Sat, 26 Dec 2015 17:22:02 +0000 (17:22 +0000)]
[mdio] Add MDIO support for "extended" registers as defined by IEEE 802.3 Clause 45.
IEEE 802.3 Clause 45 added backwards-compatible support for 2^16 PHY registers
through the addition of an additional device address frame.
Clause 45 addressing is used in 10Gbe PHYs, 802.3az EEE registers, etc. It may
make sense to provide a similar extension to the miibus interface, but I've
refrained from unilaterally doing so here.
Submitted by: Landon Fuller <landon@landonf.org>
Differential Revision: https://reviews.freebsd.org/D4607
kib [Sat, 26 Dec 2015 15:40:12 +0000 (15:40 +0000)]
Do not substitute interpeter if the brand interpreter path is
different from the interpreter path requested by the binary.
Before this change, it is impossible to activate non-default
interpreter for 32bit image on amd64, when /libexec/ld-elf32.so.1 file
exists.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
bapt [Sat, 26 Dec 2015 14:23:35 +0000 (14:23 +0000)]
procfs(5) is not required by ps(1) and w(1) anymore
Remove references of those tools in procfs(5)
mav [Sat, 26 Dec 2015 09:16:05 +0000 (09:16 +0000)]
Use single DMA tag for scratch areas of all virtual ports.
dchagin [Sat, 26 Dec 2015 09:09:49 +0000 (09:09 +0000)]
Return EINVAL in case of incorrect sigev_signo value specified instead of panicing.
dchagin [Sat, 26 Dec 2015 09:04:47 +0000 (09:04 +0000)]
Do not allow access to emuldata for non Linux processes.
Pointed out by: mjg@
Security: https://admbugs.freebsd.org/show_bug.cgi?id=679
mav [Sat, 26 Dec 2015 06:13:01 +0000 (06:13 +0000)]
Make port logins asynchronous, following r292739 logic.
This is even more important since it involves more network operations and
more prone to delays and timeouts.
np [Sat, 26 Dec 2015 06:05:21 +0000 (06:05 +0000)]
cxgbei: Hardware accelerated iSCSI target and initiator for TOE capable
cards supported by cxgbe(4).
On the host side this driver interfaces with the storage stack via the
ICL (iSCSI Common Layer) in the kernel. On the wire the traffic is
standard iSCSI (SCSI over TCP as per RFC 3720/7143 etc.) that
interoperates with all other standards compliant implementations. The
driver is layered on top of the TOE driver (t4_tom) and promotes
connections being handled by t4_tom to iSCSI ULP (Upper Layer Protocol)
mode. Hardware assistance in this mode includes:
- Full TCP processing.
- iSCSI PDU identification and recovery within the TCP stream.
- Header and/or data digest insertion (tx) and verification (rx).
- Zero copy (both tx and rx).
Man page will follow in a separate commit in a couple of weeks.
Relnotes: Yes
Sponsored by: Chelsio Communications
mav [Sat, 26 Dec 2015 04:26:32 +0000 (04:26 +0000)]
Make virtual ports control asynchronous.
Before this change virtual ports control IOCBs were executed synchronously
via Execute IOCB mailbox command. It required exclusive use of scratch
space of driver and mailbox registers of the hardware. Because of that
shared resources use this code could not really sleep, having to spin for
completion, blocking any other operation.
This change introduces new asynchronous design, sending the IOCBs directly
on request queue and gracefully waiting for their return on response queue.
Returned IOCBs are identified with unified handle space from r292725.
adrian [Sat, 26 Dec 2015 02:31:39 +0000 (02:31 +0000)]
[mdio] migrate mdiobus out of etherswitch and into a top-level device of its own.
The mdio driver interface is generally useful for devices that require
MDIO without the full MII bus interface. This lifts the driver/interface
out of etherswitch(4), and adds a mdio(4) man page.
Submitted by: Landon Fuller <landon@landonf.org>
Differential Revision: https://reviews.freebsd.org/D4606
np [Sat, 26 Dec 2015 00:26:02 +0000 (00:26 +0000)]
cxgbe(4): Updates to the base NIC driver and t4_tom to support the iSCSI
offload driver. These changes come from projects/cxl_iscsi.
dim [Fri, 25 Dec 2015 21:39:45 +0000 (21:39 +0000)]
Upgrade our copies of clang and llvm to 3.7.1 release. This is a
bugfix-only release, with no new features.
Please note that from 3.5.0 onwards, clang and llvm require C++11
support to build; see UPDATING for more information.
tuexen [Fri, 25 Dec 2015 18:11:40 +0000 (18:11 +0000)]
Don't implicitly terminate a user message when moving it to the
send_queue and the socket is closed. This results in strange
race conditions for the application.
While there, remove a stray character.
MFC after: 3 days
sjg [Fri, 25 Dec 2015 16:19:21 +0000 (16:19 +0000)]
Merge bmake-
20151220
Fixed clearing suffixes impact on null suffix
kevlo [Fri, 25 Dec 2015 14:51:36 +0000 (14:51 +0000)]
Fix typo (s/harware/hardware/)
dim [Fri, 25 Dec 2015 14:26:58 +0000 (14:26 +0000)]
Import clang 3.7.1 release (r255217).
dim [Fri, 25 Dec 2015 14:25:49 +0000 (14:25 +0000)]
Import llvm 3.7.1 release (r255217).
mav [Fri, 25 Dec 2015 13:03:18 +0000 (13:03 +0000)]
Unify handles allocation for initiator and target IOCBs.
I am not sure why this was split long ago, but I see no reason for it.
At this point this unification just slightly reduces memory usage, but
as next step I plan to reuse shared handle space for other IOCB types.
cperciva [Fri, 25 Dec 2015 11:29:18 +0000 (11:29 +0000)]
Make libxnet.so a symlink to libc.so. This makes `-lxnet` a no-op, as
POSIX requires for the c99 compiler.
(In fact, our c99(1) already ignores -lxnet; but our make(1) doesn't set
${CC} correctly, and our cc(1) treats xnet like any other library.)
Reviewed by: kib
ume [Fri, 25 Dec 2015 10:49:40 +0000 (10:49 +0000)]
Remove _gethostbynisname() and _gethostbynisaddr(). These functions
used to be called from getipnodebyname().
MFC after: 1 week
cperciva [Fri, 25 Dec 2015 10:08:42 +0000 (10:08 +0000)]
Document that make's .POSIX: handling is broken. In fact, it has been
broken ever since it was added in November 1996.
mav [Fri, 25 Dec 2015 03:44:29 +0000 (03:44 +0000)]
Clear virtual port's port database when disabling it.
Previously it was done only on full chip reinit, that caused old ports
resurrect in case of virtual port reenabling.