]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

9 years agoAfter the last influx of commits, and a REALLY BIG WARNING
gjb [Tue, 12 May 2015 01:20:27 +0000 (01:20 +0000)]
After the last influx of commits, and a REALLY BIG WARNING
to the top of the file.

Sponsored by: The FreeBSD Foundation

9 years agoFix more paths to the actual files.
gjb [Tue, 12 May 2015 01:14:21 +0000 (01:14 +0000)]
Fix more paths to the actual files.

Sponsored by: The FreeBSD Foundation

9 years agoFix more path variables.
gjb [Tue, 12 May 2015 01:04:02 +0000 (01:04 +0000)]
Fix more path variables.

Sponsored by: The FreeBSD Foundation

9 years agoProvide the correct path to the checksum file.
gjb [Tue, 12 May 2015 00:58:17 +0000 (00:58 +0000)]
Provide the correct path to the checksum file.

Sponsored by: The FreeBSD Foundation

9 years agoAlso symlink the CHECKSUM.{SHA256,MD5} files.
gjb [Tue, 12 May 2015 00:55:28 +0000 (00:55 +0000)]
Also symlink the CHECKSUM.{SHA256,MD5} files.

Sponsored by: The FreeBSD Foundation

9 years agoAlso copy CHECKSUM.{SHA256,MD5} files.
gjb [Tue, 12 May 2015 00:46:32 +0000 (00:46 +0000)]
Also copy CHECKSUM.{SHA256,MD5} files.

Sponsored by: The FreeBSD Foundation

9 years agoFix a few incorrect variables and/or hard-coded paths.
gjb [Tue, 12 May 2015 00:39:01 +0000 (00:39 +0000)]
Fix a few incorrect variables and/or hard-coded paths.

Sponsored by: The FreeBSD Foundation

9 years agoSigh. Fix more syntax errors introduced by the last commit.
gjb [Tue, 12 May 2015 00:33:18 +0000 (00:33 +0000)]
Sigh.  Fix more syntax errors introduced by the last commit.

Sponsored by: The FreeBSD Foundation

9 years agoFix a make(1) syntax error.
gjb [Tue, 12 May 2015 00:32:28 +0000 (00:32 +0000)]
Fix a make(1) syntax error.

Sponsored by: The FreeBSD Foundation

9 years agoTemporarily 'rm -rf $FTPDIR' during additional testing.
gjb [Tue, 12 May 2015 00:30:56 +0000 (00:30 +0000)]
Temporarily 'rm -rf $FTPDIR' during additional testing.

Sponsored by: The FreeBSD Foundation

9 years agoAllow configuration of the sector size advertised to the guest.
neel [Tue, 12 May 2015 00:30:39 +0000 (00:30 +0000)]
Allow configuration of the sector size advertised to the guest.

The default behavior is to infer the logical and physical sector sizes from
the block device backend. However older versions of Windows only work with
specific logical/physical combinations:
- Vista and Windows 7: 512/512
- Windows 7 SP1: 512/512 or 512/4096

For this reason allow the sector size to be specified using the following
block device option: sectorsize=logical[/physical]

Reported by: Leon Dang (ldang@nahannisys.com)
Reviewed by: grehan
MFC after: 2 weeks

9 years agoAlways use the 'make install' directory as the source for images.
gjb [Tue, 12 May 2015 00:27:52 +0000 (00:27 +0000)]
Always use the 'make install' directory as the source for images.
For RE purposes, we use the default (/R within the chroot), so
this helps avoid copying files multiple times and xz(1)-compressing
additional times when not needed.

Again, this Makefile is not for general consumption.

Sponsored by: The FreeBSD Foundation

9 years agoAdd a new file, Makefile.mirrors, which is intended to replace
gjb [Mon, 11 May 2015 22:14:03 +0000 (22:14 +0000)]
Add a new file, Makefile.mirrors, which is intended to replace
a 474-line kludge of a shell script to pre-create the directory
hierarchy on ftp-master.

This is not in any way connected to the build, and there is no
intention to do so.  This only intent here is to try to make
things a little bit easier for me.  But I've probably just made
things worse.

Sponsored by: The FreeBSD Foundation

9 years agoHandling indirect descriptors is a capability of the host and
grehan [Mon, 11 May 2015 21:24:10 +0000 (21:24 +0000)]
Handling indirect descriptors is a capability of the host and
not one that needs to be negotiated. Use the host capabilities
field and not the negotiated field when verifying that indirect
descriptors are supported.

Found with the Redhat Windows viostor driver, which clears
the indirect capability in the negotiated caps and then starts
using them.

Reported and tested by: Leon Dang (ldang@nahannisys.com)
MFC after:   2 weeks

9 years agoAdd a PCI bridge for the Freescale PCIe Root Complex
jhibbits [Mon, 11 May 2015 20:58:05 +0000 (20:58 +0000)]
Add a PCI bridge for the Freescale PCIe Root Complex

Summary:
The Freescale PCIe Root Complex shows up as a Processor class device, PowerPC
subclass, so the generic PCI code ignores it for a bridge.  This adds support
for it.

As part of this, update the Freescale PCI hostbridge driver, to allow probing
beyond the root complex, instead of only allowing "proper" PCI-PCI bridges.

Reviewers: #powerpc, marcel, nwhitehorn

Reviewed By: nwhitehorn

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D2442

Relnotes: yes

9 years agoUse the GOT_* macros to help simplify the code, these work with both pic
andrew [Mon, 11 May 2015 20:33:46 +0000 (20:33 +0000)]
Use the GOT_* macros to help simplify the code, these work with both pic
and non-pic code, and to build for Thumb.

9 years agoRetire pmap_lazyfix(). This function only existed in the new armv6 pmap
alc [Mon, 11 May 2015 19:55:01 +0000 (19:55 +0000)]
Retire pmap_lazyfix().  This function only existed in the new armv6 pmap
because the i386 pmap on which the new armv6 pmap is based had it, and in
r281707 pmap_lazyfix() was removed from the i386 pmap.

Discussed with: kib
Submitted by: Michal Meloun (via Svatopluk Kraus)

9 years agoAdd the kernel support for Thumb-2. It is only supported on ARMv7 as the
andrew [Mon, 11 May 2015 19:20:30 +0000 (19:20 +0000)]
Add the kernel support for Thumb-2. It is only supported on ARMv7 as the
main ARMv6 target, the Raspberry Pi, doesn't support Thumb-2.

This as been tested with a Thumb-2 userland, however building one is
currently unsupported as there are known toolchain issues breaking some
binaries. Further work will also be needed to decide on the method of
selecting which instruction set to build for, and to benchmark both to
find how building everything as Thumb-2 will affect performance.

Relnotes: yes

9 years agoMark thumb entry points as such when building for thumb, otherwise mark
andrew [Mon, 11 May 2015 19:04:32 +0000 (19:04 +0000)]
Mark thumb entry points as such when building for thumb, otherwise mark
them as arm.

9 years agoUse the Thumb compliant version of the add instruction. We can only use
andrew [Mon, 11 May 2015 19:00:02 +0000 (19:00 +0000)]
Use the Thumb compliant version of the add instruction. We can only use
"add Rd, Rn, Rm" from within an IT (if-then) block.

9 years agoList both registers to use in the 64-bit atomic instructions. We will need
andrew [Mon, 11 May 2015 18:52:06 +0000 (18:52 +0000)]
List both registers to use in the 64-bit atomic instructions. We will need
these to build for Thumb-2.

9 years agoRevert r281372, it's no longer needed after r282726 (fix for PR 199119) as the
delphij [Mon, 11 May 2015 17:49:07 +0000 (17:49 +0000)]
Revert r281372, it's no longer needed after r282726 (fix for PR 199119) as the
symbol conflict between libmd and libcrypto have been solved.

9 years agoUnbreak MIPS build following rev. 282726
thomas [Mon, 11 May 2015 16:45:33 +0000 (16:45 +0000)]
Unbreak MIPS build following rev. 282726

Introduce further adjustments to the renaming of libmd
symbols: make sure that we do not generate dangling weak
aliases, as this causes build failures on MIPS.

Tested by: sbruno

9 years agoAdd the ofw_bus_subr.h change missed in r282770.
andrew [Mon, 11 May 2015 15:47:55 +0000 (15:47 +0000)]
Add the ofw_bus_subr.h change missed in r282770.

9 years agoFix virtual machine disk format creating by passing VMFORMAT
gjb [Mon, 11 May 2015 14:53:07 +0000 (14:53 +0000)]
Fix virtual machine disk format creating by passing VMFORMAT
to mkimg(1)

PR: 200068
Submitted by: Jeremy Norris
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoHide code only used on i386 and amd64.
andrew [Mon, 11 May 2015 14:36:34 +0000 (14:36 +0000)]
Hide code only used on i386 and amd64.

9 years agoAdd ofw_bus_find_compatible to find a compatible ofw node. This will be
andrew [Mon, 11 May 2015 14:10:54 +0000 (14:10 +0000)]
Add ofw_bus_find_compatible to find a compatible ofw node. This will be
used on ARM to help find the correct node to use to start secondary CPUs
as this happens before device enumeration.

9 years agocpu-v6.h should only be used in the kernel, add an error to enforce this.
andrew [Mon, 11 May 2015 12:44:02 +0000 (12:44 +0000)]
cpu-v6.h should only be used in the kernel, add an error to enforce this.

9 years agozfs ioctls: use fget_write / fget_read instead of getf wrapper for fget
avg [Mon, 11 May 2015 10:07:31 +0000 (10:07 +0000)]
zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget

This allows to ensure that we do not write to a file that was opened
for reading only or vice versa.

Also, use the correct capability in in zfs_ioc_send_new().

Differential Revision: https://reviews.freebsd.org/D2382
Reviewed by: delphij
MFC after: 17 days
Sponsored by: ClusterHQ