Commit Graph

213912 Commits

Author SHA1 Message Date
adrian
8947a584e4 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
04c9f666b5 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
d29789315a 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
rodrigc
e7165de993 Use print as a function, not operator. 2015-10-08 03:28:15 +00:00
marcel
a8226abc82 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
3cab7edfb2 Move SHLIBDIR?=/lib before <src.opts.mk> so that it works again. 2015-10-08 01:17:45 +00:00
adrian
ab34dc5056 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
rodrigc
1bb3c00a2b 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
bdrewery
f3631cd596 Correct a comment. 2015-10-08 00:31:11 +00:00
gjb
ebc5619c3a 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
rodrigc
7d1573f7e9 Use proper function prototypes.
Eliminates -Wstrict-prototypes warning
2015-10-07 19:55:58 +00:00
bdrewery
923a85693e 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
jhb
9b1033cdad 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
1b20850b54 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
glebius
46f350c8ac 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.
2015-10-07 13:10:26 +00:00
glebius
daa604f294 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.
2015-10-07 12:40:00 +00:00
glebius
a2200eb70b 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
2015-10-07 12:36:28 +00:00
bapt
8a05965c77 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
2015-10-07 09:28:54 +00:00
kib
58e0a4096f 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
2015-10-07 09:12:49 +00:00
ngie
2d18671fe9 Remove all of the syncs
They're unnecessary as shown by further testing on my VM

Requested by: jhb
2015-10-07 08:56:38 +00:00
bapt
198f362e32 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
2015-10-07 08:56:01 +00:00
hrs
03da536d33 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
2015-10-07 06:32:34 +00:00
ngie
59f34e88fa Integrate the rest of the pieces from libarchive into the
FreeBSD test suite (cpio, tar)
2015-10-07 06:08:55 +00:00
ngie
98b68926cb Integrate the testcases into the FreeBSD test suite
There are a handful of broken testcases that need to be investigated
(see BROKEN_TESTS for more details)
2015-10-07 05:20:44 +00:00
kevlo
128f9bc797 Declare odata as a pointer type instead of a pointer to pointer.
Reviewed by:	adrian
2015-10-07 03:33:25 +00:00
gjb
3c4eddb710 Refine the r286591 entry based on feedback from jilles@.
Sponsored by:	The FreeBSD Foundation
2015-10-07 02:12:44 +00:00
gjb
1d43c1985b Remove entry for r287469, Skylake/i219 support is not yet complete.
Reported by:	Adam McDougall
Sponsored by:	The FreeBSD Foundation
2015-10-07 02:12:43 +00:00
gjb
cb68583ce9 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
2015-10-07 02:12:42 +00:00
delphij
6690174bf3 Remove support of ancient (pre-8.0R, 800041) FreeBSD releases.
MFC after:	2 weeks
2015-10-07 01:25:47 +00:00
sjg
4bbbb6c4f1 Updated depends 2015-10-07 00:43:05 +00:00
sjg
32f25b8b0b 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.
2015-10-07 00:32:33 +00:00
sjg
591790668c Do not assume host toolchain supports sysroot 2015-10-07 00:28:24 +00:00
sjg
dee7614f48 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
2015-10-07 00:24:27 +00:00
delphij
4ba30d9149 Now that we own the code, use arc4random(3) unconditionally
and remove the corresponding HAVE_ARC4RANDOM conditions.

MFC after:	2 weeks
2015-10-06 23:42:58 +00:00
jhb
4437aff4a8 Tweak: use 'mainlwp' instead of 'mainpid' since this is a thread (LWP)
identifier, not a pid.
2015-10-06 22:59:00 +00:00
bdrewery
52adc6c504 Fix build with older GCC which, doesn't like 'main' being a variable name. 2015-10-06 22:54:04 +00:00
delphij
1ce120cf1a Use strlcpy() when the string is expected to be nul-terminated.
MFC after:	2 weeks
2015-10-06 22:49:25 +00:00
delphij
a881a53a21 Remove a few unused headers.
MFC after:	2 weeks
2015-10-06 22:45:23 +00:00
bdrewery
7c2a5d79af 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
2015-10-06 21:58:38 +00:00
ngie
b3e8d0ae9c Forced commit to note that I was playing around with libarchive
test integration that accidentally got committed with r288955
2015-10-06 21:44:48 +00:00
ngie
a6c3db2235 MFhead @ r288954 2015-10-06 21:43:37 +00:00
jhb
cb4dcd0eff 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
2015-10-06 21:36:45 +00:00
dim
d71b32ab81 Stop linking libc++.so verbosely, there is no need to.
MFC after:	3 days
2015-10-06 21:28:54 +00:00
adrian
09dbfded81 Remove gen3 check introduced in r286653.
kib spotted this and noticed it's not correct.

Submitted by:	kib
Reviewed by:	dumbbell
2015-10-06 20:58:45 +00:00
dim
4b2b2cb1c9 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
2015-10-06 19:49:53 +00:00
jhb
0e49f5d86b 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
2015-10-06 19:31:07 +00:00
jhb
b86a33b09a 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
2015-10-06 19:29:05 +00:00
gjb
2ba80c73b3 Update the last check revision marker.
Sponsored by:	The FreeBSD Foundation
2015-10-06 19:07:10 +00:00
gjb
cad62a69b5 Document r288943, clang, llvm, etc. updated to upstream 3.7.0.
Sponsored by:	The FreeBSD Foundation
2015-10-06 19:06:34 +00:00
ngie
8cad7e1c52 MFhead @ r288943
clang 3.7.0 upgrade
2015-10-06 18:07:07 +00:00