]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMerge OpenSSL 1.0.2f.
jkim [Thu, 28 Jan 2016 20:15:22 +0000 (20:15 +0000)]
Merge OpenSSL 1.0.2f.

Relnotes: yes

8 years agoFix -include .depend hack from r294370 for headers not in .PATH.
bdrewery [Thu, 28 Jan 2016 18:57:47 +0000 (18:57 +0000)]
Fix -include .depend hack from r294370 for headers not in .PATH.

This hack will be removed in a few weeks.  It is here to fix incremental
builds of SSH between r291941 and r294370.

Reported by: jmallett
MFC after: 1 day
Sponsored by: EMC / Isilon Storage Division

8 years agoImport OpenSSL 1.0.2f.
jkim [Thu, 28 Jan 2016 18:41:59 +0000 (18:41 +0000)]
Import OpenSSL 1.0.2f.

8 years agoFix VNIC enumeration after r294993 and r294990
zbb [Thu, 28 Jan 2016 16:58:49 +0000 (16:58 +0000)]
Fix VNIC enumeration after r294993 and r294990

ofw_bus_get_node() must be tested against negative values since
missing parent bus method will result in calling the default method
which simply returns (-1): sys/dev/ofw/ofw_bus_if.m
This was lost in the review process.

Obtained from: Semihalf
Sponsored by:  Cavium

8 years agoUse m_getjcl() instead of manually selecting zone.
glebius [Thu, 28 Jan 2016 16:51:56 +0000 (16:51 +0000)]
Use m_getjcl() instead of manually selecting zone.

Reviewed by: arybchik

8 years agoAlways look in the TCP pool.
tuexen [Thu, 28 Jan 2016 16:05:46 +0000 (16:05 +0000)]
Always look in the TCP pool.
This fixes issues with a restarting peer when the listening
1-to-1 style socket is closed.

MFC after: 3 days

8 years agoSupport new MDIO hierarchy in ThunderX DTB
zbb [Thu, 28 Jan 2016 15:44:14 +0000 (15:44 +0000)]
Support new MDIO hierarchy in ThunderX DTB

Some firmware revisions provide different DTB tree that include
odd MDIO placement in the tree.
This commit adds support for 2 new buses:
- MRML bridge (PCIB subordinate)
- MDIO nexus (MRML subordinate)
This allows for the correct MDIO attachment with both - new and old
firmware.

Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5070

8 years agoAdd FDT bus capabilities to ThunderX PCI driver
zbb [Thu, 28 Jan 2016 15:40:56 +0000 (15:40 +0000)]
Add FDT bus capabilities to ThunderX PCI driver

New ThunderX firmware incorporates modified DTB that presents
different device hierarchy. In the new device tree, MDIO
devices are below two additional buses that oddly hang on
PCI bridge.

Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5069

8 years agoCorrect alloc_ and release_resource methods in thunder_pcie driver
zbb [Thu, 28 Jan 2016 15:38:02 +0000 (15:38 +0000)]
Correct alloc_ and release_resource methods in thunder_pcie driver

- Avoid using BUS_ macros as bus_generic_ functions should be used instead.
- Fix mistaken device_t pointers in thunder_pcie_alloc_resource.
  Should use dev->parent method and allocate resource for child device

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5068

8 years agoDivide ThunderX PCIe driver to general and FDT part
zbb [Thu, 28 Jan 2016 15:34:13 +0000 (15:34 +0000)]
Divide ThunderX PCIe driver to general and FDT part

- Separate FDT and general PCIe driver parts
- Drop some irrelevant printfs that cannot be displayed in
  FDT attach
- Move ranges parsing to FDT portion of PCIe code

Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5067

8 years agoFix finding appropriate BGX node in DTB and move it to a separate function
zbb [Thu, 28 Jan 2016 15:30:58 +0000 (15:30 +0000)]
Fix finding appropriate BGX node in DTB and move it to a separate function

Search for BGX node in DTS in two ways:
1. Try to find it uder root node first
2. If not found under root, find the top level PCI bridge node
   and search all nodes below it until appropriate BGX node is found.
Move search code to another function to make the code more clear.
Remove unused variable by the way.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5066

8 years agoEHCI: Make core reset and port speed reading more generic.
mmel [Thu, 28 Jan 2016 14:11:59 +0000 (14:11 +0000)]
EHCI: Make core reset and port speed reading more generic.

Use driver settable callbacks for handling of:
- core post reset
- reading actual port speed

Typically, OTG enabled EHCI cores wants setting of USBMODE register,
but this register is not defined in EHCI specification and different
cores can have it on different offset.

Also, for cores with TT extension, actual port speed must be determinable.
But again, EHCI specification not covers this so this patch provides
function for two most common variant of speed bits layout.

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D5088

8 years agoSMP support for ARMv6/v7 HW watchpoints
zbb [Thu, 28 Jan 2016 12:43:58 +0000 (12:43 +0000)]
SMP support for ARMv6/v7 HW watchpoints

Use per-CPU structure to store HW watchpoints registers state
for each CPU present in the system. Those registers will be restored
upon wake up from the STOP state if requested by the debug_monitor
code. The method is similar to the one introduced to AMD64.

We store all possible 16 registers for HW watchpoints
(maximum allowed by the architecture).
HW breakpoints are not maintained since they are used for single
stepping only.

Pointed out by: kib
Reviewed by:    wma
No strong objections from: kib
Submitted by:   Zbigniew Bodek <zbb@semihalf.com>
Obtained from:  Semihalf
Sponsored by:   Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4338

8 years agoRemove ffs_mountroot() prototype; seems to be long gone.
trasz [Thu, 28 Jan 2016 12:21:23 +0000 (12:21 +0000)]
Remove ffs_mountroot() prototype; seems to be long gone.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix mutex releasing in ARM64 cpu_switch
wma [Thu, 28 Jan 2016 12:00:17 +0000 (12:00 +0000)]
Fix mutex releasing in ARM64 cpu_switch

    The code should be comparing pointers, not any data
    gathered from a blocked_lock.

Spotted by:            cognet
Approved by:           zbb, cognet (mentor)
Differential revision: https://reviews.freebsd.org/D5100

8 years agoAdd pidfile support to ggated(8)
ngie [Thu, 28 Jan 2016 03:24:06 +0000 (03:24 +0000)]
Add pidfile support to ggated(8)

The tests will manipulate the system daemon today, which can cause undesired
service interruption when the tests are run.

This change allows the geom_gate tests to be run with an arbitrary ggated(8)
daemon / geom_gate(4) device pairing.

Other changes:
- Sort #includes
- Use a more common idiom for parsing options with getopt(3)

Differential Revision: https://reviews.freebsd.org/D4836
MFC after: 2 weeks
Reviewed by: bjk (manpages), pjd (maintainer timeout)
Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r294967: Mark flags unused.
bdrewery [Thu, 28 Jan 2016 01:19:19 +0000 (01:19 +0000)]
Follow-up r294967: Mark flags unused.

X-MFC-With: r294967
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agofilemon: Trace fork via process_fork event.
bdrewery [Thu, 28 Jan 2016 01:17:55 +0000 (01:17 +0000)]
filemon: Trace fork via process_fork event.

This avoids needing ugly hooks and needing both a vfork and fork
handler.

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

8 years agofilemon: Use process_exit EVENTHANDLER to capture process exit.
bdrewery [Thu, 28 Jan 2016 00:51:17 +0000 (00:51 +0000)]
filemon: Use process_exit EVENTHANDLER to capture process exit.

This fixes some cases where a process could exit without being untracked
by filemon.

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

8 years agofilemon_dtr: Lock the associated filemon handle before writing to it.
bdrewery [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
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
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.
bdrewery [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.
bdrewery [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).
bdrewery [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
emaste [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.
kan [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.
kan [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
mjg [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.
bdrewery [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).
trasz [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.
glebius [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 *.
jhb [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 [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 [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
allanjude [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
imp [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.
asomers [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
asomers [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
dteske [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.
skra [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
hselasky [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.
br [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
des [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.
br [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:
glebius [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.
delphij [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
ngie [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.
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
ngie [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'
dteske [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
dteske [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
ngie [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.
glebius [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.
glebius [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.
sephe [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.
jhibbits [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 [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
jhibbits [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 [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 [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
dteske [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 [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.
bdrewery [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.
bdrewery [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.
bdrewery [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.
bdrewery [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.
bdrewery [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.
bdrewery [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.
bdrewery [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
glebius [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.
glebius [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
glebius [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
bdrewery [Wed, 27 Jan 2016 00:24:24 +0000 (00:24 +0000)]
Remove excess whitespace

8 years agoProvide TCPSTAT_DEC() and TCPSTAT_FETCH() macros.
glebius [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'
dteske [Wed, 27 Jan 2016 00:12:58 +0000 (00:12 +0000)]
Use dpv(1) in `bsdconfig packages'

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

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

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

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

8 years agoAdd `-k' for dpv(3) `keep_tite' config option
dteske [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
dteske [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 [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 [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 [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 [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 [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
davidcs [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.
jhb [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.
jhb [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
imp [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.
imp [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.
imp [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
emaste [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
avos [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
avos [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 [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
hselasky [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
zbb [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:
hselasky [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