]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agofilemon_dtr: Lock the associated filemon handle before writing to it.
Bryan Drewery [Wed, 27 Jan 2016 21:37:43 +0000 (21:37 +0000)]
filemon_dtr: Lock the associated filemon handle before writing to it.

Reported by: mjg
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoThis fixes a bug in UFS2 exported NFS volumes. An NFS client can
Kirk McKusick [Wed, 27 Jan 2016 21:27:05 +0000 (21:27 +0000)]
This fixes a bug in UFS2 exported NFS volumes. An NFS client can
crash a server that has exported UFS2 by presenting a filehandle
with an inode number that references an uninitialized inode in a
cylinder group. The problem is that UFS2 only initializes blocks
of inodes as they are first allocated and ffs_fhtovp() does not
validate that the inode is in a range of inodes that have been
initialized. Attempting to read an uninitialized inode gets random
data from the disk. When the kernel tries to interpret it as an
inode, panics often arise.

Reported by: Christos Zoulas (from NetBSD)
Reviewed by: kib

8 years agoThe bread() function was inconsistent about whether it would return
Kirk McKusick [Wed, 27 Jan 2016 21:23:01 +0000 (21:23 +0000)]
The bread() function was inconsistent about whether it would return
a buffer pointer in the event of an error (for some errors it would
return a buffer pointer and for other errors it would not return a
buffer pointer). The cluster_read() function was similarly inconsistent.

Clients of these functions were inconsistent in handling errors.
Some would assume that no buffer was returned after an error and
would thus lose buffers under certain error conditions. Others would
assume that brelse() should always be called after an error and
would thus panic the system under certain error conditions.

To correct both of these problems with minimal code churn, bread()
and cluster_write() now always free the buffer when returning an
error thus ensuring that buffers will never be lost. The brelse()
routine checks for being passed a NULL buffer pointer and silently
returns to avoid panics. Thus both approaches to handling error
returns from bread() and cluster_read() will work correctly.

Future code should be written assuming that bread() and cluster_read()
will never return a buffer with an error, so should not attempt to
brelse() the buffer when an error is returned.

Reviewed by: kib

8 years agofilemon_comment has nothing to do with wrappers so move it out of filemon_wrapper.c.
Bryan Drewery [Wed, 27 Jan 2016 21:17:43 +0000 (21:17 +0000)]
filemon_comment has nothing to do with wrappers so move it out of filemon_wrapper.c.

It only prints the header from filemon_ioctl.  Keep the name though to stay
closer to other implementations.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agofilemon_ioctl: Lock the associated filemon handle before writing to it.
Bryan Drewery [Wed, 27 Jan 2016 21:14:09 +0000 (21:14 +0000)]
filemon_ioctl: Lock the associated filemon handle before writing to it.

Reported by: mjg
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agofilemon_ioctl: Handle error from devfs_get_cdevpriv(9).
Bryan Drewery [Wed, 27 Jan 2016 21:12:18 +0000 (21:12 +0000)]
filemon_ioctl: Handle error from devfs_get_cdevpriv(9).

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoReplace prebuilt uuencoded gallant.fnt with editable hex version
Ed Maste [Wed, 27 Jan 2016 20:23:42 +0000 (20:23 +0000)]
Replace prebuilt uuencoded gallant.fnt with editable hex version

8 years agoDo not unlock rtld_phdr_lock over callback invocations.
Alexander Kabaev [Wed, 27 Jan 2016 20:20:37 +0000 (20:20 +0000)]
Do not unlock rtld_phdr_lock over callback invocations.

The dl_iterate_phdr consumer code in libgcc does not expect multiple
callbacks running concurrently. This was fixed once already in r178807,
but accidentally got reverted in r294373.

8 years agoMake .debug file for libgcc_s.so.1 more useful.
Alexander Kabaev [Wed, 27 Jan 2016 20:20:35 +0000 (20:20 +0000)]
Make .debug file for libgcc_s.so.1 more useful.

The files compiled into libgcc_s.so.1 did not have -g on
compiler command line, making generated .debug quite
pointless.

8 years agoktrace: tidy up ktrstruct
Mateusz Guzik [Wed, 27 Jan 2016 19:55:02 +0000 (19:55 +0000)]
ktrace: tidy up ktrstruct

- minor style fixes
- avoid doing strlen twice [1]

PR: 206648
Submitted by: C Turt <ecturt gmail.com> (original version) [1]

8 years agoDrop any previous fd when setting a new one.
Bryan Drewery [Wed, 27 Jan 2016 19:11:11 +0000 (19:11 +0000)]
Drop any previous fd when setting a new one.

Reported by: mjg
Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoImprove reporting of connection problems in iscsid(8).
Edward Tomasz Napierala [Wed, 27 Jan 2016 18:12:42 +0000 (18:12 +0000)]
Improve reporting of connection problems in iscsid(8).

Obtained from: Mellanox Technologies
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRename netinet/tcp_cc.h to netinet/cc/cc.h.
Gleb Smirnoff [Wed, 27 Jan 2016 17:59:39 +0000 (17:59 +0000)]
Rename netinet/tcp_cc.h to netinet/cc/cc.h.

Discussed with: lstewart

8 years agoConvert ss_sp in stack_t and sigstack to void *.
John Baldwin [Wed, 27 Jan 2016 17:55:01 +0000 (17:55 +0000)]
Convert ss_sp in stack_t and sigstack to void *.

POSIX requires these members to be of type void * rather than the
char * inherited from 4BSD.  NetBSD and OpenBSD both changed their
fields to void * back in 1998.  No new build failures were reported
via an exp-run.

PR: 206503 (exp-run)
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5092

8 years agoFix the value we print when the size is too large. While here fix the types
Andrew Turner [Wed, 27 Jan 2016 17:47:07 +0000 (17:47 +0000)]
Fix the value we print when the size is too large. While here fix the types
we cast to to be unsigned as the data is unsigned.

Reviewed by: ian

8 years agoWhen finding the physical address of a device allow intermediate addresses
Andrew Turner [Wed, 27 Jan 2016 17:33:31 +0000 (17:33 +0000)]
When finding the physical address of a device allow intermediate addresses
to be 64-bit on 32-bit architectures. It is not uncommon for device trees
to use the upper 32-bits to store what effectively is an index into the
parent ranges property. In this case, when running with a 32-bit bus_addr_t
and bus_size_t, we would previously truncate the address, this may then
incorrectly match the wrong range, and return the wrong address.

Tested by: bz (earlier version)

8 years agoficl on i386 should cast to unsigned char output to support efi i386
Allan Jude [Wed, 27 Jan 2016 16:45:23 +0000 (16:45 +0000)]
ficl on i386 should cast to unsigned char output to support efi i386

make it possible for efi_console to recognize and translate box characters
on i386 build (unsigned versus signed char passed as int issue).

Submitted by: Toomas Soome <tsoome at me.com>
Reviewed by: emaste, smh, dteske
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D4993

8 years agoFix mistake when transitioning to the new defines with ZFS loader. I
Warner Losh [Wed, 27 Jan 2016 16:36:18 +0000 (16:36 +0000)]
Fix mistake when transitioning to the new defines with ZFS loader. I
hate adding yet another define, but it is the lessor of the evil
choices available. Kill another evil by removing PATH_BOOT3 and
replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.

PR: 206659

8 years agosyslogd: Enable repeated line compression for lines of any length.
Alan Somers [Wed, 27 Jan 2016 16:17:15 +0000 (16:17 +0000)]
syslogd: Enable repeated line compression for lines of any length.

Enable repeated line compression for lines of any length, instead of only
short lines. AFAICT repeated line compression was limited to short lines as
a RAM optimization, which made sense when karels added it in 1988, but no
longer.  The penalty is a paltry 904B of RAM per file logged.

Reviewed by: rpaulo
MFC after: 32 days
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4475

8 years agoFix grep_test:recurse with ZFS and TMPFS tmpdirs
Alan Somers [Wed, 27 Jan 2016 16:13:10 +0000 (16:13 +0000)]
Fix grep_test:recurse with ZFS and TMPFS tmpdirs

contrib/netbsd-tests/usr.bin/grep/t_grep.sh
Fix grep_test:recurse when /tmp is either zfs or tmpfs. The test was
relying on an implicit ordering of directory recursion which happens
to be true when using UFS. grep's specification requires no such
ordering. The solution is to ignore the order of grep's results.

Reviewed by: ngie
MFC after: 32 days
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4925

8 years agoFix fatal warn when compiling under GCC 5.2.0
Devin Teske [Wed, 27 Jan 2016 15:28:23 +0000 (15:28 +0000)]
Fix fatal warn when compiling under GCC 5.2.0

GCC 5.2.0 generates the following [fatal] warning:
dialog_util.c:270:23: error:
zero-length gnu_printf format string [-Werror=format-zero-length]
   sprintf(dargv[n++], "");

Fix malloc argument while here, removing sprintf.

Reported by: Ruslan Bukin <ruslan.bukin at cl cam ac uk>

8 years agoFix my email.
Svatopluk Kraus [Wed, 27 Jan 2016 14:47:00 +0000 (14:47 +0000)]
Fix my email.

8 years agoFix generation of dependency rules for the LinuxKPI, the MLX5 driver
Hans Petter Selasky [Wed, 27 Jan 2016 14:46:30 +0000 (14:46 +0000)]
Fix generation of dependency rules for the LinuxKPI, the MLX5 driver
and all of OFED except MLX4[EN/IB].

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoAdd pthread MD part for RISC-V.
Ruslan Bukin [Wed, 27 Jan 2016 14:10:50 +0000 (14:10 +0000)]
Add pthread MD part for RISC-V.

Reviewed by: andrew
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5063

8 years agoSwitch UseDNS back on
Dag-Erling Smørgrav [Wed, 27 Jan 2016 13:40:44 +0000 (13:40 +0000)]
Switch UseDNS back on

8 years agoAdd the RISC-V MD parts of libthread_db.
Ruslan Bukin [Wed, 27 Jan 2016 10:34:07 +0000 (10:34 +0000)]
Add the RISC-V MD parts of libthread_db.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5064

8 years agoFix issues with TCP_CONGESTION handling after r294540:
Gleb Smirnoff [Wed, 27 Jan 2016 07:34:00 +0000 (07:34 +0000)]
Fix issues with TCP_CONGESTION handling after r294540:
o Return back the buf[TCP_CA_NAME_MAX] for TCP_CONGESTION,
  for TCP_CCALGOOPT use dynamically allocated *pbuf.
o For SOPT_SET TCP_CONGESTION do NULL terminating of string
  taking from userland.
o For SOPT_SET TCP_CONGESTION do the search for the algorithm
  keeping the inpcb lock.
o For SOPT_GET TCP_CONGESTION first strlcpy() the name
  holding the inpcb lock into temporary buffer, then copyout.

Together with: lstewart

8 years agoImplement AT_SECURE properly.
Xin LI [Wed, 27 Jan 2016 07:20:55 +0000 (07:20 +0000)]
Implement AT_SECURE properly.

AT_SECURE auxv entry has been added to the Linux 2.5 kernel to pass a
boolean flag indicating whether secure mode should be enabled. 1 means
that the program has changes its credentials during the execution.
Being exported AT_SECURE used by glibc issetugid() call.

Submitted by: imp, dchagin
Security: FreeBSD-SA-16:10.linux
Security: CVE-2016-1883

8 years agoAdd debug output via ATF_REQUIRE_MSG when the first call to
Enji Cooper [Wed, 27 Jan 2016 07:06:49 +0000 (07:06 +0000)]
Add debug output via ATF_REQUIRE_MSG when the first call to
mlock(2) fails

This helps identify the problem with running this test on my VM
hosts (ENOMEM)

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoFix regression introduced on r293801.
Marcelo Araujo [Wed, 27 Jan 2016 06:28:56 +0000 (06:28 +0000)]
Fix regression introduced on r293801.
The UID/GID 93 is in using by jaber on PORTS, we will use
UID/GID 160 for ypldap(8).

Reported by: antoine
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D5062

8 years agoAdjust vm.max_wired in order to avoid hitting EAGAIN artificially
Enji Cooper [Wed, 27 Jan 2016 06:24:19 +0000 (06:24 +0000)]
Adjust vm.max_wired in order to avoid hitting EAGAIN artificially

Set vm.max_wired to INT_MAX in :mlock_err, :mlock_mmap, and :mlock_nested to
avoid hitting EAGAIN artificially on the system when running the tests

Require root privileges in order to set the sysctl

Add allow_sysctl_side_effects to require.config as this test is now adjusting
sysctls that can affect the global system state

Unlike the version submitted by cem in OneFS, this version uses a scratch file
to save/restore the previous value of the sysctl. I _really_, _really_ wish
there were better hooks in atf/kyua for per test suite setup/teardown -- using
a file is kludgy, but it's the best I can do to avoid situations where (for
instance), sysctl(3) may fail and drop a core outside the kyua sandbox.

Based on a patch submitted by cem, but modified to take business logic out of
ATF_TP_ADD_TCS(3).

Differential Revision: https://reviews.freebsd.org/D4779
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division

8 years agoFix a crash if `-D' is used without `-t title'
Devin Teske [Wed, 27 Jan 2016 06:21:35 +0000 (06:21 +0000)]
Fix a crash if `-D' is used without `-t title'

dialog(3)'s dlg_reallocate_gauge(), used both by dialog(3)'s dialog_gauge()
and dialog(1)'s `--gauge', will segmentation fault in strlen(3) if no title
is set for the widget. Reproducible with `dialog --gauge hi 6 20' (adding
`--title ""' is enough to prevent segmentation fault).

MFC after: 3 days
X-MFC-to: stable/10

8 years agoRemove unused function prototype
Devin Teske [Wed, 27 Jan 2016 06:16:53 +0000 (06:16 +0000)]
Remove unused function prototype

MFC after: 3 days
X-MFC-to: stable/10

8 years agoRequire /sbin/mount_cd9660 when running the cd9660 tests
Enji Cooper [Wed, 27 Jan 2016 06:14:20 +0000 (06:14 +0000)]
Require /sbin/mount_cd9660 when running the cd9660 tests

In some cases the test system might not have mount_cd9660(8). Don't
implicitly rely on it while testing cd9660 support; explicitly rely
on it

MFC after: 1 week
Reported by: mjohnston
Sponsored by: EMC / Isilon Storage Division

8 years agoMore fixes to the build.
Gleb Smirnoff [Wed, 27 Jan 2016 05:15:53 +0000 (05:15 +0000)]
More fixes to the build.

8 years agoFix build on i386. I can't yet understand why does it build on amd64.
Gleb Smirnoff [Wed, 27 Jan 2016 04:59:28 +0000 (04:59 +0000)]
Fix build on i386. I can't yet understand why does it build on amd64.

8 years agohyperv/vmbus: Event handling code refactor.
Sepherosa Ziehau [Wed, 27 Jan 2016 03:53:30 +0000 (03:53 +0000)]
hyperv/vmbus: Event handling code refactor.

- Use taskqueue instead of swi for event handling.
- Scan the interrupt flags in filter
- Disable ringbuffer interrupt mask in filter to ensure no unnecessary
  interrupts.

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: adrian, sephe, Dexuan <decui microsoft com>
Approved by: adrian (mentor)
MFC after: 2 weeks
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4920

8 years agoFix the build post-r294883.
Justin Hibbits [Wed, 27 Jan 2016 03:51:24 +0000 (03:51 +0000)]
Fix the build post-r294883.

Pointy-hat to: jhibbits
X-MFC with: r294883

8 years agoAllow specification of fetch options for ntp leap-seconds fetch.
Cy Schubert [Wed, 27 Jan 2016 02:25:25 +0000 (02:25 +0000)]
Allow specification of fetch options for ntp leap-seconds fetch.

MFC after: 1 week
X-MFC with: r289421, r293037, r294773

8 years agoConvert rman to use rman_res_t instead of u_long
Justin Hibbits [Wed, 27 Jan 2016 02:23:54 +0000 (02:23 +0000)]
Convert rman to use rman_res_t instead of u_long

Summary:
Migrate to using the semi-opaque type rman_res_t to specify rman resources.  For
now, this is still compatible with u_long.

This is step one in migrating rman to use uintmax_t for resources instead of
u_long.

Going forward, this could feasibly be used to specify architecture-specific
definitions of resource ranges, rather than baking a specific integer type into
the API.

This change has been broken out to facilitate MFC'ing drivers back to 10 without
breaking ABI.

Reviewed By: jhb
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5075

8 years agocleanup and document in some detail the internals of the testing code
Luigi Rizzo [Wed, 27 Jan 2016 02:22:31 +0000 (02:22 +0000)]
cleanup and document in some detail the internals of the testing code
for dummynet schedulers

8 years agothe _Static_assert was not supposed to be in the commit.
Luigi Rizzo [Wed, 27 Jan 2016 02:14:08 +0000 (02:14 +0000)]
the _Static_assert was not supposed to be in the commit.

8 years agoReplace awk with more efficient builtins-only algo
Devin Teske [Wed, 27 Jan 2016 02:11:58 +0000 (02:11 +0000)]
Replace awk with more efficient builtins-only algo

8 years agobugfix: the scheduler template (dn_schk) for the round robin scheduler
Luigi Rizzo [Wed, 27 Jan 2016 02:08:30 +0000 (02:08 +0000)]
bugfix: the scheduler template (dn_schk) for the round robin scheduler
is followed by another structure (rr_schk) whose size must be set
in the schk_datalen field of the descriptor.
Not allocating the memory may cause other memory to be overwritten
(though dn_schk is 192 bytes and rr_schk only 12 so we may be lucky
and end up in the padding after the dn_schk).

This is a merge candidate for stable and 10.3

MFC after: 3 days

8 years agoRevert yacc dependency back to pre-r241298.
Bryan Drewery [Wed, 27 Jan 2016 01:33:26 +0000 (01:33 +0000)]
Revert yacc dependency back to pre-r241298.

Several attempts to fix this logic was done after r241298, which were
all reverted, yet this change was not.

The .h file does not depend on the .c file, so do not impose such a
dependency on it.  They are generated by the same command but do not
depend on each other.  Restore the .ORDER which should handle parallel build
issues.  This fixes an actual bug where the .h file is not recreated
when missing [1].  For example:
  cd lib/libc
  make cleanobj
  make nsparser.h
  rm nsparser.h
  make nsparser.h # will not rebuild nsparser.h

I have been trying to track down a build problem where nsparser.h is
missing when nslexer.o is built.  It is possible this is related.

Reported by: bde [1]
https://lists.freebsd.org/pipermail/svn-src-all/2012-October/059481.html
https://lists.freebsd.org/pipermail/svn-src-all/2012-October/060038.html
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoReplace nslexer.l->nslexer.c custom rule with a -D CFLAG.
Bryan Drewery [Wed, 27 Jan 2016 01:33:23 +0000 (01:33 +0000)]
Replace nslexer.l->nslexer.c custom rule with a -D CFLAG.

This avoids reproducing the lex logic which had dependencies set wrong
and used an intermediate file for modifying the YY_BUF_SIZE.

This has only been possible since flex 2.5.37 was imported in r250873,
which uses #ifndef YY_BUF_SIZE.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agonslexer.c does not depend on nsparser.h.
Bryan Drewery [Wed, 27 Jan 2016 01:33:19 +0000 (01:33 +0000)]
nslexer.c does not depend on nsparser.h.

nslexer.o depends on nsparser.h, which is already added by bsd.lib.mk
and .depend.

This reverts r237402.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Mark some unneeded code for later removal.
Bryan Drewery [Wed, 27 Jan 2016 01:24:14 +0000 (01:24 +0000)]
FAST_DEPEND: Mark some unneeded code for later removal.

Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Apply missed nofilemon fix from r294351.
Bryan Drewery [Wed, 27 Jan 2016 01:24:11 +0000 (01:24 +0000)]
FAST_DEPEND: Apply missed nofilemon fix from r294351.

Sponsored by: EMC / Isilon Storage Division

8 years agoSet a value for _RECURSING_PROGS for debugging.
Bryan Drewery [Wed, 27 Jan 2016 01:24:08 +0000 (01:24 +0000)]
Set a value for _RECURSING_PROGS for debugging.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoFix DIRDEPS_BUILD after r294752.
Bryan Drewery [Wed, 27 Jan 2016 01:24:05 +0000 (01:24 +0000)]
Fix DIRDEPS_BUILD after r294752.

DIRDEPS_BUILD does not yet support PROGS having their own dependency
file.

Overriding .MAKE.DEPENDFILE here causes major problems with the meta
mode logic since it creates the Makefile.depend as '.depend' resulting
in infinite loops in make due to dirdeps.mk including .depend endlessly.

X-MFC-With: r294752
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoGrab value for LEAF_tcpCurrEstab from net.inet.tcp.stats instead of
Gleb Smirnoff [Wed, 27 Jan 2016 00:50:27 +0000 (00:50 +0000)]
Grab value for LEAF_tcpCurrEstab from net.inet.tcp.stats instead of
net.inet.tcp.pcblist, which is much cheaper.

8 years agoGrab a snap amount of TCP connections in syncache from tcpstat.
Gleb Smirnoff [Wed, 27 Jan 2016 00:48:05 +0000 (00:48 +0000)]
Grab a snap amount of TCP connections in syncache from tcpstat.

8 years agoAugment struct tcpstat with tcps_states[], which is used for book-keeping
Gleb Smirnoff [Wed, 27 Jan 2016 00:45:46 +0000 (00:45 +0000)]
Augment struct tcpstat with tcps_states[], which is used for book-keeping
the amount of TCP connections by state.  Provides a cheap way to get
connection count without traversing the whole pcb list.

Sponsored by: Netflix

8 years agoRemove excess whitespace
Bryan Drewery [Wed, 27 Jan 2016 00:24:24 +0000 (00:24 +0000)]
Remove excess whitespace

8 years agoProvide TCPSTAT_DEC() and TCPSTAT_FETCH() macros.
Gleb Smirnoff [Wed, 27 Jan 2016 00:20:07 +0000 (00:20 +0000)]
Provide TCPSTAT_DEC() and TCPSTAT_FETCH() macros.

8 years agoUse dpv(1) in `bsdconfig packages'
Devin Teske [Wed, 27 Jan 2016 00:12:58 +0000 (00:12 +0000)]
Use dpv(1) in `bsdconfig packages'

8 years agoFix ABI parsing
Devin Teske [Wed, 27 Jan 2016 00:09:53 +0000 (00:09 +0000)]
Fix ABI parsing

8 years agoChange incorrect path
Devin Teske [Wed, 27 Jan 2016 00:08:23 +0000 (00:08 +0000)]
Change incorrect path

8 years agoBump copyright
Devin Teske [Wed, 27 Jan 2016 00:03:43 +0000 (00:03 +0000)]
Bump copyright

8 years agoBump copyrights
Devin Teske [Wed, 27 Jan 2016 00:02:51 +0000 (00:02 +0000)]
Bump copyrights

8 years agoAdd `-k' for dpv(3) `keep_tite' config option
Devin Teske [Tue, 26 Jan 2016 23:59:30 +0000 (23:59 +0000)]
Add `-k' for dpv(3) `keep_tite' config option

For scripts using dialog(1) several times, it can be visually distracting
running dpv(1) several times amidst other dialogs. The `-k' option, similar
to dialog(1) `--keep-tite', enables the same functionality to smooth ti/te.

8 years agoAdd keep_tite configuration option
Devin Teske [Tue, 26 Jan 2016 23:56:27 +0000 (23:56 +0000)]
Add keep_tite configuration option

Similar to dialog(3) keep_tite option used to prevent visually disturbing
initialization or exit that could occur when run from a script using
dpv(3) by way of dpv(1) in sequence with other dialog(1) invocations.

8 years agofix various warnings to compile the test code with -Wextra
Luigi Rizzo [Tue, 26 Jan 2016 23:37:07 +0000 (23:37 +0000)]
fix various warnings to compile the test code with -Wextra

8 years agofix various warnings (signed/unsigned, printf types, unused arguments)
Luigi Rizzo [Tue, 26 Jan 2016 23:36:18 +0000 (23:36 +0000)]
fix various warnings (signed/unsigned, printf types, unused arguments)

8 years agoprevent warnings for signed/unsigned comparisons and unused arguments.
Luigi Rizzo [Tue, 26 Jan 2016 22:46:58 +0000 (22:46 +0000)]
prevent warnings for signed/unsigned comparisons and unused arguments.
Add checks for parameters overflowing 32 bit.

8 years agoprevent warning for unused argument
Luigi Rizzo [Tue, 26 Jan 2016 22:45:45 +0000 (22:45 +0000)]
prevent warning for unused argument

8 years agoavoid warnings for signed/unsigned comparison and unused arguments
Luigi Rizzo [Tue, 26 Jan 2016 22:45:05 +0000 (22:45 +0000)]
avoid warnings for signed/unsigned comparison and unused arguments

8 years agoUpgrade FW to 5.4.56
David C Somayajulu [Tue, 26 Jan 2016 22:32:58 +0000 (22:32 +0000)]
Upgrade FW to 5.4.56
Update driver version to 3.10.26

8 years agoVarious style fixes.
John Baldwin [Tue, 26 Jan 2016 21:24:49 +0000 (21:24 +0000)]
Various style fixes.

- Wrap long lines.
- Fix indentation.
- Remove excessive parens.
- Whitespace fixes in struct definitions.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D5025

8 years agoAdd support to libsysdecode for decoding system call names.
John Baldwin [Tue, 26 Jan 2016 19:07:09 +0000 (19:07 +0000)]
Add support to libsysdecode for decoding system call names.

A new sysdecode_syscallname() function accepts a system call code and
returns a string of the corresponding name (or NULL if the code is
unknown).  To support different process ABIs, the new function accepts a
value from a new sysdecode_abi enum as its first argument to select the
ABI in use.  Current ABIs supported include FREEBSD (native binaries),
FREEBSD32, LINUX, LINUX32, and CLOUDABI64.  Note that not all ABIs are
supported by all platforms.  In general, a given ABI is only supported
if a platform can execute binaries for that ABI.

To simplify the implementation, libsysdecode's build reuses the
existing pre-generated files from the kernel source tree rather than
duplicating new copies of said files during the build.

kdump(1) and truss(1) now use these functions to map system call
identifiers to names.  For kdump(1), a new 'syscallname()' function
consolidates duplicated code from ktrsyscall() and ktrsyscallret().
The Linux ABI no longer requires custom handling for ktrsyscall() and
linux_ktrsyscall() has been removed as a result.

Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D4823

8 years agoDefault NANO_DRIVE to ada0 not ad0. This shouldn't affect working
Warner Losh [Tue, 26 Jan 2016 18:39:31 +0000 (18:39 +0000)]
Default NANO_DRIVE to ada0 not ad0. This shouldn't affect working
configs (since they'd have to change NANO_DRIVE to be ada0 to work),
but will fix old ones that used to work.

MFC After: 1 week

8 years agoRemove static from these two. They slipped through the cracks.
Warner Losh [Tue, 26 Jan 2016 18:39:30 +0000 (18:39 +0000)]
Remove static from these two. They slipped through the cracks.

MFC After: 1 week

8 years agoAdd a comment about why at is turned off in the exception handler.
Warner Losh [Tue, 26 Jan 2016 18:39:23 +0000 (18:39 +0000)]
Add a comment about why at is turned off in the exception handler.
Only k0 and k1 may be touched until we save registers somewhere.

MFC After: 2 days

8 years agoAdd STT_SPARC_REGISTER ELF definition
Ed Maste [Tue, 26 Jan 2016 18:20:25 +0000 (18:20 +0000)]
Add STT_SPARC_REGISTER ELF definition

MFC after: 1 week

8 years agortwn: do not start vap when initialization fails
Andriy Voskoboinyk [Tue, 26 Jan 2016 16:50:59 +0000 (16:50 +0000)]
rtwn: do not start vap when initialization fails

- Start vap(s) (via ieee80211_start_all()) only when initialization
succeeds; stop the first vap otherwise (via ieee80211_stop());
- Do not try to stop a device multiple times
(move (sc->sc_flags & RTWN_RUNNING) check to urtwn_stop_locked()).

Tested by: kevlo
Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5058

8 years agortwn: use ieee80211_restart_all() for device reset
Andriy Voskoboinyk [Tue, 26 Jan 2016 16:34:27 +0000 (16:34 +0000)]
rtwn: use ieee80211_restart_all() for device reset

Tested by: kevlo
Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5057

8 years agoPersist timers TCPTV_PERSMIN and TCPTV_PERSMAX are hardcoded with 5 seconds and
Hiren Panchasara [Tue, 26 Jan 2016 16:33:38 +0000 (16:33 +0000)]
Persist timers TCPTV_PERSMIN and TCPTV_PERSMAX are hardcoded with 5 seconds and
60 seconds, respectively. Turn them into sysctls that can be tuned live. The
default values of 5 seconds and 60 seconds have been retained.

Submitted by: Jason Wolfe (j at nitrology dot com)
Reviewed by: gnn, rrs, hiren, bz
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D5024

8 years agoUpdate and add various macros to the LinuxKPI and resolve a macro
Hans Petter Selasky [Tue, 26 Jan 2016 15:26:35 +0000 (15:26 +0000)]
Update and add various macros to the LinuxKPI and resolve a macro
redefinition issue in the cxgb driver.

MFC after: 1 week
Sponsored by: Mellanox Technologies
Reviewed by: np @

8 years agoImport Annapurna Labs Alpine HAL for networking
Zbigniew Bodek [Tue, 26 Jan 2016 15:22:04 +0000 (15:22 +0000)]
Import Annapurna Labs Alpine HAL for networking

Files required for the NIC driver

Import from vendor-sys/alpine-hal/2.7
SVN rev.: 294828
HAL version: 2.7

Obtained from:  Semihalf
Sponsored by:   Annapurna Labs

8 years agoLinuxKPI list updates:
Hans Petter Selasky [Tue, 26 Jan 2016 15:12:31 +0000 (15:12 +0000)]
LinuxKPI list updates:
- Add some new hlist macros.
- Update existing hlist macros removing the need for a temporary
  iteration variable.
- Properly define the RCU hlist macros to be SMP safe with regard
  to RCU.
- Safe list macro arguments by adding a pair of parentheses.
- Prefix the _list_add() and _list_splice() functions with "linux"
  to reflect they are LinuxKPI internal functions.

Obtained from: Linux
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoDon't clear the software flow control flag before draining for last
Konstantin Belousov [Tue, 26 Jan 2016 14:46:39 +0000 (14:46 +0000)]
Don't clear the software flow control flag before draining for last
close or assert the bug that it is clear when leaving.

Remove an unrelated rotted comment that was attached to the buggy
clearing.

Since draining is not done in more cases, flushing is needed in more
cases, so start fixing flushing:
- do a full flush in ttydisc_close().  State what POSIX requires more
  clearly.  This was missing ttydevsw_pktnotify() calls to tell the
  devsw layer to flush.  Hardware tty drivers don't actually flush
  since they don't understand this API.
- fix 2 missing wakeups in tty_flush().  Most of the wakeups here are
  unnecessary for last close.  But ttydisc_close() did one of the
  missing ones.

This flow control bug ameliorated the design bug of requiring
potentially unbounded waits in draining.  Software flow control is the
easiest way to get an unbounded wait, and a long wait is sometimes
actually useful.  Users can type the xoff character on the receiver
and (if ixon is set on the sender) expect the output to be held until
the user is ready for more.

Hardware flow control can also give the unbounded wait, and this bug
didn't affect hardware flow control.  Unbounded waits from hardware
flow control take a more unusual configuration.  E.g., a terminal
program that controls the modem status lines, or unplugging the cable
in a configuration where this doesn't break the connection.

The design bug is still ameliorated by a newer bug in draining for
last close -- the 1 second timeout.  E.g., if the user types the
xoff character and the sender reaches last close, then output is
not resumed and the wait times out after just 1 second.  This is
broken, but preferable to an unbounded wait.  Before this change,
the output was resumed immediately and usually completed.

Submitted by: bde
MFC after: 2 weeks

8 years agoMake libgcc compilable on RISC-V.
Ruslan Bukin [Tue, 26 Jan 2016 14:45:21 +0000 (14:45 +0000)]
Make libgcc compilable on RISC-V.

8 years agoAdd fenv.c for RISC-V. Copied from MIPS.
Ruslan Bukin [Tue, 26 Jan 2016 14:40:41 +0000 (14:40 +0000)]
Add fenv.c for RISC-V. Copied from MIPS.

8 years agoImplement ether_addr_equal(), ether_addr_equal_64bits() and
Hans Petter Selasky [Tue, 26 Jan 2016 14:36:16 +0000 (14:36 +0000)]
Implement ether_addr_equal(), ether_addr_equal_64bits() and
random_ether_addr() for the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoRemove uathload from build due to issue with GCC 5.2.0:
Ruslan Bukin [Tue, 26 Jan 2016 14:34:40 +0000 (14:34 +0000)]
Remove uathload from build due to issue with GCC 5.2.0:
"ld: --relax and -r may not be used together."
Requires fixing ld command line arguments and testing.

8 years agoImplement is_vlan_dev() and vlan_dev_vlan_id() for the LinuxKPI.
Hans Petter Selasky [Tue, 26 Jan 2016 14:33:20 +0000 (14:33 +0000)]
Implement is_vlan_dev() and vlan_dev_vlan_id() for the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoImplement bitmap_weight() and bitmap_equal() for the LinuxKPI.
Hans Petter Selasky [Tue, 26 Jan 2016 14:31:20 +0000 (14:31 +0000)]
Implement bitmap_weight() and bitmap_equal() for the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd more network related macros and functions to the LinuxKPI.
Hans Petter Selasky [Tue, 26 Jan 2016 14:29:50 +0000 (14:29 +0000)]
Add more network related macros and functions to the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd definition for the NETDEV_CHANGE event and tidy up the LinuxKPI
Hans Petter Selasky [Tue, 26 Jan 2016 14:27:00 +0000 (14:27 +0000)]
Add definition for the NETDEV_CHANGE event and tidy up the LinuxKPI
notifier header file a bit while at it.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoDefine __get_user() and __put_user() for the LinuxKPI.
Hans Petter Selasky [Tue, 26 Jan 2016 14:21:30 +0000 (14:21 +0000)]
Define __get_user() and __put_user() for the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd more LinuxKPI PCI related functions and defines.
Hans Petter Selasky [Tue, 26 Jan 2016 14:20:25 +0000 (14:20 +0000)]
Add more LinuxKPI PCI related functions and defines.
Removed comments deriving from Linux.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd the openssl header for RISC-V.
Ruslan Bukin [Tue, 26 Jan 2016 14:17:39 +0000 (14:17 +0000)]
Add the openssl header for RISC-V.
Copied from aarch64 as we can't generate it yet.

8 years agoMake pmap_fault() return values vm subsystem compliant to
Svatopluk Kraus [Tue, 26 Jan 2016 13:50:44 +0000 (13:50 +0000)]
Make pmap_fault() return values vm subsystem compliant to
simplify their handling in abort_handler(). While here,
remove one extra initialization of pcb variable.

8 years agoMFV r294819: 6495 Fix mutex leak in dmu_objset_find_dp
Alexander Motin [Tue, 26 Jan 2016 13:45:41 +0000 (13:45 +0000)]
MFV r294819: 6495 Fix mutex leak in dmu_objset_find_dp

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>

illumos/illumos-gate@2bad22584defe4667f99737e3158d336e4dcca11

8 years ago6495 Fix mutex leak in dmu_objset_find_dp
Alexander Motin [Tue, 26 Jan 2016 13:44:47 +0000 (13:44 +0000)]
6495 Fix mutex leak in dmu_objset_find_dp

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>

illumos/illumos-gate@2bad22584defe4667f99737e3158d336e4dcca11

8 years ago6494 ASSERT supported zio_types for file and disk vdevs
Alexander Motin [Tue, 26 Jan 2016 13:40:22 +0000 (13:40 +0000)]
6494 ASSERT supported zio_types for file and disk vdevs

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>

illumos/illumos-gate@f693d300fbefaa2bd9a229a874b5994532a30d87

8 years agoMFV r294816: 4986 receiving replication stream fails if any snapshot
Alexander Motin [Tue, 26 Jan 2016 13:37:30 +0000 (13:37 +0000)]
MFV r294816: 4986 receiving replication stream fails if any snapshot
exceeds refquota

Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@5878fad70d76d8711f6608c1f80b0447601261c6

8 years ago4986 receiving replication stream fails if any snapshot exceeds refquota
Alexander Motin [Tue, 26 Jan 2016 13:20:31 +0000 (13:20 +0000)]
4986 receiving replication stream fails if any snapshot exceeds refquota

Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@5878fad70d76d8711f6608c1f80b0447601261c6

8 years agoMFV r294814: 6393 zfs receive a full send as a clone
Alexander Motin [Tue, 26 Jan 2016 13:14:39 +0000 (13:14 +0000)]
MFV r294814: 6393 zfs receive a full send as a clone

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Paul Dagnelie <pcd@delphix.com>

illumos/illumos-gate@68ecb2ec930c4b0f00acaf8e0abb2b19c4b8b76f

This allows to do a full (non-incremental send) and receive it as a clone
of an existing dataset. It can leverage nopwrite to share blocks with the
origin. This can be used to change the relationship of datasets on the
target. For example, maybe on the source you have:

A ---- B ---- C

And you have sent to the target a full of B, and the incremental B->C:

B ---- C

You later realize that you want to have A on the target. You will have to
do a full send of A, but nopwrite can save you space on the target if you
receive it as a clone of B, assuming that A and B have some blocks inxi
common:

B ---- C
 \
  A