Commit Graph

204486 Commits

Author SHA1 Message Date
Ed Maste
2754b49a4e Add .gnu.versym VERSYM_HIDDEN flag and related mask
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-10-09 17:33:05 +00:00
Warren Block
6a3133efbb Fix a repeated typo: rootir -> rootdir.
Approved by:	bapt
MFC after:	1 week
2015-10-09 14:55:55 +00:00
Kevin Lo
f4ea007a07 Sort function prototypes and add missing 'static' keywords.
Submitted by:	Andriy Voskoboinyk <s3erios at gmail dot com>
Differential Revision:	https://reviews.freebsd.org/D3847
2015-10-09 14:31:32 +00:00
Colin Percival
b39ce43e4c 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
2015-10-09 12:34:33 +00:00
Edward Tomasz Napierala
8d90e66066 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
2015-10-09 12:11:37 +00:00
Dag-Erling Smørgrav
b75612f8e7 Upgrade to Unbound 1.5.5. 2015-10-09 11:46:27 +00:00
Dag-Erling Smørgrav
de0161d6da import unbound 1.5.5 2015-10-09 11:29:49 +00:00
Edward Tomasz Napierala
e2d3a487b7 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
2015-10-09 08:13:59 +00:00
Alan Cox
e595970add Exploit r288122 to avoid pointlessly enqueueing a page that is about to be
freed.

Submitted by:	kmacy
Differential Revision:	https://reviews.freebsd.org/D1674
2015-10-09 03:38:58 +00:00
Conrad Meyer
1b8d039386 Fix missing semi-colon from r289055.
Obtained from:	mjg
Sponsored by:	EMC / Isilon Storage Division
2015-10-08 23:27:45 +00:00
Edward Tomasz Napierala
55811a0385 Remove comment obsoleted by r289056.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-10-08 21:52:20 +00:00
Edward Tomasz Napierala
0ad53012ed Remove unused SI_SUB_* #defines.
Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3708
2015-10-08 21:28:06 +00:00
Mateusz Guzik
3e15a670d2 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>
2015-10-08 21:08:35 +00:00
Marcel Moolenaar
1467117a05 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.
2015-10-08 17:59:05 +00:00
Xin LI
24824e9721 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
2015-10-08 17:48:49 +00:00
Konstantin Belousov
8598392cd1 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
2015-10-08 17:42:08 +00:00
Xin LI
d0177d0959 Add encoding for mime-types.
MFC after:	2 weeks
2015-10-08 17:41:17 +00:00
Konstantin Belousov
32b6c6ecc5 Disable syscons and vpo modules for arm64.
Reviewed by:	andrew, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3796
2015-10-08 17:32:45 +00:00
Konstantin Belousov
fd24f37341 Add the arm64 define.
Reviewed by:	andrew, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3796
2015-10-08 17:32:17 +00:00
Konstantin Belousov
00a53ebe08 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
2015-10-08 16:58:01 +00:00
Konstantin Belousov
fbc7b10762 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
2015-10-08 16:46:11 +00:00
Roger Pau Monné
a231723cc0 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
2015-10-08 16:39:43 +00:00
Colin Percival
889592b876 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
2015-10-08 15:38:34 +00:00
Kevin Lo
dd4c159043 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
2015-10-08 15:13:57 +00:00
Hans Petter Selasky
0e8fa8c3bc Add quirk for USB 3.0 PCI device.
Submitted by:	Gary Jennejohn <gj@freebsd.org>
MFC after:	1 week
2015-10-08 13:39:27 +00:00
Gavin Atkinson
0840f9483d Recognise the Netgear WNDA4100 (N900) 3x3 device in run(4). 2015-10-08 12:55:21 +00:00
Craig Rodrigues
49ebf9da54 Merge:
commit 400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd
   Author: Paul Eggert <eggert@cs.ucla.edu>
   Date:   Fri Oct 12 07:53:12 2012 -0700

   Assume C89.

400ecf36bb
2015-10-08 11:42:15 +00:00
Konstantin Belousov
4b48959f9f 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
2015-10-08 11:07:09 +00:00
Fabien Thomas
4f621ff9dc 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
2015-10-08 10:00:41 +00:00
Fabien Thomas
78e79434d2 Fix r283998 that broke mapin events for hwpmc.
Reviewed by:	jhb
Sponsored by:	Stormshield
2015-10-08 09:54:33 +00:00
Fabien Thomas
66ca84a7ba Fix for r288176 changes related to debug symbols move.
Reviewed by: emaste
Sponsored by:	Stormshield
2015-10-08 09:46:35 +00:00
Dag-Erling Smørgrav
2663942208 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
2015-10-08 08:55:08 +00:00
Alexander Motin
3d5cb709bd Add missing vnode lock in case of file modify request.
Submitted by:	Richard Kojedzinszky
MFC after:	1 week
2015-10-08 07:34:30 +00:00
Adrian Chadd
fbcf1662de 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
2015-10-08 07:22:40 +00:00
Adrian Chadd
4c09e592e6 wpi(4): fix some byteorder conversions
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3761
2015-10-08 07:21:36 +00:00
Adrian Chadd
19ea23a08d wpi(4): fix 'maybe uninitialized' warnings
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3760
2015-10-08 07:20:22 +00:00
Adrian Chadd
859f6ddcdc wpi(4): add some branch predictions.
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3759
2015-10-08 07:18:28 +00:00
Adrian Chadd
c34db4207c wpi(4): drop unnecessary locking in wpi_set_pslevel().
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3758
2015-10-08 07:17:11 +00:00
Ed Schouten
808d980506 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
2015-10-08 05:27:45 +00:00
Craig Rodrigues
c151731fbf Use print as a function, not operator. 2015-10-08 03:28:15 +00:00
Marcel Moolenaar
8c96dcc166 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.
2015-10-08 02:28:22 +00:00
Peter Wemm
6cc056de26 Move SHLIBDIR?=/lib before <src.opts.mk> so that it works again. 2015-10-08 01:17:45 +00:00
Adrian Chadd
753ca9ef4f 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
2015-10-08 00:52:41 +00:00
Craig Rodrigues
4c92141bda Use -fpermissive if compiling with GCC.
Works around GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67888
when compiling Module.cpp
2015-10-08 00:48:29 +00:00
Bryan Drewery
04a97800bf Correct a comment. 2015-10-08 00:31:11 +00:00
Glen Barber
d144be2ae7 Correct the command-line utility in the r285420 entry:
s/jail/jexec/

Sponsored by:	The FreeBSD Foundation
2015-10-07 20:04:32 +00:00
Craig Rodrigues
6790313541 Use proper function prototypes.
Eliminates -Wstrict-prototypes warning
2015-10-07 19:55:58 +00:00
Bryan Drewery
a730673058 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
2015-10-07 19:10:38 +00:00
John Baldwin
d07c923bda Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.
Reviewed by:	emaste, kib
Differential Revision:	https://reviews.freebsd.org/D3833
2015-10-07 17:52:18 +00:00
Andrew Turner
b1bddf4039 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
2015-10-07 13:19:44 +00:00