]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r289324:
kib [Wed, 28 Oct 2015 11:32:39 +0000 (11:32 +0000)]
MFC r289324:
Allow PT_NOTES segments to be located anywhere in the executable
image.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289322:
kib [Wed, 28 Oct 2015 11:29:54 +0000 (11:29 +0000)]
MFC r289322:
Allow PT_INTERP and PT_NOTES segments to be located anywhere in the
executable image.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290097 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r284157 (by emaste):
kib [Wed, 28 Oct 2015 11:22:30 +0000 (11:22 +0000)]
MFC r284157 (by emaste):
Add user facing errors for exceeding process memory limits.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290094 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC 283645:
jhb [Tue, 27 Oct 2015 22:57:58 +0000 (22:57 +0000)]
MFC 283645:
Similarly to other architecture, add the include for cpufunc.h which is
needed for pte.h by vmstat to resolve MIPS_CCA_UNCACHED.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286163: rc.subr: Allow rc.conf.d with multi-directory local_startup.
jilles [Tue, 27 Oct 2015 20:58:14 +0000 (20:58 +0000)]
MFC r286163: rc.subr: Allow rc.conf.d with multi-directory local_startup.

I also changed ${...%*/rc.d} to ${...%/rc.d} since the shortest match always
has an empty string for the asterisk.

PR: 201641
Submitted by: Jamie Landeg-Jones (original version)

git-svn-id: svn://svn.freebsd.org/base/stable/10@290062 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC 271389,286330,286331,286358,286378,286380,286381,286383,286388,286848,
jhb [Tue, 27 Oct 2015 17:00:04 +0000 (17:00 +0000)]
MFC 271389,286330,286331,286358,286378,286380,286381,286383,286388,286848,
286849,286857,286860,286913,286914,286937-286940,286962,286963,288405,
288406,288424,288454-288456,288625,288626,288832,288834,288950,288997,
289080:
Merge most of the recent changes to truss in HEAD.  The largest effects
are that fork following now uses a single truss process (and thus truss -c
reports counts for the entire tree of processes instead of separate dumps
for each process).  truss -c also reports counts for all system calls
instead of only a subset.  More system call arguments are also decoded.
System calls should now report the correct number of arguments (instead
of 6), and some platforms that did not properly decode arguments might
now do so (e.g. mips64).

Changes relative to the equivalent commits to HEAD include:
- The ia64 backend was refactored similar to the other backends.
- _umtx_lock/_umtx_unlock entries were updated similar to other system
  call entries.
- 10 does not have futimens(), utimensat(), EVFILT_PROCDESC, EVFILT_SENDFILE,
  RLIMIT_KQUEUES, O_VERIFY, NOTE_FILE_POLL, or EV_FORCEONESHOT.

271389:
Stop accessing the saved stack pointer by looking past the end of the
array of registers.

286330:
Whitespace fix: remove some spurious spaces before commas.

286331:
Rework get_string() to make it more robust when fetching strings of unknown
length.  In particular, instead of blinding fetching 1k blocks, do an initial
fetch up to the end of the current page followed by page-sized fetches up to
the maximum size.  Previously if the 1k buffer crossed a page boundary and
the second page was not valid, the entire operation would fail.

286358:
Add recently added values of various flags and enumerations including
kevent filters, kevent flags, flags to mmap, seek locations, fcntl
operations, file flags, socket domains, open flags, resource limits, and
pathconf values.

286378:
Don't mark the fcntl flag argument as an output parameter so that it is
always decoded.  Previously the argument was not decoded if fcntl() failed.

286380:
Decode the arguments to mkfifo() and fix an off-by-one error in the arguments
to mknod().

286381:
Decode the arguments passed to the *at() family of system calls.  This is
especially useful now that libc's open() always calls openat().  While here,
fix a few other things:
- Decode the mode argument passed to access(), eaccess(), and faccessat().
- Decode the atfd paramete to pretty-print AT_FDCWD.
- Decode the special AT_* flags used with some of the *at() system calls.
- Decode arguments for fchmod(), lchmod(), fchown(), lchown(), eaccess(),
  and futimens().
- Decode both of the timeval structures passed to futimes() instead of just
  the first one.

286383:
Whitespace fixes to consistently use spaces before }'s and
wrap long lines.

286388:
Consistently use both leading and trailing spaces inside of the {}'s
when pretty-printing structures.  Most structures used both spaces,
but some only used a trailing space and some used neither.

286848:
- Decode the arguments for several signal-related system calls: sigpending,
  sigqueue, sigreturn, sigsuspend, sigtimedwait, sigwait, sigwaitinfo, and
  thr_kill.
- Print signal sets as a structure (with {}'s) and in particular use this to
  differentiate empty sets from a NULL pointer.
- Decode arguments for some other system calls: issetugid, pipe2, sysarch
  (operations are only decoded for amd64 and i386), and thr_self.

286849:
Decode the optional SOCK_NONBLOCK and SOCK_CLOEXEC flags passed in a
socket type.

286857:
Tidy the linux_socketcall decoding:
- Don't exit if get_struct() fails, instead print the raw pointer value to
  match all other argument decoding cases.
- Use an xlat table instead of a home-rolled switch for the operation name.
- Display the nested socketcall args structure as a structure instead of as
  two inline arguments.

286860:
Use an xlat table and xlookup() instead of a home-rolled version for the
sigprocmask operation type.

286913:
Change the argument formatting function to use a stdio FILE object opened
with open_memstream() to build the string for each argument.  This allows
for more complicated argument building without resorting to intermediate
malloc's, etc.

Related, the strsig*() functions no longer return allocated strings but
use a static global buffer instead.

286914:
Expand the decoding of kevent structures.
- Print the ident value as decimal instead of hexadecimal for filter types
  that use "small" values such as file descriptors and PIDs.
- Decode NOTE_* flags in the fflags field of kevents for several system
  filter types.

286937:
Use nitems().

286938:
Various style and whitespace fixes.

287939:
Always use %j with an intmax_t cast to print time_t values.  time_t is
longer than long on 32-bit platforms with a 64-bit time_t.

286940:
ino_t is unsigned, so use uintmax_t instead of intmax_t when printing it.

286962:
Rework the argv and env string fetching for execve to be more robust.
Before truss would fetch 100 string pointers and happily walk off the end
of the array if it never found a NULL.  This also means for a short argv
list it could fail entirely if the 100 string pointers spanned into an
unmapped page.

Instead, fetch page-aligned blocks of string pointers in a loop fetching
each string until a NULL is found.

While here, make use of the open memstream file descriptor instead of
allocating a temporary array.  This allows us to fetch each string once
instead of twice.

286963:
Handle the conditional decoding of execve() argument and environment
arrays generically rather than duplicating a hack in all of the backends.
- Add two new system call argument types and use them instead of StringArray
  for the argument and environment arguments execve and linux_execve.
- Honor the -a/-e flags in the handling of these new types.
- Instead of printing "<missing argument>" when the decoding is disabled,
  print the raw pointer value.

288405:
Decode recently added procctl(2) operations.

288406:
Trim trailing whitespace.

288424:
Several changes to truss.
- Refactor the interface between the ABI-independent code and the
  ABI-specific backends.  The backends now provide smaller hooks to
  fetch system call arguments and return values.  The rest of the
  system call entry and exit handling that was previously duplicated
  among all the backends has been moved to one place.
- Merge the loop when waiting for an event with the loop for handling stops.
  This also means not emulating a procfs-like interface on top of ptrace().
  Instead, use a single event loop that fetches process events via waitid().
  Among other things this allows us to report the full 32-bit exit value.
- Use PT_FOLLOW_FORK to follow new child processes instead of forking a new
  truss process for each new child.  This allows one truss process to monitor
  a tree of processes and truss -c should now display one total for the
  entire tree instead of separate summaries per process.
- Use the recently added fields to ptrace_lwpinfo to determine the current
  system call number and argument count.  The latter is especially useful
  and fixes a regression since the conversion from procfs.  truss now
  generally prints the correct number of arguments for most system calls
  rather than printing extra arguments for any call not listed in the
  table in syscalls.c.
- Actually check the new ABI when processes call exec.  The comments claimed
  that this happened but it was not being done (perhaps this was another
  regression in the conversion to ptrace()).  If the new ABI after exec
  is not supported, truss detaches from the process.  If truss does not
  support the ABI for a newly executed process the process is killed
  before it returns from exec.
- Along with the refactor, teach the various ABI-specific backends to
  fetch both return values, not just the first.  Use this to properly
  report the full 64-bit return value from lseek().  In addition, the
  handler for "pipe" now pulls the pair of descriptors out of the
  return values (which is the true kernel system call interface) but
  displays them as an argument (which matches the interface exported by
  libc).
- Each ABI handler adds entries to a linker set rather than requiring
  a statically defined table of handlers in main.c.
- The arm and mips system call fetching code was changed to follow the
  same pattern as amd64 (and the in-kernel handler) of fetching register
  arguments first and then reading any remaining arguments from the
  stack.  This should fix indirect system call arguments on at least
  arm.
- The mipsn32 and n64 ABIs will now look for arguments in A4 through A7.
- Use register %ebp for the 6th system call argument for Linux/i386 ABIs
  to match the in-kernel argument fetch code.
- For powerpc binaries on a powerpc64 system, fetch the extra arguments
  on the stack as 32-bit values that are then copied into the 64-bit
  argument array instead of reading the 32-bit values directly into the
  64-bit array.

288454:
- Remove extra integer argument from truncate() and ftruncate().  This is
  probably fallout from the removal of the extra padding argument before
  off_t in 7.  However, that padding still exists for 32-bit powerpc, so
  use QUAD_ALIGN.
- Fix QUAD_ALIGN to be zero for powerpc64.  It should only be set to 1
  for 32-bit platforms that add padding to align 64-bit arguments.

288455:
The id_t type used to pass IDs to wait6(2) and procctl(6) is a 64-bit
integer.  Fix the argument decoding to treat this as a quad instead of an
int.  This includes using QUAD_ALIGN and QUAD_SLOTS as necessary.  To
continue printing IDs in decimal, add a new QuadHex argument type that
prints a 64-bit integer in hex, use QuadHex for the existing off_t arguments,
repurpose Quad to print a 64-bit integer in decimal, and use Quad for id_t
arguments.

This fixes the decoding of wait6(2) and procctl(2) on 32-bit platforms.

288456:
Rather than groveling around in a socket address structure for a socket
address's length (and then overriding it if it "looks wrong"), use the
next argument to the system call to determine the length.  This is more
reliable since this is what the kernel depends on anyway and is also
simpler.

288625:
Add decoding for struct statfs.

288626:
Style fix.

288832:
Fix tracking of unknown syscalls for 'truss -c'.

This is done by changing get_syscall() to either lookup the known syscall
or add it into the list with the default handlers for printing.

This also simplifies some code to not have to check if the syscall variable
is set or NULL.

288834:
Add decoding for modfind(2)

288950:
Group the decoded system calls by ABI and sort the calls within each ABI.

288997:
Correct a comment.

289080:
Let -c imply -S (hide signal output).

Without this, the signals are shown seemingly randomly in the output before
the final summary is shown.  This is especially noticeable when there is
not much output from the application being traced.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290052 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r289878
bapt [Tue, 27 Oct 2015 07:08:47 +0000 (07:08 +0000)]
MFC: r289878

timeout(1): fix the acceptable range values for parse_signal()

Before both 0 and sys_nsig would be successfully returned by parse_signal()
although being invalid signal numbers.

Submitted by: Alexandre Perrin <alex@kaworu.ch>

git-svn-id: svn://svn.freebsd.org/base/stable/10@290040 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoFix indentation in etc/rc.d/fsck.
vangyzen [Tue, 27 Oct 2015 02:52:05 +0000 (02:52 +0000)]
Fix indentation in etc/rc.d/fsck.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290036 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoRevert the merge of r289269 for now as it may break non-root installs.
delphij [Tue, 27 Oct 2015 01:28:11 +0000 (01:28 +0000)]
Revert the merge of r289269 for now as it may break non-root installs.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290033 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289269:
delphij [Tue, 27 Oct 2015 00:37:19 +0000 (00:37 +0000)]
MFC r289269:

Use chroot(2) instead of using prefixes for files.

Previously, the code prefixes the chroot path to actual file paths to
simulate the effect.  This, however, will not work for tzset(3) which
expects the current system have a working set of timezone data files,
and that is not always the case.

This changeset simplifies the handling of paths and use an actual
chroot(2) call to implement the effect.

PR: bin/197313

git-svn-id: svn://svn.freebsd.org/base/stable/10@290027 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289407:
bdrewery [Mon, 26 Oct 2015 17:49:13 +0000 (17:49 +0000)]
MFC r289407:

  Fix delete-old and check-old-files not removing old debug symbols.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290017 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: r288419
brueffer [Mon, 26 Oct 2015 17:45:37 +0000 (17:45 +0000)]
MFC: r288419

Join excessive split lines.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290016 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoDisable SSE in libthr
vangyzen [Mon, 26 Oct 2015 16:21:56 +0000 (16:21 +0000)]
Disable SSE in libthr

Clang emits SSE instructions on amd64 in the common path of
pthread_mutex_unlock.  If the thread does not otherwise use SSE,
this usage incurs a context-switch of the FPU/SSE state, which
reduces the performance of multiple real-world applications by a
non-trivial amount (3-5% in one application).

Instead of this change, I experimented with eagerly switching the
FPU state at context-switch time.  This did not help.  Most of the
cost seems to be in the read/write of memory--as kib@ stated--and
not in the #NM handling.  I tested on machines with and without
XSAVEOPT.

One counter-argument to this change is that most applications already
use SIMD, and the number of applications and amount of SIMD usage
are only increasing.  This is absolutely true.  I agree that--in
general and in principle--this change is in the wrong direction.
However, there are applications that do not use enough SSE to offset
the extra context-switch cost.  SSE does not provide a clear benefit
in the current libthr code with the current compiler, but it does
provide a clear loss in some cases.  Therefore, disabling SSE in
libthr is a non-loss for most, and a gain for some.

I refrained from disabling SSE in libc--as was suggested--because
I can't make the above argument for libc.  It provides a wide variety
of code; each case should be analyzed separately.

https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html

Suggestions from:   dim, jmg, rpaulo
Sponsored by:   Dell Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@290014 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFH (r275359, r290007): make load_rc_config's name argument optional
des [Mon, 26 Oct 2015 15:20:45 +0000 (15:20 +0000)]
MFH (r275359, r290007): make load_rc_config's name argument optional

git-svn-id: svn://svn.freebsd.org/base/stable/10@290009 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoUpgrade NTP to 4.2.8p4.
glebius [Mon, 26 Oct 2015 11:35:40 +0000 (11:35 +0000)]
Upgrade NTP to 4.2.8p4.

Security: FreeBSD-SA-15:25.ntp
Security: CVE-2015-7871
Security: CVE-2015-7855
Security: CVE-2015-7854
Security: CVE-2015-7853
Security: CVE-2015-7852
Security: CVE-2015-7851
Security: CVE-2015-7850
Security: CVE-2015-7849
Security: CVE-2015-7848
Security: CVE-2015-7701
Security: CVE-2015-7703
Security: CVE-2015-7704, CVE-2015-7705
Security: CVE-2015-7691, CVE-2015-7692, CVE-2015-7702

git-svn-id: svn://svn.freebsd.org/base/stable/10@289997 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289601:
ngie [Mon, 26 Oct 2015 03:53:48 +0000 (03:53 +0000)]
MFC r289601:

Don't check if `val` is NULL before calling free; free(3) already
handles this

PR: 203649
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 1305659
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@289989 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288305:
ngie [Mon, 26 Oct 2015 03:43:28 +0000 (03:43 +0000)]
MFC r288305:

Replace N #defines with nitems to simplify ifconfig code slightly

git-svn-id: svn://svn.freebsd.org/base/stable/10@289986 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289300:
ngie [Mon, 26 Oct 2015 03:37:01 +0000 (03:37 +0000)]
MFC r289300:

Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs

Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@289985 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r264965:
ngie [Mon, 26 Oct 2015 03:33:40 +0000 (03:33 +0000)]
MFC r264965:
r264965 (by des):

Note that the bug was fixed, and when.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289984 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r282339,r282341:
ngie [Mon, 26 Oct 2015 03:15:06 +0000 (03:15 +0000)]
MFC r282339,r282341:

r282339 (by bapt):

Add regression test about reverse line feed to col(1)

r282341 (by bapt):

Actually push the right tests

git-svn-id: svn://svn.freebsd.org/base/stable/10@289981 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289600:
ngie [Mon, 26 Oct 2015 00:28:05 +0000 (00:28 +0000)]
MFC r289600:

Initialize `quiet` to false so `pw groupnext` again prints out the next gid
by default

Reported by: Florian Degner <f.degner@gmx.de>
PR: 203876
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@289978 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288304:
ngie [Mon, 26 Oct 2015 00:13:49 +0000 (00:13 +0000)]
MFC r288304:

Enable parallel subdirectory building with sys/modules/netgraph

git-svn-id: svn://svn.freebsd.org/base/stable/10@289976 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289451:
ngie [Mon, 26 Oct 2015 00:11:07 +0000 (00:11 +0000)]
MFC r289451:

Install share/zoneinfo in a deterministic way by sorting the results from find

This helps produce deterministic METALOG output

PR: 200674
Submitted by: Fabian Keil <fk@fabiankeil.de>
Reviewed by: emaste
Obtained from: ElectroBSD

git-svn-id: svn://svn.freebsd.org/base/stable/10@289974 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289450:
ngie [Mon, 26 Oct 2015 00:08:40 +0000 (00:08 +0000)]
MFC r289450:

Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd
descriptor to avoid trashing valid file descriptors that access dev->fd at a
later point in time

PR: 192671
Submitted by: Scott Ferris <scott.ferris@isilon.com>
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@289972 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289332:
ngie [Mon, 26 Oct 2015 00:06:04 +0000 (00:06 +0000)]
MFC r289332:

Fix test-fenv:test_dfl_env when run on some amd64 CPUs

Compare the fields that the AMD [1] and Intel [2] specs say will be
set once fnstenv returns.

Not all amd64 capable processors zero out the env.__x87.__other field
(example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the
env.__x87.__other field will contain after fnstenv is executed, so the values
in env.__x87.__other could be filled with arbitrary data depending on how the
CPU-specific implementation of fnstenv.

1. http://support.amd.com/TechDocs/26569_APM_v5.pdf
2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf

Discussed with: kib, Anton Rang <anton.rang@isilon.com>
Reviewed by: Daniel O'Connor <darius@dons.net.au> (earlier patch; pre-generalization)
Sponsored by: EMC / Isilon Storage Division
Reported by: Bill Morchin <wmorchin@isilon.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@289970 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289488:
ngie [Mon, 26 Oct 2015 00:05:02 +0000 (00:05 +0000)]
MFC r289488:

Clean up trailing whitespace

git-svn-id: svn://svn.freebsd.org/base/stable/10@289969 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288330,r288423,r288678,r288905,r288906,r288907,r289102:
ngie [Sun, 25 Oct 2015 23:03:04 +0000 (23:03 +0000)]
MFC r288330,r288423,r288678,r288905,r288906,r288907,r289102:

r288330:

Add initial testcases for bin/ls

Sponsored by: EMC / Isilon Storage Division

r288423:

Skip the B_flag testcase to stop blowing up freebsd-current@ with
"test failure emails" because kyua report-jenkins doesn't properly
escape non-printable chars

r288678:

Merge additional testcases and improvements to bin/ls/ls_tests from
^/user/ngie/more-tests.

- Additional testcases added:
-- ls -D
-- ls -F
-- ls -H
-- ls -L
-- ls -R
-- ls -S
-- ls -T
-- ls -b
-- ls -d
-- ls -f
-- ls -g
-- ls -h
-- ls -i
-- ls -k
-- ls -l
-- ls -m
-- ls -n
-- ls -o
-- ls -p
-- ls -q/ls -w
-- ls -r
-- ls -s
-- ls -t
-- ls -u
-- ls -y
- Socket file creation is limited to the ls -F testcase, greatly speeding up
  the test process
- The ls -C testcase was made more robust by limiting the number of columns
  via COLUMNS and by dynamically formulating the columns/lines.
- Add `atf_test_case` before all testcase `head` functions.

Sponsored by: EMC / Isilon Storage Division

r288905:

Add some more syncs to quiesce the filesystem after creating the
files to see if this fixes deterministic Jenkin failures

r288906:

Explicitly set BLOCKSIZE to 512 in the environment

r288907:

Call sync consistently using atf_check

Remove superfluous sync's

r289102:

Remove all of the syncs

They're unnecessary as shown by further testing on my VM

Requested by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/10@289965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288295,r288298:
ngie [Sun, 25 Oct 2015 22:55:19 +0000 (22:55 +0000)]
MFC r288295,r288298:

r288295:

Posthumously remove all references to MFREE(9)

The macro was removed in r90227

Sponsored by: EMC / Isilon Storage Division

r288298:

Remove MLINKS to more non-existent mbuf(9) macros

Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@289963 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288057:
ngie [Sun, 25 Oct 2015 22:50:33 +0000 (22:50 +0000)]
MFC r288057:

Delete /etc/autofs/special_noauto when MK_AUTOFS == no

git-svn-id: svn://svn.freebsd.org/base/stable/10@289962 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r287520:
ngie [Sun, 25 Oct 2015 22:44:37 +0000 (22:44 +0000)]
MFC r287520:

Parallelize the usr.sbin/ntp subdirectory build

Articulate all needed dependencies for the subdirectories

git-svn-id: svn://svn.freebsd.org/base/stable/10@289961 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoRegen src.conf(5) after r289959
ngie [Sun, 25 Oct 2015 22:43:10 +0000 (22:43 +0000)]
Regen src.conf(5) after r289959

git-svn-id: svn://svn.freebsd.org/base/stable/10@289960 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286822:
ngie [Sun, 25 Oct 2015 22:41:26 +0000 (22:41 +0000)]
MFC r286822:

Reap MK_SYSINSTALL

It's no longer in use in the tree (most likely missed when sade/sysinstall
were removed)

git-svn-id: svn://svn.freebsd.org/base/stable/10@289959 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286512:
ngie [Sun, 25 Oct 2015 22:38:17 +0000 (22:38 +0000)]
MFC r286512:

Make some debug printf's into DPRINTF's to reduce noise on attach/detahh

Similar reasoning to what was done in r286367 with geom_uzip(4)

Differential Revision: D3320
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@289958 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r283144:
ngie [Sun, 25 Oct 2015 22:34:49 +0000 (22:34 +0000)]
MFC r283144:

Articulate dependencies for cddl/lib/libdtrace and cddl/lib/libzfs

Parallelize the build in this subdirectory

Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@289956 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r282072,r283018:
ngie [Sun, 25 Oct 2015 22:30:45 +0000 (22:30 +0000)]
MFC r282072,r283018:

r282072:

- Fix compilation (MAP_INHERIT's dead)
- Fix warnings
- Use mkstemp instead of tmpnam

r283018:

Fix more warnings related to missing headers

git-svn-id: svn://svn.freebsd.org/base/stable/10@289954 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r284405:
ngie [Sun, 25 Oct 2015 22:23:04 +0000 (22:23 +0000)]
MFC r284405:

Remove ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support from atf.test.mk

The legacy atf tools were removed in atf 0.20

git-svn-id: svn://svn.freebsd.org/base/stable/10@289953 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286367:
ngie [Sun, 25 Oct 2015 22:21:19 +0000 (22:21 +0000)]
MFC r286367:

Make some debug printf's into DPRINTF's to reduce noise on attach/detach

Differential Revision: https://reviews.freebsd.org/D3306
Reviewed by: loos
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@289952 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286304:
ngie [Sun, 25 Oct 2015 22:17:43 +0000 (22:17 +0000)]
MFC r286304:

Set f_file to -1/F_UNUSED when after closing when possible

This will help ensure we don't trash file descriptors that get used later on
in the daemon

Found via internal Coverity scan

Discussed with: cem, ed, markj
Differential Revision: https://reviews.freebsd.org/D3081
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@289949 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288309: fnmatch(): Remove exponential behaviour as in sh r229201.
jilles [Sun, 25 Oct 2015 21:39:23 +0000 (21:39 +0000)]
MFC r288309: fnmatch(): Remove exponential behaviour as in sh r229201.

The old code was exponential in the number of asterisks in the pattern.
However, once a match has been found upto the next asterisk, the previous
asterisks are no longer relevant.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289943 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288430: wordexp: Rewrite to make WRDE_NOCMD reliable.
jilles [Sun, 25 Oct 2015 17:17:50 +0000 (17:17 +0000)]
MFC r288430: wordexp: Rewrite to make WRDE_NOCMD reliable.

Shell syntax is too complicated to detect command substitution and unquoted
operators reliably without implementing much of sh's parser. Therefore, have
sh do this detection.

While changing sh's support anyway, also read input from a pipe instead of
arguments to avoid {ARG_MAX} limits and improve privacy, and output count
and length using 16 instead of 8 digits.

The basic concept is:
execl("/bin/sh", "sh", "-c", "freebsd_wordexp ${1:+\"$1\"} -f "$2",
    "", flags & WRDE_NOCMD ? "-p" : "", <pipe with words>);

The WRDE_BADCHAR error is still implemented in libc. POSIX requires us to
fail strings containing unquoted braces with code WRDE_BADCHAR. Since this
is normally not a syntax error in sh, there is still a need for checking
code in libc, we_check().

The new we_check() is an optimistic check that all the characters
  <newline> | & ; < > ( ) { }
are quoted. To avoid duplicating too much sh logic, such characters are
permitted when quoting characters are seen, even if the quoting characters
may themselves be quoted. This code reports all WRDE_BADCHAR errors; bad
characters that get past it and are a syntax error in sh return WRDE_SYNTAX.

Although many implementations of WRDE_NOCMD erroneously allow some command
substitutions (and ours even documented this), there appears to be code that
relies on its security (codesearch.debian.net shows quite a few uses).
Passing untrusted data to wordexp() still exposes a denial of service
possibility and a fairly large attack surface.

This is also a MFC of r286830 to reduce conflicts. I changed the code
somewhat to avoid changes from r286941; in particular, WRDE_BADVAL can still
only be returned if WRDE_UNDEF was passed.

Relnotes: yes
Security: fixes command execution with wordexp(untrusted, WRDE_NOCMD)

git-svn-id: svn://svn.freebsd.org/base/stable/10@289938 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289146:
mav [Sun, 25 Oct 2015 07:26:12 +0000 (07:26 +0000)]
MFC r289146:
Make delete method set via kern.cam.da.X.delete_method persistent.

This allows to set delete method via tunable, before device capabilities
are known.  Also allow ZERO method for devices not reporting LBP, if user
explicitly requests it -- it may be useful if storage supports compression
and WRITE SAME, but does not support UNMAP.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289924 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agomergeinfo for r289818 (MFC r261891 ...)
avg [Fri, 23 Oct 2015 12:20:35 +0000 (12:20 +0000)]
mergeinfo for r289818 (MFC r261891 ...)

git-svn-id: svn://svn.freebsd.org/base/stable/10@289827 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and
avg [Fri, 23 Oct 2015 10:05:43 +0000 (10:05 +0000)]
MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and
flsll for amd64

git-svn-id: svn://svn.freebsd.org/base/stable/10@289818 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288339: remove unused sgsmsg utility (originally imported from opensolaris)
avg [Fri, 23 Oct 2015 08:35:17 +0000 (08:35 +0000)]
MFC r288339: remove unused sgsmsg utility (originally imported from opensolaris)

git-svn-id: svn://svn.freebsd.org/base/stable/10@289813 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288363: std: it is important that func name is never an empty string
avg [Fri, 23 Oct 2015 08:15:53 +0000 (08:15 +0000)]
MFC r288363: std: it is important that func name is never an empty string

git-svn-id: svn://svn.freebsd.org/base/stable/10@289809 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r284409: Fix circular dependency between libzfs and libzfs_core
avg [Fri, 23 Oct 2015 08:12:00 +0000 (08:12 +0000)]
MFC r284409: Fix circular dependency between libzfs and libzfs_core

By bapt.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288340: define aok in libnvpair which is linked to all zfs
avg [Fri, 23 Oct 2015 08:01:46 +0000 (08:01 +0000)]
MFC r288340: define aok in libnvpair which is linked to all zfs
libraries that need aok

git-svn-id: svn://svn.freebsd.org/base/stable/10@289805 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288362: sdt: start checking version field when parsing probe definitions
avg [Fri, 23 Oct 2015 07:57:21 +0000 (07:57 +0000)]
MFC r288362: sdt: start checking version field when parsing probe definitions

git-svn-id: svn://svn.freebsd.org/base/stable/10@289803 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288337: remove an extra copy of avl.c from illumos contrib code
avg [Fri, 23 Oct 2015 07:48:28 +0000 (07:48 +0000)]
MFC r288337: remove an extra copy of avl.c from illumos contrib code

git-svn-id: svn://svn.freebsd.org/base/stable/10@289801 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288336: save some bytes by using more concise SDT_PROBE<n>
avg [Fri, 23 Oct 2015 07:40:43 +0000 (07:40 +0000)]
MFC r288336: save some bytes by using more concise SDT_PROBE<n>

git-svn-id: svn://svn.freebsd.org/base/stable/10@289798 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288366: sdt.h: no need for argtype_list_head
avg [Fri, 23 Oct 2015 07:37:44 +0000 (07:37 +0000)]
MFC r288366: sdt.h: no need for argtype_list_head

git-svn-id: svn://svn.freebsd.org/base/stable/10@289795 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288365: sdt: static-ize couple of variables
avg [Fri, 23 Oct 2015 07:35:39 +0000 (07:35 +0000)]
MFC r288365: sdt: static-ize couple of variables

git-svn-id: svn://svn.freebsd.org/base/stable/10@289791 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288364: sdt module does not seem to actually use any symbol from
avg [Fri, 23 Oct 2015 07:33:43 +0000 (07:33 +0000)]
MFC r288364: sdt module does not seem to actually use any symbol from
opensolaris module

git-svn-id: svn://svn.freebsd.org/base/stable/10@289788 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288361: dtrace_getarg: remove stray return statement on amd64, powerpc
avg [Fri, 23 Oct 2015 07:31:04 +0000 (07:31 +0000)]
MFC r288361: dtrace_getarg: remove stray return statement on amd64, powerpc

git-svn-id: svn://svn.freebsd.org/base/stable/10@289786 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r287673: radeon_suspend_kms: don't mess with pci state
avg [Fri, 23 Oct 2015 07:25:14 +0000 (07:25 +0000)]
MFC r287673: radeon_suspend_kms: don't mess with pci state

git-svn-id: svn://svn.freebsd.org/base/stable/10@289784 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC 287386,288949,288993:
jhb [Fri, 23 Oct 2015 01:27:44 +0000 (01:27 +0000)]
MFC 287386,288949,288993:
Export current system call code and argument count for system call entry
and exit events.  To preserve the ABI, the new fields are moved to the
end of struct thread in these branches (unlike HEAD) and explicitly copied
when new threads are created.  In addition, the new tests are only added
in 10.

r287386:
Export current system call code and argument count for system call entry
and exit events. procfs stop events for system call tracing report these
values (argument count for system call entry and code for system call exit),
but ptrace() does not provide this information. (Note that while the system
call code can be determined in an ABI-specific manner during system call
entry, it is not generally available during system call exit.)

The values are exported via new fields at the end of struct ptrace_lwpinfo
available via PT_LWPINFO.

r288949:
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.

r288993:
Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289780 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agogetconf(1): Fix typo. _POSIX_V6_LP64_OFFBIG -> _POSIX_V6_LPBIG_OFFBIG.
bapt [Thu, 22 Oct 2015 06:32:33 +0000 (06:32 +0000)]
getconf(1): Fix typo. _POSIX_V6_LP64_OFFBIG -> _POSIX_V6_LPBIG_OFFBIG.

Submitted by: Sascha Wildner <saw@online.de>
Obtained from: DragonflyBSD

git-svn-id: svn://svn.freebsd.org/base/stable/10@289740 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289316:
kp [Wed, 21 Oct 2015 15:32:21 +0000 (15:32 +0000)]
MFC r289316:

pf: Fix TSO issues

In certain configurations (mostly but not exclusively as a VM on Xen) pf
produced packets with an invalid TCP checksum.

The problem was that pf could only handle packets with a full checksum. The
FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only
addresses, length and protocol).
Certain network interfaces expect to see the pseudo-header checksum, so they
end up producing packets with invalid checksums.

To fix this stop calculating the full checksum and teach pf to only update TCP
checksums if TSO is disabled or the change affects the pseudo-header checksum.

PR:             154428, 193579, 198868
Relnotes:       yes
Sponsored by:   RootBSD

git-svn-id: svn://svn.freebsd.org/base/stable/10@289703 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288994:
bdrewery [Wed, 21 Oct 2015 01:41:22 +0000 (01:41 +0000)]
MFC r288994:

  Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2)
  wrappers.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289672 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r281828, r289083, r289084, r289091, r289093, r289095, r289097, r289098,
ian [Tue, 20 Oct 2015 21:20:34 +0000 (21:20 +0000)]
MFC r281828, r289083, r289084, r289091, r289093, r289095, r289097, r289098,
    r289104, r289105, r289118:  various i2c fixes...

  Fix numerous issues in iic(4) and iicbus(4):
  --Allow multiple open iic fds by storing addressing state in cdevpriv
  --Fix, as much as possible, the baked-in race conditions in the iic
  ioctl interface by requesting bus ownership on I2CSTART, releasing it on
  I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv
  to use the I/O ioctls
  --Reduce internal iic buffer size and remove 1K read/write limit by
  iteratively calling iicbus_read/iicbus_write
  --Eliminate dynamic allocation in I2CWRITE/I2CREAD
  --Move handling of I2CRDWR to separate function and improve error handling
  --Add new I2CSADDR ioctl to store address in current cdevpriv so that
  I2CSTART is not needed for read(2)/write(2) to work
  --Redesign iicbus_request_bus() and iicbus_release_bus():
      --iicbus_request_bus() no longer falls through if the bus is already
  owned by the requesting device.  Multiple threads on the same device may
  want exclusive access.  Also, iicbus_release_bus() was never
  device-recursive anyway.
      --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but
  the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be
  issued again
      --Do not hold iicbus mtx during IICBUS_CALLBACK call.  There are
  several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed.
      --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns
  EWOULDBLOCK; instead pass that to the caller so that it can retry if so
  desired.

  Bugfix: Exit the transfer loop if any read or write operation fails.  Also,
  perform a stop operation on the bus if there was an error, otherwise the
  bus will remain hung forever.  Consistantly use 'if (error != 0)' style in
  the function.

  Mostly rewrite the imx i2c driver.  This started out as an attempt to fix
  one specific problem: the driver didn't check for ACK/NAK after writing a
  slave address byte to the bus, and some slaves signal that they are busy
  (such as when completing an internal write to flash memory) by sending a
  NAK in response to being addressed.

  Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers.
  Make it clearer what each one means in the comments that define them.

  Add iic2errno(), a helper function to translate IIC_Exxxxx status values to
  errno values that are at least vaguely equivelent.  Also add a new status
  value, IIC_ERESOURCE, to indicate a failure to acquire memory or other
  required resources to complete a transaction.

  Return only IIC_Exxxx status values from iicbus-layer functions.  Most of
  these functions are thin wrappers around calling the hardware-layer driver,
  but some of them do sanity checks and return an error.

  Add a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT).

  Replace a local sx lock that allowed only one client at a time to access
  an eeprom device with iicbus_request/release_bus(), which achieves the
  same effect and also keeps other i2c slave drivers from clashing on the bus.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289666 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288903:
bdrewery [Tue, 20 Oct 2015 18:35:52 +0000 (18:35 +0000)]
MFC r288903:

  Fix crash if a process sends itself a SIGTRAP.  Just forward it as expected.

  This does not match head as the code was rewritten significantly there.

Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@289641 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288477:
bdrewery [Tue, 20 Oct 2015 18:23:14 +0000 (18:23 +0000)]
MFC r288477:

  META_MODE: For some reason meta mode cannot generate the intermediate tab.c
  files.  Split up all of the targets to be more clear on how they are
  generated to fix the problem.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289639 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r288429:
bdrewery [Tue, 20 Oct 2015 18:20:38 +0000 (18:20 +0000)]
MFC r288429:

  Replace most of the beforeinstall: hack with FILES mechanism.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289638 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289480. Really fix ipfilter bug 3600459.
cy [Tue, 20 Oct 2015 13:20:29 +0000 (13:20 +0000)]
MFC r289480. Really fix ipfilter bug 3600459.

Obtained from: ipfilter cvs repo r1.48.2.25, r1.72 and NetBSD repo r1.4

git-svn-id: svn://svn.freebsd.org/base/stable/10@289628 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289337:
gjb [Mon, 19 Oct 2015 00:36:54 +0000 (00:36 +0000)]
MFC r289337:
  Deprecate MD5 checksum generation in favor of SHA512.

  This was discussed during the 10.2-RELEASE cycle, however
  since we were nearing the end of the cycle, we decided to
  defer this change until after 10.2-RELEASE.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r287785:
trasz [Sun, 18 Oct 2015 15:03:47 +0000 (15:03 +0000)]
MFC r287785:

Make it clear that 'swapuse' is swap reservation and not actual swap usage.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289521 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r287827:
trasz [Sun, 18 Oct 2015 15:02:07 +0000 (15:02 +0000)]
MFC r287827:

Add a way to specify stripesize and stripeoffset to gnop(8). This makes
it possible to "simulate" 4K media, to eg test alignment handling.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289520 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r287951:
trasz [Sun, 18 Oct 2015 14:59:38 +0000 (14:59 +0000)]
MFC r287951:

The "automount" rc script should depend on "automountd", not the other
way around.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC 287397:
trasz [Sun, 18 Oct 2015 14:57:42 +0000 (14:57 +0000)]
MFC 287397:

Fix markup.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289518 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286360:
trasz [Sun, 18 Oct 2015 14:55:09 +0000 (14:55 +0000)]
MFC r286360:

Tweak mdconfig(8) manual page, in particular revise the EXAMPLES
section.  This removes stuff that doesn't really belong there,
and simplifies examples for the basic operations.

MFC r286361:

Whoops, wrong flag.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289517 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r258909:
trasz [Sun, 18 Oct 2015 14:52:31 +0000 (14:52 +0000)]
MFC r258909:

Tweak mdconfig(8) manual page, in particular revise the EXAMPLES
section.  This removes stuff that doesn't really belong there,
and simplifies examples for the basic operations.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289516 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r257182 (by jmg@):
trasz [Sun, 18 Oct 2015 14:47:19 +0000 (14:47 +0000)]
MFC r257182 (by jmg@):

bump date forgotten in r257165

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289515 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r257165 (by jmg@):
trasz [Sun, 18 Oct 2015 14:46:12 +0000 (14:46 +0000)]
MFC r257165 (by jmg@):

Document that -a will output the device name when -u is not specified..
when -u is specified it is not...

update the docs to say that you can use full device names w/ -u, and
update the examples...

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289514 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r287033:
trasz [Sun, 18 Oct 2015 14:41:38 +0000 (14:41 +0000)]
MFC r287033:

After r286237 it should be fine to call vgone(9) on a busy GEOM vnode;
remove KASSERT that would prevent forced devfs unmount from working.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289513 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286283:
trasz [Sun, 18 Oct 2015 14:36:04 +0000 (14:36 +0000)]
MFC r286283:

Fix panic triggered by code like this:
open("/dev/md0", O_EXEC);

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289512 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286237:
trasz [Sun, 18 Oct 2015 14:34:13 +0000 (14:34 +0000)]
MFC r286237:

Fix panic that would happen on forcibly unmounting devfs (note that
as it is now, devfs ignores MNT_FORCE anyway, so it needs to be modified
to trigger the panic) with consumers still opened.

Note that this still results in a leak of r/w/e counters.  It seems
to be harmless, though.  If anyone knows a better way to approach
this - please tell.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286281:
trasz [Sun, 18 Oct 2015 14:31:54 +0000 (14:31 +0000)]
MFC r286281:

Mark vgonel() as static.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289510 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r286226:
trasz [Sun, 18 Oct 2015 14:25:04 +0000 (14:25 +0000)]
MFC r286226:

Rework the way iSCSI initiator handles system shutdown. This fixes
hangs on shutdown with LUNs with mounted filesystems over a disconnected
iSCSI session.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289509 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r285881:
trasz [Sun, 18 Oct 2015 14:20:11 +0000 (14:20 +0000)]
MFC r285881:

Add md_root example to defaults/loader.conf.

Note that this doesn't quite work yet - the preloaded image
gets loaded twice for some reason.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289508 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r285870:
trasz [Sun, 18 Oct 2015 14:17:30 +0000 (14:17 +0000)]
MFC r285870:

Document md_root in loader(8). The md(4) manual page mentions it,
but it's hard to find and easy to miss.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289507 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r285847:
trasz [Sun, 18 Oct 2015 14:16:01 +0000 (14:16 +0000)]
MFC r285847:

Add missing SIGUSR1 description.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289506 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r281726:
trasz [Sun, 18 Oct 2015 14:01:20 +0000 (14:01 +0000)]
MFC r281726:

Optimize the O_NOCTTY handling hack in linux_common_open().

MFC r281728:

Add back fdrop() missed in r281726.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r281689:
trasz [Sun, 18 Oct 2015 13:58:17 +0000 (13:58 +0000)]
MFC r281689:

Remove unused code from linux_mount(), and make it possible to mount
any kind of filesystem instead of harcoded three.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289504 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r280981:
trasz [Sun, 18 Oct 2015 13:52:53 +0000 (13:52 +0000)]
MFC r280981:

Remove unused code.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289503 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289136: Remove lock upgrade attempt from ctl_be_block_open_file().
mav [Sun, 18 Oct 2015 06:53:31 +0000 (06:53 +0000)]
MFC r289136: Remove lock upgrade attempt from ctl_be_block_open_file().

I am not sure what for it was done.  Now open routine should automatically
fall back to read-only if open for writing is impossible.  In such case
attempt to upgrade to write sounds strange.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289489 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r272455:
markj [Sat, 17 Oct 2015 20:38:40 +0000 (20:38 +0000)]
MFC r272455:
Have dtrace(1) handle SIGPIPE, and handle signals when in list mode (-l).
In particular, make sure to detach from child processes before exiting.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289468 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC 289067:
wblock [Sat, 17 Oct 2015 02:49:19 +0000 (02:49 +0000)]
MFC 289067:
Fix a repeated typo: rootir -> rootdir.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289436 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289026:
kib [Fri, 16 Oct 2015 20:51:25 +0000 (20:51 +0000)]
MFC r289026:
Enforce the maxproc limitation before allocating struct proc.

In collaboration with: pho

git-svn-id: svn://svn.freebsd.org/base/stable/10@289431 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoFix build with options DIAGNOSTIC.
pho [Fri, 16 Oct 2015 12:16:35 +0000 (12:16 +0000)]
Fix build with options DIAGNOSTIC.

Sponsored by: EMC / Isilon storage division
In collaboration with:  kib

git-svn-id: svn://svn.freebsd.org/base/stable/10@289418 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289070: Add .gnu.versym VERSYM_HIDDEN flag and related mask
emaste [Fri, 16 Oct 2015 01:31:38 +0000 (01:31 +0000)]
MFC r289070: Add .gnu.versym VERSYM_HIDDEN flag and related mask

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289403 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289065: Add --currently-running <release> option to freebsd-update.
cperciva [Fri, 16 Oct 2015 01:23:41 +0000 (01:23 +0000)]
MFC r289065: Add --currently-running <release> option to freebsd-update.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289402 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoif_lem: Bring over the missing pieces from -HEAD to make NIC_PARAVIRT work.
adrian [Thu, 15 Oct 2015 20:37:30 +0000 (20:37 +0000)]
if_lem: Bring over the missing pieces from -HEAD to make NIC_PARAVIRT work.

The paravirt support for the driver and netmap code was already MFCed,
but the adapter and ifnet API bits weren't.

This was backported from -HEAD by Eric Melville <eric@freebsd.org>.

Submitted by: eric
Sponsored by: Norse Corp, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoAdd the paravirt.h support from -HEAD.
adrian [Thu, 15 Oct 2015 20:36:04 +0000 (20:36 +0000)]
Add the paravirt.h support from -HEAD.

Submitted by: eric
Sponsored by: Norse Corp, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r265164: Small cleanup: mostly whitespace vs. tabs.
emaste [Thu, 15 Oct 2015 16:07:15 +0000 (16:07 +0000)]
MFC r265164: Small cleanup: mostly whitespace vs. tabs.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289368 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r264889: newfs_msdos: Correct min/max cluster counts for FAT12/16/32
emaste [Thu, 15 Oct 2015 16:06:10 +0000 (16:06 +0000)]
MFC r264889: newfs_msdos: Correct min/max cluster counts for FAT12/16/32

FAT12      1..4084
FAT16   4085..65524
FAT32  65525..

This is required for interoperability with other FAT implementations,
and in particular UEFI.

Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@289367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r289017: Add missing vnode lock in case of file modify request.
mav [Thu, 15 Oct 2015 08:49:52 +0000 (08:49 +0000)]
MFC r289017: Add missing vnode lock in case of file modify request.

Submitted by: Richard Kojedzinszky

git-svn-id: svn://svn.freebsd.org/base/stable/10@289363 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC 289031: Teach gptldr to handle >64k boot2.
cperciva [Thu, 15 Oct 2015 03:48:03 +0000 (03:48 +0000)]
MFC 289031: Teach gptldr to handle >64k boot2.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289358 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r261994, r275905, r275951, r276106, r283128, r285678: MMC driver fixes...
ian [Wed, 14 Oct 2015 23:41:41 +0000 (23:41 +0000)]
MFC r261994, r275905, r275951, r276106, r283128, r285678: MMC driver fixes...

  If no compatible cards were found after probing the bus, say so.

  Don't deselect the card too soon. To set the block size or switch the
  function parameters, the card has to be in transfer state. If it is in
  the idle state, the commands are ignored. This caused us not to set
  the proper parameters that we later assume to be present, leading to
  downstream failures of the card / interface as our state machine
  mismatches the card's.

  Log mmc and sd command failures.  Reporting of routine expected errors,
  such as timeouts while probing a bus or testing for a feature, is
  squelched.  Also, error reporting is limited to 5 events per second,
  because when an sdcard goes bad on a low-end embedded board, flooding
  the console at high speed isn't helpful.

  Always select the card before we do the 4.x specific stuff and
  deselect it after setting the block size. This is a similar bug that
  was fixed elsewhere, but not here. This makes sure that we leave the
  card deselected at the end of the loop, and we don't send any commands
  to the card without it selected.

  Re-select the SD card before getting the SD status. On a couple Atmel
  boards, this prevents some error messages during enumeration and also
  gives us the correct erase block size. They appear to be harmless
  elsewhere.

  Deselect the sd card before re-selecting it when working around a problem
  with some cards that causes them to become deselected after probing for
  switch capabilities.  The old workaround fixes the behavior with some cards,
  but causes problems with the cards the behave correctly and don't become
  deselected.  Forcing a deselect then reselect appears to work correctly
  with all cards in initial testing.

git-svn-id: svn://svn.freebsd.org/base/stable/10@289339 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC 288833:
jgh [Wed, 14 Oct 2015 17:00:35 +0000 (17:00 +0000)]
MFC 288833:
PR: 203440 (based on)
Submitted by: ceratv@rpi.edu
Approved by: wblock@ (mentor)
Differential Revision: https://reviews.freebsd.org/D3813

- address grammar

git-svn-id: svn://svn.freebsd.org/base/stable/10@289318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC: 288984
bapt [Wed, 14 Oct 2015 06:31:49 +0000 (06:31 +0000)]
MFC: 288984

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'

Sponsored by: Gandi.net

git-svn-id: svn://svn.freebsd.org/base/stable/10@289292 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f