]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agopath.h is not needed here.
delphij [Sat, 16 May 2015 08:12:00 +0000 (08:12 +0000)]
path.h is not needed here.

9 years agoMake these all work with the new way of doing privatelib.
adrian [Sat, 16 May 2015 06:18:39 +0000 (06:18 +0000)]
Make these all work with the new way of doing privatelib.

Without these CFLAGS settings a cross-compile won't find the headers
anywhere.

Tested:

* mips (32, big endian) cross-build w/ LOCAL_DIRS including these
  tools.

9 years agossh-copy-id: Add missing line continuation
eadler [Sat, 16 May 2015 06:15:49 +0000 (06:15 +0000)]
ssh-copy-id: Add missing line continuation

PR: 194301
Reported by: pkubaj@riseup.net
Patch by: Ross Kilgariff <rosskilgariff@gmail.com>

9 years agosfxge: add local variable with changed capabilities mask
arybchik [Sat, 16 May 2015 06:04:53 +0000 (06:04 +0000)]
sfxge: add local variable with changed capabilities mask

It is required for the next patch which adds dependency of TSO
capabilities from Tx checksum offloads.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2553

9 years agoVarious iwn(4) fixes.
adrian [Sat, 16 May 2015 05:59:25 +0000 (05:59 +0000)]
Various iwn(4) fixes.

* simplify channel logic for determining RF gain setting in scan setup
* don't set TX timer on error
* free node references for unsent frames on device stop
* set maxfrags to IWN_MAX_SCATTER-1 (first segment is used by TX command)
* add missing IWN_UNLOCK() from interrupt path when the hardware
  disappears.
* pass control frames to host
* nitems() instead of local macro

Tested:

* Intel 5100, STA mode

PR: kern/196264
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agosfxge: move mbuf free to sfxge_if_transmit()
arybchik [Sat, 16 May 2015 05:43:20 +0000 (05:43 +0000)]
sfxge: move mbuf free to sfxge_if_transmit()

It is a preparation to the next patch which will service packet queue even
if packet addtion fails.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2552

9 years agosfxge: get rid of locked variable in sfxge_tx_packet_add()
arybchik [Sat, 16 May 2015 05:37:47 +0000 (05:37 +0000)]
sfxge: get rid of locked variable in sfxge_tx_packet_add()

Now each branch has one and only one possible TxQ lock state.
It simplifies understanding of the code.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2551

9 years agosfxge: support Rx checksum offloads disabling
arybchik [Sat, 16 May 2015 05:36:40 +0000 (05:36 +0000)]
sfxge: support Rx checksum offloads disabling

We can't disable it in HW, but we can ignore result.
Discard Rx descriptor checksum flags if Rx checksum offload is off.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2544

9 years agoProvide reallocarray() in -legacy, if needed, to allow building head on
dim [Fri, 15 May 2015 22:19:35 +0000 (22:19 +0000)]
Provide reallocarray() in -legacy, if needed, to allow building head on
previous releases.

Also add a stdlib.h wrapper, which declares the function, otherwise the
compiler may assume it returns int, which can cause segfaults on LP64
architectures.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D2558

9 years agoUpdate the comments to match what the code ended up becoming.
adrian [Fri, 15 May 2015 21:33:19 +0000 (21:33 +0000)]
Update the comments to match what the code ended up becoming.

-1 is now "no locality information available".

Sponsored by: Norse Corp, Inc.

9 years agoBreak apart the gnu_inline attribute and use "artificial" if available.
pfg [Fri, 15 May 2015 20:53:43 +0000 (20:53 +0000)]
Break apart the gnu_inline attribute and use "artificial" if available.

Missing #endif (in wrong place)

Pointed hat: me

9 years agoBreak apart the gnu_inline attribute and use "artificial" if available.
pfg [Fri, 15 May 2015 20:47:25 +0000 (20:47 +0000)]
Break apart the gnu_inline attribute and use "artificial" if available.

Missing #endif

Reported by: jhb, jenkins
Pointed hat: me

9 years agoMake use of GCC alloc_align attribute
pfg [Fri, 15 May 2015 20:43:37 +0000 (20:43 +0000)]
Make use of GCC alloc_align attribute

This lets the compiler know about the alignment of pointers returned
by aligned_alloc(3), posix_memalign(3). and contigmalloc(9)

Currently this is only supported in recent gcc but we are ready to
use it if clang implements it.

Relnotes: yes

9 years agoBreak apart the gnu_inline attribute and use "artificial" if available.
pfg [Fri, 15 May 2015 19:51:05 +0000 (19:51 +0000)]
Break apart the gnu_inline attribute and use "artificial" if available.

In general it is bad practice to use the gnu_inline attribute but we
will need it in special cases like FORTIFY_SOURCE. In this specific
case it is also useful to have the "artificial" attribute:

"This attribute is useful for small inline wrappers which if possible
should appear during debugging as a unit, depending on the debug info
format it will either mean marking the function as artificial or using the
caller location for all instructions within the inlined body."

This attribute appears to be currently implemented only in GCC. Use it
only in conjuntion with gnu_inline in the cases where it is available,
which is similar in spirit in how it's used in glibc.

9 years agoCorrect location for libntpevent.a.
cy [Fri, 15 May 2015 19:37:17 +0000 (19:37 +0000)]
Correct location for libntpevent.a.

9 years agoIntroduce support for the Alpine PoC from Annapurna Labs
zbb [Fri, 15 May 2015 18:25:48 +0000 (18:25 +0000)]
Introduce support for the Alpine PoC from Annapurna Labs

The Alpine Platform-On-Chip offers multicore processing
(quad ARM Cortex-A15), 1/10Gb Ethernet, SATA 3, PCI-E 3,
DMA engines, Virtualization, Advanced Power Management and other.

This code drop involves basic platform support including:
SMP, IRQs, SerDes, SATA. As of now it is missing the PCIe support.
Part of the functionality is provided by the low-level code (HAL)
delivered by the chip vendor (Annapurna Labs) and is a subject to
change in the future (is planned to be moved to sys/contrib directory).

The review log for this commit is available here:
https://reviews.freebsd.org/D2340

Reviewed by:    andrew, ian, imp
Obtained from:  Semihalf
Sponsored by:   Annapurna Labs

9 years agoAdd assertions that the addresses passed to tlb maintenance are page-aligned.
ian [Fri, 15 May 2015 18:10:00 +0000 (18:10 +0000)]
Add assertions that the addresses passed to tlb maintenance are page-aligned.

Perform cache writebacks and invalidations in the correct (inner to outer
or vice versa) order, and add comments that explain that.

Consistantly use 'va' as the variable name for virtual addresses.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoRetrieve the cache parms in the proper arch-specific way.
ian [Fri, 15 May 2015 18:07:58 +0000 (18:07 +0000)]
Retrieve the cache parms in the proper arch-specific way.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoSummary: Remove spurious, extra, next header comments.
gnn [Fri, 15 May 2015 18:04:49 +0000 (18:04 +0000)]
Summary: Remove spurious, extra, next header comments.
Correct the name of the pad length field.

9 years agoReplace a CONSTCOND for a void value as a replacement for __unreachable builtin
pfg [Fri, 15 May 2015 17:51:03 +0000 (17:51 +0000)]
Replace a CONSTCOND for a void value as a replacement for __unreachable builtin

This only applies if we are not using clang or gcc but it lets us use the
__unreachable() buitin in expressions.

Suggested by: tijl

9 years agoAllow MANWIDTH to work with mandoc(1)
bapt [Fri, 15 May 2015 15:56:28 +0000 (15:56 +0000)]
Allow MANWIDTH to work with mandoc(1)

Reported by: bdrewery

9 years agoWhen a netmap process terminates without the full set of buffers it
pkelsey [Fri, 15 May 2015 15:36:57 +0000 (15:36 +0000)]
When a netmap process terminates without the full set of buffers it
was granted via rings and ni_bufs_list_head represented in those rings
and lists (e.g., via SIGKILL), those buffers are no longer available
for subsequent users for the lifetime of the system. To mitigate this
resource leak, reset the allocator state when the last ref to that
allocator is released.

Note that this only recovers leaked resources for an allocator when
there are no longer any users of that allocator, so there remain
circumstances in which leaked allocator resources may not ever be
recovered - consider a set of multiple netmap processes that are all
using the same allocator (say, the global allocator) where members of
that set may be killed and restarted over time but at any given point
there is one member of that set running.

Based on intial work by adrian@.

Reviewed by: Giuseppe Lettieri (g.lettieri@iet.unipi.it), luigi
Approved by: jmallett (mentor)
MFC after: 1 week
Sponsored by: Norse Corp, Inc.

9 years agoBuild libgomp only if we're also building base system GCC
emaste [Fri, 15 May 2015 14:22:33 +0000 (14:22 +0000)]
Build libgomp only if we're also building base system GCC

Clang's OpenMP support will emit Intel OpenMP API library calls,
and will therefore require libiomp (or whatever name is settled on).
An up-to-date version of libgomp is included in ports or pkg GCC.
Thus, there is no reason to build base libgomp without base system GCC.

PR: 199979 (exp-run)
Reviewed by: pfg
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2459

9 years agoProvide the number of interrupt resources added to the list
br [Fri, 15 May 2015 13:55:18 +0000 (13:55 +0000)]
Provide the number of interrupt resources added to the list
by using extra argument, so caller will know that.

9 years agoPreviously, cv_waiters was only updated by cv_signal or cv_wait. If a
jhb [Fri, 15 May 2015 13:50:37 +0000 (13:50 +0000)]
Previously, cv_waiters was only updated by cv_signal or cv_wait. If a
thread awakened due to a time out, then cv_waiters was not decremented.
If INT_MAX threads timed out on a cv without an intervening cv_broadcast,
then cv_waiters could overflow. To fix this, have each sleeping thread
decrement cv_waiters when it resumes.

Note that previously cv_waiters was protected by the sleepq chain lock.
However, that lock is not held when threads resume from sleep. In
addition, the interlock is also not always reacquired after resuming
(cv_wait_unlock), nor is it always held by callers of cv_signal() or
cv_broadcast(). Instead, use atomic ops to update cv_waiters. Since
the sleepq chain lock is still held on every increment, it should
still be safe to compare cv_waiters against zero while holding the
lock in the wakeup routines as the only way the race should be lost
would result in extra calls to sleepq_signal() or sleepq_broadcast().

Differential Revision: https://reviews.freebsd.org/D2427
Reviewed by: benno
Reported by: benno (wrap of cv_waiters in the field)
MFC after: 2 weeks

9 years agoClose some potential races around socket start/close.
mav [Fri, 15 May 2015 13:36:50 +0000 (13:36 +0000)]
Close some potential races around socket start/close.

There are some reports about panics on ic->ic_socket NULL derefence.
This kind of races is the only way I can imagine it to happen.

MFC after: 2 weeks

9 years agoBump date for iic.4
jah [Fri, 15 May 2015 13:04:14 +0000 (13:04 +0000)]
Bump date for iic.4

9 years agoSimplify i2c reader: we don't need per-NIC handler anymore.
melifaro [Fri, 15 May 2015 12:32:17 +0000 (12:32 +0000)]
Simplify i2c reader: we don't need per-NIC handler anymore.
Make code use read_i2c() function instead of callback.
Simplify&document struct i2c_info.
Consistently use uint8_t to read from i2c.

9 years agoUpdate iic(4) man page to reflect recent changes
jah [Fri, 15 May 2015 12:28:17 +0000 (12:28 +0000)]
Update iic(4) man page to reflect recent changes

Differential Revision: https://reviews.freebsd.org/D2461
Reviewed by: wblock
Approved by: kib (mentor)

9 years agoAdd an ability accept encapsulated packets from different sources by one
ae [Fri, 15 May 2015 12:19:45 +0000 (12:19 +0000)]
Add an ability accept encapsulated packets from different sources by one
gif(4) interface. Add new option "ignore_source" for gif(4) interface.
When it is enabled, gif's encapcheck function requires match only for
packet's destination address.

Differential Revision: https://reviews.freebsd.org/D2004
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC

9 years agoSome third-party malloc(3) implementations use pthread_setspecific(3)
kib [Fri, 15 May 2015 08:40:17 +0000 (08:40 +0000)]
Some third-party malloc(3) implementations use pthread_setspecific(3)
to handle per-thread information.  Since our pthread_setspecific()
implementation calls calloc(3) to allocate per-thread specific data
storage, things get complicated.

Switch the allocator to use bare mmap(2).  There is some loss of the
allocated page, since e.g. on amd64, PTHREAD_KEYS_MAX * sizeof(struct
pthread_specific_elem) is 3K (it actually spans whole page due to
padding), but I believe it is more acceptable than additional code for
specialized allocator().

The alternatives would either to make the specific data array be part of
the struct thread, or use internal bindings to call the libc malloc,
avoiding interposing.

Also do the style pass over the thr_spec.c, esp. simplify the
conditionals nesting by returning early when an error detected.
Remove trivial comments.

Found by: yuri@rawbw.com
PR: 200138
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoOn amd64, make proc0 pmap initialization slightly more correct. In
kib [Fri, 15 May 2015 08:30:29 +0000 (08:30 +0000)]
On amd64, make proc0 pmap initialization slightly more correct.  In
particular, switch to the proc0 pmap to have expected %cr3 and PCID
for the thread0 during initialization, and the up to date pm_active
mask.

pmap_pinit0() should be done after proc0->p_vmspace is assigned so
that the amd64 pmap_activate() find the correct curproc pmap.

Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

9 years agoImplement the support for PCID in UP kernels.
kib [Fri, 15 May 2015 07:57:47 +0000 (07:57 +0000)]
Implement the support for PCID in UP kernels.

Requested by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

9 years agoRight now, the process' p_boundary_count counter is decremented by the
kib [Fri, 15 May 2015 07:54:31 +0000 (07:54 +0000)]
Right now, the process' p_boundary_count counter is decremented by the
suspended thread itself, on the return path from
thread_suspend_check().  A consequence is that return from
thread_single_end(SINGLE_BOUNDARY) may leave p_boundary_count
non-zero, it might be even equal to the threads count.

Now, assume that we have two threads in the process, both calling
execve(2).  Suppose that the first thread won the race to be the
suspension thread, and that afterward its exec failed for any reason.
After the first thread did thread_single_end(SINGLE_BOUNDARY), second
thread becomes the process suspension thread and checks
p_boundary_count.  The non-zero value of the count allows the
suspension loop to finish without actually suspending some threads.
In other words, we enter exec code with some threads not suspended.

Fix this by decrementing p_boundary_count in the
thread_single_end()->thread_unsuspend_one() during marking the thread
as runnable.  This way, a return from thread_single_end() guarantees
that the counter is cleared.  We do not care whether the unsuspended
thread has a chance to run.

Add some asserts to ensure the state of the process when single
boundary suspension is lifted.  Also make thread_unuspend_one()
static.

In collaboration with: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agosfxge: split sfxge_tx_qdpl_put() into *_locked() and *_unlocked()
arybchik [Fri, 15 May 2015 06:50:59 +0000 (06:50 +0000)]
sfxge: split sfxge_tx_qdpl_put() into *_locked() and *_unlocked()

It simplifies understanding of the sfxge_tx_packet_add() logic and
avoids passing of 'locked' to called function.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2547

9 years agosfxge: do not change CSUM_TSO when IFCAP_TSOx is changed
arybchik [Fri, 15 May 2015 06:49:43 +0000 (06:49 +0000)]
sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed

It is simply not required since the kernel checks corresponding
IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads.
Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits
are set in IPv4 and IPv6 mbufs.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2546

9 years agosfxge: LRO may be done only if checksums are OK
arybchik [Fri, 15 May 2015 06:48:36 +0000 (06:48 +0000)]
sfxge: LRO may be done only if checksums are OK

Also it is cheaper to check Rx descriptor flags than TCP protocol in IP
header.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2542

9 years agoFree vsi->queues after use.
araujo [Fri, 15 May 2015 06:11:47 +0000 (06:11 +0000)]
Free vsi->queues after use.

Differential Revision: D2344
Reviewed by: erj

9 years agoIt appears to be armv7_sleep is a duplication of armv7_cpu_sleep.
ganbold [Fri, 15 May 2015 00:39:51 +0000 (00:39 +0000)]
It appears to be armv7_sleep is a duplication of armv7_cpu_sleep.
For consistency with the naming conventions used by the other
implementations kill armv7_sleep and keep armv7_cpu_sleep.

Differential Revision: https://reviews.freebsd.org/D2537
Submitted by: John Wehle
Reviewed by: ian@, andrew@

9 years agoMFV r282927,r282928,r282930 (kientzle):
delphij [Thu, 14 May 2015 22:35:26 +0000 (22:35 +0000)]
MFV r282927,r282928,r282930 (kientzle):

Don't segfault when reading malformed cpio archives.

MFC after: 3 days

9 years agoBump the size of the blockif scatter-gather list to 67.
grehan [Thu, 14 May 2015 21:08:48 +0000 (21:08 +0000)]
Bump the size of the blockif scatter-gather list to 67.

The Windows virtio driver ignores the advertized seg_max
field and assumes the host can accept up to 67 segments
in indirect descriptors, triggering an assert in the bhyve
process.

No objection from: mav
Reviewed by: neel
Reported and tested by: Leon Dang (ldang@nahannisys.com)
MFC after: 2 weeks

9 years agoAdd nvme and nvd drivers to GENERIC for amd64 and i386.
jimharris [Thu, 14 May 2015 20:19:22 +0000 (20:19 +0000)]
Add nvme and nvd drivers to GENERIC for amd64 and i386.

MFC after: 3 days
Sponsored by: Intel

9 years agovtfontcvt: Allow 6 digits in verbose output
emaste [Thu, 14 May 2015 20:17:53 +0000 (20:17 +0000)]
vtfontcvt: Allow 6 digits in verbose output

Some fonts (e.g. GNU Unifont) have more than 100,000 (half-)glyphs.

Sponsored by: The FreeBSD Foundation

9 years agoUpdate to ELF Tool Chain r3197
emaste [Thu, 14 May 2015 19:48:15 +0000 (19:48 +0000)]
Update to ELF Tool Chain r3197

Highlights:
 - Fix man page markup, whitespace, and typos
 - Fix sh_info of SHT_GROUP section to point to the correct string
 - Improve validation in readelf and elfcopy/strip
 - Handle DWARF 4's DW_AT_high_pc in addr2line

Sponsored by: The FreeBSD Foundation

9 years agoAdd ELF machine EM_IAMCU, 32-bit Intel MCU
emaste [Thu, 14 May 2015 18:29:05 +0000 (18:29 +0000)]
Add ELF machine EM_IAMCU, 32-bit Intel MCU

It is e_machine 6, which was previously reserved for 486.

9 years agokbdmap(1): Correct menu title: keyboards have a layout, not a language
emaste [Thu, 14 May 2015 18:09:56 +0000 (18:09 +0000)]
kbdmap(1): Correct menu title: keyboards have a layout, not a language

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2545

9 years agolibyaml.so.1 are actually libraries and should only be removed during
bapt [Thu, 14 May 2015 17:49:01 +0000 (17:49 +0000)]
libyaml.so.1 are actually libraries and should only be removed during
make delete-old-libs

Reported by: rpaulo

9 years agoObsoleteFiles: add lib32 entries for libyaml missed in r262407.
rpaulo [Thu, 14 May 2015 17:37:10 +0000 (17:37 +0000)]
ObsoleteFiles: add lib32 entries for libyaml missed in r262407.

Pointy hat: bapt

9 years agoAdd fabs() to arm64 libc
emaste [Thu, 14 May 2015 17:12:45 +0000 (17:12 +0000)]
Add fabs() to arm64 libc

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2532

9 years agonetfront: wait for backend to connect before sending ARP
royger [Thu, 14 May 2015 16:29:11 +0000 (16:29 +0000)]
netfront: wait for backend to connect before sending ARP

Netfront has to wait for the backend to switch to state XenbusStateConnected
before sending the ARP request, or else the backend might not be connected
and thus the packet will be lost.

Sponsored by: Citrix Systems R&D
MFC after: 1 week

9 years agoAdd new __unreachable() builtin
pfg [Thu, 14 May 2015 15:49:48 +0000 (15:49 +0000)]
Add new __unreachable() builtin

This is one of the few post gcc4.2 builtins that has been implemented by
clang:

__builtin_unreachable is used to indicate that a specific point in the
program cannot be reached, even if the compiler might otherwise think it
can. This is useful to improve optimization and eliminates certain
warnings.

Hinted by: NetBSD
Differential Revision: https://reviews.freebsd.org/D2536

9 years agoAllow sizeof(cpuset_t) to be queried in capability mode.
jonathan [Thu, 14 May 2015 15:14:03 +0000 (15:14 +0000)]
Allow sizeof(cpuset_t) to be queried in capability mode.

This allows functions that retrieve and inspect pthread_attr_t objects to
work correctly: querying the cpuset_t size is part of querying CPU
affinity information, which is part of creating a complete pthread_attr_t.

Approved by: rwatson (mentor)
Reviewed by: pjd
Sponsored by: NSERC

9 years agoRestore 'he' language code for Hebrew kbdmap(1) menu title
emaste [Thu, 14 May 2015 14:40:01 +0000 (14:40 +0000)]
Restore 'he' language code for Hebrew kbdmap(1) menu title

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agokbdmap(1): increase description size to 256 bytes
emaste [Thu, 14 May 2015 14:20:50 +0000 (14:20 +0000)]
kbdmap(1): increase description size to 256 bytes

After conversion to UTF-8 some INDEX.keymaps descriptions are longer
than the previous limit of 64 bytes.

PR: 193656
Sponsored by: The FreeBSD Foundation

9 years agosfxge: advertise IPv6 Rx and Tx checksum offload support
arybchik [Thu, 14 May 2015 14:16:09 +0000 (14:16 +0000)]
sfxge: advertise IPv6 Rx and Tx checksum offload support

Tx checksum offload may be enabled/disabled.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2543

9 years agoCorrect language code -- "Danish" is English
emaste [Thu, 14 May 2015 14:07:44 +0000 (14:07 +0000)]
Correct language code -- "Danish" is English

The menu entry "Danish ISO-8859-1 (macbook)" was first added to the
syscons(4) INDEX.keymaps in r241851 with no language code, and then in
r256367 incorrectly tagged with "da".  It is a Danish keyboard map, but
the description is in English and therefore must be "en".

This error subsequently propagated into the vt(4) INDEX.keymaps.

PR: 146793, 193656
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agoBuild GENERIC with RACCT/RCTL support by default. Note that it still
trasz [Thu, 14 May 2015 14:03:55 +0000 (14:03 +0000)]
Build GENERIC with RACCT/RCTL support by default.  Note that it still
needs to be enabled by adding "kern.racct.enable=1" to /boot/loader.conf.

Differential Revision: https://reviews.freebsd.org/D2407
Reviewed by: emaste@, wblock@
MFC after: 1 month
Relnotes: yes
Sponsored by: The FreeBSD Foundation

9 years agosfxge: IPv4 Tx checksum offload may be disabled in fact
arybchik [Thu, 14 May 2015 13:49:00 +0000 (13:49 +0000)]
sfxge: IPv4 Tx checksum offload may be disabled in fact

Split IFCAP_HWCSUM to IFCAP_RXCSUM and IFCAP_TXCSUM to highlight Tx and Rx.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2541

9 years agosfxge: add local variable with Rx descriptor flags
arybchik [Thu, 14 May 2015 13:28:29 +0000 (13:28 +0000)]
sfxge: add local variable with Rx descriptor flags

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

9 years agoCorrect UTF-8 encoding in Británico
emaste [Thu, 14 May 2015 13:27:24 +0000 (13:27 +0000)]
Correct UTF-8 encoding in Británico

One á was ISO 8859-1 0xE1 instead of UTF-8 0xC3 0xA1.

9 years agosfxge: add missing const qualifier to sfxge_link_mode
arybchik [Thu, 14 May 2015 12:59:17 +0000 (12:59 +0000)]
sfxge: add missing const qualifier to sfxge_link_mode

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

9 years agoRemove OUTPUT_FORMAT from theARM EFI linker script, it breaks building
andrew [Thu, 14 May 2015 12:43:39 +0000 (12:43 +0000)]
Remove OUTPUT_FORMAT from theARM EFI linker script, it breaks building
for big-endian arm.

9 years agowhois: add an option to query the PeeringDB
fanf [Thu, 14 May 2015 11:37:36 +0000 (11:37 +0000)]
whois: add an option to query the PeeringDB

9 years agoUpdate whois(1) synopsis.
fanf [Thu, 14 May 2015 11:33:31 +0000 (11:33 +0000)]
Update whois(1) synopsis.

9 years agoBump whois(1) date.
fanf [Thu, 14 May 2015 11:25:18 +0000 (11:25 +0000)]
Bump whois(1) date.

(Thanks to bz@ for the reminder!)

9 years agowhois: alphabetize whois server list
fanf [Thu, 14 May 2015 10:33:51 +0000 (10:33 +0000)]
whois: alphabetize whois server list

9 years agowhois: do not clobber command-line flags when tweaking O_NONBLOCK
fanf [Thu, 14 May 2015 10:33:33 +0000 (10:33 +0000)]
whois: do not clobber command-line flags when tweaking O_NONBLOCK

This can make whois fail to follow referrals when it should.
The bug was introduced in r281959.

9 years agowhois: try whois.nic.TLD if TLD.whois-servers.net does not exist
fanf [Thu, 14 May 2015 10:33:01 +0000 (10:33 +0000)]
whois: try whois.nic.TLD if TLD.whois-servers.net does not exist

Based on an idea from OpenBSD.

9 years agowhois: check WHOIS_SERVER as well as RA_SERVER environment variables
fanf [Thu, 14 May 2015 10:32:35 +0000 (10:32 +0000)]
whois: check WHOIS_SERVER as well as RA_SERVER environment variables

WHOIS_SERVER is used by Debian's whois client.

9 years agowhois: code cleanup
fanf [Thu, 14 May 2015 10:32:05 +0000 (10:32 +0000)]
whois: code cleanup

Remove deprecated options.

Use pedantically correct types.

9 years agowhois: special case certain query suffixes
fanf [Thu, 14 May 2015 10:31:37 +0000 (10:31 +0000)]
whois: special case certain query suffixes

This extends the existing support for -NORID handles
to include -NICAT, -ARIN, and -RIPE handles.

The suffix machinery is also used to work around a problem with
lack of referrals from the Nominet server for .uk: names under
.ac.uk need to be queried directly at JANET's whois server.

9 years agoClean up whois manual.
fanf [Thu, 14 May 2015 10:30:37 +0000 (10:30 +0000)]
Clean up whois manual.

Document the RA_SERVER environment variable.

Remove the obsolete -R option, and discourage people from trying
to use the Network Solutions server.

Describe the default behaviour in the DESCRIPTION section,
not buried in the options.

9 years agoDo not promote large async writes to sync.
mav [Thu, 14 May 2015 10:04:42 +0000 (10:04 +0000)]
Do not promote large async writes to sync.

Present implementation of large sync writes is too strict and so can be
quite slow.  Instead of doing that, execute large async write in chunks,
syncing each chunk separately.

It would be good to fix large sync writes too, but I leave it to somebody
with more skills in this area.

Reviewed by: rmacklem
MFC after: 1 week

9 years agoAdd copyright info missing from r282205
smh [Thu, 14 May 2015 08:13:01 +0000 (08:13 +0000)]
Add copyright info missing from r282205

Add the copyright info missing from ZoL origin version.

MFC after: 2 days
Sponsored by: Multiplay

9 years agoHandle lib32 libraries which should have been removed in 20140807
bapt [Wed, 13 May 2015 21:38:39 +0000 (21:38 +0000)]
Handle lib32 libraries which should have been removed in 20140807

Reported by: Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no>

9 years agoFix typo
bapt [Wed, 13 May 2015 20:50:58 +0000 (20:50 +0000)]
Fix typo

Reported by: Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no>

9 years agoAdd support for ARM GICv3 interrupt controller used in some ARM64 chips
zbb [Wed, 13 May 2015 18:57:03 +0000 (18:57 +0000)]
Add support for ARM GICv3 interrupt controller used in some ARM64 chips

GICv3 allows to distribute interrupts to more than 8 cores served by
the previous GIC revisions. GICv3 introduces additional logic in form
of Re-Distributors associated with particular CPUs to determine
the highest priority interrupts and manage PPIs and LPIs
(Locality-specific Peripheral Interrupts). Interrupts routing is
based on CPUs' affinity numbers. CPU interface was changed to be
accessible via CPU System Registers and this is the preferred
(and supported) method in this driver.

Obtained from: Semihalf
Reviewed by:   andrew, emaste, ian, imp
Sponsored by:  The FreeBSD Foundation

9 years agoFix pmcstat symbol resolution for userland processes.
stas [Wed, 13 May 2015 18:52:18 +0000 (18:52 +0000)]
Fix pmcstat symbol resolution for userland processes.

When examining existing processes pmcstat fails to
correctly determine the locations of executable sections
of the process due to a miscalculated virtual load address.
This does not affect the newly launched processes as the
same value passed as a "start address" to the pmcstat_image_link()
thus nullifying the effect of it.  The issue manifests itself
in processes not being reported in the pmcstat(8) output and
"dubious frames" being reported.

Fix it for now by ignoring all the sections except the executable
one.  This won't fix the issue for objects with multiple
executable sections but helps in majority of real world usecases.
The real solution would be to modify the MAP-IN event to include
the appropriate load address so pmcstat(8) won't have to manually
parse object files to try to determine it.

PR: 198147, 198148
Reviewed by: jhb, rpaulo
MFC after: 2 weeks

9 years agoSet the subvendor field in config space to the vendor ID.
grehan [Wed, 13 May 2015 17:38:07 +0000 (17:38 +0000)]
Set the subvendor field in config space to the vendor ID.
This is required by the Windows virtio drivers to correctly
match a device.

Submitted by: Leon Dang (ldang@nahannisys.com)
MFC after: 2 weeks

9 years agoUse the correct node wen reading the compatible property.
andrew [Wed, 13 May 2015 16:02:55 +0000 (16:02 +0000)]
Use the correct node wen reading the compatible property.

9 years agoAdjust visibility macros.
pfg [Wed, 13 May 2015 15:26:44 +0000 (15:26 +0000)]
Adjust visibility macros.

The GCC visibility attributes were introduced in GCC 4.0.
Apparently the "protected" attribute was introduced only
until GCC 4.2, but we are not currently using it.

MFC after: 1 week

9 years agoDocument RCTL events in devd.conf(5).
trasz [Wed, 13 May 2015 12:02:51 +0000 (12:02 +0000)]
Document RCTL events in devd.conf(5).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agobugfix (only affecting the "lookup" option in the userspace version of ipfw):
luigi [Wed, 13 May 2015 11:53:25 +0000 (11:53 +0000)]
bugfix (only affecting the "lookup" option in the userspace version of ipfw):

the conditional block should not include the 'else' otherwise
the code does a 'break;' without completing the check

9 years agoDelete cpu_do_powersave which is set but never used/tested
ganbold [Wed, 13 May 2015 05:46:04 +0000 (05:46 +0000)]
Delete cpu_do_powersave which is set but never used/tested
serving no useful purpose.

Differential Revision: https://reviews.freebsd.org/D2516
Submitted by: John Wehle
Reviewed by: ian@

9 years agoFix the vmstat -i output on ARM.
loos [Wed, 13 May 2015 02:25:54 +0000 (02:25 +0000)]
Fix the vmstat -i output on ARM.

The consumers of hw.intrnames expect a NULL byte at end of the string
containing the interrupt names.

On ARM all the interrupt name slots are initialized and this leave no room
for the terminating NULL byte, which makes vmstat read beyond the end of
intrnames.

PR: 199891
Tested on: RPi 2 and BeagleBone Black

9 years agoFix the SMP initialization on RPi 2 (BCM2836).
loos [Wed, 13 May 2015 01:48:47 +0000 (01:48 +0000)]
Fix the SMP initialization on RPi 2 (BCM2836).

Invalidate the CPU cache before start the others CPUs.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoAdd support for the power button on BeagleBone Black.
loos [Wed, 13 May 2015 01:10:28 +0000 (01:10 +0000)]
Add support for the power button on BeagleBone Black.

Shutdown and turn off the board when the power button is pressed.

Submitted by: Michal Meloun <meloun@miracle.cz>
Relnotes: yes

9 years agoRemove ptei->value check from ipfw_link_table_values():
melifaro [Tue, 12 May 2015 20:42:42 +0000 (20:42 +0000)]
Remove ptei->value check from ipfw_link_table_values():
  even if there was non-zero number of restarts, we would unref/clear
  all value references and start ipfw_link_table_values() once again
  with (mostly) cleared "tei" buffer.
 Additionally, ptei->ptv stores only to-be-added values, not existing ones.
 This is a forgotten piece of previous value refconting implementation,
  and now it is simply incorrect.

9 years agocrunchide: remove EOL whitespace
emaste [Tue, 12 May 2015 20:04:17 +0000 (20:04 +0000)]
crunchide: remove EOL whitespace

9 years agoRemove redundant csu subdir logic
emaste [Tue, 12 May 2015 17:53:22 +0000 (17:53 +0000)]
Remove redundant csu subdir logic

The appropriate subdirectories are handled by lib/csu/Makefile. There's
no need to duplicate this logic in Makefile.inc1 and lib/Makefile.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2523

9 years agoDo not check sequence number for QoS Null frames; set it for generated QoS Null
adrian [Tue, 12 May 2015 16:55:50 +0000 (16:55 +0000)]
Do not check sequence number for QoS Null frames; set it for generated QoS Null
frames to 0

From IEEE Std. 802.11-2012, 8.3.2.1 "Data frame format", p. 415 (513):
"The Sequence Control field for QoS (+)Null frames is ignored by the receiver
upon reception."

At this moment, any <mode>_input() function interprets them as regular QoS data
frames with TID = 0. As a result, stations, that use another TX sequence for
QoS Null frames (e.g. wpi(4), where (QoS) Null frames are generated by the
firmware), may experience significant packet loss with any other NIC in hostap
mode.

Tested:

* wpi(4) (author)
* iwn(4) - Intel 5100, STA mode (me)

PR: kern/200128
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoApply proper locking when iterating the multicast addresses and add a
hselasky [Tue, 12 May 2015 11:52:34 +0000 (11:52 +0000)]
Apply proper locking when iterating the multicast addresses and add a
missing check for NULL from a non-blocking "kzalloc()" function call.

MFC after: 1 week
Sponsored by: Mellanox Technologies
Found by: glebius @

9 years agoTeach bits of libc about Thumb. This adds the if-then instructions needed
andrew [Tue, 12 May 2015 10:03:14 +0000 (10:03 +0000)]
Teach bits of libc about Thumb. This adds the if-then instructions needed
to handle the ARM conditional execution.

While here fix a bug found by this in the hard-float code, cc is the
opposite of cs. The former is used for 'less than' in floating-point code
and is executed when the C (carry) bit is clear, the latter is used when
greater than, equal, or unordered, and is executed when the C bit is set.

9 years agoDisable WPI in case of aml8726-m3.
ganbold [Tue, 12 May 2015 08:53:54 +0000 (08:53 +0000)]
Disable WPI in case of aml8726-m3.
The aml8726-m3 SoC is identified as a Cortex A9-r2 rev 4 CPU and
it hangs sometimes during the boot when WFI is used by the kernel.

Differential Revision:   https://reviews.freebsd.org/D2473
Submitted by:   John Wehle
Suggested by:   ian@

9 years agoEnsure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was
tuexen [Tue, 12 May 2015 08:08:16 +0000 (08:08 +0000)]
Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was
received over UDP.
Thanks to Felix Weinrank for makeing me aware of the problem and to
Irene Ruengeler for providing the fix.

MFC after: 1 week

9 years agoAdd new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated
ae [Tue, 12 May 2015 07:37:27 +0000 (07:37 +0000)]
Add new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated
packets on tunnel interfaces. Add support of these ioctls to gre(4),
gif(4) and me(4) interfaces. For incoming packets M_SETFIB() should use
if_fib value from ifnet structure, use proper value in gre(4) and me(4).

Differential Revision: https://reviews.freebsd.org/D2462
No objection from: #network
MFC after: 2 weeks
Sponsored by: Yandex LLC

9 years agoRevert r282775 for now. The added dependency would cause problems for
delphij [Tue, 12 May 2015 05:42:13 +0000 (05:42 +0000)]
Revert r282775 for now.  The added dependency would cause problems for
e.g. ports-mgmt/pkg and we would like to do an exp-build.

Requested by: bdrewery

9 years agoFix a panic when VIMAGE is enabled.
hrs [Tue, 12 May 2015 03:35:45 +0000 (03:35 +0000)]
Fix a panic when VIMAGE is enabled.

Spotted by: Nikos Vassiliadis

9 years ago- Remove ND6_IFF_IGNORELOOP. This functionality was useless in practice
hrs [Tue, 12 May 2015 03:31:57 +0000 (03:31 +0000)]
- Remove ND6_IFF_IGNORELOOP.  This functionality was useless in practice
  because a link where looped back NS messages are permanently observed
  does not work with either NDP or ARP for IPv4.

- draft-ietf-6man-enhanced-dad is now RFC 7527.

Discussed with: hiren
MFC after: 3 days

9 years agoAvoid polluting the filesystem when not necessary.
gjb [Tue, 12 May 2015 01:27:58 +0000 (01:27 +0000)]
Avoid polluting the filesystem when not necessary.

Sponsored by: The FreeBSD Foundation