199567 Commits

Author SHA1 Message Date
brueffer
dffad8730a MFC: r284929
Fix issues that kept some of the examples from actually working.

PR:		144534
Submitted by:	Nicolas Edel
Approved by:	re (gjb)
2015-07-13 12:04:40 +00:00
brueffer
c846b28e60 MFC: r284931
Set the initial system time to a sane (as in: not end of 21st century)
value when booting on a PC with CMOS clock set to a year before 2000.

This uses 1980 (instead of 1970 as in the initial patch) as pivot year as
suggested by imp in the PR followup.

PR:		195703
Submitted by:	cs@soi.spb.ru
Reviewed by:	imp
Approved by:	re (gjb)
2015-07-13 11:58:08 +00:00
hselasky
e70b377190 MFC r285088:
Fix broken implementation of "kvasprintf()" function by adding missing
kmalloc() call. Make function global instead of static inline to fix
compiler warnings about passing variable argument lists to inline
functions.

Sponsored by:   Mellanox Technologies
Approved by:	re, gjb
2015-07-11 21:59:15 +00:00
kib
969c638bab MFC r284887:
Handle errors from background write of the cylinder group blocks.

MFC r284927:
Simplify code.

Approved by:	re (gjb)
2015-07-11 19:11:40 +00:00
gjb
42ea6b1b27 Fix two remaining issues with the arm UFS mount issue:
- Add the GEOM_PART_GPT option and enable MSDOSFS in the GUMSTIX
  kernel. [1]

- Add GEOM_LABEL to the PANDABOARD kernel, that should have been
  included included in r285132.  I confused the kernel configuration
  used for the WANDBOARD and PANDABOARD, which the former uses the
  IMX6 kernel configuration, along with the CUBOX-HUMMINGBOARD.

This is a direct commit to stable/10, as was r285132.

[1] I do not actually have the GUMSTIX board, but I suspect it will
    fail to boot in the same way as the others have been.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-10 22:10:00 +00:00
gjb
cb93732d0d Update stable/10 to BETA1 in preparation for 10.2-BETA1 builds.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-10 00:01:33 +00:00
gjb
48957d233d Remove duplicate file(1) update entry.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-09 22:44:28 +00:00
gjb
c3ee63817e Document SA-15:12.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-09 17:45:08 +00:00
gjb
80d27c7e33 Document r285330, OpenSSL update to 1.0.1p.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-09 17:25:02 +00:00
jkim
d7beffb2a7 MFC: r285329
Merge OpenSSL 1.0.1p.

Approved by:	re (gjb)
Relnotes:	yes
2015-07-09 17:17:22 +00:00
gjb
218a371ceb MFC r276383, r276400:
r276383:
  Delay dropping to the mountroot prompt for 10 seconds
  in case the root device is not yet ready.

 r276400:
  Use the correct loader.conf(5) entry for deferring the
  mountroot prompt.

Approved by:	re (marius)
Reminded by:	hrs
Sponsored by:	The FreeBSD Foundation
2015-07-09 15:56:51 +00:00
des
e9222c7afa MFH (r275020): partial fix for getgrouplist() in group_compat case
PR:		190055
Approved by:	re (marius)
2015-07-09 13:30:37 +00:00
gjb
8415194b18 Document r285305, sendmail update to 8.15.2.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-09 05:46:37 +00:00
gshapiro
5ed69735b2 MFC: Update for sendmail 8.15.2 import
Approved by:	re (gjb)
2015-07-09 05:27:30 +00:00
gshapiro
997879b818 MFC: Minor changes to force commit these files so new freebsd*.cf files
are built to use the new sendmail-8.15.2/cf tree.

Approved by:	re (gjb)
2015-07-09 05:25:47 +00:00
gshapiro
574e70a7ab MFC: Merge sendmail 8.15.2
Approved by:	re (gjb)
2015-07-09 05:23:17 +00:00
gshapiro
6fbe38a3cd MFC: Temporarily disable WARNS while addressing a non-issue with the upstream code
Approved by:	re (gjb)
2015-07-09 05:02:13 +00:00
gshapiro
f50f4be157 By default, sendmail 8.15 uses uncompressed IPv6 addresses. Keep
current FreeBSD 10 and earlier behavior of using compressed IPv6
addresses in configuration, maps, rulesets, etc.  (FreeBSD 11 and
later will use the new default of uncompressed IPv6 addresses.)

Approved by:	re (gjb)
2015-07-09 05:00:19 +00:00
gshapiro
22fd8e5d58 MFC: libsm/path.c is about to disappear in the merge of sendmail 8.15.2. It
is an empty file now so it is safe to remove before the merge.

Approved by:	re (gjb)
2015-07-09 04:58:56 +00:00
loos
13177b16bb MFC r285138:
Install loader.rc with ARM u-boot loader (ubldr).

  loader.rc is the responsible to read and process loader.conf variables.

  This fix the issue of loader.conf being silently ignored.

Approved by:	re (gjb)
2015-07-08 23:50:04 +00:00
bapt
2ba8e41f9e MFC: r279597 (and 259152,259219 as dependency)
Make calendar(1) usable again. rework the calendar parser so that it is
compatible with documented format:

Support includes surrounded by '"' or '<' '>'
Print warnings about bad syntax
Correctly navigate through include directories to find calendar files
Correctly support multiple includes

While here:

MFC: 262011 (by eadler)

calendar(1): don't segfault in invalid input

When the user supplies an invalid number of days provide a useful error message
instead of segfaulting.

Approved by:	re (gjb)
2015-07-08 21:06:19 +00:00
gjb
6ca1356aa8 Document r285236, TSO and checksum offloading support in
hv_netvsc(4).

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-08 12:08:58 +00:00
gjb
29b0d59569 Document r285206, unbound updated to 1.5.3.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-08 12:08:55 +00:00
gjb
93022cd32d Document r285092, pw(8) '-R' option.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-08 12:08:53 +00:00
gjb
cee33caf0f MFC r273489 (cperciva):
Populate the GELI passphrase cache with the kern.geom.eli.passphrase
 variable (if any) provided in the boot environment.  Unset it from
 the kernel environment after doing this, so that the passphrase is
 no longer present in kernel memory once we enter userland.

 This will make it possible to provide a GELI passphrase via the boot
 loader.

 Note: head and stable/10 differ as a result of r273174, which renames
 the getenv(), setenv(), and unsetenv() functions with kern_getenv(),
 kern_setenv(), and kern_unsetenv(), which was reverted in the relevant
 parts of this change in 10-STABLE.

PR:		200448
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-08 09:54:17 +00:00
gjb
82385ff484 Revert r285249, pending further investigation on how the build
broke.

Approved by:	re (implicit)
Pointyhat:	gjb (self)
Sponsored by:	The FreeBSD Foundation
2015-07-07 20:36:48 +00:00
gjb
4b4ce39bb7 MFC r273489 (cperciva):
Populate the GELI passphrase cache with the kern.geom.eli.passphrase
 variable (if any) provided in the boot environment.  Unset it from
 the kernel environment after doing this, so that the passphrase is
 no longer present in kernel memory once we enter userland.

 This will make it possible to provide a GELI passphrase via the boot
 loader.

PR:		200448
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-07 18:52:22 +00:00
whu
c6218b1955 MFC r284746 and r284889 TSO and checksum offloading support for Netvsc
driver on Hyper-V.

Submitted by: whu
Reviewed by: royger
Approved by: re
Relnotes: yes
Sponsored by: Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D2906
2015-07-07 04:15:22 +00:00
emaste
46c04bda42 MFC r284928: speed up ar(1) on UFS file systems
Fault in the buffer prior to writing to workaround poor performance due
to interaction with kernel fs deadlock avoidance code. See the comment
prior to vn_io_fault_doio() in sys/kern/vfs_vnops.c for details of the
issue.

On my stable/10 desktop with a 16MB obj.o and "ar r out.a obj.o" I see
the following run times (seconds):

x ar.r284891
+ ar.patched
+----------------------------------------------------------------------+
|+                                                                     |
|+                                                                    x|
|+                                                                   xx|
|A                                                                   |A|
+----------------------------------------------------------------------+
    N         Min          Max        Median           Avg        Stddev
x   3       1.307        1.321         1.315     1.3143333  0.0070237692
+   3       0.020        0.023         0.022   0.021666667  0.0015275252
Difference at 95.0% confidence
        -1.29267 +/- 0.0115203
        -98.3515% +/- 0.876513%
        (Student's t, pooled s = 0.00508265)

Thanks to kib for diagnosing and explaining the issue and suggesting
the workaround.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2015-07-07 02:17:24 +00:00
des
a060063a48 MFH (r276605, r282089): upgrade to latest Unbound
MFH (r276699, r276702, r277057): local control socket
MFH (r276599, r276612, r282087, r282088): build fixes

This brings in Unbound 1.5.3 from head.  Local control sockets are now
supported and will be used by default for new installations.  Existing
systems will continue to use TCP control sockets until the automated
setup script is re-run ("service local_unbound setup") and the service
restarted ("service local_unbound restart").

Approved by:	re (kib)
Relnotes:	yes
2015-07-06 13:23:27 +00:00
garga
c49abb198d MFC r285050, r285053, r285059:
When passwd or group information is changed (by pw, vipw, chpass, ...)
temporary file is created and then a rename() call move it to official file.
This operation didn't have any check to make sure data was written to disk
and if a power cycle happens system could end up with a 0 length passwd
or group database.

There is a pfSense bug with more information about it:

https://redmine.pfsense.org/issues/4523

The following changes were made to protect passwd and group operations:

* lib/libutil/gr_util.c:
 - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file
 - After rename(), fsync() call on directory for faster result

* lib/libutil/pw_util.c
 - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file

* usr.sbin/pwd_mkdb/pwd_mkdb.c
 - Added O_SYNC flag on dbopen() calls
 - After rename(), fsync() call on directory for faster result

* lib/libutil/pw_util.3
 - pw_lock() returns a file descriptor to master password file on success

Differential Revision:	https://reviews.freebsd.org/D2978
Approved by:	re (kib), bapt (implicit agreed)
Sponsored by:	Netgate
2015-07-06 13:01:01 +00:00
avg
998834455c MFC r284593: MFV r284412: 5911 ZFS "hangs" while deleting file
illumos/illumos-gate@46e1baa6cf
https://www.illumos.org/issues/5911
Sometimes ZFS appears to hang while deleting a file. It is actually
making slow progress at the file deletion, but other operations
(administrative and writes via the data path) "hang" until the file
removal completes, which can take a long time if the file has many
blocks. The deletion (or most of it) happens in a single txg, and the
sync thread spends most of its time reading indirect blocks...

Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Reviewed by: Alek Pinchuk <alek@nexenta.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

PR:	199775
Approved by:	re(kib)
2015-07-06 10:40:51 +00:00
marius
afd8ff0c41 MFC: r281337
Don't enable RX and TX before their initial configuration is done, i. e.
after setting up interrupt moderation but before turning interrupts on.
This matches what Realtek's r8168 Linux driver does as of version 8.039.00
and fixes problems with certain incarnations of certain MAC revisions
like the interface requiring an extra up/down-cycle after boot to start
working or DMA configuration not being adhered to.

PR:		193743, 197535
Approved by:	re (kib)
2015-07-05 20:16:38 +00:00
marius
882f03214b MFC: r281751
Refine the workaround for Intel HSD131 [1] added in r269052 (MFCed to
stable/10 in r269592):
- Use the full mask described by the erratum as with a sufficiently high
  number of these false-positives, the overflow bit (bit 62) additionally
  gets set [7].
- HSD131 has been brought into several other Haswell-derived CPUs including
  to the next generation, i. e. Intel Broadwell. Thus, also skip reporting of
  these benign errors by default on CPU models affected by HSM142, HSW131 and
  BDM48 [2 - 5], describing the HSD131 silicon bug for additional models.
  Also, Celeron 2955U with a CPU ID of 0x45 have been reported to be covered
  by this fault [6], with the specification update concerned with HSM142 [2]
  only referring to 0x3c and 0x46.

Submitted by:	David Froehlich [7]
Approved by:	re (kib)

http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf [1]
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-mobile-specification-update.pdf [2]
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/5th-gen-core-family-spec-update.pdf [3]
http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/core-m-processor-family-spec-update.pdf [4]
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e3-1200v3-spec-update.pdf [5]
https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046878.html [6]
2015-07-05 19:32:10 +00:00
wblock
79b9df8c4d MFC r284914:
Fix a couple of missing lines that obscured the -p description.

Approved by:	re
2015-07-05 14:17:57 +00:00
gjb
4d6a99d3a9 Add the GEOM_LABEL option to the BEAGLEBONE, GUMSTIX, and RPI-B
kernel configuration files, resolving an issue where the UFS and
MSDOSFS partitions would not mount as set in fstab(5).

This is a direct commit to stable/10, as the GEOM_LABEL option
is handled differently in head for arm/armv6.  The WANDBOARD
and PANDABOARD already have this kernel option entry via the IMX6
kernel configuration file, so do not need to be changed.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-04 14:50:32 +00:00
gjb
17ec25ba4e MFC r284004 (parital):
Use the pw(8) '-R' flag to change the relative root directory
 when creating operating within the DESTDIR.

Approved by:	re (marius)
Sponsored by:	The FreeBSD Foundation
2015-07-04 00:43:23 +00:00
sjg
63c8b34326 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).

Also filemon_pid_check needs to hold proctree_lock
and use proc_realparent()

Differential Revision:  D2810
Reviewed by: jhb
Approved by: re
2015-07-03 20:43:31 +00:00
dim
d1cc40dd67 MFC r284732:
Add __cxa_deleted_virtual to libcxxrt's version map.

This symbol can sometimes be emitted by clang++, and was not yet
exported from libcxxrt.  Attempt to be compatible with libsupc++ by
using the same CXXABI_1.3.6 symbol version.

Approved by:	re (kib)
Reported by:	yuri@rawbw.com
PR:		200863
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D2850
2015-07-03 20:29:04 +00:00
bapt
39d037786a Revert a modification that should not have been part of r285092
Approved by:	re (implicit)
Sponsored by:	gandi.net
2015-07-03 14:29:55 +00:00
bapt
9420a4ea0e MFC: r274011,r274022,r274453,r274542,r274632,r274727,r275653,r275656,r275657,
r275658,r275829,r277652,r277764,r278475,r278767,r278819,r278902,r279256,
     r282681,r282683,r282685,r282686,r282687,r282697,r282698,r282699,r282700,
     r282709,r282712,r282713,r282716,r282718,r282719,r282720,r282721,r283809,
     r283810,r283811,r283814,r283815,r283816,r283818,r283841,r283842,r283843,
     r283961,r283962,r284110,r284111,r284112,r284113,r284114,r284117,r284118,
     r284119,r284120,r284121,r284122,r284123,r284124,r284126,r284128,r284129,
     r284130,r284133,r284135,r284137,r284139,r284140,r284148,r284149,r284392

Lots of cleanup in the pw(8) code
Add pw -R <rootdir>
Add lots of regression tests
More accurate error messages

Approved by:	re (kib)
Sponsored by:	gandi.net
2015-07-03 14:22:44 +00:00
gjb
af3b3e8396 Document EN-15:08 (revised), EN-15:09, EN-15:10.
Sponsored by:	The FreeBSD Foundation
2015-07-02 20:41:50 +00:00
emaste
fda669645d MFC r269137 by marcel:
Add missing definition of ELF_MACHINE_OK, now used by gcore(1).

PR:	201204
2015-07-02 18:27:04 +00:00
gjb
6c9b1bee2d MFC r284893, r284895-r284897, r284942, r284968, r284996, r285005:
r284893 (brd):
  Add initial support for building Vagrant images for VMWare.
  Next steps will be adding Virtualbox support and uploading
  to Hashicorp Atlas for others to consume.

 r284895:
  Add default VAGRANT_IMG variable.

 r284896:
  Remove _ACCOUNT and add _USERNAME, _NAME, _VERSION for the
  VAGRANT_${VAR} variables extracted from VAGRANT_UPLOAD_CONF.

  Set ATLAS_${VAR} to VAGRANT_${VAR} if VAGRANT_UPLOAD_CONF
  is set.  There is intent to intentionally have separate
  variants of configuration entries, but the defaults do not
  yet have any reason to be different.

 r284897:
  Instead of hard-coding the PROVIDERS for upload, add the
  VAGRANT_PROVIDERS variable.  Right now, it defaults to only
  vmware_desktop, virtualbox support is to follow at some point.

  While here, fix the hashicorp URL: s/vagrant/atlas/, which
  was result of a sed(1) replace (and my fault).

 r284942 (brd):
  Add Support for uploading Vagrant images to Hashicorp Atlas.

 r284968:
  Default the VAGRANT_VERSION to ${REVISION}-${BRANCH} if
  not set, which expands to '11.0-CURRENT', for example.

  If the branch is -CURRENT, -STABLE, or -PRERELEASE, suffix
  the VAGRANT_VERSION with the snapshot date.

 r284996:
  Fix the gcloud port/package name.

 r285005:
  Remove the HH-MM suffix from the build date suffix.

  It was useful when working out several kinks when testing
  automated image uploading when retrying was necessary, but
  now it is making things much too messy.

Sponsored by:	The FreeBSD Foundation
2015-07-02 16:17:05 +00:00
des
5daf218e81 MFH (r277531): don't include newvers in freebsd-version 2015-07-02 11:46:40 +00:00
garga
d2118e7c17 MFC r265096:
Fix "netstat -gW" behavior broken in r259638.
netstat has two options for printing multicast tables:
sysctl (the default one for live systems) and kvm-based one (for cores).
It looks like kvm-based one hasn't been working since it's been introduced
in r190012 due to absence of mfctablesize kernel symbol.
Check for all ipv4-multicast symbols being correctly resolved was introduced
in r259638 regardless of 'live' value leading to "No IPv4 MROUTING" error
message.

Reported by:	Olivier Cochard-Labbé
Approved by:	melifaro@
Sponsored by:	Netgate
2015-07-02 10:31:08 +00:00
kp
f1fbe0ce5b MFC r284348: 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
2015-07-01 21:21:14 +00:00
neel
b396223254 MFC r284712:
Restore the host's GS.base before returning from 'svm_launch()' so the Dtrace
FBT provider works with vmm.ko on AMD.
2015-07-01 19:46:57 +00:00
pfg
517a5ffe96 MFC 284913:
dconschat(8): Use NULL instead of 0 for the last argument in execl(3)

Found while experimenting with the gcc sentinel attribute.
2015-07-01 15:03:49 +00:00
avg
3a7588b223 MFC r278153,284416: ttm memory allocation improvements
If the vm_page_alloc_contig() failed in the ttm page allocators, do
what other callers of vm_page_alloc_contig() do, retry after
vm_pageout_grow_cache().

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.

Note: no MFC to stable/9 because it lacks vm_pageout_grow_cache().
2015-07-01 11:28:42 +00:00