Commit Graph

216862 Commits

Author SHA1 Message Date
Mariusz Zaborski
afc7ee85ef Fix few sentence in the man page.
Pointed out by:	wblock
2016-10-21 16:31:58 +00:00
Mariusz Zaborski
4b83a77606 capsicum: perform copyout without the fildesc lock held in sys_cap_ioctls_get
Reviewed by:	pjd
2016-10-21 16:12:23 +00:00
Alexander Motin
a7a560be79 Add names for some DASP devices.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2016-10-21 15:23:54 +00:00
Ed Maste
485fb02571 netmap: if_ptnet depends on inet 2016-10-21 15:17:42 +00:00
Ed Maste
984ff0d910 netmap: fix kernel build on GCC-using architectures
GCC produced a multiple declaration warning from the
SYSCTL_DECL(_dev_netmap).
2016-10-21 13:51:47 +00:00
Michael Tuexen
b8835a8a6b Document the TCP sysctl variables insecure_rst and insecure_syn.
MFC after: 1 month
Sponsored by: netflix
2016-10-21 11:29:25 +00:00
Michael Tuexen
3e1465754f Make ICMPv6 hard error handling for TCP consistent with the ICMPv4
handling. Ensure that:
* Protocol unreachable errors are handled by indicating ECONNREFUSED
  to the TCP user for both IPv4 and IPv6. These were ignored for IPv6.
* Communication prohibited errors are handled by indicating ECONNREFUSED
  to the TCP user for both IPv4 and IPv6. These were ignored for IPv6.
* Hop Limited exceeded errors are handled by indicating EHOSTUNREACH
  to the TCP user for both IPv4 and IPv6.
  For IPv6 the TCP connected was dropped but errno wasn't set.

Reviewed by: gallatin, rrs
MFC after: 1 month
Sponsored by: Netflix
Differential Revision: 7904
2016-10-21 10:32:57 +00:00
Sepherosa Ziehau
525607d10c hyperv/hn: Function renaming; consistent w/ hardware capabilities query.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8296
2016-10-21 08:21:23 +00:00
Enji Cooper
547d4caa73 Remove /usr/libexec/bsdinstall/hardening if MK_BSDINSTALL == no
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2016-10-21 08:12:18 +00:00
Sepherosa Ziehau
970ead008d hyperv/hn: Add network change support.
Currently the network change is simulated by link status changes.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8295
2016-10-21 08:02:05 +00:00
Sepherosa Ziehau
31f05efd89 hyperv/hn: Check NVS version for HASHVAL pktinfo on sending path.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8293
2016-10-21 07:46:35 +00:00
Sepherosa Ziehau
0634f75c72 hyperv/hn: Always query RSS capabilities.
- This avoid distributing NDIS version check.
- Only NDIS 6.20 required (earlier NDIS uses different indirect table
  format).

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8291
2016-10-21 07:37:29 +00:00
Sepherosa Ziehau
e0e8479b87 LINT: Unhook netmap from LINT-NOIP and LINT-NOINET temporarily.
After fixing ptnet NOINET support, netmap can be linked back to
these two LINTs.

Sponsored by:	Microsoft
2016-10-21 07:35:49 +00:00
Jung-uk Kim
fadb8b98ee Clean up and add some test cases for ALU instructions. 2016-10-21 06:56:30 +00:00
Jung-uk Kim
69d410eeb1 Implement BPF_MOD and BPF_XOR instructions.
These two ALU instructions first appeared on Linux.  Then, libpcap adopted
and made them available since 1.6.2.  Now more platforms including NetBSD
have them in kernel.  So do we.
 --이 줄 이하는 자동으로 제거됩니다--
2016-10-21 06:55:07 +00:00
Sepherosa Ziehau
ffaa5deb38 netmap: Unbreak LINT-VIMAGE building
Sponsored by:	Microsoft
2016-10-21 06:32:45 +00:00
Jung-uk Kim
730b3be34f Redude code for conditional jumps. 2016-10-21 06:09:30 +00:00
Jung-uk Kim
99e3ae6839 Fix compiler warnings for user land. 2016-10-21 06:06:54 +00:00
Sepherosa Ziehau
e3f94e5133 netmap: Unbreak i386 LINT building
Sponsored by:	Microsoft
2016-10-21 06:05:16 +00:00
Enji Cooper
669c253531 Integrate contrib/netbsd-tests/fs/tmpfs into the FreeBSD test suite
as tests/sys/fs

These testcases exercise tmpfs support

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2016-10-21 05:24:08 +00:00
Enji Cooper
def7fe87e9 Expect tests/sys/fs/tmpfs/link_test:kqueue to fail
It fails with: "dir/b did not receive NOTE_LINK"

Also, add needed cleanup logic to cleanup the mountpoint after the fact

MFC after:	2 weeks
PR:		213662
Sponsored by:	Dell EMC Isilon
2016-10-21 05:21:20 +00:00
Enji Cooper
aa1a469bcd Only build lib/libc/tests/iconv if MK_ICONV != no
MFC after:	1 week
Reported by:	damian@damianek.be
Sponsored by:	Dell EMC Isilon
2016-10-21 04:54:43 +00:00
Enji Cooper
ae5f5e1c02 Revert r307689
The proposed change ("Fix building of llvm's unwind if gcc has been
also built") breaks the build with clang/llvm.

Tested with...

	(
	export SRCCONF=/dev/null WITH_CLANG=
	cd gnu/lib/libgcc; make obj; make depend; make all
	)

MFC after:	3 days
X-MFC with:	r307689
Pointyhat to:	bapt
Reported by:	Jenkins, O. Hartmann <ohartman@zedat.fu-berlin.de>
Sponsored by:	Dell EMC Isilon
2016-10-21 04:49:39 +00:00
Li-Wen Hsu
90ea06dd8a - Add required header for fixing make in sys/modules/gpio
Reviewed by:	imp, loos
Differential Revision:	https://reviews.freebsd.org/D7815
2016-10-21 03:23:17 +00:00
Justin Hibbits
47cabd046d Remove a hack requiring dtsec0 to always be enabled for mdio.
Instead replace it with a different hack, that turns fman into a simplebus
subclass, and maps its children within its address space.

Since all PHY communication is done through dtsec0's mdio space, the FDT
contains a reference to the dtsec0 mdio handle in all nodes that need it.
Instead of using Freescale's implementation for MII access, use our own (copied
loosely from the eTSEC driver, and could possibly be merged eventually).  This
lets us access the registers directly rather than needing a full dtsec interface
just to access the registers.

Future directions will include turning fman into more of a simplebus, and not
mapping the region and playing games.  This will require changes to the dtsec
driver to make it a child of fman, and possibly other drivers as well.
2016-10-21 02:16:11 +00:00
Justin Hibbits
525b23c541 Remove an unnecessary debug printf. 2016-10-21 02:07:03 +00:00
Rick Macklem
dcb19c3886 A problem w.r.t. interoperation between the FreeBSD NFSv4.1 server with
delegations enabled and the Linux NFSv4.1 client was reported in
reviews.freebsd.org/D7891.
I believe that the FreeBSD server behaviour conforms to the RFC and that
the Linux client has a bug. Therefore, I do not think the proposed patch
is appropriate. When nfsrv_writedelegifpos is non-zero, the FreeBSD
server will issue a write delegation for a read open if possible.
The Linux client then erroneously assumes that the credentials used for
the read open can write the file.
This patch reverses the default value for nfsrv_writedelegifpos to 0 so
that the default behaviour is Linux compatible and adds a sysctl that can
be used to set nfsrv_writedelegifpos.

This change should only affect users that are mounting a FreeBSD server
with delegations enabled (they are not enabled by default) with a Linux
NFSv4.1 client mount.

Reported by:	fatih.acar@gandi.net
Tested by:	fatih.acar@gandi.net
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D7891
2016-10-20 23:53:16 +00:00
Mark Johnston
829be5168d Simplify keg_drain() a bit by using LIST_FOREACH_SAFE.
MFC after:	1 week
2016-10-20 23:10:27 +00:00
Mark Johnston
5c2ac5cf2a gmirror: Add a subroutine to free synchronization BIOs.
This addresses a memory leak that occurs upon an I/O error during a mirror
synchronization.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2016-10-20 23:08:40 +00:00
Mark Johnston
b450976dc2 gmirror: Release pending regular requests when synchronization stops.
Normally gmirror allows colliding requests to proceed whenever a
synchronization request completes and advances to the next offset. However
if an I/O request collides with one of the final g_mirror_syncreqs, nothing
releases it once synchronization completes, resulting in an apparent I/O
hang. The same problem can occur if synchronization is aborted by an
I/O error. Therefore, be sure to requeue pending requests when
mirror synchronization is stopped for any reason.

While here, remove some dead code from g_mirror_regular_release().

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2016-10-20 23:02:30 +00:00
Ed Maste
c615275ccc Don't build libssp as a prereq lib if WITHOUT_SSP is set
Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D8301
2016-10-20 21:29:59 +00:00
Baptiste Daroussin
14c3b02e01 Fix building of llvm's unwind if gcc has been also built
when building gcc an unwind.h header is generate in the cc_tool directory
which is included in the CFLAGS before the path where the llvm's unwind.h file
lives

Reviewed by:	emaste
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D7357
2016-10-20 21:12:50 +00:00
Ed Maste
5503201d98 Tidy up ia32_sysvec sv_flags setting
Use the same approach as sys/arm/arm/elf_machdep.c to avoid an odd-
looking , on a separate line.
2016-10-20 20:29:54 +00:00
Ed Maste
8e71e1129f arch.7: correct typo in predefined macro example
The example incorrectly used -Dm, which defines macro m with value 1.
It is supposed to be -dM, which lists macros.
2016-10-20 20:16:10 +00:00
Warner Losh
86461c064b Use MACHINE_ARCH rather than TARGET_ARCH which has no meaning outside
of Makefile.inc1
2016-10-20 20:12:34 +00:00
Mateusz Guzik
bb697a20d7 cache: fix up a corner case in r307650
If no negative entry is found on the last list, the ncp pointer will be
left uninitialized and a non-null value will make the function assume an
entry was found.

Fix the problem by initializing to NULL on entry.

Reported by:	glebius
2016-10-20 19:55:50 +00:00
Kenneth D. Merry
8220f9ac52 For CCBs allocated on the stack, we need to clear the entire CCB, not just
the header.  Otherwise stack garbage can lead to random flags getting set.

This showed up as 'camcontrol rescan all' failing with EINVAL because the
address type wasn't CAM_DATA_VADDR.

sbin/camcontrol/camcontrol.c:
	In rescan_or_reset_bus(), bzero the stack-allocated CCBs before
	use instead of clearing the body.

MFC after:	3 days
Sponsored by:	Spectra Logic
2016-10-20 19:42:26 +00:00
Ed Maste
2abd48643a Correct typo in r307679: the variable is MK_GNU_GREP_COMPAT 2016-10-20 18:43:12 +00:00
Ryan Stone
de0d37e2e3 Set the executable bit on arcgit and importgit
Make it possible to run these scripts directly out of svn by setting
the executable property on them.
2016-10-20 18:28:05 +00:00
Ryan Stone
252b793ad4 Add some tools to simplify the use of git
Add some scripts that wraps some FreeBSD Project infrastructure
and simplifies using them with git.  The scripts are:

 - arcgit, which creates a series of reviews in Differential
 - importgit, which applies a series of git commits to svn

Differential Revision:      https://reviews.freebsd.org/D2071
2016-10-20 18:23:44 +00:00
Ed Maste
d1a6903377 Build libgnuregex only if necessary for other components
Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D8298
2016-10-20 17:28:52 +00:00
Ruslan Bukin
68a18b821e Disable geom_eli module build on MIPS64 as it has alignment
issues and causes kernel panic.
ELI metadata is also not aligned properly for MIPS64 case.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-10-20 17:10:26 +00:00
Jonathan Anderson
c867306e60 Add make rules to build LLVM IR from C/C++ sources.
As a foundation for future work with LLVM's Intermediate Representation (IR),
add new suffix rules that can be used to build .llo (text) or .bco (bitcode)
files from C or C++ sources.  This compilation step uses the same CFLAGS, etc.,
as are used for building .o files, with the exception of optimization flags.
Many of the things we would like to do with IR (e.g., instrumentation) work
better with unoptimized code, so our approach is to build .c->.bco without
optimization and then apply the optimization in post-analysis,
post-instrumentation linking.

The overall result of these changes is:

* one can "make foo.llo" or "make foo.bco" wherever "make foo.o" was supported
* new make variables IR_CFLAGS and IR_CXXFLAGS are available to inspect the
  flags that are used by Clang to generate the IR

These new rules are added unconditionally to our non-POSIX suffix rule set,
since we cannot inspect COMPILER_TYPE in sys.mk.  Future changes that depend
on these rules (e.g., building IR versions of binaries from bsd.prog.mk)
should use COMPILER_TYPE to determine when we can expect IR rules to succeed.

Reviewed by:	emaste, imp
Approved by:	rwatson (mentor)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D4339
2016-10-20 15:14:21 +00:00
Ed Maste
71e30a3131 Remove trailing whitespace from r307674 2016-10-20 15:12:06 +00:00
Ed Maste
94ff3d0344 Add knobs to make GNU diff and GNU grep optional
This is added to facilitate experiments building FreeBSD without
copyleft software.

If WITHOUT_GNU_DIFF is set no /usr/bin/diff or /usr/bin/diff3 will
be built.

If WITHOUT_GNU_GREP is set then BSD grep will be installed as
/usr/bin/bsdgrep or /usr/bin/grep, depending on the WITH_BSD_GREP
knob.

Reviewed by:	brooks (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	Differential Revision: https://reviews.freebsd.org/D8288
2016-10-20 14:48:57 +00:00
Andrew Gallatin
eedb49598b Clear mbuf hashtype on loopback when RSS is enabled.
The hashtype on an outgoing mbuf reflects the correct hash on the
transmit side of the connection.  If this hash persists on loopback,
the receiving RSS/PCBGROUP code will use it to look up the pcbgroup
for the transmit side, which will often not match the pcbgroup for the
receive side of the connection.  This leads to TCP connections
hanging, and dropping the SYN/ACK packet.   This is essentially
the same as having a hardware network card generate mbufs with an
incorrect RSS hash.

There are a number of places which can set the hash on transmit,
so the simplest fix is to simply clear the hash at loopback time.
Clearing the hash allows a new, correct hash to be calculated in
software on the receive side.

Reviewed by:	jtl
Discussed with:	adrian
Sponsored by:	Netflix
2016-10-20 13:48:29 +00:00
Wojciech Macek
7902c8dca8 Driver for PCI Ethernet NIC on Alpine V1 and V2.
Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           wma
Differential Revision: https://reviews.freebsd.org/D7814
2016-10-20 11:31:11 +00:00
Wojciech Macek
246d07a7a3 Support for Alpine Serializer/Deserializer.
The exported functions will be used by
Alpine Ethernet driver.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           wma
Differential Revision: https://reviews.freebsd.org/D7763
2016-10-20 11:26:51 +00:00
Wojciech Macek
be48125bbf Support for MSI-X on Annapurna Alpine
This patch adds support for MSI-X interrupts
on Annapurna Alpine platform. MSI-X on Alpine
work similarly to GICv2m, i.e. some range of
SPI interrupts is reserved in GIC and individual
SPIs can be triggered by MSI-X messages.
This SPI range is defined in FDT.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           nwhitehorn, wma
Differential Revision: https://reviews.freebsd.org/D7579
2016-10-20 11:23:59 +00:00
Andrew Turner
6ed982a221 Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing
VFP code to store the old context, with lazy loading of the new context
when needed.

FPU_KERN_NOCTX is missing as this is unused in the crypto code this has
been tested with, and I am unsure on the requirements of the UEFI
Runtime Services.

Reviewed by:	kib
Obtained from:	ABT Systeems Ltd
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8276
2016-10-20 09:22:10 +00:00