Commit Graph

194106 Commits

Author SHA1 Message Date
Mateusz Guzik
07b384cbe2 Eliminate unnecessary memory allocation in sys_getgroups and its ibcs2 counterpart. 2014-10-21 23:08:46 +00:00
Baptiste Daroussin
e1f7d54595 Do not define bad_array_new_length::bad_array_new_length in libc++ anymore
when used in combinaison with libcxxrt since it is now defined there already.
This fixes building world
2014-10-21 21:49:06 +00:00
Glen Barber
668026383c Bump __FreeBSD_version to track SA-14:20, SA-14:21, SA-14:22,
SA-14:23

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-10-21 21:37:53 +00:00
Mateusz Guzik
2afec8edfc Take the lock shared in linker_search_symbol_name.
This helps sysctl kern.proc.stack.
2014-10-21 21:29:20 +00:00
Mateusz Guzik
12e2a30ef9 tmpfs: allow shared file lookups
Tested by: pho
2014-10-21 21:27:13 +00:00
Baptiste Daroussin
e82241aa78 Revert r273426 r273409
A solution that work with both new and old binutils should be investigated
2014-10-21 21:17:44 +00:00
Baptiste Daroussin
412013d7a8 older binutils does not know about --no-fatal-warnings 2014-10-21 21:09:54 +00:00
Mateusz Guzik
fca7732078 Mark some more sysctl stuff shared-locked and MPSAFE. 2014-10-21 21:08:45 +00:00
Hans Petter Selasky
71aea8c84b Use the UAUTO SYSCTL type for exporting the bounce zone alignment,
because the variable size depends on the build type.

Reported by:	kib @
MFC after:	3 days
2014-10-21 21:04:44 +00:00
Ed Maste
16fbb1ab33 Fix typo in src option description 2014-10-21 20:44:33 +00:00
Ed Maste
a0f6423b3d Regenerate after r273418 2014-10-21 20:41:19 +00:00
Warner Losh
289ee3b601 For the kernel, we have USB_GADGET_EXAMPLES as defaults to yes. For
userland defaults to no. This caused issues for the automated option
documenation script. Turns out, this isn't used in userland at all, so
just remove it from here.
2014-10-21 20:29:53 +00:00
Warner Losh
983678dd7c Generate both userland and kernel option settings for showconfig.
PR: 191920
2014-10-21 20:29:51 +00:00
Warner Losh
e8a66c33e4 You aren't allowed to test WITH_xxx or WITHOUT_xxx here, so remove it.
Even if you were allowed to test for it, the test makes no sense as it
always results in adding -DWITH_ATF unless WITH_ATF was already
defined. But if MK_ATF != no, then we know it was defined. This, in
turn, caused tools/build/options/makemake always think WITH_ATF is the
default, which removed control of that from sys.conf.mk.

To get the intent of the deleted comment, another mechanism is
required, assuming that the intent of that comment is desirable.
2014-10-21 20:29:42 +00:00
Enji Cooper
f8974fefdb Add sys/socket.h #include for bind(2), et al
Sponsored by: EMC / Isilon Storage Division
2014-10-21 20:17:05 +00:00
Baptiste Daroussin
9904471bf3 Do not make ld(1) warnings fatal anymore, binutils behaviour has changed over the
time and gnu.warnings.symbol are now being fatal preventing building world.

in the futur we want to investigate only making the gnu.warning.symbol non fatal

Reviewed by:	imp
2014-10-21 20:11:05 +00:00
Baptiste Daroussin
1ff70c7190 Make the external toolchain support grows to the knowleged of XXFLAGS for C++ dedicated flags
and DEPFLAGS for mkdep flags
Pass the path to the libc++ headers in both, enforce the gnu++11 standard in the XXFLAGS
to satisfy libc++ requirements pass the libc++ objectdir as a location where to find
libraries so it can find libstdc++.so and libstdc++.A

Reviewed by:	imp
2014-10-21 20:07:15 +00:00
Baptiste Daroussin
aa7703be9c When using an external gcc 4.8+ and not building libstdc++ then create in the objectdir a
fake libstdc++.so and libstdc++.a which is a symlink on libc++ that allow g++ to satisfy
its links dependencies in the least hackish way.
Please note that this hacky libstds++ never get installed on the final system

Reviewed by:	imp
2014-10-21 20:04:05 +00:00
Baptiste Daroussin
ff2cf3685b Always use libc++ as the default c++ stack when building with an external gcc 4.8+
While here disable building gcc from base when using gcc 4.8+

Reviewed by:	imp
2014-10-21 20:00:49 +00:00
Baptiste Daroussin
d8d1a9ad6c When using an external toolchain note that gcc 4.8+ supports C++11
Submitted by:	imp
2014-10-21 19:58:23 +00:00
Baptiste Daroussin
8447c44fe7 The dependencies are computed with CC even if sources are C++, when building
when building with an external gcc, we want to be able to pass the path to
the libc++ headers so dependencies are correctly computed for C++ source files.
Add a DEPFLAGS for that purpose

Reviewed by:	imp
2014-10-21 19:56:45 +00:00
Mateusz Guzik
b564c5d6aa Make sysctl name2oid shared-locked as well.
This is a follow-up to r273401.
2014-10-21 19:45:08 +00:00
Glen Barber
c379cfaf3c Fix an issue where a FreeBSD virtual machine provisioned in
the Microsoft Azure service does not recognize the second
attached disk on the system.

Submitted by:	kyliel@Microsoft
Patched by:	weh@Microsoft
PR:		194376
MFC after:	3 days
X-MFC-10.1:	yes, ASAP
Sponsored by:	The FreeBSD Foundation
2014-10-21 19:36:20 +00:00
Mateusz Guzik
efe0abddf5 Implement shared locking for sysctl. 2014-10-21 19:05:44 +00:00
Mateusz Guzik
580a011762 Rename sysctl_lock and _unlock to sysctl_xlock and _xunlock. 2014-10-21 19:02:26 +00:00
Enji Cooper
203a8409a0 Port t_chroot to FreeBSD
- Add missing #include sys/stat.h for mkdir(2)
- Omit the fchroot(2) tests because the support is not present on FreeBSD

Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:10:05 +00:00
Enji Cooper
67654a1af5 unlink("/") fails with EISDIR instead of EBUSY on FreeBSD; test for that
instead

Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:06:04 +00:00
Enji Cooper
30f7722958 Mark osi __unused so this compiles cleanly on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:01:37 +00:00
Jim Harris
83a4c3f99e ixl: remove i40e_register_x710_int.h
This file is not used by the FreeBSD ixl driver.

Submitted by:	Eric Joyner <eric.joyner@intel.com>
MFC after:	3 days
2014-10-21 18:00:56 +00:00
Enji Cooper
84763702c5 Port t_write to FreeBSD
- Mark the signo variable for the signal handle __unused
- Use limits.h instead of sys/syslimits.h (the latter does not
exist on FreeBSD)

Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:00:55 +00:00
John-Mark Gurney
d31a976084 it is not cast to a pointer of the specified type, it is cast to the
specified type...

mtod(m, uint8_t) does not work, mtod(m, uint8_t *) does work..
2014-10-21 17:59:27 +00:00
Enji Cooper
6da1ceb210 Add missing #include for sys/stat.h for fchmod
Sponsored by: EMC / Isilon Storage Division
2014-10-21 17:58:53 +00:00
Enji Cooper
2a0388e163 libutil.h is required for fparseln on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-21 17:57:12 +00:00
Enji Cooper
192a7b5f9e Port lib/libc/gen/t_siginfo to FreeBSD
- mcontext_t on FreeBSD doesn't have a __gregs field (it's split out on FreeBSD
into separate fields). In order to avoid muddying the test code with MD code,
the debugging trace info has not been implemented
- FreeBSD does not implement the si_stime and si_utime fields in siginfo_t, so
omit the debugging code that dumps the values
- sys/inttypes.h doesn't exist on FreeBSD

Sponsored by: EMC / Isilon Storage Division
2014-10-21 17:56:06 +00:00
John-Mark Gurney
e0912e08e4 spell out the arguments..
the + *offsetp does not belong w/ the type, move it outside the .Fn
macro...
2014-10-21 17:17:40 +00:00
Baptiste Daroussin
1418fbd6c7 Fix build by marking the new functions as weak
This is a temporary fix
2014-10-21 12:52:01 +00:00
Baptiste Daroussin
726f4cd580 Add support for __cxa_throw_bad_array_new_length in libcxxrt
It is required for use with newer g++49

Differential Revision:	https://reviews.freebsd.org/D982
Reviewed by:	theraven
Approved by:	theraven
MFC after:	3 weeks
2014-10-21 10:19:45 +00:00
Ruslan Bukin
8b62915e24 Add driver for Micrel KSZ9021 Gigabit Ethernet Transceiver (PHY).
Sponsored by:	DARPA, AFRL
2014-10-21 09:14:16 +00:00
Hans Petter Selasky
4db0aba3b2 Fix minor typo in currently unused macro.
MFC after:	3 days
2014-10-21 07:49:34 +00:00
Hans Petter Selasky
f0188618f2 Fix multiple incorrect SYSCTL arguments in the kernel:
- Wrong integer type was specified.

- Wrong or missing "access" specifier. The "access" specifier
sometimes included the SYSCTL type, which it should not, except for
procedural SYSCTL nodes.

- Logical OR where binary OR was expected.

- Properly assert the "access" argument passed to all SYSCTL macros,
using the CTASSERT macro. This applies to both static- and dynamically
created SYSCTLs.

- Properly assert the the data type for both static and dynamic
SYSCTLs. In the case of static SYSCTLs we only assert that the data
pointed to by the SYSCTL data pointer has the correct size, hence
there is no easy way to assert types in the C language outside a
C-function.

- Rewrote some code which doesn't pass a constant "access" specifier
when creating dynamic SYSCTL nodes, which is now a requirement.

- Updated "EXAMPLES" section in SYSCTL manual page.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2014-10-21 07:31:21 +00:00
Kevin Lo
7eb884645c Add the Intel BayTrail USB device which needs port routing for USB 3.0.
Tested on the BayTrail E3845 platform.
Reviewed by:	hselasky
2014-10-21 07:24:58 +00:00
Neel Natu
a78dc03254 Merge projects/bhyve_svm into HEAD.
After this change bhyve supports AMD processors with the SVM/AMD-V hardware
extensions.

More details available here:
https://lists.freebsd.org/pipermail/freebsd-virtualization/2014-October/002905.html

Submitted by:	Anish Gupta (akgupt3@gmail.com)
Tested by:	Benjamin Perrault (ben.perrault@gmail.com)
Tested by:	Willem Jan Withagen (wjw@digiware.nl)
2014-10-21 07:10:43 +00:00
Bryan Venteicher
854f7e89e6 Use the size of the Ethernet address, not the entire header, when
copying into forwarding entry.

Reported by:	Coverity
CID:		1248849
2014-10-21 05:45:57 +00:00
Mark Johnston
fd8b318ab6 Correct the calculation of tcps_rto in the struct tcpcb -> tcpsinfo_t
translator.

Submitted by:	Grenville Armitage <garmitage@swin.edu.au>
MFC after:	1 week
2014-10-21 05:19:08 +00:00
Mark Johnston
e9083b2dc5 Fix a few small bugs in the DTrace USDT rules:
* anchor search strings appropriately,
* use .ALLSRC to pass the full path to the D script to dtrace(1),
* don't insert the auto-generated header into SRCS - it doesn't
  accomplish anything, and we end up having to remove it from OBJS anyway.

Reviewed by:		rpaulo
Differential Revision:	https://reviews.freebsd.org/D978
MFC after:		3 weeks
Sponsored by:		EMC / Isilon Storage Division
2014-10-21 04:30:00 +00:00
Neel Natu
408ea86538 IFC @r273338 2014-10-21 01:57:36 +00:00
Navdeep Parhar
9302455e9a cxgbetool: Catch up with r185979. One of MAP_ANON, MAP_PRIVATE,
MAP_SHARED, or MAP_STACK must be specified.

This fixes the "loadfw" subcommand.

MFC after:	1 week
2014-10-21 01:34:18 +00:00
Pyun YongHyeon
b8333e4546 It seems multicast filtering of RTL8168F does not work. Workaround
the silicon bug by accepting any multicast packets.

PR:	193488
MFC After:	1 week
2014-10-21 01:31:24 +00:00
Neel Natu
a5045426db Fix a race in pmap_emulate_accessed_dirty() that could trigger a EPT
misconfiguration VM-exit.

An EPT misconfiguration is triggered when the processor encounters a PTE
that is writable but not readable (WR=10). On processors that require A/D
bit emulation PG_M and PG_A map to EPT_PG_WRITE and EPT_PG_READ respectively.

If the PTE is updated as in the following code snippet:
	*pte |= PG_M;
	*pte |= PG_A;
then it is possible for another processor to observe the PTE after the PG_M
(aka EPT_PG_WRITE) bit is set but before PG_A (aka EPT_PG_READ) bit is set.

This will trigger an EPT misconfiguration VM-exit on the other processor.

Reported by:	rodrigc
Reviewed by:	grehan
MFC after:	3 days
2014-10-21 01:06:58 +00:00
Ian Lepore
52d99877ba Attach the imx6 CCM driver during BUS_PASS_CPU. It controls the clocks
for most on-chip devices and needs to be available before other drivers
start attaching and asking to have their clocks enabled.
2014-10-20 23:34:47 +00:00