melifaro [Sun, 13 Dec 2015 16:37:01 +0000 (16:37 +0000)]
Fix PINNED routes handling.
Before r291643, adding new interface prefix had the following logic:
try_add:
EEXIST && (PINNED) {
try_del(w/o PINNED flag)
if (OK)
try_add(PINNED)
}
In r291643, deletion was performed w/ PINNED flag held which leaded
to new interface prefixes (like ::1) overriding older ones.
Fix this by requesting deletion w/o RTF_PINNED.
PR: kern/205285
Submitted by: Fabian Keil <fk at fabiankeil.de>
mmel [Sun, 13 Dec 2015 09:05:55 +0000 (09:05 +0000)]
SIMPLEBUS: Don't panic if child device doesn't have devinfo set.
Strictly speaking, missing devinfo is error which can be caused
by instantiating child using device_add_child() instead of
BUS_ADD_CHILD(). However, we can tolerate it.
mmel [Sun, 13 Dec 2015 08:17:49 +0000 (08:17 +0000)]
OFW: Add helper functions for parsing xref based lists.
By using this functions, we can parse a list of tuples, each of them holds
xref and variable number of values.
This kind of list is used in DT for clocks, gpios, resets ...
melifaro [Sun, 13 Dec 2015 07:39:49 +0000 (07:39 +0000)]
Remove LLE read lock from IPv6 fast path.
LLE structure is mostly unchanged during its lifecycle: there are only 2
things relevant for fast path lookup code:
1) link-level address change. Since r286722, these updates are performed
under AFDATA WLOCK.
2) Some sort of feedback indicating that this particular entry is used so
we send NS to perform reachability verification instead of expiring entry.
The only signal that is needed from fast path is something like binary
yes/no.
The latter is solved by the following changes:
Special r_skip_req (introduced in D3688) value is used for fast path feedback.
It is read lockless by fast path, but updated under req_mutex mutex. If this
field is non-zero, then fast path will acquire lock and set it back to 0.
After transitioning to STALE state, callout timer is armed to run each
V_nd6_delay seconds to make sure that if packet was transmitted at the start
of given interval, we would be able to switch to PROBE state in V_nd6_delay
seconds as user expects.
(in STALE state) timer is rescheduled until original V_nd6_gctimer expires
keeping lle in STALE state (remaining timer value stored in lle_remtime).
(in STALE state) timer is rescheduled if packet was transmitted less that
V_nd6_delay seconds ago to make sure we transition to PROBE state exactly
after V_n6_delay seconds.
As a result, all packets towards lle in REACHABLE/STALE/PROBE states are handled
by fast path without acquiring lle read lock.
ume [Sat, 12 Dec 2015 14:42:50 +0000 (14:42 +0000)]
RFC 3493 requires ignoring the loopback address for A_ADDRCONFIG.
Since it breaks certain jail setup, we ignore just 127.0.0.1
instead of whole loopback address range.
kib [Sat, 12 Dec 2015 14:08:29 +0000 (14:08 +0000)]
In md(4) over vnode, correct handling of the unaligned unmapped io
requests which page alignment + size is greater than MAXPHYS. Right
now md(4) over vnode would use the physical buffer of the size MAXPHYS
to map a data of size MAXPHYS + page offset of the user buffer. This
typically corrupts next pbuf, or, if the pbuf used was the last pbuf
in the map, the next page after the pbuf's map.
Split request up to the size of io which fits into pbuf KVA with
alignment, and retry if a part of the bio is left unprocessed.
Reported by: Fabian Keil <fk@fabiankeil.de>
Tested by: Fabian Keil, pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
ak [Fri, 11 Dec 2015 23:52:08 +0000 (23:52 +0000)]
- Allow to extract symlinks
- Implement 4-digit year format listing (-y option)
- Improve detection of text files
- Use %ju for error_count as it is unsigned
emaste [Fri, 11 Dec 2015 20:28:27 +0000 (20:28 +0000)]
Update to ELF Tool Chain r3272
Highlights (not already in the FreeBSD tree):
- addr2line: Speed up and support searching inlined functions
- addr2line: Support -i, -a, -p options
- readelf: Add some ARM relocation types
- readelf, libelf: Avoid reading beyond end of buffer/file
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
markj [Fri, 11 Dec 2015 20:05:07 +0000 (20:05 +0000)]
Don't make assertions about td_critnest when the scheduler is stopped.
A panicking thread always executes with a critical section held, so any
attempt to allocate or free memory while dumping will otherwise cause a
second panic. This can occur, for example, if xpt_polled_action() completes
non-dump I/O that was pending at the time of the panic. The fact that this
can occur is itself a bug, but asserting in this case does little but
reduce the reliability of kernel dumps.
emaste [Fri, 11 Dec 2015 18:47:41 +0000 (18:47 +0000)]
elfcopy: include extension but replace . when converting from binary
The change in r291958 was not consistent with GNU objcopy. The start,
end and size symbols created for ELF objects converted from binary need
to include the full filename including the extension, but with the
periods replaced with underscores.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4474
imp [Fri, 11 Dec 2015 16:51:04 +0000 (16:51 +0000)]
Correct the CONFIG0_VI value. According to
http://www.t-es-t.hu/download/mips/md00090c.pdf this is bit 3 of the
config0 word, not bit 2. This should fix virtually indexed caches
(relatively new in the MIPS world, so no current platforms used this
and current code just uses it as an optimization). It was causing
false positives on newer platforms that default to large values for
the kseg0 cache coherency attribute.
imp [Fri, 11 Dec 2015 05:39:45 +0000 (05:39 +0000)]
Handle CPUTYPE=armv[4567]* better. gcc expects those to be either
-march=foo or -mcpu=generic-foo. Catch the armvX* case and pass
the right args for it.
imp [Fri, 11 Dec 2015 05:39:44 +0000 (05:39 +0000)]
Move the inclusion of bsd.cpu.mk from sys.mk to bsd.opts.mk. However,
for historical behavior that ports depends on, include it if we're
inside the ports tree.
imp [Fri, 11 Dec 2015 05:28:00 +0000 (05:28 +0000)]
Create a USB_PNP_INFO and use it to export the existing PNP
tables. Some drivers needed some slight re-arrangement of declarations
to accommodate this. Change the USB pnp tables slightly to allow
better compatibility with the system by moving linux driver info from
start of each entry to the end. All other PNP tables in the system
have the per-device flags and such at the end of the elements rather
that at the beginning.
imp [Fri, 11 Dec 2015 05:27:56 +0000 (05:27 +0000)]
Create a generic PCCARD_PNP_INFO from the MODULE_PNP_INFO building
block. Use it in all the PNP drivers to export either the current PNP
table. For uart, create a custom table and export it using
MODULE_PNP_INFO since it's the only one that matches on function
number.
imp [Fri, 11 Dec 2015 05:15:13 +0000 (05:15 +0000)]
o Resolve the real path to NANO_OBJ so everything that depends on it
doesn't have lots of ../../foo in it.
o Tweak the powerpc64 variant a bit. This gets us closer to working
with qemu-system-poewrpc64, but we aren't quite there yet.
smh [Fri, 11 Dec 2015 02:06:03 +0000 (02:06 +0000)]
Limit stripesize reported from nvd(4) to 4K
Intel NVMe controllers have a slow path for I/Os that span a 128KB stripe boundary but ZFS limits ashift, which is derived from d_stripesize, to 13 (8KB) so we limit the stripesize reported to geom(8) to 4KB.
This may result in a small number of additional I/Os to require splitting in nvme(4), however the NVMe I/O path is very efficient so these additional I/Os will cause very minimal (if any) difference in performance or CPU utilisation.
This can be controller by the new sysctl kern.nvme.max_optimal_sectorsize.
jhibbits [Fri, 11 Dec 2015 01:23:18 +0000 (01:23 +0000)]
Add more interrupts handled for booke.
e500mc, e5500, and e6500 all use the normal FPU, with the same behavior as AIM
hardware. e6500 also supports Altivec, so, although we don't yet have e6500
hardware to test on, add these IVORs as well. Theoretically, since it boots the
same as a e5500, it should work, single-threaded, single-core, with full altivec
support as of this commit.
With this commit, and some other patches to be committed shortly FreeBSD now
boots on the P5020, single-core, all the way to user space, and should boot just
fine on e500mc.
Relnotes: Yes (e500mc, e5500 support)
Sponsored by: Alex Perez/Inertial Computing
rrs [Fri, 11 Dec 2015 01:21:32 +0000 (01:21 +0000)]
More fixes in the various intel processors, fixing missing
IAP_F_FM's as well as incorrect umask specifications for
some of the new Broadwell/Skylake PMC's. Also silvermont
had a *lot* of missing IAP_F_FM.
asomers [Thu, 10 Dec 2015 21:46:21 +0000 (21:46 +0000)]
During vdev_geom_open, require that the vdev guids match the device's label
except during split, add, or create operations. This fixes a bug where the
wrong disk could be returned, and higher layers of ZFS would immediately
eject it again.
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c:
o When opening by GUID, require both the pool and vdev GUIDs to
match. While it is highly unlikely for two vdevs to have the same
vdev GUIDs, the ZFS storage pool allocator only guarantees they
are unique within a pool.
o Modify the open behavior to:
- If we are opening a vdev that hasn't previously been opened,
open by path without checking GUIDs.
- Otherwise, open by path and verify GUIDs.
- If that fails, search all geom providers for a device with
matching GUIDs.
- If that fails, return ENOENT.
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.
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.
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+.
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.
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
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.
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.
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.
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.
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@
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@
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.
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.
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.