Commit Graph

185828 Commits

Author SHA1 Message Date
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
Konstantin Belousov
0a9655a082 If check_deferred_signal() execution needs binding of PLT symbol,
unlocking the rtld bind lock results in the processing of ast and
recursing into the check_deferred_signal().  Nested execution of
check_deferred_signal() delivers the signal to user code and clears
si_signo.  On return, top-level check_deferred_signal() frame
continues delivering the same signal one more time, but now with zero
si_signo.

Fix this by adding a flag to indicate that deferred delivery is
running, so check_deferred_signal() should avoid doing anything. Since
user signal handler is allowed to modify the passed machine context to
make return from the signal handler to cause arbitrary jump, or do
longjmp(). For this case, also clear the flag in thr_sighandler(),
since kernel signal delivery means that nested delivery code should
not run right now.

Reported by:	Vitaly Magerya <vmagerya@gmail.com>
Reviewed by:	davidxu, jilles
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-11-23 15:48:17 +00:00
Alexander Motin
8a8d9d1475 When purging per-CPU UMA caches do not return empty buckets into the global
full bucket cache to not trigger assertion if allocation happen before that
global cache get purged.
2013-11-23 13:42:56 +00:00
Alexander Motin
680a6bcf2f MFreleng/8.4 r251256 (by hrs):
Update description of logical CPU handling in the latest releases and
remove obsolete sysctl variable machdep.hlt_logical_cpus.

MFC after:	3 days
2013-11-23 11:46:13 +00:00
Neel Natu
ac7304a758 Add an ioctl to assert and deassert an ioapic pin atomically. This will be used
to inject edge triggered legacy interrupts into the guest.

Start using the new API in device models that use edge triggered interrupts:
viz. the 8254 timer and the LPC/uart device emulation.

Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
2013-11-23 03:56:03 +00:00
John-Mark Gurney
9164a239ea fix broken style(9) in r258399
Pointed out by:	brd
2013-11-23 00:28:18 +00:00
Jilles Tjoelker
c2fd50d77a sh: Add tests for the </dev/null implicit in a background command. 2013-11-22 21:50:13 +00:00
Gleb Smirnoff
116e43f021 Remove __FreeBSD__ ifdefs. 2013-11-22 20:13:32 +00:00
Gleb Smirnoff
0c46447bda Rewrite usage() so that its source code resembles what is printed. 2013-11-22 20:11:17 +00:00
Gleb Smirnoff
19acaecac3 The DIOCKILLSRCNODES operation was implemented with O(m*n) complexity,
where "m" is number of source nodes and "n" is number of states. Thus,
on heavy loaded router its processing consumed a lot of CPU time.

Reimplement it with O(m+n) complexity. We first scan through source
nodes and disconnect matching ones, putting them on the freelist and
marking with a cookie value in their expire field. Then we scan through
the states, detecting references to source nodes with a cookie, and
disconnect them as well. Then the freelist is passed to pf_free_src_nodes().

In collaboration with:	Kajetan Staszkiewicz <kajetan.staszkiewicz innogames.de>
PR:		kern/176763
Sponsored by:	InnoGames GmbH
Sponsored by:	Nginx, Inc.
2013-11-22 19:22:26 +00:00
Gleb Smirnoff
d77c1b3269 To support upcoming changes change internal API for source node handling:
- Removed pf_remove_src_node().
- Introduce pf_unlink_src_node() and pf_unlink_src_node_locked().
  These function do not proceed with freeing of a node, just disconnect
  it from storage.
- New function pf_free_src_nodes() works on a list of previously
  disconnected nodes and frees them.
- Utilize new API in pf_purge_expired_src_nodes().

In collaboration with:	Kajetan Staszkiewicz <kajetan.staszkiewicz innogames.de>

Sponsored by:	InnoGames GmbH
Sponsored by:	Nginx, Inc.
2013-11-22 19:16:34 +00:00
Gleb Smirnoff
3260ae00be Add missing 'extern'. 2013-11-22 19:02:22 +00:00
Gleb Smirnoff
1320f8c0d5 Fix off by ones when scanning source nodes hash.
Sponsored by:	Nginx, Inc.
2013-11-22 18:57:27 +00:00
Neel Natu
af480303a9 Eliminate redundant information about the host cpu in bhyve's KTR trace points.
This is always tracked by ktr(4) and can be displayed using the "-c" option
of ktrdump(8).

Discussed with:	grehan
2013-11-22 18:57:22 +00:00
Gleb Smirnoff
4280d14d2b Style: don't compare unsigned <= 0.
Sponsored by:	Nginx, Inc.
2013-11-22 18:54:06 +00:00
Neel Natu
9785e97901 Teach acpidump(8) to display the 'Flags' field in the HPET Description Table.
Reviewed by:	jhb@
2013-11-22 18:53:54 +00:00
Ed Maste
da71787841 Refactor i386 startup SMAP parsing
This is a port from amd64 of r258436, and is intended to make diffs
(against amd64 and for future UEFI work) easier to review.

Reviewed by:	jhb@
Sponsored by:	The FreeBSD Foundation
2013-11-22 18:31:07 +00:00
Dimitry Andric
56510193f0 Revert r258455 for now, as it apparently causes miscompilation in some
situations.  Until this is fully resolved, the X.org workaround in ports
still needs to take place.
2013-11-22 17:54:53 +00:00
Ed Maste
7b7d8599fe Don't abort SMAP processing after an entry of length 0
Length 0 is not special and should just be skipped.  This is the same
behaviour as i386.

Discussed with:	jhb@
Sponsored by:	The FreeBSD Foundation
2013-11-22 14:56:10 +00:00
Sergey Kandaurov
5cd4723c5c - Purge one more reference to ad(4)[1].
- NSWAPDEV limit has gone.

Noticed by:	Sergey V. Dyatko [1]
MFC after:	1 week
2013-11-22 12:09:15 +00:00
Luigi Rizzo
41d10f903d add a counter on the struct mq (a queue of mbufs),
and add a block for userspace compiling.
2013-11-22 05:02:37 +00:00
Luigi Rizzo
f783a35ced disable some ipfw match options when compiling in userspace 2013-11-22 05:01:38 +00:00
Luigi Rizzo
d0f65d47ec make this code compile in userspace on OSX 2013-11-22 05:00:18 +00:00
Luigi Rizzo
413c8aaa87 more support for userspace compiling of this code:
emulate the uma_zone for dynamic rules.
2013-11-22 04:59:17 +00:00