np [Tue, 16 Jun 2015 12:36:29 +0000 (12:36 +0000)]
cxgbe(4): Add the ability to dump mailbox commands and replies. It is
enabled/disabled via bit 0 of adapter->debug_flags (which is available
at dev.t5nex.<n>.debug_flags).
gshapiro [Tue, 16 Jun 2015 02:58:50 +0000 (02:58 +0000)]
The import of openssl to address the FreeBSD-SA-15:10.openssl security
advisory includes a change which rejects handshakes with DH parameters
below 768 bits. sendmail releases prior to 8.15.2 (not yet released),
defaulted to a 512 bit DH parameter setting for client connections.
This commit chages that default to 1024 bits. sendmail 8.15.2, when
released well use a default of 2048 bits.
tijl [Mon, 15 Jun 2015 20:40:44 +0000 (20:40 +0000)]
- Change comments to be more consistent with s_ccosh.c and s_csinh.c.
- Fix a case where NaNs were not mixed correctly and signalling NaNs were
not converted to quiet NaNs.
- Eliminate two negations from ctan(z).
tijl [Mon, 15 Jun 2015 20:16:53 +0000 (20:16 +0000)]
Fix some exceptional cases where the sign of the result is unspecified
but must still satisfy csinh(conj(z)) == conj(csinh(z)) and csinh(-z) ==
-csinh(z). This allows eliminating two negations from csin(z).
tijl [Mon, 15 Jun 2015 20:11:06 +0000 (20:11 +0000)]
Fix some exceptional cases where the sign of the result is unspecified
but must still satisfy ccosh(conj(z)) == conj(ccosh(z)) and ccosh(-z) ==
ccosh(z).
bapt [Mon, 15 Jun 2015 15:34:20 +0000 (15:34 +0000)]
Enforce overwritting SHLIBDIR
Since METAMODE has been added, sys.mk loads bsd.mkopt.mk which ends load loading
bsd.own.mk which then defines SHLIBDIR before all the Makefile.inc everywhere.
avg [Mon, 15 Jun 2015 13:43:23 +0000 (13:43 +0000)]
ttm_vm_page_alloc: use vm_page_alloc for pages without dma32 restriction
This change re-organizes code a little bit to extract common pieces
of ttm_alloc_new_pages() and ttm_get_pages() into dedicated functions.
Also, for requests without address restrictions regular vm_page_alloc()
is used.
Lastly, when vm_page_alloc_contig() fails we call VM_WAIT before calling
vm_pageout_grow_cache() to ensure that there is enough free pages at all.
gshapiro [Mon, 15 Jun 2015 04:18:29 +0000 (04:18 +0000)]
Add a quick (?) note for users who may be having sendmail interoperability issues
due to the recent (FreeBSD-SA-15:10.openssl) OpenSSL change to reject 512 bit
DH parameters. Affects 11-CURRENT and 10-STABLE.
kib [Sun, 14 Jun 2015 20:23:41 +0000 (20:23 +0000)]
Invalid pages do not need neither update of the activation count nor
they coould be dirty. Move the handling if the invalid pages in the
inactive scan earlier.
Remove some code duplication in the scan by introducing the
'drop_page' label, which centralizes the object and the page unlock.
Suggested and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
tuexen [Sun, 14 Jun 2015 17:48:44 +0000 (17:48 +0000)]
Stop the heartbeat timer when removing a net.
Thanks to the reporter of
https://code.google.com/p/sctp-refimpl/issues/detail?id=14
for reporting the issue.
sjg [Sun, 14 Jun 2015 16:31:06 +0000 (16:31 +0000)]
Latest clang uses openat(2).
If the pathname is absolute or dirfd is AT_FDCWD we can
handle it exactly like open(2).
Otherwise we output an A record to indicate that the path of
an open directory needs to be used (earlier in the trace).
Differential Revision: D2810
Reviewed by: jhb
MFC after: a bit
jlh [Sun, 14 Jun 2015 07:47:18 +0000 (07:47 +0000)]
NetBSD commit log:
Use a constant array for the MIB. Newer LLVM decided that mib[] warranted
stack protections, with the obvious crash after the setup was done.
As a positive side effect, code size shrinks a bit.
I'm not sure why this hasn't bitten us yes, but it is certainly possible and
there are no real drawbacks to this change anyway.
alc [Sun, 14 Jun 2015 05:23:39 +0000 (05:23 +0000)]
As the next step in eliminating PG_CACHE pages, free rather than cache
pages in vm_pageout_scan(). The reactivation rate of cache pages created
by vm_pageout_scan() is extremely low; typically no more than 0.5% to
2.25% of the pages are ever reactivated. At the same time, caching pages
is more expensive than freeing them. For example, in a test with
PostgreSQL, this change reduced the amount of time spent in the inactive
queue scan by 1/6.
tuexen [Sat, 13 Jun 2015 20:15:44 +0000 (20:15 +0000)]
When using -L the code skips a socket if the local or foreign
address is loopback. So it is shown if both are not loopback.
The man page says that it is shown if the local or foreign
address is not loopback. Change the man page to reflect the
code.
tuexen [Sat, 13 Jun 2015 20:05:20 +0000 (20:05 +0000)]
Allow more than one local or remote address per socket. This is needed to
support SCTP (and MPTCP in the future). No functional change for existing
protocols.
tuexen [Sat, 13 Jun 2015 20:01:54 +0000 (20:01 +0000)]
Allow more than one socket entry for a file descriptor. This is needed
for supporting 1-to-many style SCTP sockets. For other sochets, there
is no functional change.
kp [Sat, 13 Jun 2015 19:39:21 +0000 (19:39 +0000)]
Fix panic when adding vtnet interfaces to a bridge
vtnet interfaces are always in promiscuous mode (at least if the
VIRTIO_NET_F_CTRL_RX feature is not negotiated with the host). if_promisc() on
a vtnet interface returned ENOTSUP although it has IFF_PROMISC set. This
confused the bridge code. Instead we now accept all enable/disable promiscuous
commands (and always keep IFF_PROMISC set).
There are also two issues with the if_bridge error handling.
If if_promisc() fails it uses bridge_delete_member() to clean up. This tries to
disable promiscuous mode on the interface. That runs into an assert, because
promiscuous mode was never set in the first place. (That's the panic reported in
PR 200210.)
We can only unset promiscuous mode if the interface actually is promiscuous.
This goes against the reference counting done by if_promisc(), but only the
first/last if_promic() calls can actually fail, so this is safe.
A second issue is a double free of bif. It's already freed by
bridge_delete_member().
PR: 200210
Differential Revision: https://reviews.freebsd.org/D2804
Reviewed by: philip (mentor)
kan [Sat, 13 Jun 2015 15:14:39 +0000 (15:14 +0000)]
Unbreak libxo's handling of characters not representable in current locale
The xo_format_string_direct function loops forever never advancing the
processed string pointer when it encounters a character that makes
mbrtowc fail. Make it emit '?' character instead, as it seems this is
what the code intent was, sans bugs.
davidcs [Sat, 13 Jun 2015 01:28:19 +0000 (01:28 +0000)]
PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which can cause the PHY to use bogus values. Fixes intermittent link failures.
bxe_ioctl() completes all functions within its context as opposed to a taskqueue earlier.
bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the functionality within its context
Submitted by:gary.zambrano@qlogic.com
MFC after:5 days
jhb [Fri, 12 Jun 2015 15:06:17 +0000 (15:06 +0000)]
Ensure that the upper 16 bits of segment registers manually saved in
trapframes are cleared by explicitly pushing a zero and then moving
the segment register into the low 16 bits. Certain Intel processors
treat a push of a segment register as a move of the segment register
into the low 16 bits leaving the upper 16 bits of the word in the
stack unchanged.
glebius [Fri, 12 Jun 2015 13:57:04 +0000 (13:57 +0000)]
Unbreak mouse on resume on Thinkpads when hw.psm.trackpoint_support=0,
which is default. It was broken in r281441.
It appears that set_trackpoint_parameters() call on resume disables the
mouse. So, we need not call it on resume if hw.psm.trackpoint_support=0.
The problem is that the probe functions are used both for probing and
for reiniting on resume. And the absense of the softc parameter is used
as a mark to distinguish reinit and probe, which is quite ugly. At the
same time the softc parameter is needed to call set_trackpoint_parameters().
o Change the arguments of probefunc_t to always supply the softc, and
use additional enum argument to tell probing from initing.
o Don't call set_trackpoint_parameters() from global doinitialize(),
instead call it from the enable_trackpoint() only.
o In enable_synaptics() call enable_trackpoint() in both probe and
reinit cases.
Together with: Jan Kokemüller <jan.kokemueller gmail.com>
marcel [Fri, 12 Jun 2015 12:27:10 +0000 (12:27 +0000)]
We need to handle 64-bit BARs ourselves to avoid that the
PCI infrastructure instantiates a non-existent resource.
This has BARs suddenly show up with pciconf(8) under
VMware as well. Now that we read the BAR ourselves, ask
for the correct resource type.
glebius [Fri, 12 Jun 2015 11:32:20 +0000 (11:32 +0000)]
Make KPI of vm_pager_get_pages() more strict: if a pager changes a page
in the requested array, then it is responsible for disposition of previous
page and is responsible for updating the entry in the requested array.
Now consumers of KPI do not need to re-lookup the pages after call to
vm_pager_get_pages().
Reviewed by: kib
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
avg [Fri, 12 Jun 2015 11:21:35 +0000 (11:21 +0000)]
zfs clone should not mount the clone if canmount == noauto
Creation of a new filesystem does not imply an intent to mount it.
Since canmount property is not inherited and its default value is 'on',
the only scenario where this matters is zfs clone -o canmount=noauto.
zfs create -o canmount=noauto already does not mount the new filesystem.
Also see:
https://www.illumos.org/issues/5984
https://reviews.csiden.org/r/228/
https://github.com/FransUrbo/zfs/commit/dd0e0e69f5b1c83bf2895ac00a0b83af77473175
https://github.com/zfsonlinux/zfs/issues/2241
Reviewed by: mahrens
MFC after: 8 days
Sponsored by: ClusterHQ
avg [Fri, 12 Jun 2015 10:41:24 +0000 (10:41 +0000)]
MFV r284040: check that datasets are snapshots
5946 zfs_ioc_space_snaps must check that firstsnap and lastsnap refer to snapshots
5945 zfs_ioc_send_space must ensure that fromsnap refers to a snapshot
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Note that the upstream commit is modified during MFV: in the upstream
the check is done by inspecting ds_is_snapshot field while in FreeBSD
we call dsl_dataset_is_snapshot().
This is because illumos/illumos-gate@bc9014e6a81272073b9854d9f65dd59e18d18c35
(r277428 in vendor-sys/illumos) is not MFV-ed yet.
avg [Fri, 12 Jun 2015 10:01:24 +0000 (10:01 +0000)]
several lockstat improvements
0. For spin events report time spent spinning, not a loop count.
While loop count is much easier and cheaper to obtain it is hard
to reason about the reported numbers, espcially for adaptive locks
where both spinning and sleeping can happen.
So, it's better to compare apples and apples.
1. Teach lockstat about FreeBSD rw locks.
This is done in part by changing the corresponding probes
and in part by changing what probes lockstat should expect.
2. Teach lockstat that rw locks are adaptive and can spin on FreeBSD.
3. Report lock acquisition events for successful rw try-lock operations.
4. Teach lockstat about FreeBSD sx locks.
Reporting of events for those locks completely mirrors
rw locks.
5. Report spin and block events before acquisition event.
This is behavior documented for the upstream, so it makes sense to stick
to it. Note that because of FreeBSD adaptive lock implementations
both the spin and block events may be reported for the same acquisition
while the upstream reports only one of them.
The FreeBSD extension adds a new request type, called blkif_segment_block
which has a size of 112bytes for both i386 and amd64. This is fine on
amd64, since requests have a size of 112B there also. But this is not true
for i386, where requests have a size of 108B. So on i386 we basically
overrun the ring slot when queuing a request of type blkif_segment_block_t,
which is very bad.
Remove this extension (including a cleanup of the public blkif.h header
file) from blkfront and blkback.
Sponsored by: Citrix Systems R&D Tested-by: cperciva
sjg [Fri, 12 Jun 2015 03:26:05 +0000 (03:26 +0000)]
Reorganize targets/pseudo/userland
This target mainly exists to help check things build.
Eventually targets that build real packages or images will be more
important.
As such move the pseudo targets that only exist for the benefit of
'userland' to under it.