rwatson [Thu, 19 Mar 2015 13:37:36 +0000 (13:37 +0000)]
Merge r263233 from HEAD to stable/10:
Update kernel inclusions of capability.h to use capsicum.h instead; some
further refinement is required as some device drivers intended to be
portable over FreeBSD versions rely on __FreeBSD_version to decide whether
to include capability.h.
jhb [Thu, 19 Mar 2015 13:08:17 +0000 (13:08 +0000)]
MFC 278327:
Change ktrdump to use the more standard -M/-N flags to specify the path
to a crash dump and kernel, respectively. The existing -m/-e flags are
still supported for backwards compatiblity but are no longer documented.
ae [Thu, 19 Mar 2015 12:49:55 +0000 (12:49 +0000)]
MFC r279910:
Reset mbuf pointer to NULL in fastroute case to indicate that mbuf was
consumed by filter. This fixes several panics due to accessing to mbuf
after free.
rwatson [Thu, 19 Mar 2015 12:32:48 +0000 (12:32 +0000)]
Merge an applicable subset of r263234 from HEAD to stable/10:
Update most userspace consumers of capability.h to use capsicum.h instead.
auditdistd is not updated as I will make the change upstream and then do a
vendor import sometime in the next week or two.
Note that a significant fraction does not apply, as FreeBSD 10 doesn't
contain a Capsicumised ping, casperd, libcasper, etc. When these features
are merged, the capsicum.h change will need to be merged with them.
rwatson [Wed, 18 Mar 2015 15:20:08 +0000 (15:20 +0000)]
Merge r263232 from head to stable/10:
Rename capability.h to capsicum.h: the original name conflicts with the
draft POSIX.1e capability.h used on some systems (e.g., Linux). On
FreeBSD, leave a wrapper header so that current code continues to compile.
We will eventually want to deprecate the old header as the presence of a
capability.h may be confusing some configure scripts.
Suggested by: David Drysdale <drysdale at google.com>
Discussed on: cl-capsicum-discuss
MFC after: 3 weeks
ed [Sun, 15 Mar 2015 09:15:11 +0000 (09:15 +0000)]
MFC r279016:
Make syslogd work in case shutdown() is POSIX-ly correct.
On POSIX conformant systems, shutdown() should return ENOTCONN when not
connected. We attempted to fix this once (kern/84761), but this change
got backed out because it 'breaks code' (r150155).
I just reapplied the patch and indeed, syslogd fails on startup. Make it
easier to re-enable this change in the future by paching up syslogd to
do the right thing.
kib [Sat, 14 Mar 2015 08:42:40 +0000 (08:42 +0000)]
MFC r279401:
Some fixes for fdescfs lookup code Do not ever return doomed vnode from.
lookup. Reuse the vn_vget_ino_gen() helper to handle parallel unmounts .
jhb [Fri, 13 Mar 2015 18:38:02 +0000 (18:38 +0000)]
MFC 270516:
i915 driver - enable opregion handle; program CADL.
add opregion handling for drm2 - which exposes some ACPI video configuration
pieces that some Lenovo laptop models use to flesh out which video device
to speak to. This enables the brightness control in ACPI to work these models.
The CADL bits are also important - it's used to figure out which ACPI
events to hook the brightness buttons into. It doesn't yet seem to work
for me, but it does for the OP.
PR: 190186, 198551
Submitted by: Henry Hu <henry.hu.sh@gmail.com>
jhb [Fri, 13 Mar 2015 17:45:34 +0000 (17:45 +0000)]
MFC 278682:
Make the extra dependencies in DPADD be dependencies of PROG_FULL and
SHLIB_NAME_FULL so that the full binary is relinked when a dependency
changes. Right now the existing full binary is left as-is and only
the objcopy to remove debug symbols is run.
jhb [Thu, 12 Mar 2015 15:08:23 +0000 (15:08 +0000)]
MFC 277713:
If the boot-time memory test is enabled, output a dot ('.') for
each GB of RAM tested so people watching the console can see that
the machine is making progress and not hung.
mav [Thu, 12 Mar 2015 13:16:05 +0000 (13:16 +0000)]
MFC r270833 (by imp):
We were returning 20 bytes as the FIS size to send, but only
initializing 16. Initialize all 20 so we don't send garbage in the
Auxiliary register. The SATA standard mandates a 5 dword length for
the Host to Device FIS.
ae [Thu, 12 Mar 2015 09:04:19 +0000 (09:04 +0000)]
MFC r279588:
Fix deadlock in IPv6 PCB code.
When several threads are trying to send datagram to the same destination,
but fragmentation is disabled and datagram size exceeds link MTU,
ip6_output() calls pfctlinput2(PRC_MSGSIZE). It does notify all
sockets wanted to know MTU to this destination. And since all threads
hold PCB lock while sending, taking the lock for each PCB in the
in6_pcbnotify() leads to deadlock.
RFC 3542 p.11.3 suggests notify all application wanted to receive
IPV6_PATHMTU ancillary data for each ICMPv6 packet too big message.
But it doesn't require this, when we don't receive ICMPv6 message.
Change ip6_notify_pmtu() function to be able use it directly from
ip6_output() to notify only one socket, and to notify all sockets
when ICMPv6 packet too big message received.
MFC r279684:
tcp6_ctlinput() doesn't pass MTU value to in6_pcbnotify().
Check cmdarg isn't NULL before dereference, this check was in the
ip6_notify_pmtu() before r279588.
dim [Sun, 8 Mar 2015 22:50:45 +0000 (22:50 +0000)]
MFC r279598:
When compiling boot2 with gcc on i386 and pc98, only use the custom flag
-mno-align-long-strings when compiling with base gcc. This is checked
by comparing the version number against 4.2.1, which is not exactly
right, but good enough. (There is no other way to check whether we are
using the non-standard gcc in base, as far as I know.)
dim [Sun, 8 Mar 2015 22:39:01 +0000 (22:39 +0000)]
MFC r265829 (by imp):
Support, to the extent we generate proper command lines, compiling
with clang 3.3. Useful for test building -current on a -stable system
in individual directories. Potentially useful if we ever want to
support, say, gcc 4.8 or 4.9's new warnings when building with an
external toolchain (but such support not yet committed). Document
the bsd.compiler.mk interface.
MFC r266587 (by imp):
Allow CC to not actually exist. During the ports INDEX run, all the
Makefiles are evaluated without building things. In a normal build,
the prerequisites would be built, and CC would be an actual thing. In
an INDEX build, though, they don't exists. Redirect stderr to get rid
of annoying messages, and assume that the compiler version is 0 if the
actual compiler can't tell us. Do this in preference to guessing based
on numbers because gcc410 might be 4.10, or 4.1.0 and without
carefully crafted special knowledge we differentiate between them
easily (also ming-gcc has no clues at all). Elsewhere, don't trust
the compiler version if it is 0.
MFC r273405 (by bapt):
When using an external toolchain note that gcc 4.8+ supports C++11
Submitted by: imp
MFC r275557 (by ngie):
Fix typos in comments and wrap to <80 columns
MFC r275588 (by ngie):
${CC} --version doesn't need to be queried if both COMPILER_TYPE and
COMPILER_VERSION are known
MFC r275589 (by ngie):
The previous commit should have been a logical or not a logical "and"
trasz [Sat, 7 Mar 2015 19:32:19 +0000 (19:32 +0000)]
MFC r273127:
Make automountd(8) inform autofs(4) whether directory being handled can
have wildcards. This makes it possible for autofs(4) to avoid requesting
automountd(8) action on access to nonexistent nodes - unless wildcards
are actually used.
Note that this change breaks ABI for automountd(8).
MFC r278521:
Restore ABI compatibility, broken in r273127. Note that while this fixes
ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd(8)
is neccessary.
hselasky [Sat, 7 Mar 2015 18:33:28 +0000 (18:33 +0000)]
MFC r279584:
Updates for the Mellanox ethernet driver
> List of fixes:
* use correct format for GID printouts
* double array indexing
* spelling in printouts
* void pointer arithmetic
* allow more receive rings
* correct maximum number of transmit rings
* use "const" instead of "static" for constants
* check for invalid VLAN tags
* check for lack of IRQ resources
> Added more hardware specific defines
> Added more verbose printouts of firmware status codes
edwin [Fri, 6 Mar 2015 21:56:44 +0000 (21:56 +0000)]
MFC of 279706,tzdata10:
Release 2015a - 2015-01-29
Changes affecting future time stamps
The Mexican state of Quintana Roo, represented by America/Cancun,
will shift from Central Time with DST to Eastern Time without DST
on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.)
Chile will not change clocks in April or thereafter; its new standard time
will be its old daylight saving time. This affects America/Santiago,
Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.)
New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
(Thanks to Tim Parenti.)
Changes affecting past time stamps
Iceland observed DST in 1919 and 1921, and its 1939 fallback
transition was Oct. 29, not Nov. 29. Remove incorrect data from
Shanks about time in Iceland between 1837 and 1908.
Some more zones have been turned into links, when they differed
from existing zones only for older time stamps. As usual,
these changes affect UTC offsets in pre-1970 time stamps only.
Their old contents have been moved to the 'backzone' file.
The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
and Asia/Muscat.
kib [Fri, 6 Mar 2015 09:22:05 +0000 (09:22 +0000)]
MFC r279362:
The VNASSERT in vflush() FORCECLOSE case is trying to panic early to
prevent errors from yanking devices out from under filesystems. Only
care about special vnodes on devfs, special nodes on other kinds of
filesystems do not have special properties.
MFC r279324:
When gpart(8) is trying automatically determine the first available
block of free space after existing partition, take into account
provider's stripeoffset, since the result will be adjusted to this
value.
hselasky [Thu, 5 Mar 2015 10:04:34 +0000 (10:04 +0000)]
MFC r279210:
Add support for the DWC OTG v2 chipset found in the STM32F4 series of
processors. Make sure we pullup the data lines in device mode when we
power on the port.
dteske [Thu, 5 Mar 2015 00:32:54 +0000 (00:32 +0000)]
MFC r273068:
Rename awk(1) implementation of GNU awk's built-in asorti() function to
prevent fatal conflict should one-true-awk ever be replaced -- e.g., in
an appliance -- with GNU awk. NB: Renamed my implementation to _asorti()
kib [Wed, 4 Mar 2015 09:29:25 +0000 (09:29 +0000)]
MFC r279282:
When unlocking a contested PI pthread mutex, if the queue of waiters
is empty, look up the umtx_pi and disown it if the current thread owns it.
gjb [Tue, 3 Mar 2015 02:46:59 +0000 (02:46 +0000)]
MFC r279249, r279250, r279257:
r279249:
Add 'cloudware-install' target to handle copying cloud
disk images to a directory within DESTDIR.
Add CLOUDINSTALL variable to automatically generate the
actual list of install targets. While here, rename the
cloud-specific names from 'vm-' to 'cw-' to avoid naming
collisions.
Add AZURE_DISK, GCE_DISK, and OPENSTACK_DISK output file
variables.
Add 'cloudware-install' to the 'install' target.
r279250:
Remove a stale comment.
r279257:
Add a CLOUDPACKAGE variable to contain a list of targets for
post-install packaging cloud provider images.
Add a 'gce-package.sh' script to generate the final output
image ready for upload to the GCE platform. Right now, this
is the only image that has a specific output format (GNU-tar),
and this implementation is expected to be temporary.
This is not directly connected to the other release targets.
thomas [Mon, 2 Mar 2015 23:17:17 +0000 (23:17 +0000)]
MFC rev. 278728:
(backup_kernel_finddir, backup_kernel, install_files):
Add missing references to $BASEDIR, in order to allow correct operation
when updating a system mounted at another location than / (e.g. when
updating an alternate Boot Environment).
ken [Mon, 2 Mar 2015 21:00:54 +0000 (21:00 +0000)]
MFC r279346:
------------------------------------------------------------------------
r279346 | ken | 2015-02-26 19:44:12 -0700 (Thu, 26 Feb 2015) | 13 lines
Remove an obsolete comment in devstat(3) about the accuracy of the
milliseconds per transaction (DSM_MS_PER_TRANSACTION) calculation.
The comment was accurate many years ago when the kernel didn't
record I/O times on a per-I/O basis, but now that we do collect
that information in most areas, it isn't correct.
The milliseconds per transaction values are correct, assuming the
I/O duration has been recorded.
MFC r279206:
In some cases soreceive_dgram() can return no data, but has control
message. This can happen when application is sending packets too big
for the path MTU and recvmsg() will return zero (indicating no data)
but there will be a cmsghdr with cmsg_type set to IPV6_PATHMTU.
Remove KASSERT() which does NULL pointer dereference in such case.
Also call m_freem() only when m isn't NULL.
MFC r279209:
soreceive_generic() still has similar KASSERT(), therefore instead of
remove KASSERT(), change it to check mbuf isn't NULL.