]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoUpdate to ELF Tool Chain r3250
Ed Maste [Fri, 9 Oct 2015 17:46:05 +0000 (17:46 +0000)]
Update to ELF Tool Chain r3250

Highlights (not already in the FreeBSD tree):
  - addr2line: Fixed multiple memory leaks related to DIE allocation
  - readelf: improve sh_link validation
  - various man page improvements

Sponsored by: The FreeBSD Foundation

8 years agoAdd .gnu.versym VERSYM_HIDDEN flag and related mask
Ed Maste [Fri, 9 Oct 2015 17:33:05 +0000 (17:33 +0000)]
Add .gnu.versym VERSYM_HIDDEN flag and related mask

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoImport ELF Tool Chain snapshot revision 3250
Ed Maste [Fri, 9 Oct 2015 16:43:36 +0000 (16:43 +0000)]
Import ELF Tool Chain snapshot revision 3250

From http://svn.code.sf.net/p/elftoolchain/code

8 years agoFix a repeated typo: rootir -> rootdir.
Warren Block [Fri, 9 Oct 2015 14:55:55 +0000 (14:55 +0000)]
Fix a repeated typo: rootir -> rootdir.

Approved by: bapt
MFC after: 1 week

8 years agoSort function prototypes and add missing 'static' keywords.
Kevin Lo [Fri, 9 Oct 2015 14:31:32 +0000 (14:31 +0000)]
Sort function prototypes and add missing 'static' keywords.

Submitted by: Andriy Voskoboinyk <s3erios at gmail dot com>
Differential Revision: https://reviews.freebsd.org/D3847

8 years agoAdd --currently-running <release> option to freebsd-update.
Colin Percival [Fri, 9 Oct 2015 12:34:33 +0000 (12:34 +0000)]
Add --currently-running <release> option to freebsd-update.

This option tells freebsd-update to act as if it is running a specific
release instead of querying the kernel.  In particular, this can be
useful when upgrading jails.

Requested by: EuroBSDCon devsummit jails session
Tested by: allanjude
MFC after: 1 week

8 years agoRemove root_mount_wait(). It's not used anywhere.
Edward Tomasz Napierala [Fri, 9 Oct 2015 12:11:37 +0000 (12:11 +0000)]
Remove root_mount_wait(). It's not used anywhere.

Reviewed by: bapt@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3787

8 years agoUpgrade to Unbound 1.5.5.
Dag-Erling Smørgrav [Fri, 9 Oct 2015 11:46:27 +0000 (11:46 +0000)]
Upgrade to Unbound 1.5.5.

8 years agoimport unbound 1.5.5
Dag-Erling Smørgrav [Fri, 9 Oct 2015 11:29:49 +0000 (11:29 +0000)]
import unbound 1.5.5

8 years agoDocument iSCSI and autofs(5) variables in rc.conf(5).
Edward Tomasz Napierala [Fri, 9 Oct 2015 08:13:59 +0000 (08:13 +0000)]
Document iSCSI and autofs(5) variables in rc.conf(5).

PR: 203119
Reviewed by: bjk@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3671

8 years agoExploit r288122 to avoid pointlessly enqueueing a page that is about to be
Alan Cox [Fri, 9 Oct 2015 03:38:58 +0000 (03:38 +0000)]
Exploit r288122 to avoid pointlessly enqueueing a page that is about to be
freed.

Submitted by: kmacy
Differential Revision: https://reviews.freebsd.org/D1674

8 years agoFix missing semi-colon from r289055.
Conrad Meyer [Thu, 8 Oct 2015 23:27:45 +0000 (23:27 +0000)]
Fix missing semi-colon from r289055.

Obtained from: mjg
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove comment obsoleted by r289056.
Edward Tomasz Napierala [Thu, 8 Oct 2015 21:52:20 +0000 (21:52 +0000)]
Remove comment obsoleted by r289056.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove unused SI_SUB_* #defines.
Edward Tomasz Napierala [Thu, 8 Oct 2015 21:28:06 +0000 (21:28 +0000)]
Remove unused SI_SUB_* #defines.

Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3708

8 years agolinux: fix handling of out-of-bounds syscall attempts
Mateusz Guzik [Thu, 8 Oct 2015 21:08:35 +0000 (21:08 +0000)]
linux: fix handling of out-of-bounds syscall attempts

Due to an off by one the code would read an entry past the table, as
opposed to the last entry which contains the nosys handler.

Reported by: Pawel Biernacki <pawel.biernacki gmail.com>

8 years agoIf we can't open the file, skip devclose() for the exclusive_file_system
Marcel Moolenaar [Thu, 8 Oct 2015 17:59:05 +0000 (17:59 +0000)]
If we can't open the file, skip devclose() for the exclusive_file_system
case. We never called devopen(), so we know there's nothing to close.

8 years agoFix short month names and replace %b with %_m in date_fmt for Chinese
Xin LI [Thu, 8 Oct 2015 17:48:49 +0000 (17:48 +0000)]
Fix short month names and replace %b with %_m in date_fmt for Chinese
locales.

When using a Chinese locale, such as zh_TW.UTF-8 or zh_CN.UTF-8,
nl_langinfo(ABMON_*) only returned numbers.  For instance,
nl_langinfo(ABMON_1) returns 1, nl_langinfo(ABMON_2) returns 2, and
so on.

This causes problems in applications that put the short month name
and the day of the month together.  For example, 'Apr 14' in English
becomes '414日' in Chinese on the top bar of GNOME Shell.

This problem may be resolved by appending '月' to all short month
names and replacing %b with %_m in date_fmt. ja_JP.UTF-8 already
does this, and this matches the en_US.ISO8859-1 behavior, which
returns 'Oct'.  The GNU C Library also returns values with '月'
appended.

PR: 199441
Submitted by: Ting-Wei Lan <lantw44 gmail com>
MFC after: 2 weeks

8 years agoBuild changes that allow the modules on arm64.
Konstantin Belousov [Thu, 8 Oct 2015 17:42:08 +0000 (17:42 +0000)]
Build changes that allow the modules on arm64.
- Move the required kernel compiler flags from Makefile.arm64 to kern.mk.
- Build arm64 modules as PIC; non-PIC relocations in .o for shared object
  output cannot be handled.
- Do not try to install aarch64 symlink.
- A hack for arm64 to avoid ld -r stage.  See the comment for the explanation.
  Some functionality is lost, like ctf handling, but hopefully will be
  restored after newer linker is available.

Reviewed by: andrew, emaste
Tested by: andrew (on real hardware)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3796

8 years agoAdd encoding for mime-types.
Xin LI [Thu, 8 Oct 2015 17:41:17 +0000 (17:41 +0000)]
Add encoding for mime-types.

MFC after: 2 weeks

8 years agoDisable syscons and vpo modules for arm64.
Konstantin Belousov [Thu, 8 Oct 2015 17:32:45 +0000 (17:32 +0000)]
Disable syscons and vpo modules for arm64.

Reviewed by: andrew, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3796

8 years agoAdd the arm64 define.
Konstantin Belousov [Thu, 8 Oct 2015 17:32:17 +0000 (17:32 +0000)]
Add the arm64 define.

Reviewed by: andrew, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3796

8 years agoImplement in-kernel relocator for the arm64 module linker.
Konstantin Belousov [Thu, 8 Oct 2015 16:58:01 +0000 (16:58 +0000)]
Implement in-kernel relocator for the arm64 module linker.

It is decided to go with the shared object file format for modules on
arm64, due to the Aarch64 instruction set details.  Combination of the
signed 28-bit offset in the branch instructions encoding together with
the supported memory model of compilers makes the relocatable object
support impossible or at least too hard.

Reviewed by: andrew, emaste
Tested by: andrew (on real hardware)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3796

8 years agoMake the copyright notice in the file to match reality. Use the
Konstantin Belousov [Thu, 8 Oct 2015 16:46:11 +0000 (16:46 +0000)]
Make the copyright notice in the file to match reality.  Use the
recommended FreeBSD license text.

Approved by: andrew
Discussed with: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3846

8 years agoxen/console: Introduce a new console driver for Xen guest
Roger Pau Monné [Thu, 8 Oct 2015 16:39:43 +0000 (16:39 +0000)]
xen/console: Introduce a new console driver for Xen guest

The current Xen console driver is crashing very quickly when using it on
an ARM guest. This is because the console lock is recursive and it may
lead to recursion on the tty lock and/or corrupt the ring pointer.

Furthermore, the console lock is not always taken where it should be and has
to be released too early because of the way the console has been designed.

Over the years, code has been modified to support various new features but
the driver has not been reworked.

This new driver has been rewritten with the idea of only having a small set
of specific function to write either via the shared ring or the hypercall
interface.

Note that HVM support has been left aside for now because it requires
additional features which are not yet supported. A follow-up patch will be
sent with HVM guest support.

List of items that may be good to have but not mandatory:
 - Avoid to flush for each character written when using the tty
 - Support multiple consoles

Submitted by: Julien Grall <julien.grall@citrix.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D3698
Sponsored by: Citrix Systems R&D

8 years agoChange gptldr from relocating 0xfff1 bytes of boot2 to relocating 0x20000
Colin Percival [Thu, 8 Oct 2015 15:38:34 +0000 (15:38 +0000)]
Change gptldr from relocating 0xfff1 bytes of boot2 to relocating 0x20000
bytes of boot2.  Since we're in 16-bit mode, we can't copy all 128kB at
once; instead we loop four times and copy 32 kB each time.

This change was made necessary by an upcoming increase in the size of the
boot2 binary; should it increase further, the COPY_BLKS value can be
adjusted without anyone needing to remember 8086 assembly language again.

Requested by: allanjude
Tested by: allanjude
MFC after: 1 week

8 years agoAdd support for Fresco Logic USB 3.0 host controller.
Kevin Lo [Thu, 8 Oct 2015 15:13:57 +0000 (15:13 +0000)]
Add support for Fresco Logic USB 3.0 host controller.

Fresco Logic hosts advertise MSI, but fail to actually generate MSI
interrupts.  We have to disable MSI use.

Reviewed by: hselasky

8 years agoAdd quirk for USB 3.0 PCI device.
Hans Petter Selasky [Thu, 8 Oct 2015 13:39:27 +0000 (13:39 +0000)]
Add quirk for USB 3.0 PCI device.

Submitted by: Gary Jennejohn <gj@freebsd.org>
MFC after: 1 week

8 years agoRecognise the Netgear WNDA4100 (N900) 3x3 device in run(4).
Gavin Atkinson [Thu, 8 Oct 2015 12:55:21 +0000 (12:55 +0000)]
Recognise the Netgear WNDA4100 (N900) 3x3 device in run(4).

8 years agoMerge:
Craig Rodrigues [Thu, 8 Oct 2015 11:42:15 +0000 (11:42 +0000)]
Merge:
   commit 400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd
   Author: Paul Eggert <eggert@cs.ucla.edu>
   Date:   Fri Oct 12 07:53:12 2012 -0700

   Assume C89.

https://github.com/eggert/tz/commit/400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd

8 years agoEnforce the maxproc limitation before allocating struct proc, initial
Konstantin Belousov [Thu, 8 Oct 2015 11:07:09 +0000 (11:07 +0000)]
Enforce the maxproc limitation before allocating struct proc, initial
struct thread and kernel stack for the thread.  Otherwise, a load
similar to a fork bomb would exhaust KVA and possibly kmem, mostly due
to the struct proc being type-stable.

The nprocs counter is changed from being protected by allproc_lock sx
to be an atomic variable.  Note that ddb/db_ps.c:db_ps() use of nprocs
was unsafe before, and is still unsafe, but it seems that the only
possible undesired consequence is the harmless warning printed when
allproc linked list length does not match nprocs.

Diagnosed by: Svatopluk Kraus <onwahe@gmail.com>
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoFix r283120 which use class size larger than 8bits.
Fabien Thomas [Thu, 8 Oct 2015 10:00:41 +0000 (10:00 +0000)]
Fix r283120 which use class size larger than 8bits.
The new mapping will restore binary compatibility with stable_10
but file generated since r283120 are broken.

Reviewed by: jhb
Sponsored by: Stormshield

8 years agoFix r283998 that broke mapin events for hwpmc.
Fabien Thomas [Thu, 8 Oct 2015 09:54:33 +0000 (09:54 +0000)]
Fix r283998 that broke mapin events for hwpmc.

Reviewed by: jhb
Sponsored by: Stormshield

8 years agoFix for r288176 changes related to debug symbols move.
Fabien Thomas [Thu, 8 Oct 2015 09:46:35 +0000 (09:46 +0000)]
Fix for r288176 changes related to debug symbols move.

Reviewed by: emaste
Sponsored by: Stormshield

8 years agoAdd -n to the ntpq command line so it will show IP addresses instead of
Dag-Erling Smørgrav [Thu, 8 Oct 2015 08:55:08 +0000 (08:55 +0000)]
Add -n to the ntpq command line so it will show IP addresses instead of
host names, which rarely fit in the available space.

MFC after: 1 week

8 years agoAdd missing vnode lock in case of file modify request.
Alexander Motin [Thu, 8 Oct 2015 07:34:30 +0000 (07:34 +0000)]
Add missing vnode lock in case of file modify request.

Submitted by: Richard Kojedzinszky
MFC after: 1 week

8 years agowpi(4): check size before transmitting frames
Adrian Chadd [Thu, 8 Oct 2015 07:22:40 +0000 (07:22 +0000)]
wpi(4): check size before transmitting frames

In addition to https://bz-attachments.freebsd.org/attachment.cgi?id=156112;
fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=144987.

Tested:

* Tested with Intel 3945BG, STA mode

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3762

8 years agowpi(4): fix some byteorder conversions
Adrian Chadd [Thu, 8 Oct 2015 07:21:36 +0000 (07:21 +0000)]
wpi(4): fix some byteorder conversions

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3761

8 years agowpi(4): fix 'maybe uninitialized' warnings
Adrian Chadd [Thu, 8 Oct 2015 07:20:22 +0000 (07:20 +0000)]
wpi(4): fix 'maybe uninitialized' warnings

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3760

8 years agowpi(4): add some branch predictions.
Adrian Chadd [Thu, 8 Oct 2015 07:18:28 +0000 (07:18 +0000)]
wpi(4): add some branch predictions.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3759

8 years agowpi(4): drop unnecessary locking in wpi_set_pslevel().
Adrian Chadd [Thu, 8 Oct 2015 07:17:11 +0000 (07:17 +0000)]
wpi(4): drop unnecessary locking in wpi_set_pslevel().

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3758

8 years agoProperly format pointer size independent CloudABI system calls.
Ed Schouten [Thu, 8 Oct 2015 05:27:45 +0000 (05:27 +0000)]
Properly format pointer size independent CloudABI system calls.

CloudABI has approximately 50 system calls that do not depend on the
pointer size of the system. As the ABI is pretty compact, it takes
little effort to each truss(8) the formatting rules for these system
calls. Start off by formatting pointer size independent system calls.

Changes:

- Make it possible to include the CloudABI system call definitions in
  FreeBSD userspace builds. Add ${root}/sys to the truss(8) Makefile so
  we can pull in <compat/cloudabi/cloudabi_syscalldefs.h>.
- Refactoring: patch up amd64-cloudabi64.c to use the CLOUDABI_*
  constants instead of rolling our own table.
- Add table entries for all of the system calls.
- Add new generic formatting types (UInt, IntArray) that we'll be using
  to format unsigned integers and arrays of integers.
- Add CloudABI specific formatting types.

Approved by: jhb
Differential Revision: https://reviews.freebsd.org/D3836

8 years agoUse print as a function, not operator.
Craig Rodrigues [Thu, 8 Oct 2015 03:28:15 +0000 (03:28 +0000)]
Use print as a function, not operator.

8 years agoAdd option -l for specifying which OS loader to dlopen(3). By default
Marcel Moolenaar [Thu, 8 Oct 2015 02:28:22 +0000 (02:28 +0000)]
Add option -l for specifying which OS loader to dlopen(3). By default
this is /boot/userboot.so. This option allows for the development and
use of other OS loaders.

8 years agoMove SHLIBDIR?=/lib before <src.opts.mk> so that it works again.
Peter Wemm [Thu, 8 Oct 2015 01:17:45 +0000 (01:17 +0000)]
Move SHLIBDIR?=/lib before <src.opts.mk> so that it works again.

8 years agowpi(4): remove software queues
Adrian Chadd [Thu, 8 Oct 2015 00:52:41 +0000 (00:52 +0000)]
wpi(4): remove software queues

Use direct dispatch into the destination hardware ring instead of using
a staging queue.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3757

8 years agoUse -fpermissive if compiling with GCC.
Craig Rodrigues [Thu, 8 Oct 2015 00:48:29 +0000 (00:48 +0000)]
Use -fpermissive if compiling with GCC.

Works around GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67888
when compiling Module.cpp

8 years agoCorrect a comment.
Bryan Drewery [Thu, 8 Oct 2015 00:31:11 +0000 (00:31 +0000)]
Correct a comment.

8 years agoCorrect the command-line utility in the r285420 entry:
Glen Barber [Wed, 7 Oct 2015 20:04:32 +0000 (20:04 +0000)]
Correct the command-line utility in the r285420 entry:
s/jail/jexec/

Sponsored by: The FreeBSD Foundation

8 years agoUse proper function prototypes.
Craig Rodrigues [Wed, 7 Oct 2015 19:55:58 +0000 (19:55 +0000)]
Use proper function prototypes.
Eliminates -Wstrict-prototypes warning

8 years agoRemove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2) wrappers.
Bryan Drewery [Wed, 7 Oct 2015 19:10:38 +0000 (19:10 +0000)]
Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2) wrappers.

r161611 added some of the code from sys_vfork() directly into the Linux
module wrappers since they use RFSTOPPED.  In r232240, the RFFPWAIT handling
was moved to syscallret(), thus this code in the Linux module is no longer
needed as it will be called later.

This also allows the Linux wrappers to benefit from the fix in r275616 for
threads not getting suspended if their vforked child is stopped while they
wait on them.

Reviewed by: jhb, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3828

8 years agoDocument the recently added pl_syscall_* fields in struct ptrace_lwpinfo.
John Baldwin [Wed, 7 Oct 2015 17:52:18 +0000 (17:52 +0000)]
Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.

Reviewed by: emaste, kib
Differential Revision: https://reviews.freebsd.org/D3833

8 years agoMove pmu.c to files.arm and rename the option to pmu. This is not hwpmc
Andrew Turner [Wed, 7 Oct 2015 13:19:44 +0000 (13:19 +0000)]
Move pmu.c to files.arm and rename the option to pmu. This is not hwpmc
specific as we may use the pmu registers for other uses. No configs seem
to currently build this.

This will allow for more use of this device.

Discussed with: bz
Sponsored by: ABT Systems Ltd

8 years agoFix regression from r287779, that bite me. If we call m_pullup()
Gleb Smirnoff [Wed, 7 Oct 2015 13:10:26 +0000 (13:10 +0000)]
Fix regression from r287779, that bite me. If we call m_pullup()
unconditionally, we end up with an mbuf chain of two mbufs, which
later in in_arpreply() is rewritten from ARP request to ARP reply
and is sent out. Looks like igb(4) (at least mine, and at least
at my network) fails on such mbuf chain, so ARP reply doesn't go
out wire. Thus, make the m_pullup() call conditional, as it is
everywhere. Of course, the bug in igb(?) should be investigated,
but better first fix the head. And unconditional m_pullup() was
suboptimal, anyway.

8 years agoFix regression from r248371. We need to copy packet header to new
Gleb Smirnoff [Wed, 7 Oct 2015 12:40:00 +0000 (12:40 +0000)]
Fix regression from r248371. We need to copy packet header to new
mbuf. Unlike in the pre-r248371 code, assert that M_PKTHDR is set
only on a first mbuf.

Reported & tested by: Andriy Voskoboinyk <s3erios gmail.com>
Sponsored by: Nginx, Inc.

8 years agoIn softdep_setup_freeblocks():
Gleb Smirnoff [Wed, 7 Oct 2015 12:36:28 +0000 (12:36 +0000)]
In softdep_setup_freeblocks():
- Move the bread() to the beginning of function.
- Return if it fails, otherwise we will panic.

Submitted by: mckusick
Sponsored by: Netflix

8 years agoOnly print the errno string in case sysctl(3) does not file with ENOENT
Baptiste Daroussin [Wed, 7 Oct 2015 09:28:54 +0000 (09:28 +0000)]
Only print the errno string in case sysctl(3) does not file with ENOENT
This reduces the noise in error reporing from sysctl(8):

Before:
$ sysctl bla=something
sysctl: unknown oid 'bla': No such file or directory

After:
$ sysctl bla=something
sysctl: unknown oid 'bla'

MFC after: 1 week
Sponsored by: Gandi.net

8 years agoA follow-up to r288492. In fact, revert the mentioned commit for
Konstantin Belousov [Wed, 7 Oct 2015 09:12:49 +0000 (09:12 +0000)]
A follow-up to r288492.  In fact, revert the mentioned commit for
pre-VFPv3 processors, since they do require software support code to
handle denormals.  For VFPv3 and later, enable flush-to-zero if
hardware does not claim full denormals arithmetic support by VMVFR1_FZ
field in mvfr1 register.

The end result is that we do use correct fpu environment on Cortexes
with VFPv3, while ARM11 (e.g. rpi) is in non-compliant flush-to-zero
mode.  At least CPUs without complete hardware implementation of
IEEE 754 do not cause unhandled floating point exception on underflow,
as it was before r288492.

Noted by: ian
Tested by: gjb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoTrim spaces at the end of the buffer before trying to convert it to an oid
Baptiste Daroussin [Wed, 7 Oct 2015 08:56:01 +0000 (08:56 +0000)]
Trim spaces at the end of the buffer before trying to convert it to an oid

This allows to write entries in sysctl.conf with spaces before the '=' like
kern.ipc.shmmax = 9663676416

MFC after: 1 week
Sponsored by: Gandi.net

8 years agoFix a bug that caused reinitialization failure of MAC addresses on
Hiroki Sato [Wed, 7 Oct 2015 06:32:34 +0000 (06:32 +0000)]
Fix a bug that caused reinitialization failure of MAC addresses on
the lagg interface when removing the primary port.

PR: 201916
Differential Revision: https://reviews.freebsd.org/D3301

8 years agoDeclare odata as a pointer type instead of a pointer to pointer.
Kevin Lo [Wed, 7 Oct 2015 03:33:25 +0000 (03:33 +0000)]
Declare odata as a pointer type instead of a pointer to pointer.

Reviewed by: adrian

8 years agoRefine the r286591 entry based on feedback from jilles@.
Glen Barber [Wed, 7 Oct 2015 02:12:44 +0000 (02:12 +0000)]
Refine the r286591 entry based on feedback from jilles@.

Sponsored by: The FreeBSD Foundation

8 years agoRemove entry for r287469, Skylake/i219 support is not yet complete.
Glen Barber [Wed, 7 Oct 2015 02:12:43 +0000 (02:12 +0000)]
Remove entry for r287469, Skylake/i219 support is not yet complete.

Reported by: Adam McDougall
Sponsored by: The FreeBSD Foundation

8 years agoSplit the r288943 entry into different entries, since the entire
Glen Barber [Wed, 7 Oct 2015 02:12:42 +0000 (02:12 +0000)]
Split the r288943 entry into different entries, since the entire
clang/llvm/lldb/etc may not always be in sync with upstream.

Sponsored by: The FreeBSD Foundation

8 years agoRemove support of ancient (pre-8.0R, 800041) FreeBSD releases.
Xin LI [Wed, 7 Oct 2015 01:25:47 +0000 (01:25 +0000)]
Remove support of ancient (pre-8.0R, 800041) FreeBSD releases.

MFC after: 2 weeks

8 years agoUpdated depends
Simon J. Gerraty [Wed, 7 Oct 2015 00:43:05 +0000 (00:43 +0000)]
Updated depends

8 years agoTo help bootstrap new local depends,
Simon J. Gerraty [Wed, 7 Oct 2015 00:32:33 +0000 (00:32 +0000)]
To help bootstrap new local depends,
if SRCS contains *.h for which there are targets,
make buildfiles depend on them - so they get generated early.

8 years agoDo not assume host toolchain supports sysroot
Simon J. Gerraty [Wed, 7 Oct 2015 00:28:24 +0000 (00:28 +0000)]
Do not assume host toolchain supports sysroot

8 years agoIn jobs mode we can use .ORDER to force stage_links to run after other
Simon J. Gerraty [Wed, 7 Oct 2015 00:24:27 +0000 (00:24 +0000)]
In jobs mode we can use .ORDER to force stage_links to run after other
stage_* targets.
In non-jobs mode we can achieve the same result by simply introducing
the targets in the correct order.
Thus in bsd*.mk we simply add targets to STAGE_TARGETS which we
realize in meta.stage.mk

Reviewed by: bdrewery

8 years agoNow that we own the code, use arc4random(3) unconditionally
Xin LI [Tue, 6 Oct 2015 23:42:58 +0000 (23:42 +0000)]
Now that we own the code, use arc4random(3) unconditionally
and remove the corresponding HAVE_ARC4RANDOM conditions.

MFC after: 2 weeks

8 years agoTweak: use 'mainlwp' instead of 'mainpid' since this is a thread (LWP)
John Baldwin [Tue, 6 Oct 2015 22:59:00 +0000 (22:59 +0000)]
Tweak: use 'mainlwp' instead of 'mainpid' since this is a thread (LWP)
identifier, not a pid.

8 years agoFix build with older GCC which, doesn't like 'main' being a variable name.
Bryan Drewery [Tue, 6 Oct 2015 22:54:04 +0000 (22:54 +0000)]
Fix build with older GCC which, doesn't like 'main' being a variable name.

8 years agoUse strlcpy() when the string is expected to be nul-terminated.
Xin LI [Tue, 6 Oct 2015 22:49:25 +0000 (22:49 +0000)]
Use strlcpy() when the string is expected to be nul-terminated.

MFC after: 2 weeks

8 years agoRemove a few unused headers.
Xin LI [Tue, 6 Oct 2015 22:45:23 +0000 (22:45 +0000)]
Remove a few unused headers.

MFC after: 2 weeks

8 years agotruss: Add support for utrace(2).
Bryan Drewery [Tue, 6 Oct 2015 21:58:38 +0000 (21:58 +0000)]
truss: Add support for utrace(2).

This uses the kdump(1) utrace support code directly until a common library
is created.

This allows malloc(3) tracing with MALLOC_CONF=utrace:true and rtld tracing
with LD_UTRACE=1.  Unknown utrace(2) data is just printed as hex.

PR: 43819 [inspired by]
Reviewed by: jhb
MFC after: 2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D3819

8 years agoMove td_oncpu and td_lastcpu out of the "zero'd on fork" section of
John Baldwin [Tue, 6 Oct 2015 21:36:45 +0000 (21:36 +0000)]
Move td_oncpu and td_lastcpu out of the "zero'd on fork" section of
struct thread since they are always explicitly initialized during fork
and thread creation after r286256.

Suggested by: kib

8 years agoStop linking libc++.so verbosely, there is no need to.
Dimitry Andric [Tue, 6 Oct 2015 21:28:54 +0000 (21:28 +0000)]
Stop linking libc++.so verbosely, there is no need to.

MFC after: 3 days

8 years agoRemove gen3 check introduced in r286653.
Adrian Chadd [Tue, 6 Oct 2015 20:58:45 +0000 (20:58 +0000)]
Remove gen3 check introduced in r286653.

kib spotted this and noticed it's not correct.

Submitted by: kib
Reviewed by: dumbbell

8 years agoFor llvm/clang libraries, skip including tablegen-produced .d files when
Dimitry Andric [Tue, 6 Oct 2015 19:49:53 +0000 (19:49 +0000)]
For llvm/clang libraries, skip including tablegen-produced .d files when
the target is "make depend".  This works around errors during
incremental make depend of some clang libraries, for example "don't know
how to make contrib/llvm/include/llvm/IR/IntrinsicsR600.td".

Reported by: emaste

8 years agoGroup the decoded system calls by ABI and sort the calls within each ABI.
John Baldwin [Tue, 6 Oct 2015 19:31:07 +0000 (19:31 +0000)]
Group the decoded system calls by ABI and sort the calls within each ABI.

Reviewed by: bdrewery
Glanced at by: kib
Differential Revision: https://reviews.freebsd.org/D3823

8 years agoFix various edge cases related to system call tracing.
John Baldwin [Tue, 6 Oct 2015 19:29:05 +0000 (19:29 +0000)]
Fix various edge cases related to system call tracing.
- Always set td_dbg_sc_* when P_TRACED is set on system call entry
  even if the debugger is not tracing system call entries.  This
  ensures the fields are valid when reporting other stops that
  occur at system call boundaries such as for PT_FOLLOW_FORKS or
  when only tracing system call exits.
- Set TDB_SCX when reporting the stop for a new child process in
  fork_return().  This causes the event to be reported as a system
  call exit.
- Report a system call exit event in fork_return() for new threads in
  a traced process.
- Copy td_dbg_sc_* to new threads instead of zeroing.  This ensures
  that td_dbg_sc_code in particular will report the system call that
  created the new thread or process when it reports a system call
  exit event in fork_return().
- Add new ptrace tests to verify that new child processes and threads
  report system call exit events with a valid pl_syscall_code via
  PT_LWPINFO.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D3822

8 years agoUpdate the last check revision marker.
Glen Barber [Tue, 6 Oct 2015 19:07:10 +0000 (19:07 +0000)]
Update the last check revision marker.

Sponsored by: The FreeBSD Foundation

8 years agoDocument r288943, clang, llvm, etc. updated to upstream 3.7.0.
Glen Barber [Tue, 6 Oct 2015 19:06:34 +0000 (19:06 +0000)]
Document r288943, clang, llvm, etc. updated to upstream 3.7.0.

Sponsored by: The FreeBSD Foundation

8 years agoFix core corruption caused by race in note_procstat_vmmap
Conrad Meyer [Tue, 6 Oct 2015 18:07:00 +0000 (18:07 +0000)]
Fix core corruption caused by race in note_procstat_vmmap

This fix is spiritually similar to r287442 and was discovered thanks to
the KASSERT added in that revision.

NT_PROCSTAT_VMMAP output length, when packing kinfo structs, is tied to
the length of filenames corresponding to vnodes in the process' vm map
via vn_fullpath.  As vnodes may move during coredump, this is racy.

We do not remove the race, only prevent it from causing coredump
corruption.

- Add a sysctl, kern.coredump_pack_vmmapinfo, to allow users to disable
  kinfo packing for PROCSTAT_VMMAP notes.  This avoids VMMAP corruption
  and truncation, even if names change, at the cost of up to PATH_MAX
  bytes per mapped object.  The new sysctl is documented in core.5.

- Fix note_procstat_vmmap to self-limit in the second pass.  This
  addresses corruption, at the cost of sometimes producing a truncated
  result.

- Fix PROCSTAT_VMMAP consumers libutil (and libprocstat, via copy-paste)
  to grok the new zero padding.

Reported by: pho (https://people.freebsd.org/~pho/stress/log/datamove4-2.txt)
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3824

8 years agoUpgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.7.0
Dimitry Andric [Tue, 6 Oct 2015 17:53:29 +0000 (17:53 +0000)]
Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.7.0
release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.7.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.7.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Andrew Turner and Antoine Brodin for their help.

Exp-run: antoine
Relnotes: yes

8 years agoDocument r288669, stack protector "strong" level.
Glen Barber [Tue, 6 Oct 2015 17:42:31 +0000 (17:42 +0000)]
Document r288669, stack protector "strong" level.

Help from: pfg
Sponsored by: The FreeBSD Foundation

8 years agoDocument r288654, lagg(4) fec removal.
Glen Barber [Tue, 6 Oct 2015 17:42:30 +0000 (17:42 +0000)]
Document r288654, lagg(4) fec removal.

Sponsored by: The FreeBSD Foundation

8 years agoAdd directory for test encoder missed by accident in r288929
Enji Cooper [Tue, 6 Oct 2015 17:22:54 +0000 (17:22 +0000)]
Add directory for test encoder missed by accident in r288929

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove a comment from an earlier iteration of trying to figure out how the
Enji Cooper [Tue, 6 Oct 2015 17:18:15 +0000 (17:18 +0000)]
Remove a comment from an earlier iteration of trying to figure out how the
test encoder testcases worked

8 years agoIntegrate the tests from libxo into the FreeBSD test suite
Enji Cooper [Tue, 6 Oct 2015 16:58:47 +0000 (16:58 +0000)]
Integrate the tests from libxo into the FreeBSD test suite

The functional_test.sh harness for each test subdir was inspired
by the version in bin/sh/tests/functional_test.sh

Some gymnastics were required to deal with implicit rules for
.c / .o -> .out as the suffix transformation rules were
incorrectly trying to create the test outputs from some of the
source files

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate dates in UPDATING and ObsoleteFiles.inc.
Dimitry Andric [Tue, 6 Oct 2015 16:26:07 +0000 (16:26 +0000)]
Update dates in UPDATING and ObsoleteFiles.inc.

8 years agoMerge ^/head r288836 through r288925.
Dimitry Andric [Tue, 6 Oct 2015 16:25:13 +0000 (16:25 +0000)]
Merge ^/head r288836 through r288925.

8 years agoUpdate Xen headers from 4.2 to 4.6
Roger Pau Monné [Tue, 6 Oct 2015 11:29:44 +0000 (11:29 +0000)]
Update Xen headers from 4.2 to 4.6

Pull the latest headers for Xen which allow us to add support for ARM and
use new features in FreeBSD.

This is a verbatim copy of the xen/include/public so every headers which
don't exits anymore in the Xen repositories have been dropped.

Note the interface version hasn't been bumped, it will be done in a
follow-up. Although, it requires fix in the code to get it compiled:

 - sys/xen/xen_intr.h: evtchn_port_t is already defined in the headers so
   drop it.

 - {amd64,i386}/include/intr_machdep.h: NR_EVENT_CHANNELS now depends on
   xen/interface/event_channel.h, so include it.

 - {amd64,i386}/{amd64,i386}/support.S: It's not neccessary to include
   machine/intr_machdep.h. This is also fixing build compilation with the
   new headers.

 - dev/xen/blkfront/blkfront.c: The typedef for blkif_request_segmenthas
   been dropped. So directly use struct blkif_request_segment

Finally, modify xen/interface/xen-compat.h to throw a preprocessing error if
__XEN_INTERFACE_VERSION__ is not set. This is allow us to catch any file
where xen/xen-os.h is not correctly included.

Submitted by: Julien Grall <julien.grall@citrix.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D3805
Sponsored by: Citrix Systems R&D

8 years agoRemove debugging variable from r143761.
Gleb Smirnoff [Tue, 6 Oct 2015 09:43:49 +0000 (09:43 +0000)]
Remove debugging variable from r143761.

8 years agoReallocate a maxlen-long buffer only when the current maxlen is
Hiroki Sato [Tue, 6 Oct 2015 08:43:48 +0000 (08:43 +0000)]
Reallocate a maxlen-long buffer only when the current maxlen is
shorter than the required length.  Note that it rarely happens
because maxlen is almost always 128 which covers struct sockaddr_storage.

8 years agoAdd a comment specifying how we implement rfc3042.
Hiren Panchasara [Tue, 6 Oct 2015 07:46:19 +0000 (07:46 +0000)]
Add a comment specifying how we implement rfc3042.

Differential Revision: D3746
MFC after:     1 week
Sponsored by:     Limelight Networks

8 years agoUse LIBXOSRC instead of LIBXO when defining the path to contrib/libxo
Enji Cooper [Tue, 6 Oct 2015 07:28:54 +0000 (07:28 +0000)]
Use LIBXOSRC instead of LIBXO when defining the path to contrib/libxo

The latter is already defined in bsd.libnames.mk, so avoid the conflict
in case someone copy-pastes make variables

While here, switch path to the top of the source tree with SRCTOP

8 years agoExploit r288122 to address a cosmetic issue. Pages belonging to either
Alan Cox [Tue, 6 Oct 2015 05:49:00 +0000 (05:49 +0000)]
Exploit r288122 to address a cosmetic issue.  Pages belonging to either
the kernel or kmem object can't be paged out.  Since they can't be paged
out, they are never enqueued in a paging queue.  Nonetheless, passing
PQ_INACTIVE to vm_page_unwire() in kmem_unback() creates the appearance
that these pages are being enqueued in the inactive queue.  As of r288122,
we can avoid giving this false impression by passing PQ_NONE.

Submitted by: kmacy
Differential Revision: https://reviews.freebsd.org/D1674

8 years agoPrevious versions of bsd.own.mk included bsd.compiler.mk
Warner Losh [Tue, 6 Oct 2015 04:18:48 +0000 (04:18 +0000)]
Previous versions of bsd.own.mk included bsd.compiler.mk
only when _WITHOUT_SRCCONF wasn't defined. Restore this
behavior because bsd.ports.mk depends on this in subtle
ways. The compat include of bsd.compiler.mk should
be removed in 12 anyway.

PR: 203540

8 years agoOn some interfaces, ipfilter drops UDP packets with zero checkum.
Cy Schubert [Tue, 6 Oct 2015 03:41:11 +0000 (03:41 +0000)]
On some interfaces, ipfilter drops UDP packets with zero checkum.
This commit fixes that.

PR: 166372
Submitted by: mk@neon1.net
Reviewed by: Darren Reed <darrenr@reed.wattle.id.au>
MFC after: 1 week

8 years agoSave the link register in savectx().
Justin Hibbits [Tue, 6 Oct 2015 01:24:46 +0000 (01:24 +0000)]
Save the link register in savectx().

Pointed out by: jhb