199628 Commits

Author SHA1 Message Date
tuexen
b52cec9e00 MFC r284596:
When setting the primary address, return an error whenever it fails.
2015-06-22 05:34:13 +00:00
tuexen
a42ec2035f MFC r284547:
Fix a bug reported by coverity. Since AF_UNIX sockets don't
have multiple addresses, the problem didn't show up during testing.

Reported by:	Coverity
CID:		1306787
2015-06-22 05:31:29 +00:00
gjb
b6383a0fc8 MFC r284617:
Fix path to waagent.

Sponsored by:	The FreeBSD Foundation
2015-06-22 00:54:47 +00:00
trasz
7c999938ee MFC r283141:
Remove the warning about invalid PE checksum; apparently nothing
cares about those checksums anyway.

Sponsored by:	The FreeBSD Foundation
2015-06-21 07:00:54 +00:00
trasz
88bb9f05c4 MFC r283285:
Advertise ctlstat(8) a little better.

Sponsored by:	The FreeBSD Foundation
2015-06-21 06:54:54 +00:00
trasz
5c12b82b8d MFC r281929:
Fix growfs(8) build with debug enabled (make -DGFSDBG).

Sponsored by:	The FreeBSD Foundation
2015-06-21 06:49:44 +00:00
trasz
1b7df0d462 MFC r282238:
Remove spurious period.

Sponsored by:	The FreeBSD Foundation
2015-06-21 06:44:32 +00:00
trasz
d057adeb92 MFC r282236:
Make rctl(8) more user-friendly when RACCT/RCTL is disabled for some reason.

Sponsored by:	The FreeBSD Foundation
2015-06-21 06:40:43 +00:00
trasz
a79dffff33 MFC r282857:
Document RCTL events in devd.conf(5).

Sponsored by:	The FreeBSD Foundation
2015-06-21 06:36:54 +00:00
trasz
e1055c772b MFC r282213:
Add kern.racct.enable tunable and RACCT_DISABLED config option.
The point of this is to be able to add RACCT (with RACCT_DISABLED)
to GENERIC, to avoid having to rebuild the kernel to use rctl(8).

MFC r282901:

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.

Note those two are MFC-ed together, because the latter one changes the
name of RACCT_DISABLED option to RACCT_DEFAULT_TO_DISABLED.  Should have
committed the renaming separately...

Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-06-21 06:28:26 +00:00
gjb
964ee5e924 MFC r284567:
Add Makefile.azure, used to upload VHD images to the
  Microsoft Azure environment, similar to the EC2 AMIs.

Sponsored by:	The FreeBSD Foundation
2015-06-21 04:39:34 +00:00
markj
93e43c433d MFC r284127:
witness: don't warn about matrix inconsistencies without holding the mutex

Lock order checking is done without the witness mutex held, so multiple
threads that are racing to establish a new lock order may read matrix
entries that are in an inconsistent state. Don't print a warning in this
case, but instead just redo the check after taking the witness lock.
2015-06-21 00:36:02 +00:00
rmacklem
80271ba17a MFC: r284531
Document that a forced dismount of an NFSv3 mount when the
NLM (rpc.lockd) is running can crash the system.
Unfortunately this is not easy to fix, but I have left
PR#200585 open.
2015-06-20 23:15:57 +00:00
trasz
c2390610a5 MFC r281820:
Add hint about "volmode=dev" to ctl.conf(5).

Sponsored by:	The FreeBSD Foundation
2015-06-20 15:55:53 +00:00
dim
d3e521cfec MFC r284346:
Fix the following clang 3.7.0 warnings in lib/libfetch/http.c:

    lib/libfetch/http.c:1628:26: error: address of array 'purl->user'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.user = purl->user ?
                                                   ~~~~~~^~~~ ~
    lib/libfetch/http.c:1630:30: error: address of array 'purl->pwd'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.password = purl->pwd?
                                                       ~~~~~~^~~~
    lib/libfetch/http.c:1657:25: error: address of array 'url->user'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.user = url->user ?
                                                   ~~~~~^~~~ ~
    lib/libfetch/http.c:1659:29: error: address of array 'url->pwd'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.password = url->pwd ?
                                                       ~~~~~^~~ ~
    lib/libfetch/http.c:1669:25: error: address of array 'url->user'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.user = url->user ?
                                                   ~~~~~^~~~ ~
    lib/libfetch/http.c:1671:29: error: address of array 'url->pwd'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.password = url->pwd ?
                                                       ~~~~~^~~ ~

Since url->user and url->pwd are arrays, they can never be NULL, so the
checks can be removed.

Reviewed by:	bapt
Differential Revision: https://reviews.freebsd.org/D2673
2015-06-20 13:30:09 +00:00
dim
f96f7b3d8f MFC r284167:
Merge r283870 from amd64:

Remove unneeded NULL checks in trap_fatal().

Since td_name is an array member of struct thread, it can never be NULL,
so the check can be removed.  In addition, curproc can never be NULL,
so remove the if statement, and splice the two printfs() together.

While here, remove the u_long cast, and use the correct printf format
specifier for curproc->p_pid.

Requested by:	jhb
2015-06-20 13:25:28 +00:00
tuexen
094ec02dc8 MFC r284526:
Fix a bug related to flow assignment I introduced in
https://svnweb.freebsd.org/base?view=revision&revision=275483
2015-06-20 08:28:47 +00:00
tuexen
103d48d60e MFC r284515:
Add FIB support for SCTP.
This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200379

PR:	200379
2015-06-20 08:25:27 +00:00
hiren
4aefd42d20 MFC r266420 (by adrian)
Ensure that the flowid hashtype is assigned to the inp if the flowid
is also assigned.

Spotted by:	gallatin
Tested by:	gallatin
2015-06-19 19:36:21 +00:00
mav
82356d356a MFC r284013: Allow setting only WWNN or only WWPN. 2015-06-19 00:53:15 +00:00
gjb
1ce80feefb Update stable/10 from 10.1-STABLE to 10.2-PRERELEASE,
marking the official start of the code slush.

Set the default mdoc(7) version to 10.2, and update the
clang(1) TARGET_TRIPLE and BUILD_TRIPLE to reflect 10.2.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-06-19 00:00:32 +00:00
kp
0b6ab54e54 Merge r284280
pf: Remove frc_direction

We don't use the direction of the fragments for anything. The frc_direction
field is assigned, but never read.
Just remove it.

Differential Revision:	https://reviews.freebsd.org/D2825
Reviewed by:	gnn
2015-06-18 21:25:07 +00:00
kp
32fc55692f Merge r284222, r284260
pf: address family must be set when creating a pf_fragment

Fix a panic when handling fragmented ip4 packets with 'drop-ovl' set.
In that scenario we take a different branch in pf_normalize_ip(), taking us to
pf_fragcache() (rather than pf_reassemble()). In pf_fragcache() we create a
pf_fragment, but do not set the address family. This leads to a panic when we
try to insert that into pf_frag_tree because pf_addr_cmp(), which is used to
compare the pf_fragments doesn't know what to do if the address family is not
set.

Simply ensure that the address family is set correctly (always AF_INET in this
path).

When we try to look up a pf_fragment with pf_find_fragment() we compare (see
pf_frag_compare()) addresses (and family), but also protocol.  We failed to
save the protocol to the pf_fragment in pf_fragcache(), resulting in failing
reassembly.

PR:		200330
Differential Revision:	https://reviews.freebsd.org/D2824
Reviewed by:	gnn
2015-06-18 21:23:41 +00:00
kp
7d05cb134c Merge r278874, r278925, r278868
- Improve INET/INET6 scope.
- style(9) declarations.
- Make couple of local functions static.
- Even more fixes to !INET and !INET6 kernels.
  In collaboration with pluknet
- Toss declarations to fix regular build and NO_INET6 build.

Differential Revision:	https://reviews.freebsd.org/D2823
Reviewed by:	gnn
2015-06-18 21:21:52 +00:00
kp
7602db847b Merge r281536
pf: Fix forwarding detection

If the direction is not PF_OUT we can never be forwarding. Some input packets
have rcvif != ifp (looped back packets), which lead us to ip6_forward() inbound
packets, causing panics.

Equally, we need to ensure that packets were really received and not locally
generated before trying to ip6_forward() them.

Differential Revision:	https://reviews.freebsd.org/D2822
Reviewed by:	gnn
2015-06-18 20:59:48 +00:00
kp
1af840c38e Merge r281234
Evaluate packet size after the firewall had its chance

Defer the packet size check until after the firewall has had a look at it. This
means that the firewall now has the opportunity to (re-)fragment an oversized
packet.

Differential Revision:	https://reviews.freebsd.org/D2821
Reviewed by:	gnn
2015-06-18 20:57:21 +00:00
kp
801d5721d1 Merge r281165
Remove duplicate code

We'll just fall into the same local delivery block under the
'if (m->m_flags & M_FASTFWD_OURS)'.

Suggested by:       ae
Differential Revision:	https://reviews.freebsd.org/D2820
Reviewed by:	gnn
2015-06-18 20:45:37 +00:00
kp
99baa6b1d1 Merge r281164
pf: Skip firewall for refragmented ip6 packets

In cases where we scrub (fragment reassemble) on both input and output
we risk ending up in infinite loops when forwarding packets.

Fragmented packets come in and get collected until we can defragment. At
that point the defragmented packet is handed back to the ip stack (at
the pfil point in ip6_input(). Normal processing continues.

Eventually we figure out that the packet has to be forwarded and we end
up at the pfil hook in ip6_forward(). After doing the inspection on the
defragmented packet we see that the packet has been defragmented and
because we're forwarding we have to refragment it.

In pf_refragment6() we split the packet up again and then ip6_forward()
the individual fragments.  Those fragments hit the pfil hook on the way
out, so they're collected until we can reconstruct the full packet, at
which point we're right back where we left off and things continue until
we run out of stack.

Break that loop by marking the fragments generated by pf_refragment6()
as M_SKIP_FIREWALL. There's no point in processing those packets in the
firewall anyway. We've already filtered on the full packet.

Differential Revision:	https://reviews.freebsd.org/D2819
Reviewed by:	gnn
2015-06-18 20:43:16 +00:00
kp
6ba0797920 Merge r280956
pf: Deal with runt packets

On Ethernet packets have a minimal length, so very short packets get padding
appended to them. This padding is not stripped off in ip6_input() (due to
support for IPv6 Jumbograms, RFC2675).
That means PF needs to be careful when reassembling fragmented packets to not
include the padding in the reassembled packet.

While here also remove the 'Magic from ip_input.' bits. Splitting up and
re-joining an mbuf chain here doesn't make any sense.

Differential Revision:	https://reviews.freebsd.org/D2818
Reviewed by:	gnn
2015-06-18 20:41:55 +00:00
kp
ad9eb0c77b Merge r280955
Preserve IPv6 fragment IDs accross reassembly and refragmentation

When forwarding fragmented IPv6 packets and filtering with PF we
reassemble and refragment. That means we generate new fragment headers
and a new fragment ID.

We already save the fragment IDs so we can do the reassembly so it's
straightforward to apply the incoming fragment ID on the refragmented
packets.

Differential Revision:	https://reviews.freebsd.org/D2817
Reviewed by:	gnn
2015-06-18 20:40:36 +00:00
kp
83b6287db4 Merge r278843, r278858
In the forwarding case refragment the reassembled packets with the same
size as they arrived in. This allows the sender to determine the optimal
fragment size by Path MTU Discovery.

Roughly based on the OpenBSD work by Alexander Bluhm.

Differential Revision:	https://reviews.freebsd.org/D2816
Reviewed by:	gnn
2015-06-18 20:34:39 +00:00
kp
80d7588d81 Merge r278842
Factor out ip6_fragment() function, to be used in IPv6 stack and pf(4).

Differential Revision:	https://reviews.freebsd.org/D2815
Reviewed by:	gnn
2015-06-18 20:32:53 +00:00
kp
de79c168eb Merge r278831, r278834
Update the pf fragment handling code to closer match recent OpenBSD.
That partially fixes IPv6 fragment handling.

Differential Revision:	https://reviews.freebsd.org/D2814
Reviewed by:	gnn
2015-06-18 20:28:52 +00:00
kp
37f96b7312 Merge r278828, r278832
- Factor out ip6_deletefraghdr() function, to be shared between IPv6 stack and pf(4).
 - Move ip6_deletefraghdr() to frag6.c. (Suggested by bz)

Differential Revision:	https://reviews.freebsd.org/D2813
Reviewed by:	gnn
2015-06-18 20:21:02 +00:00
ae
383d953540 MFC r284151:
Teach G_PART_GPT class handle g_resize_provider event.
2015-06-18 17:42:24 +00:00
ume
f7ea38668a MFC r284229: Add support for '_' occurring at the beginning or
end of a name component.

PR:		176093
Submitted by:	landonf__at__bikemonkey.org
2015-06-18 16:39:05 +00:00
arybchik
dffc07db79 MFC: r283679
sfxge: do not use DEBUG_FLAGS to enable extra debug checks

DEBUG_FLAGS are set to DEBUG option value when kernel is built.
For example, it is -g in GENERIC config to have debug symbols.
Also DEBUG_FLAGS are used to determine if ctfconvert should keep
debug symbols.
Since we redefined DEBUG_FLAGS, debug symbols were always missing.
ctfconvert complains about it during kernel build.
It is incorrect to append DEBUG_FLAGS, since if DEBUG has no -g (or
similar), we'll have no debug symbols and ctfconvert will complain.
If it incorrect to always have -g in our DEBUG_FLAGS, since debug
symbols presence should be controllable by kernel config.
So, just add disabled by default addition of -DDEBUG=1 to CFLAGS.

Reviewed by:    imp
Sponsored by:   Solarflare Communications, Inc.
2015-06-18 15:50:42 +00:00
arybchik
60da1828ed MFC: r283514
sfxge: add 7xxx NICs family support

Support 7xxx adapters including firmware-assisted TSO and VLAN tagging:

  - Solarflare Flareon Ultra 7000 series 10/40G adapters:
    - Solarflare SFN7042Q QSFP+ Server Adapter
    - Solarflare SFN7142Q QSFP+ Server Adapter

  - Solarflare Flareon Ultra 7000 series 10G adapters:
    - Solarflare SFN7022F SFP+ Server Adapter
    - Solarflare SFN7122F SFP+ Server Adapter
    - Solarflare SFN7322F Precision Time Synchronization Server Adapter

  - Solarflare Flareon 7000 series 10G adapters:
    - Solarflare SFN7002F SFP+ Server Adapter

Support utilities to configure adapters and update firmware.

The work is done by Solarflare developers
(Andy Moreton, Andrew Lee and many others),
Artem V. Andreev <Artem.Andreev at oktetlabs.ru> and me.

Sponsored by:   Solarflare Communications, Inc.
2015-06-18 15:46:39 +00:00
arybchik
7f9011de0c sfxge: use if_initbaudrate() to set interface baudrate
It is required to cope with u_long limit for 10 Gbps in a right way.
It is a direct commit to stable/10 since head differs (head does not
have if_initbaudrate(), if_baudrate is simply uint64_t).

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2849
2015-06-18 15:41:09 +00:00
kib
9d6c0060b8 MFC r284178:
Add barriers when updating and reading th_generation.

MFC r284256:
Tweaks for r284178.
2015-06-18 13:46:32 +00:00
np
56adc340e2 MFC r277229:
Use parentheses instead of close proximity to ensure layer + 1 is evaluated
before the rest of the expression.
2015-06-17 22:52:12 +00:00
delphij
643c625222 MFC r264038 (theraven):
Fix an issue where the locale and rune locale could become out of sync,
causing mb* functions (and similar) to be called with the wrong data
(possibly a null pointer, causing a crash).

PR:		standards/188036
2015-06-17 19:12:18 +00:00
marcel
e4538d7f16 MFC 279125, 279126, 279128, 279139:
Add the -c option for specifying the capacity of the disk image.
  Bump the version to 20150222.
2015-06-17 19:03:32 +00:00
sbruno
d2f2bb87e8 MFC r284179, r283959
Implement multiqueue (max 2 tx/rx queues) for the 82574L chipset.

Change default tuning parameters to handle this new configuration if
EM_MULTIQUEUE is set in the kernel configuration.  Off by default.

See r283959 changelog for the scope of these changes.

Relnotes:	Yes
Sponsored by:	Limelight Networks
2015-06-17 18:50:57 +00:00
gjb
6f16060288 Revert r284516, which broke the build in a way I do not fully
understand yet.  I'll redo this MFC after investigation.

Sponsored by:	The FreeBSD Foundation
2015-06-17 18:22:52 +00:00
gjb
943f6dd413 MFC r284333:
Reduce the arm/armv6 image size from 1G to 480M.

  Since the images are effectively mostly zeros at 1G,
  reduce the size to allow installation on smaller SD
  cards, such as 512Mb.

  While here, stop writing the /boot.txt file on the
  WANDBOARD, which isn't used anyway.

Sponsored by:	The FreeBSD Foundation
2015-06-17 16:29:32 +00:00
gjb
0065593d45 MFC r283989:
Implement endian-aware services_mkdb(8) in the 'distribute'
 target.

Sponsored by:	The FreeBSD Foundation
2015-06-17 16:26:13 +00:00
avg
9729619a52 MFC r284025,284032: dnode_read: handle hole blocks in zfs boot code
PR:		199804
2015-06-17 11:47:06 +00:00
tuexen
6d0b3bca71 MFC r284393:
Correctly detect the case where the last address is removed.
2015-06-17 09:44:02 +00:00
tuexen
76dca5273f MFC r284386:
Fix name of a constant.
2015-06-17 09:41:16 +00:00