Commit graph

207393 commits

Author SHA1 Message Date
Kevin Lo ab707ec668 - Add the definition of CHARCLASS_NAME_MAX, as per POSIX.1-2001.
- Avoid namespace pollution and move definitions of _POSIX2_CHARCLASS_NAME_MAX
  and _POSIX2_COLL_WEIGHTS_MAX into the .2001 section.
  With input from bde.

Submitted by	bde
2016-01-09 14:53:23 +00:00
Alexander V. Chernikov 5dba456c14 Remove prefix check from in6_addroute().
This check was added in initial? netinet6/ import
  back in 1999 (r53541).
It effectively became unnecessary after 'address/prefix clean-ups'
  KAME commit 90ff8792e676132096a440dd787f99a5a5860ee8 (github) in 2001
  (merged to FreeBSD in r78064) where prefix check was added to
  nd6_prefix_onlink(). Similar IPv4 check (in_addroute() was added
  in r137628).
Additionally, the right plance for this (or similar) check is the prefix
  addition code (nd6_prefix_onlink(), nd6_prefix_onlink_rtrequest(),
  in_addprefix() or rtinit()), but not the generic radix insert routine.
2016-01-09 11:41:37 +00:00
Alexander V. Chernikov ea8d14925c Remove sys/eventhandler.h from net/route.h
Reviewed by:	ae
2016-01-09 09:34:39 +00:00
Xin LI 1c2b1cecf1 Fix version number. 2016-01-09 09:33:24 +00:00
Andrey V. Elsukov 6299675b9f Make tohex() work as expected. 2016-01-09 08:04:29 +00:00
Andrey V. Elsukov 06ddd0b7ac Fix a typo.
PR:		205722
2016-01-09 08:02:35 +00:00
Alexander V. Chernikov f2b2e77a41 (Temporarily) remove route_redirect_event eventhandler.
Such handler should pass different set of variables, instead
  of directly providing 2 locked route entries.
Given that it hasn't been really used since at least 2012, remove
  current code.
Will re-add it after finishing most major routing-related changes.

Discussed with:	np
2016-01-09 06:26:40 +00:00
Alexander V. Chernikov 16703ea811 Please Coverity by removing unneccessary check (rt_key() is always set).
Coverity CID:	1347797
2016-01-09 05:39:06 +00:00
Steven Hartland 1b1632a243 Remove hidden "Not ufs" printfs from boot code
Remove the printf("Not ufs\n") from the boot code which was hidden by the
local printf implementations, allowing these to have that code removed too.

MFC after:	2 weeks
X-MFC-With:	r293268
Sponsored by:	Multiplay
2016-01-09 03:30:33 +00:00
Steven Hartland 77e4457b19 Switch EFT boot1 to use libstand
ARM and i386 already required libstand so switch to using it for all
patforms, allowing the removal of custom print and memory methods.

This is also a pre-cursor to enabling WARNS which highlighted a number
of issues with the removed methods.

MFC after:	2 weeks
X-MFC-With:	r293268
Sponsored by:	Multiplay
2016-01-09 03:20:01 +00:00
George V. Neville-Neil b60204754b Add netmap support for bhyve
Submitted by:	btw
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D4826
2016-01-09 03:08:21 +00:00
Mark Johnston 11f9ca696e Prevent cv_waiters wraparound.
r282971 attempted to fix this problem by decrementing cv_waiters after
waking up from sleeping on a condition variable, but this can result in
a use-after-free if the CV is freed before all woken threads have had a
chance to run. Instead, avoid incrementing cv_waiters past INT_MAX, and
have cv_signal() explicitly check for sleeping threads once cv_waiters has
reached this bound.

Reviewed by:	jhb
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D4822
2016-01-09 01:56:46 +00:00
Allan Jude fce8d0e350 Only call init_zfs_bootenv() when the system was booted with ZFS
Add a few other safeguards to ensure things do not break when the
boot device cannot be determined

Reported by:	flo
MFC after:	3 days
Sponsored by:	ScaleEngine Inc.
2016-01-09 00:54:08 +00:00
Ed Maste 1500eb213d Regen after r293450 2016-01-09 00:47:01 +00:00
Glen Barber 41ea4cc219 Set FORCE_PKG_REGISTER=1 when installing packages to avoid failures
when re-using build chroot(8) environments.

This is based on the patch in the PR referenced below, but instead
of using 'reinstall' in two locations (one of which already uses
FORCE_PKG_REGISTER=1), changes the non-embedded behavior.

PR:		205998
Submitted by:	ngie
MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
2016-01-09 00:45:38 +00:00
Bryan Drewery eefa1c373f Update dependencies.
Sponsored by:	EMC / Isilon Storage Division
2016-01-09 00:43:11 +00:00
Ed Maste b80f3546a8 Support use of LLVM's libunwind for exception unwinding
It is built in libgcc_s.so and libgcc_eh.a to simplify transition.

It is enabled by default on arm64 (where we previously had no other
unwinder) and may be enabled for testing on other platforms by setting
WITH_LLVM_LIBUNWIND in src.conf(5).

Also add compiler-rt's __gcc_personality_v0 implementation for use with
the LLVM unwinder.

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4787
2016-01-09 00:42:07 +00:00
Bryan Drewery 1f17dba482 Chase r292622: Update path to ioctl.c for incremental build hack.
Sponsored by:	EMC / Isilon Storage Division
2016-01-08 22:59:49 +00:00
Enji Cooper f009f68a21 - Move functions that might be used in class-specific cleanup functions
(geom_test_cleanup, etc) down so the testcases don't emit noise when
  bailing
- Conform to the TAP protocol better when dealing with classes that can't
  be loaded and with temporary files that can't be allocated for tracking
  md(4) devices.

MFC after: 2 weeks
X-MFC with: r293028, r293029, r293048
Sponsored by: EMC / Isilon Storage Division
2016-01-08 21:47:41 +00:00
Enji Cooper eb028f7b2d - Make test-1.sh into a TAP testable testcase
- Delete test-2.sh as it was an incomplete testcase, and the contents were
  basically a subset of test-1.sh
- Add a conf.sh file for executing common functions with geom_uzip
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 21:38:26 +00:00
Enji Cooper b8338417d2 - Add a geom_stripe specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 21:28:09 +00:00
Enji Cooper 67c3cb72da - Add a geom_shsec specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 21:25:27 +00:00
Bryan Drewery 8dc7b23a02 Fix upgrading from OSVERSION 1000002-1000032 after r288829.
r288829 states that lex requires the latest m4, but was not always building it.
Move lex to the same logic as m4 since they are closely tied now.

MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
Reported by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
2016-01-08 21:07:34 +00:00
Gleb Smirnoff 2bab0c5535 New sendfile(2) syscall. A joint effort of NGINX and Netflix from 2013 and
up to now.

The new sendfile is the code that Netflix uses to send their multiple tens
of gigabits of data per second. The new implementation features asynchronous
I/O, when I/O operations are launched, but not awaited to be complete. An
explanation of why such behavior is beneficial compared to old one is
going to be too long for a commit message, so we will skip it here.

Additional features of new syscall are extra flags, which provide an
application more control over data sent. The SF_NOCACHE flag tells
kernel that data shouldn't be cached after it was sent. The SF_READAHEAD()
macro allows to specify readahead size in pages.

The new syscalls is a drop in replacement. No modifications are required
to applications. One can take nginx binary for stable/10 and run it
successfully on head. Although SF_NODISKIO lost its original sense, as now
sendfile doesn't block, and now means something completely different (tm),
using the new sendfile the old way is absolutely safe.

Celebrates:	Netflix global launch!
Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
Relnotes:	yes
2016-01-08 20:34:57 +00:00
Enji Cooper 5f119e8d13 - Add a geom_raid3 specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 19:47:49 +00:00
Enji Cooper 72670c33c2 - Add a conf.sh file for executing common functions with gnop
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 19:43:18 +00:00
Enji Cooper 06908bcb39 - Add a conf.sh file for executing common functions with geli
-- Use linear probing to find the first unique md(4) device, unlike the other
   code which uses attach_md, as geli(8) allocates the md(4) devices itself
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 19:38:59 +00:00
Ed Maste 873e5b5e14 Reduce libstand Makefile duplication
Userboot's copy of the libstand Makefile had more extensive changes
compared to the one in sys/boot/libstand32, but it turns out these are
not intentional and we can just include lib/libstand/Makefile as done
for libstand32 in r293040.

Reviewed by:	imp, jhb
Tested by:	allanjude
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4793
2016-01-08 19:12:26 +00:00
Enji Cooper 6b2f497e48 - Use attach_md for memory disks so they can be tracked.
- Add a geom_concat specific cleanup function and trap on that function at
  exit so things are cleaned up properly
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 19:10:52 +00:00
Gleb Smirnoff 829fae9063 Make it possible for sbappend() to preserve M_NOTREADY on mbufs, just like
sbappendstream() does. Although, M_NOTREADY may appear only on SOCK_STREAM
sockets, due to sendfile(2) supporting only the latter, there is a corner
case of AF_UNIX/SOCK_STREAM socket, that still uses records for the sake
of control data, albeit being stream socket.

Provide private version of m_clrprotoflags(), which understands PRUS_NOTREADY,
similar to m_demote().
2016-01-08 19:03:20 +00:00
Ed Maste 638b3cc8ce Avoid unintended $FreeBSD$ expansion in generate-fat.sh 2016-01-08 17:33:34 +00:00
Gleb Smirnoff ffd1c319a9 Revert r293405: it breaks socket buffer INVARIANTS when sending control
data over local sockets.
2016-01-08 17:27:23 +00:00
Ed Maste 8f2318bdcc Add safety belt for boot1.efi file size
Reviewed by:	smh
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4833
2016-01-08 16:37:22 +00:00
Alexander V. Chernikov 048738b546 Do more fine-grained locking in rtrequest1_fib().
Last consumer using RTF_RNH_LOCKED flag was eliminated in r291643.
Restrict passing RTF_RNH_LOCKED to rtrequest1_fib() and do better
  locking for RTM_ADD / RTM_DELETE cases.
2016-01-08 16:25:11 +00:00
Xin LI 3311ff84ea MFV r293415:
ntp 4.2.8p5

Reviewed by:	cy, roberto
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D4828
2016-01-08 15:53:48 +00:00
Steven Hartland 858ceeb3ef Update generated efi boot image templates
r279533 increased the boot1 size from 64k to 128k but didn't regenerate the
fat templates, hence the change was never activated.

With recent and upcoming changes the efi boot1 binary is now > 64k.

To avoid fat corruption in the created boot images regenerate the
templates to activate the boot1 size increase.

MFC after:	2 weeks
X-MFC-With:	r293268
2016-01-08 13:58:36 +00:00
Christian Brueffer c4b0ec0d15 Fix issues found by mandoc -Tlint.
MFC after:	1 week
2016-01-08 13:33:22 +00:00
Hans Petter Selasky 0c510167fb LinuxKPI style changes:
- Properly prefix internal functions with "linux_" instead of only a
  single underscore to avoid future namespace collisions.
- Make some functions global instead of inline to ease debugging and
  to avoid unnecessary code duplication.
- Remove no longer existing kthread_create() function's prototype.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-08 10:04:19 +00:00
Xin LI c373d9289d Vendor import of ntp-4.2.8p5. 2016-01-08 08:06:14 +00:00
Allan Jude adff67c988 Add support for ZFS Boot Environments to userboot (for bhyve and others)
While here, also fix a possible null pointer

Reported by:	lattera
MFC after:	3 days
Sponsored by:	ScaleEngine Inc.
2016-01-08 05:09:55 +00:00
Gleb Smirnoff 2f2edf0a08 For SOCK_STREAM socket use sbappendstream() instead of sbappend(). 2016-01-08 01:16:03 +00:00
Ed Maste b873436a30 Revert r293201, r293202 (rtld: populate DT_DEBUG iff DYNAMIC segment is writable)
It turns out MIPS binaries may have other oddities that can trigger a
fault at startup.

PR:		206017
Reported by:	ray
2016-01-08 00:56:41 +00:00
Warner Losh 45b2ffd09e Make sure that the /set directive gets put at the top of the file,
instead of in sort order. Slash sorts after period.
2016-01-08 00:05:47 +00:00
Warner Losh d83ed77082 Setup /pkg as a spot for pkg to operate. This is for testing purposes
only. You need to remount / rw and export TMPDIR=/pkg/tmp. pkg will
then work. It's slow though: 15 minutes to pkg install git on an RPi 2
with a decently fast SD card. Since this is for testing, we set
DEFAULT_ALWAYS_YES and ASSUME_ALWAYS_YES to YES.
2016-01-08 00:05:28 +00:00
Jilles Tjoelker 3da40d4a6b sh: Reduce size of options table. 2016-01-07 23:13:20 +00:00
Conrad Meyer 1502e36346 ioat(4): Add ioat_acquire_reserve() KPI
ioat_acquire_reserve() is an extended version of ioat_acquire().  It
allows users to reserve space in the channel for some number of
descriptors.  If this succeeds, it guarantees that at least submission
of N valid descriptors will succeed.

Sponsored by:	EMC / Isilon Storage Division
2016-01-07 23:02:15 +00:00
Devin Teske eb581ab54a Bump copyright (forgotten part of r293340)
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r293340
2016-01-07 22:13:17 +00:00
Jilles Tjoelker 0e50eefbd5 sh: Add a test for 'cd -'.
Redirect 'cd -' output to /dev/null since POSIX requires it to write the new
directory name even if not interactive, but we currently only write it if
interactive.
2016-01-07 21:46:07 +00:00
Pedro F. Giffuni 7135ca50c1 ext2fs: reading mmaped file in Ext4 causes panic
Always call brelse(path.ep_bp), fixing reading EXT4 files using mmap().

Patch by Damjan Jovanovic.

PR:		205938
MFC after:	1 week
2016-01-07 21:43:43 +00:00
Jim Harris 042231951b ismt: fix ISMT_DESC_ADDR_RW macro
Submitted by:	Masanobu SAITOH <msaitoh@netbsd.org>
MFC after:	3 days
2016-01-07 21:16:44 +00:00