]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMove nanobsd up since I'm overhauling it
imp [Thu, 10 Dec 2015 16:44:40 +0000 (16:44 +0000)]
Move nanobsd up since I'm overhauling it
Sort the new section alphabetically.

8 years agoAdd support for the GICv2M extension to the GICv2 interrupt controller.
andrew [Thu, 10 Dec 2015 16:40:38 +0000 (16:40 +0000)]
Add support for the GICv2M extension to the GICv2 interrupt controller.
This is (oddly) specified in the ARM Server Base System Architecture. It
extends the GICv2 to support MSI and MSI-X interrupts, however only the
latter are currently supported.

Only the FDT attachment is currently supported, however the attachment
and core driver are split to help adding ACPI support in the future.

Obtained from: ABT Systems Ltd
Relnotes: yes
Sponsored by: SoftIron Inc

8 years agoRemove pic_map_msix from ARM64, it is unneeded as all mappings happen
andrew [Thu, 10 Dec 2015 15:51:02 +0000 (15:51 +0000)]
Remove pic_map_msix from ARM64, it is unneeded as all mappings happen
through pic_map_msi (without the x).

Sponsored by: ABT Systems Ltd

8 years agoReduce the numbers of levels of indirection in arm64 pcib drivers by making
andrew [Thu, 10 Dec 2015 13:19:30 +0000 (13:19 +0000)]
Reduce the numbers of levels of indirection in arm64 pcib drivers by making
the MSI & MSI-X handler functions be directly callable from the driver
methods.

Sponsored by: ABT Systems Ltd

8 years agovmm is still maintained.
grehan [Thu, 10 Dec 2015 12:12:47 +0000 (12:12 +0000)]
vmm is still maintained.

8 years agoRetire sctp_validate_no_locks().
tuexen [Thu, 10 Dec 2015 11:49:32 +0000 (11:49 +0000)]
Retire sctp_validate_no_locks().

This routine checks that there are no locks held for an inp,
without having any lock on the inp. This breaks if the inp
goes away when it is called. This happens on stress tests
on a RPi B+.

MFC after: 3 days

8 years agoThe calls to RES_SET_H_ERRNO() macro on error paths wind up
ume [Thu, 10 Dec 2015 11:11:44 +0000 (11:11 +0000)]
The calls to RES_SET_H_ERRNO() macro on error paths wind up
dereferencing an uninitialized res.

PR: 202142
Submitted by: Sean Boudreau
MFC after: 1 week

8 years agoRemove a note about damaged PMBR. Now GPT will be detected automatically
ae [Thu, 10 Dec 2015 10:37:12 +0000 (10:37 +0000)]
Remove a note about damaged PMBR. Now GPT will be detected automatically
with such corruption.

MFC after: 1 month

8 years agoMake detection of GPT a bit more reliable.
ae [Thu, 10 Dec 2015 10:35:07 +0000 (10:35 +0000)]
Make detection of GPT a bit more reliable.

When we are detecting a partition table and didn't find PMBR, try to
read backup GPT header from the last sector and if it is correct,
assume that we have GPT.

Reviewed by: rpokala
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D4282

8 years agoAll 2-endpoints configs have high and normal pariority queues.
kevlo [Thu, 10 Dec 2015 07:45:58 +0000 (07:45 +0000)]
All 2-endpoints configs have high and normal pariority queues.

8 years agosfxge: consolidate privilege check functions
arybchik [Thu, 10 Dec 2015 07:42:56 +0000 (07:42 +0000)]
sfxge: consolidate privilege check functions

To reduce code duplication in common code, consolidate similar privilege
check functions.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4480

8 years agosfxge: cleanup: fix header
arybchik [Thu, 10 Dec 2015 07:35:38 +0000 (07:35 +0000)]
sfxge: cleanup: fix header

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: simplify privilege checks with macro
arybchik [Thu, 10 Dec 2015 07:17:46 +0000 (07:17 +0000)]
sfxge: simplify privilege checks with macro

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4455

8 years agosfxge: [6/6] support for MCDI proxy authorization in common code
arybchik [Thu, 10 Dec 2015 07:16:21 +0000 (07:16 +0000)]
sfxge: [6/6] support for MCDI proxy authorization in common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4454

8 years agosfxge: [5/6] rework event completion error handling
arybchik [Thu, 10 Dec 2015 07:15:09 +0000 (07:15 +0000)]
sfxge: [5/6] rework event completion error handling

Required for MCDI proxy authorization support.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4453

8 years agoDon't leak rsector/sector in mp_label(..)
ngie [Thu, 10 Dec 2015 07:04:36 +0000 (07:04 +0000)]
Don't leak rsector/sector in mp_label(..)

Use calloc instead of malloc + memset(.., 0, ..) when allocating sector

Differential Revision: https://reviews.freebsd.org/D4450
MFC after: 1 week
Reported by: cppcheck
Reviewed by: mav
Sponsored by: EMC / Isilon Storage Division

8 years agoRPC: populate local address for rendezvous transporter.
stas [Thu, 10 Dec 2015 05:17:04 +0000 (05:17 +0000)]
RPC: populate local address for rendezvous transporter.

When accepting a connection on underlying tcp socket rpc vc
transporter fails to populate local address.  This change rectifies
this problem by modifying rendezvous_request() to fill out the xptr
structure member with appropriate information.

Submitted by: Alex Burlyga <alex.burlyga.ietf@gmail.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4206

8 years agor290122 added 4 bytes and removed 8 in struct sackhint. Add a pad entry of 4
hiren [Thu, 10 Dec 2015 03:20:10 +0000 (03:20 +0000)]
r290122 added 4 bytes and removed 8 in struct sackhint. Add a pad entry of 4
bytes to restore the size.

Spotted by: rrs
Reviewed by: rrs
X-MFC with: r290122
Sponsored by: Limelight Networks

8 years agoAdd -t option to display field types.
araujo [Thu, 10 Dec 2015 02:11:42 +0000 (02:11 +0000)]
Add -t option to display field types.

PR: bin/203918
Submitted by: ota <ota@j.email.ne.jp>
Reviewed by: cem
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D4451

8 years agoioat(4): Add ioatcontrol(8) testing for copy_8k
cem [Thu, 10 Dec 2015 02:05:35 +0000 (02:05 +0000)]
ioat(4): Add ioatcontrol(8) testing for copy_8k

Add -E ("Eight k") and -m ("Memcpy") modes to the ioatcontrol(8) tool.

Prompted by: rpokala
Sponsored by: EMC / Isilon Storage Division

8 years agoFix several typos and bugs within pmcstudy. Also highlight the one SB test
rrs [Thu, 10 Dec 2015 01:52:29 +0000 (01:52 +0000)]
Fix several typos and bugs within pmcstudy. Also highlight the one SB test
that is failing (and is likely a problem in the actual PMC defintions). Add
to this also the -A option to run all canned tests.

Sponsored by: Netflix Inc.

8 years agoUpdate list of card names.
mav [Thu, 10 Dec 2015 01:41:05 +0000 (01:41 +0000)]
Update list of card names.

8 years agoGuess NVRAM address for 16Gbps Qlogic cards.
mav [Thu, 10 Dec 2015 01:17:30 +0000 (01:17 +0000)]
Guess NVRAM address for 16Gbps Qlogic cards.

I have feeling this approach is wrong, but it works for me so far and
it is better then nothing.

8 years agoUse LIBADD for pthread.
bdrewery [Thu, 10 Dec 2015 01:16:22 +0000 (01:16 +0000)]
Use LIBADD for pthread.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix a copy and paste bug when this page was first written by copying from
jhb [Thu, 10 Dec 2015 00:16:02 +0000 (00:16 +0000)]
Fix a copy and paste bug when this page was first written by copying from
BUS_BIND_INTR.9.

MFC after: 1 week

8 years agoConvert contrib/ofed libraries to LIBADD.
bdrewery [Thu, 10 Dec 2015 00:07:11 +0000 (00:07 +0000)]
Convert contrib/ofed libraries to LIBADD.

Sponsored by: EMC / Isilon Storage Division

8 years agoSort the LIB list.
bdrewery [Thu, 10 Dec 2015 00:07:05 +0000 (00:07 +0000)]
Sort the LIB list.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd a couple of spots I tend to look at and Michael for SCTP as well :-)
rrs [Wed, 9 Dec 2015 23:02:20 +0000 (23:02 +0000)]
Add a couple of spots I tend to look at and Michael for SCTP as well :-)

8 years agoAdd PCI ID for 16G QLogic chips in FCoE mode.
mav [Wed, 9 Dec 2015 22:52:37 +0000 (22:52 +0000)]
Add PCI ID for 16G QLogic chips in FCoE mode.

I haven't tested FCoE really yet, but the driver attaches fine.

8 years agoFix the tunable in logging so that if its pre-11 we have the proper
rrs [Wed, 9 Dec 2015 22:46:40 +0000 (22:46 +0000)]
Fix the tunable in logging so that if its pre-11 we have the proper
line so the tunable is present.

Sponsored by: Netflix Inc.

8 years agoioat(4): Add Broadwell-EP PCI IDs
cem [Wed, 9 Dec 2015 22:46:00 +0000 (22:46 +0000)]
ioat(4): Add Broadwell-EP PCI IDs

Sponsored by: EMC / Isilon Storage Division

8 years agoioat(4): Add ioat_copy_8k_aligned KPI
cem [Wed, 9 Dec 2015 22:45:51 +0000 (22:45 +0000)]
ioat(4): Add ioat_copy_8k_aligned KPI

The hardware supports descriptors with two non-contiguous pages.  This
allows issuing one descriptor for an 8k copy from/to non-contiguous but
otherwise page-aligned memory.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse correct lookup key for gif route lookups.
melifaro [Wed, 9 Dec 2015 22:09:33 +0000 (22:09 +0000)]
Use correct lookup key for gif route lookups.
This fixes r291993 change.

8 years agoUpdate the manual page to include Broadwell.
rrs [Wed, 9 Dec 2015 21:54:33 +0000 (21:54 +0000)]
Update the manual page to include Broadwell.

8 years agoWhite space changes.
rrs [Wed, 9 Dec 2015 21:50:06 +0000 (21:50 +0000)]
White space changes.

8 years agoProper support of Broadwell tool by the pmc_study based on the
rrs [Wed, 9 Dec 2015 21:49:31 +0000 (21:49 +0000)]
Proper support of Broadwell tool by the pmc_study based on the
Intel Itune guide for 5th generation processors. There is at least
one formula missing in that guide, which I extrapolated and put a ? by
in the help.

Sponsored by: Netflix Inc

8 years agoRemove NO_WERROR, after fix from r292023.
rodrigc [Wed, 9 Dec 2015 19:25:45 +0000 (19:25 +0000)]
Remove NO_WERROR, after fix from r292023.

8 years agoMerge from OpenBSD:
rodrigc [Wed, 9 Dec 2015 19:22:20 +0000 (19:22 +0000)]
Merge from OpenBSD:
  revision 1.13
  date: 2015/12/09 11:54:12;  author: tb;  state: Exp;  lines: +2 -2
  Add a cast to silence a compiler warning by clang on FreeBSD.
  From Craig Rodrigues.
  ok tedu@

8 years agoMerge from OpenBSD:
rodrigc [Wed, 9 Dec 2015 19:21:00 +0000 (19:21 +0000)]
Merge from OpenBSD:
  revision 1.12
  date: 2015/12/05 13:06:52;  author: claudio;  state: Exp;  lines: +4 -6
  Do not loop on EAGAIN in imsg_read(). Better to return the error to the
  caller and let him do another poll loop. This fixes spinning relayd
  processes seen on busy TLS relays. OK benno@ henning@

8 years agoMerge from OpenBSD:
rodrigc [Wed, 9 Dec 2015 19:19:36 +0000 (19:19 +0000)]
Merge from OpenBSD:
  revision 1.11
  date: 2015/11/27 01:57:59;  author: mmcc;  state: Exp;  lines: +2 -3
  Remove three NULL-checks before free().   ok millert@

8 years agoIncrease devd's client socket buffer size to 256KB. This is not as large as
asomers [Wed, 9 Dec 2015 18:55:25 +0000 (18:55 +0000)]
Increase devd's client socket buffer size to 256KB. This is not as large as
it looks, because we'll hit the sockbuf's mbuf limit long before hitting its
data limit. A 256KB data limit allows creating a ZFS pool on about 450
drives without overflowing the client socket buffers.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4476

8 years agoWhen iostat(8) receives SIGINT while running with "-w" or "-c", it will now
asomers [Wed, 9 Dec 2015 18:07:26 +0000 (18:07 +0000)]
When iostat(8) receives SIGINT while running with "-w" or "-c", it will now
print statistics one more time before exiting. Also, it now implements the
wait using setitimer instead of sleep, so the waits will be more consistent
when the system is heavily loaded.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4473

8 years agoMake in_arpinput(), inp_lookup_mcast_ifp(), icmp_reflect(),
melifaro [Wed, 9 Dec 2015 11:14:27 +0000 (11:14 +0000)]
Make in_arpinput(), inp_lookup_mcast_ifp(), icmp_reflect(),
  ip_dooptions(), icmp6_redirect_input(), in6_lltable_rtcheck(),
  in6p_lookup_mcast_ifp() and in6_selecthlim() use new routing api.

Eliminate now-unused ip_rtaddr().
Fix lookup key fib6_lookup_nh_basic() which was lost diring merge.
Make fib6_lookup_nh_basic() and fib6_lookup_nh_extended() always
  return IPv6 destination address with embedded scope. Currently
  rw_gateway has it scope embedded, do the same for non-gatewayed
  destinations.

Sponsored by: Yandex LLC

8 years agourtwn: add WME support
avos [Wed, 9 Dec 2015 09:29:38 +0000 (09:29 +0000)]
urtwn: add WME support

Tested with:
 - RTL8188CUS, HOSTAP mode.
 - RTL8188EU, STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4020

8 years agoUse stdint.h instead of inttypes.h as the latter pollutes namespace more
ngie [Wed, 9 Dec 2015 09:14:57 +0000 (09:14 +0000)]
Use stdint.h instead of inttypes.h as the latter pollutes namespace more

MFC after: 3 days
X-MFC with: r292004
Submitted by: bde
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd an option to use rfc6675 based pipe/inflight bytes calculation in newreno.
hiren [Wed, 9 Dec 2015 08:53:41 +0000 (08:53 +0000)]
Add an option to use rfc6675 based pipe/inflight bytes calculation in newreno.

MFC after:     3 weeks
Sponsored by:     Limelight Networks

8 years agoAdd an option to use rfc6675 based pipe/inflight bytes calculation in cubic.
hiren [Wed, 9 Dec 2015 07:56:40 +0000 (07:56 +0000)]
Add an option to use rfc6675 based pipe/inflight bytes calculation in cubic.

Reviewed by: gnn
MFC after: 3 weeks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D4205

8 years agosfxge: cleanup: removed unused variable
arybchik [Wed, 9 Dec 2015 06:59:04 +0000 (06:59 +0000)]
sfxge: cleanup: removed unused variable

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: fix (unused) EFX_OR_BYTE macro
arybchik [Wed, 9 Dec 2015 06:53:43 +0000 (06:53 +0000)]
sfxge: cleanup: fix (unused) EFX_OR_BYTE macro

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: use MAC spoofing TX and MAC change privileges
arybchik [Wed, 9 Dec 2015 06:24:22 +0000 (06:24 +0000)]
sfxge: use MAC spoofing TX and MAC change privileges

Update of common code to provide a query on the MAC_SPOOFING_TX and
CHANGE_MAC privileges instead of the deprecated MAC_SPOOFING privilege.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4436

8 years agosfxge: [4/6] rework MCDI response polling
arybchik [Wed, 9 Dec 2015 06:14:47 +0000 (06:14 +0000)]
sfxge: [4/6] rework MCDI response polling

Required for MCDI proxy authorization support.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4435

8 years agoCall va_end on ap when vsnprintf fails in run_cmd(..) to clean up
ngie [Wed, 9 Dec 2015 01:24:34 +0000 (01:24 +0000)]
Call va_end on ap when vsnprintf fails in run_cmd(..) to clean up
the variable state

MFC after: 1 week
Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division

8 years agoFix compilation when -DDEBUG is defined by adding inttypes.h #include
ngie [Tue, 8 Dec 2015 22:47:54 +0000 (22:47 +0000)]
Fix compilation when -DDEBUG is defined by adding inttypes.h #include
for intmax_t

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D4434
Reported by: cppcheck
Reviewed by: jhb
Sponsored by: EMC / Isilon Storage Division

8 years agoOne of the ways to detect loss is to count duplicate acks coming back from the
hiren [Tue, 8 Dec 2015 21:21:48 +0000 (21:21 +0000)]
One of the ways to detect loss is to count duplicate acks coming back from the
other end till it reaches predetermined threshold which is 3 for us right now.
Once that happens, we trigger fast-retransmit to do loss recovery.

Main problem with the current implementation is that we don't honor SACK
information well to detect whether an incoming ack is a dupack or not. RFC6675
has latest recommendations for that. According to it, dupack is a segment that
arrives carrying a SACK block that identifies previously unknown information
between snd_una and snd_max even if it carries new data, changes the advertised
window, or moves the cumulative acknowledgment point.

With the prevalence of Selective ACK (SACK) these days, improper handling can
lead to delayed loss recovery.

With the fix, new behavior looks like following:

0) th_ack < snd_una --> ignore
Old acks are ignored.
1) th_ack == snd_una, !sack_changed --> ignore
Acks with SACK enabled but without any new SACK info in them are ignored.
2) th_ack == snd_una, window == old_window --> increment
Increment on a good dupack.
3) th_ack == snd_una, window != old_window, sack_changed --> increment
When SACK enabled, it's okay to have advertized window changed if the ack has
new SACK info.
4) th_ack > snd_una --> reset to 0
Reset to 0 when left edge moves.
5) th_ack > snd_una, sack_changed --> increment
Increment if left edge moves but there is new SACK info.

Here, sack_changed is the indicator that incoming ack has previously unknown
SACK info in it.

Note: This fix is not fully compliant to RFC6675. That may require a few
changes to current implementation in order to keep per-sackhole dupack counter
and change to the way we mark/handle sack holes.

PR: 203663
Reviewed by: jtl
MFC after: 3 weeks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D4225

8 years agoCCACHE_BUILD: Only export CCACHE_PATH= if it was already set with a value.
bdrewery [Tue, 8 Dec 2015 20:20:40 +0000 (20:20 +0000)]
CCACHE_BUILD: Only export CCACHE_PATH= if it was already set with a value.

Older ccache don't work with an empty CCACHE_PATH value.  They will error with:
  ccache: FATAL: Could not find compiler "cc" in PATH
  make: "/mnt/bdrewery/git/onefs/src/share/mk/bsd.compiler.mk" line 134: Unable to determine compiler type for /usr/local/bin/ccache cc.  Consider setting COMPILER_TYPE.

Sponsored by: EMC / Isilon Storage Division

8 years agoahci_generic.c needs ofw_bus_if.h, add it to the module.
andrew [Tue, 8 Dec 2015 20:05:27 +0000 (20:05 +0000)]
ahci_generic.c needs ofw_bus_if.h, add it to the module.

8 years agoRemove historical GNUC test
emaste [Tue, 8 Dec 2015 19:32:58 +0000 (19:32 +0000)]
Remove historical GNUC test

The requirement is for a GCC-compatible compiler and not necessarily
GCC itself. However, we currently expect any compiler used for building
the whole of FreeBSD to be GCC-compatible and many things will break if
not; there's no longer a need to have an explicit test for this in csu.

Sponsored by: The FreeBSD Foundation

8 years agoAdd comment explaining aarch64's BROKEN_OPTIONS
emaste [Tue, 8 Dec 2015 19:19:26 +0000 (19:19 +0000)]
Add comment explaining aarch64's BROKEN_OPTIONS

In-tree bintuils and GCC do not support aarch64 or other recent
architectures.

8 years agoDon't use 0 for pointer comparison
smh [Tue, 8 Dec 2015 18:38:33 +0000 (18:38 +0000)]
Don't use 0 for pointer comparison

Use NULL instead of 0 for comparison with panicstr.

MFC after: 1 week
Sponsored by: Multiplay

8 years agoMETA MODE: Define a STAGE_TARGET_OBJTOP and export it alone with
bdrewery [Tue, 8 Dec 2015 17:56:40 +0000 (17:56 +0000)]
META MODE: Define a STAGE_TARGET_OBJTOP and export it alone with
STAGE_OBJTOP and STAGE_HOST_OBJTOP.

These will always be overridden in sub-makes when building in-tree, but
are exported for the benefit of hooking in external builds, such as
ports.

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate after r291955, build/install userland debug by default
emaste [Tue, 8 Dec 2015 17:40:42 +0000 (17:40 +0000)]
Update after r291955, build/install userland debug by default

Sponsored by: The FreeBSD Foundation

8 years agoFix some makeman issues.
bdrewery [Tue, 8 Dec 2015 17:09:17 +0000 (17:09 +0000)]
Fix some makeman issues.

- Don't bother looking up REVISION/BRANCH/etc from release/, or the
  CPUTYPE check, as these are not used for makeman and wastes time.  The also
  invokes auto.obj.mk after I reverted auto.obj.mk ignoring -V in r291312.
- Don't modify CC or PATH when WITH_CCACHE_BUILD or WITH_META_MODE is enabled
  as it leads to bsd.compiler.mk errors.

Sponsored by: EMC / Isilon Storage Division

8 years agoresolver: fix the build of some ports, broken by r289315
vangyzen [Tue, 8 Dec 2015 16:09:48 +0000 (16:09 +0000)]
resolver: fix the build of some ports, broken by r289315

r289315 required time_t and struct timespec to be defined before
including <resolv.h>.  This broke the build of net-mgmt/sx, at least.

Include <sys/timespec.h> in resolv.h to fix this with minimal pollution.

Reported by: Raphael Kubo da Costa <rakuco>
MFC after: 3 days
Sponsored by: Dell Inc.

8 years agoMerge helper fib* functions used for basic lookups.
melifaro [Tue, 8 Dec 2015 10:50:03 +0000 (10:50 +0000)]
Merge helper fib* functions used for basic lookups.

Vast majority of rtalloc(9) users require only basic info from
route table (e.g. "does the rtentry interface match with the interface
  I have?". "what is the MTU?", "Give me the IPv4 source address to use",
  etc..).
Instead of hand-rolling lookups, checking if rtentry is up, valid,
  dealing with IPv6 mtu, finding "address" ifp (almost never done right),
  provide easy-to-use API hiding all the complexity and returning the
  needed info into small on-stack structure.

This change also helps hiding route subsystem internals (locking, direct
  rtentry accesses).
Additionaly, using this API improves lookup performance since rtentry is not
  locked.
(This is safe, since all the rtentry changes happens under both radix WLOCK
  and rtentry WLOCK).

Sponsored by: Yandex LLC

8 years agoFix make depend
uqs [Tue, 8 Dec 2015 07:39:39 +0000 (07:39 +0000)]
Fix make depend

8 years agosfxge: [3/6] rework MCDI response handling
arybchik [Tue, 8 Dec 2015 06:25:52 +0000 (06:25 +0000)]
sfxge: [3/6] rework MCDI response handling

Required for MCDI proxy authorization support.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4420

8 years agoAdd missing stdlib.h header
ngie [Tue, 8 Dec 2015 05:27:22 +0000 (05:27 +0000)]
Add missing stdlib.h header

Apply some minor style(9) fixes

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoFix compilation warnings by adding unistd.h #include and missing return
ngie [Tue, 8 Dec 2015 05:24:06 +0000 (05:24 +0000)]
Fix compilation warnings by adding unistd.h #include and missing return
statements

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoSkip the MAC portacl tests if MAC_PORTACL support is missing instead of
ngie [Tue, 8 Dec 2015 05:17:22 +0000 (05:17 +0000)]
Skip the MAC portacl tests if MAC_PORTACL support is missing instead of
marking them failed

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoDelete bogus freeing of uninitialized data
ngie [Tue, 8 Dec 2015 04:51:21 +0000 (04:51 +0000)]
Delete bogus freeing of uninitialized data

MFC after: 3 days
Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing va_ends for corresponding va_starts to clean up variable arguments
ngie [Tue, 8 Dec 2015 04:45:44 +0000 (04:45 +0000)]
Add missing va_ends for corresponding va_starts to clean up variable arguments
initialized in _test_fmt(..)

MFC after: 3 days
Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division

8 years agoUnbreak compiling getnetgrent.c with -DDEBUG after r236402 by adding a
ngie [Tue, 8 Dec 2015 04:40:03 +0000 (04:40 +0000)]
Unbreak compiling getnetgrent.c with -DDEBUG after r236402 by adding a
missing "}"

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoMerge bmake-20151201
sjg [Tue, 8 Dec 2015 01:29:07 +0000 (01:29 +0000)]
Merge bmake-20151201

8 years agoo DragonFly 4.4.1 release added.
maxim [Tue, 8 Dec 2015 01:16:53 +0000 (01:16 +0000)]
o DragonFly 4.4.1 release added.

8 years agolocal.meta.sys.mk already defines TARGET_ARCHES_arm
bdrewery [Tue, 8 Dec 2015 00:22:24 +0000 (00:22 +0000)]
local.meta.sys.mk already defines TARGET_ARCHES_arm

8 years agoDIRDEPS_BUILD: Update dependencies.
bdrewery [Mon, 7 Dec 2015 23:53:01 +0000 (23:53 +0000)]
DIRDEPS_BUILD: Update dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoActually add the proc_rwmem(9) man page, missed in r291961.
markj [Mon, 7 Dec 2015 22:08:12 +0000 (22:08 +0000)]
Actually add the proc_rwmem(9) man page, missed in r291961.

8 years agoFix a couple misspellings of "environment."
markj [Mon, 7 Dec 2015 22:00:13 +0000 (22:00 +0000)]
Fix a couple misspellings of "environment."

MFC after: 3 days

8 years agoAdd a trailing newline to the expected output for tst.walltimestamp.ksh.
markj [Mon, 7 Dec 2015 21:59:10 +0000 (21:59 +0000)]
Add a trailing newline to the expected output for tst.walltimestamp.ksh.

MFC after: 1 week

8 years agoFix a discrepancy in r291738.
markj [Mon, 7 Dec 2015 21:57:36 +0000 (21:57 +0000)]
Fix a discrepancy in r291738.

The script that generates these makefiles was changed to modify LIBADD
rather than LDADD/DPADD, but the makefile itself was also changed in a
slightly different way.

8 years agoUpdate DTrace test suite makefiles after r291963.
markj [Mon, 7 Dec 2015 21:51:50 +0000 (21:51 +0000)]
Update DTrace test suite makefiles after r291963.

8 years agoMFV r289003:
markj [Mon, 7 Dec 2015 21:49:32 +0000 (21:49 +0000)]
MFV r289003:
6271 dtrace caused excessive fork time

Author: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Gordon Ross <gwr@nexenta.com>

illumos/illumos-gate@7bd3c1d12d0c764e1517c3aca62c634409356764

8 years agoModify DTRACEHIOC_ADDDOF to copy the DOF section from the target process.
markj [Mon, 7 Dec 2015 21:44:05 +0000 (21:44 +0000)]
Modify DTRACEHIOC_ADDDOF to copy the DOF section from the target process.

r281257 added support for lazyload mode by allowing dtrace(1) to register
a DOF section on behalf of a traced process. This was implemented by
having libdtrace copy the DOF section into a heap-allocated buffer and
passing its address to the ioctl handler. However, DTrace uses the DOF
section address as a lookup key in certain cases, so the ioctl handler
should be given the target process' DOF section address instead. This
change modifies the ADDDOF handler to copy the DOF section in from the
target process, rather than from dtrace(1).

8 years agoAdd helper functions proc_readmem() and proc_writemem().
markj [Mon, 7 Dec 2015 21:33:15 +0000 (21:33 +0000)]
Add helper functions proc_readmem() and proc_writemem().

These helper functions can be used to read in or write a buffer from or to
an arbitrary process' address space. Without them, this can only be done
using proc_rwmem(), which requires the caller to fill out a uio. This is
onerous and results in code duplication; the new functions provide a simpler
interface which is sufficient for most existing callers of proc_rwmem().

This change also adds a manual page for proc_rwmem() and the new functions.

Reviewed by: jhb, kib
Differential Revision: https://reviews.freebsd.org/D4245

8 years agoThe ccb_xflags enumeration was removed from FreeBSD/head in
ken [Mon, 7 Dec 2015 21:04:27 +0000 (21:04 +0000)]
The ccb_xflags enumeration was removed from FreeBSD/head in
r259397 (it contained the CAM_EXTLUN_VALID bit) and I added the
same type name with a different set of values back in r291716.

The old ccb_xflags enumeration still exists in FreeBSD stable/10.
Shift all of the new values by one bit to avoid compatibility
issues when merged to stable/10.

MFC after: 3 days
Sponsored by: Spectra Logic

8 years agoFix ls -l alignement with new locales
bapt [Mon, 7 Dec 2015 20:48:28 +0000 (20:48 +0000)]
Fix ls -l alignement with new locales

Latest update of locales introduced abbreviated month that follows the regionale
rules meaning that they can be of variable length instead of being arbitrary
truncated to top 3 characters.

To fix alignement, ls now computes the visible length of the abbreviated month,
pads the shorter month with spaces in order to make sure everything is properly
aligned

Reviewed by: ache, ed, jilles
Differential Revision: https://reviews.freebsd.org/D4239

8 years agoelfcopy: exclude extension when converting from binary
emaste [Mon, 7 Dec 2015 20:21:12 +0000 (20:21 +0000)]
elfcopy: exclude extension when converting from binary

When converting from binary to ELF, elfcopy creates symbols
_binary_<filename>_start_, _binary_<filename>_end, and
_binary_<filename>_size. For compatibility with GNU objcopy (and to
produce sensible symbol names) the extension must be stripped off.

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

8 years agoFix a comment typo in the code example.
brueffer [Mon, 7 Dec 2015 19:21:08 +0000 (19:21 +0000)]
Fix a comment typo in the code example.

PR: 203497
Submitted by: chadf@triularity.org
MFC after: 1 week

8 years agoBuild and install userland .debug files by default
emaste [Mon, 7 Dec 2015 19:15:52 +0000 (19:15 +0000)]
Build and install userland .debug files by default

Debug data files are now built by default with 'make buildworld' and
installed with 'make installworld'. This facilitates debugging but
requires more disk space both during the build and for the installed
world. Debug files may be disabled by setting WITHOUT_DEBUG_FILES=yes
in src.conf(5).

Reviewed by: bdrewery, eadler, vangyzen
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4018

8 years agoAdd an MLINK for m_collapse.
brueffer [Mon, 7 Dec 2015 19:08:33 +0000 (19:08 +0000)]
Add an MLINK for m_collapse.

PR: 204205
Submitted by: avos
MFC after: 1 week

8 years agoWhen setting up VLANs on a Raspberry Pi ethernet port, the MTU drops
hselasky [Mon, 7 Dec 2015 18:55:33 +0000 (18:55 +0000)]
When setting up VLANs on a Raspberry Pi ethernet port, the MTU drops
from 1500 to 1496 bytes. The MTU should remain at 1500, extending the
frame size as per IEEE 802.3. Adding IFCAP_VLAN_MTU to the
if_capabilities field in the smsc driver solves the problem.  The
datasheet for the LAN9512 chip, section 3.2.3 states that the chip
supports the extended frame.

Submitted by: rpp@ci.com.au
MFC after: 1 week
PR: 205050

8 years agoFix spelling of internal hack.
bdrewery [Mon, 7 Dec 2015 18:45:55 +0000 (18:45 +0000)]
Fix spelling of internal hack.

Reported by: ngie

8 years agoReplace magic value ELF note type with NT_FREEBSD_ABI_TAG
emaste [Mon, 7 Dec 2015 18:43:27 +0000 (18:43 +0000)]
Replace magic value ELF note type with NT_FREEBSD_ABI_TAG

As of r291909 elf_common.h provides a definition.

Suggested by: kib
Sponsored by: The FreeBSD Foundation

8 years agoFix a typo in the CPUTYPE list.
brueffer [Mon, 7 Dec 2015 18:39:38 +0000 (18:39 +0000)]
Fix a typo in the CPUTYPE list.

PR: 205099
Submitted by: xxjack12xx@gmail.com
MFC after: 1 week

8 years agoMerge common parts of i386 and amd64 md_var.h and smp.h into
kib [Mon, 7 Dec 2015 17:41:20 +0000 (17:41 +0000)]
Merge common parts of i386 and amd64 md_var.h and smp.h into
new headers x86/include x86_var.h and x86_smp.h.

Reviewed by: emaste, jhb
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4358

8 years agoUse ANSI C definition.
kib [Mon, 7 Dec 2015 17:24:55 +0000 (17:24 +0000)]
Use ANSI C definition.

MFC after: 1 week

8 years agoSet %esp correctly in the extended TSS.
jhb [Mon, 7 Dec 2015 16:27:11 +0000 (16:27 +0000)]
Set %esp correctly in the extended TSS.

The pcb is saved at the top of the kernel stack on x86 platforms.
The initial kenrel stack pointer is set in the TSS so that the trapframe
from user -> kernel transitions begins directly below the pcb and grows
down.

The XSAVE changes moved the FPU save area out of the pcb and into a
variable-sized area after the pcb.  This required updating the expressions
to calculate the initial stack pointer from 'stacktop - sizeof(pcb)' to
'stacktop - sizeof(pcb) + FPU save area size'.

The i386_set_ioperm() system call allows user applications to access
individual I/O ports via the I/O port permission bitmap in the TSS.
On FreeBSD this requires allocating a custom per-process TSS instead of
using the shared per-CPU TSS.

The expression to initialize the initial kernel stack pointer in the
per-process TSS created for i386_set_ioperm() was not properly updated
after the XSAVE changes.  Processes that used i386_set_ioperm() would
trash the trapframe during subsequent context switches resulting in
panics from memory corruption.

This changes fixes the kernel stack pointer calculation for the per-process
TSS.

Reviewed by: kib, n_hibma
Reported by: n_hibma
MFC after: 1 week

8 years agoGarbage collect removed directories.
bdrewery [Mon, 7 Dec 2015 16:08:26 +0000 (16:08 +0000)]
Garbage collect removed directories.

Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Only pass -MF if we care about the object being compiled.
bdrewery [Mon, 7 Dec 2015 16:08:22 +0000 (16:08 +0000)]
FAST_DEPEND: Only pass -MF if we care about the object being compiled.

This will save time generating dependency files that we didn't expect
due to cases where SRCS!=OBJS or for building custom targetted objects
in Makefiles that do not end up in the DEPENDOBJS list.

This uses a bmake trick to modify CFLAGS based on ${.TARGET}.  A
.PARSEDIR check is done for the sake of MFC safety.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Move handling code below yacc/lex/dtrace code that modified SRCS.
bdrewery [Mon, 7 Dec 2015 16:08:19 +0000 (16:08 +0000)]
FAST_DEPEND: Move handling code below yacc/lex/dtrace code that modified SRCS.

This fixes some of those newly added SRCS not having their depend files
included.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division