Commit Graph

185959 Commits

Author SHA1 Message Date
Sergey Kandaurov
bb39ffb8c9 Adjust introduction history.
Dump .Dd for this and previous changes.

Discussed with:	trasz
MFC after:	3 days
2013-11-25 23:45:50 +00:00
Neel Natu
d6fe268fdd Fix discrepancy between the IOAPIC ID advertised by firmware tables and the
actual value read by the guest from the device. The IOAPIC ID is now set to
zero in both MPtable/ACPI tables as well as in the ioapic device emulation.

Pointed out by:	grehan@
2013-11-25 23:31:00 +00:00
Sergey Kandaurov
8cb3704a63 iostat: fix extracting TTY statistics from core.
MFC after:	1 week
2013-11-25 22:55:47 +00:00
Adrian Chadd
fa22ce1570 Convert over the TCP probes to use mtod() rather than directly
dereferencing m->m_data.

Sponsored by:	Netflix, Inc.
2013-11-25 22:55:06 +00:00
Peter Wemm
a5b9d9b723 Import apr-util-1.5.3 from vendor branch (rr258600)
This is a minor bug fix release.
2013-11-25 22:20:34 +00:00
Peter Wemm
5bf7090be4 Import apr-util 1.5.3 2013-11-25 22:15:47 +00:00
Pawel Jakub Dawidek
1cef014007 When append-only, immutable or read-only flag is set don't allow for
hard links creation. This matches UFS behaviour.

Reported by:	Oleg Ginzburg <olevole@olevole.ru>
MFC after:	1 month
2013-11-25 21:17:14 +00:00
Pawel Jakub Dawidek
a9554102f9 Fix double free().
Reported by:	Coverity
Coverity CID:	1130048
2013-11-25 20:45:30 +00:00
Devin Teske
84dfba8d18 Sort messages. 2013-11-25 20:37:53 +00:00
Craig Rodrigues
6274ce3e2b In vnet_route_uninit(), free some memory that is allocated in vnet_route_init().
To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       see: http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html
            http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021291.html

This doesn't eliminate all the "Freed UMA keg was not empty" warning messages
on the console, but it helps.
2013-11-25 20:33:33 +00:00
Devin Teske
1833362dc3 Add missing newline to printf format string. 2013-11-25 20:29:26 +00:00
Devin Teske
f18d3c4116 Add missing $' before variable name pgm'. Unnoticed unless running
parallel concurrent copies of `bsdconfig syscons_ttys'.
2013-11-25 20:28:39 +00:00
Craig Rodrigues
d04dc94cac In sys/netpfil/ipfw/ip_fw_nat.c:vnet_ipfw_nat_uninit() we call "IPFW_WLOCK(chain);".
This lock gets deleted in sys/netpfil/ipfw/ip_fw2.c:vnet_ipfw_uninit().

Therefore, vnet_ipfw_nat_uninit() *must* be called before vnet_ipfw_uninit(),
but this doesn't always happen, because the VNET_SYSINIT order is the same for both functions.
In sys/net/netpfil/ipfw/ip_fw2.c and sys/net/netpfil/ipfw/ip_fw_nat.c,
IPFW_SI_SUB_FIREWALL == IPFW_NAT_SI_SUB_FIREWALL == SI_SUB_PROTO_IFATTACHDOMAIN
and
IPFW_MODULE_ORDER == IPFW_NAT_MODULE_ORDER

Consequently, if VIMAGE is enabled, and jails are created and destroyed,
the system sometimes crashes, because we are trying to use a deleted lock.

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html )

Fix the problem by increasing the value of IPFW_NAT_SI_SUB_FIREWALL,
so that vnet_ipfw_nat_uninit() runs after vnet_ipfw_uninit().
2013-11-25 20:20:34 +00:00
Peter Wemm
db2af39373 Move the iconv wrapper source from libc_nonshared to libc/iconv so that
it is all in the one place again.  Rename libc/iconv/iconv.c to
bsd_iconv.c. Compile the wrappers into libc.a so that WITHOUT_DYNAMICROOT
works again.

Discussed with:	kib (and partly stolen from his patch)
2013-11-25 20:17:55 +00:00
Eitan Adler
c0fafb2882 Add missing cards now supported by iwn. 2013-11-25 20:03:57 +00:00
Hiroki Sato
33888c08dd There is no file under SISSL after license replacement in r258581. 2013-11-25 19:24:15 +00:00
Hiroki Sato
44443e425f Replace Sun Industry Standards Source License for Sun RPC code with a
3-clause BSD license as specified by Oracle America, Inc. in 2010.
This license change was approved by Wim Coekaerts, Senior Vice
President, Linux and Virtualization at Oracle Corporation.
2013-11-25 19:08:38 +00:00
Hiroki Sato
d9f4d21bdd Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,
with the explicit permission of Sun Microsystems in 2009.
2013-11-25 19:07:44 +00:00
Neel Natu
08e3ff329a Add HPET device emulation to bhyve.
bhyve supports a single timer block with 8 timers. The timers are all 32-bit
and capable of being operated in periodic mode. All timers support interrupt
delivery using MSI. Timers 0 and 1 also support legacy interrupt routing.

At the moment the timers are not connected to any ioapic pins but that will
be addressed in a subsequent commit.

This change is based on a patch from Tycho Nightingale (tycho.nightingale@pluribusnetworks.com).
2013-11-25 19:04:51 +00:00
Hiroki Sato
2e322d3796 Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,
with the explicit permission of Sun Microsystems in 2009.
2013-11-25 19:04:36 +00:00
Craig Rodrigues
c0c61281b4 Only initialize some mutexes for the default VNET.
In r208160, sctp_it_ctl was made a global variable, across all VNETs.
However, sctp_init() is called for every VNET that is created.  This results
in the same global mutexes which are part of sctp_it_ctl being initialized.  This can result
in crashes if many jails are created.

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html )

Witness will warn about the same mutex being initialized.

Fix the problem by only initializing these mutexes in the default VNET.
2013-11-25 18:49:37 +00:00
Pedro F. Giffuni
340b342723 MFV: removes strict-aliasing warnings from GCC in tcpdump.
Reported by:	tinderbox (gjb)
Submitted by:	glebius
MFC after:	2 weeks
2013-11-25 18:46:08 +00:00
Ryan Stone
9b605dd32e pmc(3) does not document a dependency on <sys/types.h> but <pmc.h>
requires it, so include it explicitly from <pmc.h>.

MFC after:	1 month
2013-11-25 18:31:13 +00:00
Pedro F. Giffuni
05b21c9adf tcpdump Bring change from upstream.
commit 772d6fbcf592209aa1ab1b61714e8ae72a5b1698
Author: Dmitrij Tejblum <tejblum@yandex-team.ru>
Date:   Sun Jun 2 13:48:44 2013 +0400

    Convert some versions of EXTRACT_{16,32,64}BITS() to inline functions.

    It removes the vast majority of strict-aliasing warnings from GCC.
2013-11-25 18:28:34 +00:00
Craig Rodrigues
c9dc8f36d6 Change sysinstall.8 references to bsdinstall.8.
Submitted by: skreuzer
2013-11-25 18:11:55 +00:00
Peter Wemm
949ef25c23 Import svn-1.8.5. This contains a user-visible fix for svn:externals
handling (there are no svn:externals in freebsd repo), and two security
fixes for modules that we don't build for the apache http server stack.
2013-11-25 17:52:16 +00:00
Peter Wemm
eeb88685bf Import subversion-1.8.5 2013-11-25 17:44:04 +00:00
Hiroki Sato
a7c51fa1a0 Replace Sun RPC license with a 3-clause BSD license, with the explicit
permission of Sun Microsystems in 2009.
2013-11-25 16:44:02 +00:00
Jean-Sébastien Pédron
d52ba34e7b drm: Fix build with gcc, broken with r258549
The code was easier to read without __DECONST and clang didn't report
any error. I thought the cast was enough...

MFC after:	3 days
X-MFC-With:	r258549
2013-11-25 15:01:59 +00:00
Julio Merino
9e684a3a79 Generate plain sh test programs from a source file.
Instead of assuming that plain sh test programs exist in the source
tree in their final form and are marked as executable, generate them
from a list of sources.

By default, just assume that the source file for a program P is P.sh
but allow the caller to customize the inputs.  Similarly, also allow
the caller to apply sed(1) replacements on the output.  These will
both be useful in hooking existing test code from tools/regression/
into the test suite.

Approved by:	rpaulo (mentor)
2013-11-25 13:30:06 +00:00
Julio Merino
f67f6c4e3b Install plain.test.mk.
This was missed when this file was first imported.  Its atf.test.mk
counterpart is already being installed and these are necessary if we
want "make" within the source tree (not via "buildworld") to work.

Approved by:	rpaulo (mentor)
2013-11-25 13:28:40 +00:00
Baptiste Daroussin
d8d2111e85 Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated
Reported by:	glebius
MFC after:	3 days
2013-11-25 11:31:42 +00:00
Jean-Sébastien Pédron
1eafa5d8b0 drm: Dereference pointers given to qsort_r()'s cmp callback
drm_le_cmp() (qsort_r()'s callback) receives pointers to elements in the
array passed to qsort_r(), not the elements themselves.

Before this fix, the use of qsort_r() shuffled the array, not sorted it,
because the compare callback accessed random memory locations, not the
expected elements.

This bug triggered an infinite loop in KDE/xserver:

    1. KDE has a kded module called "randrmonitor" which queries xserver
       for current monitors at startup and then listens to RandR
       notifications from xserver.

    2. xserver handles the query from "randrmonitor" by polling the
       video device using the "drm_mode_getconnector()" ioctl. This
       ioctl returns a list of connectors and, for those with a
       connected monitor, the available modes. Each modes list is sorted
       by the kernel before returning. When xserver gets the connectors
       list, it sorts the modes lists again.

       In the case of this bug, when two modes are equal (in xserver's
       compare function PoV), their order is kept stable (ie. the
       kernel order is kept for those two modes). And because the list
       was shuffled by the kernel, the order of two equal modes was
       frequently changed in the final modes list in xserver.

    3. xserver compares the returned connectors list with the list
       obtained earlier. In particular, it compares the sorted
       modes lists for each connector. If a property of a connector
       changes (eg. modes), xserver sends a "RRNotify_OutputChange"
       notification.

       Because of the change of order between equal modes, xserver sent
       a notification after each polling of the connectors.

    4. "randrmonitor" receives a notification, triggered by its query. The
       notification doesn't contain the new connectors list, therefore, it
       asks for the new list using the same function: go back to step #2.

MFC after:	3 days
2013-11-25 11:15:51 +00:00
Ganbold Tsagaankhuu
18d753d0fb Enable reset mechanism for rk3188.
Approved by: ray@
2013-11-25 11:02:58 +00:00
Ganbold Tsagaankhuu
a8e50123f0 Add clock frequency for rk3188 watchdog.
Whilst here, replace "clocks" to "clock-frequency".

Approved by: ray@
2013-11-25 11:02:11 +00:00
Ganbold Tsagaankhuu
421663eb64 Add watchdog driver for rk3188.
Approved by: ray@
2013-11-25 11:01:19 +00:00
Hans Petter Selasky
5c0f828a07 Comply to the XHCI specification. Certain input context fields should
always be zero.

MFC after:	1 week
2013-11-25 10:58:02 +00:00
Attilio Rao
54366c0bd7 - For kernel compiled only with KDTRACE_HOOKS and not any lock debugging
option, unbreak the lock tracing release semantic by embedding
  calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the inlined
  version of the releasing functions for mutex, rwlock and sxlock.
  Failing to do so skips the lockstat_probe_func invokation for
  unlocking.
- As part of the LOCKSTAT support is inlined in mutex operation, for
  kernel compiled without lock debugging options, potentially every
  consumer must be compiled including opt_kdtrace.h.
  Fix this by moving KDTRACE_HOOKS into opt_global.h and remove the
  dependency by opt_kdtrace.h for all files, as now only KDTRACE_FRAMES
  is linked there and it is only used as a compile-time stub [0].

[0] immediately shows some new bug as DTRACE-derived support for debug
in sfxge is broken and it was never really tested.  As it was not
including correctly opt_kdtrace.h before it was never enabled so it
was kept broken for a while.  Fix this by using a protection stub,
leaving sfxge driver authors the responsibility for fixing it
appropriately [1].

Sponsored by:	EMC / Isilon storage division
Discussed with:	rstone
[0] Reported by:	rstone
[1] Discussed with:	philip
2013-11-25 07:38:45 +00:00
Hiroki Sato
7c5b23111c Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl. GNU iconv returns EILSEQ
when there is an invalid character in the output codeset while it is
valid in the input.  However, POSIX requires iconv() to perform an
implementation-defined conversion on the character.  So, Citrus iconv converts
such a character to a special character which means it is invalid in the
output codeset.

This is not a problem in most cases but some software like libxml2 depends
on GNU's behavior to determine if a character is output as-is or another form
such as a character entity (&#NNN;).
2013-11-25 01:26:06 +00:00
Jilles Tjoelker
1b57cec7d9 sh: Make <&0 disable the </dev/null implicit in a background command.
Although <&0 does nothing, it is a redirection affecting standard input and
should therefore disable the </dev/null redirection implicit in a background
command.
2013-11-24 23:12:13 +00:00
Gavin Atkinson
e0c634180c Fix typo in comment. 2013-11-24 22:53:49 +00:00
Jilles Tjoelker
82baac5777 sh: Add more tests for the </dev/null implicit in a background command. 2013-11-24 22:45:49 +00:00
Gavin Atkinson
702701714b platform_devmap_init() was renamed initarm_devmap_init() in r257669, update
comments to match.
2013-11-24 22:01:15 +00:00
Pedro F. Giffuni
b5e1e9602d libcpp: Keep a record of changes from upstream GCC (pre-43).
This makes it easier to track the changes in the rare event of the code
being distributed without access to version control.

MFC after:	3 weeks
2013-11-24 20:54:52 +00:00
Andrew Turner
299f9dc1a6 Recent versions of U-Boot require us to also backup and restore r9 for API
calls to work.
2013-11-24 20:33:38 +00:00
Pedro F. Giffuni
f7f4d3779b gcc: Missing makefile changes for r258501.
pointyhat:	me
2013-11-24 04:08:47 +00:00
Andreas Tobler
f367ffdecc Save and restore the trap vectors when doing OF calls on pSeries machines.
It turned out that on pSeries machines the call into OF modified the trap
vectors and this made further behaviour unpredictable.

With this commit I'm now able to boot multi user on a network booted
environment on my IntelliStation 285. This is a POWER5+ machine.

Discussed with:		nwhitehorn
MFC after:	1 week
2013-11-23 18:58:17 +00:00
Andreas Tobler
4af7c8949e Limit the large page size to 16MB for now.
MFC after:	1 week
2013-11-23 18:52:14 +00:00
Andreas Tobler
f9cc6b5558 Get rid of the CONCAT macro. 2013-11-23 18:50:43 +00:00
Pedro F. Giffuni
81e5b01765 gcc: Bring updates from Google's enhanced gcc-4.2.1.
Google released and enhanced version of gcc-4.2.1 plus their local
patches for Android[1].

The patches are owned by Google and the license hasn't been changed
from  the original GPLv2. We are only bringing a subset of the
available patches that may be helpful in FreeBSD. Changes specific
to android are not included.

From the README.google file[1].

Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1:

gcc/Makefile.in
gcc/c-common.c
gcc/c-common.h
gcc/c-opts.c
gcc/c-typeck.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/flags.h
gcc/opts.c
gcc/tree-flow.h
gcc/tree-ssa-alias-warnings.c
gcc/tree-ssa-alias.c

 Backport of -Wstrict-aliasing from mainline.
  Silvius Rus <rus@google.com>

gcc/coverage.c:
  Patch coverage_checksum_string for PR 25351.
  Seongbae Park <spark@google.com>
  Not yet submitted to FSF.

gcc/c-opts.c
gcc/c-ppoutput.c
gcc/c.opt
gcc/doc/cppopts.texi
libcpp/Makefile.in
libcpp/directives-only.c
libcpp/directives.c
libcpp/files.c
libcpp/include/cpplib.h
libcpp/init.c
libcpp/internal.h
libcpp/macro.c
  Support for -fdirectives-only.
  Ollie Wild <aaw@google.com>.
  Submitted to FSF but not yet approved.

libstdc++-v3/include/ext/hashtable.h
  http://b/742065
  http://b/629994
  Reduce min size of hashtable for hash_map, hash_set from 53 to 5

libstdc++-v3/include/ext/hashtable.h
  http://b/629994
  Do not iterate over buckets if hashtable is empty.

gcc/common.opt
gcc/doc/invoke.texi
gcc/flags.h
gcc/gimplify.c
gcc/opts.c
  Add Saito's patch for -finstrument-functions-exclude-* options.

gcc/common.opt
gcc/doc/invoke.texi
gcc/final.c
gcc/flags.h
gcc/opts.c
gcc/testsuite/gcc.dg/Wframe-larger-than.c
  Add a new flag -Wframe-larger-than- which enables a new warning
  when a frame size of a function is larger than specified.
  This patch hasn't been integrated into gcc mainline yet.

gcc/tree-vrp.c
  Add a hack to avoid using ivopts information for pointers starting
  at constant values.

Reference:

[1]
https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/

Obtained from:	Google Inc.
MFC after:	3 weeks
2013-11-23 18:32:53 +00:00