]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agodev/usb: add USB IDs for Realtek 802.11ac wireless adapters.
avos [Mon, 19 Sep 2016 18:36:26 +0000 (18:36 +0000)]
dev/usb: add USB IDs for Realtek 802.11ac wireless adapters.

They are will be used by the updated rtwn(4) / urtwn(4) driver.

Suggested by: adrian

7 years agohexdump(1): Simplify by using asprintf(3)
pfg [Mon, 19 Sep 2016 18:35:22 +0000 (18:35 +0000)]
hexdump(1): Simplify by using asprintf(3)

Instead of strlen() + calloc() + snprintf, just use asprintf().
No functional change.

Obtained from: OpenBSD (CVS Rev. 1.22)

7 years agotcpdump: remove sys/capability.h #include
emaste [Mon, 19 Sep 2016 17:51:56 +0000 (17:51 +0000)]
tcpdump: remove sys/capability.h #include

sys/capability.h is just a backwards compatibility wrapper around
sys/capsicum.h, which is already #included.

7 years agoRemove unused bio_taskqueue().
trasz [Mon, 19 Sep 2016 17:46:15 +0000 (17:46 +0000)]
Remove unused bio_taskqueue().

MFC after: 1 month

7 years agoSync in latest vDSOs from upstream.
ed [Mon, 19 Sep 2016 17:31:05 +0000 (17:31 +0000)]
Sync in latest vDSOs from upstream.

- Use conditional instruction to simplify the ARMv6 vDSO. This means
  that we no longer perform any branching. In the failure case, we
  simply slide over the assignments of the return values.

  The vDSO could be improved even further by using stmia to do
  assignments in parallel. Unfortunately, the script used to generate
  these is not smart enough for that (yet).

  Spotted by: andrew@.

- Make the style of the i686 vDSO more similar to the others by using
  decimal literals.

7 years agocxgbe(4): Fixes to wrq stats.
np [Mon, 19 Sep 2016 17:16:51 +0000 (17:16 +0000)]
cxgbe(4): Fixes to wrq stats.

- Increment tx_wrs_copied in the correct place.
- Add tx_wrs_sspace to the sysctl MIB.

Sponsored by: Chelsio Communications

7 years agoindent(1): Capsicumify
cem [Mon, 19 Sep 2016 16:16:14 +0000 (16:16 +0000)]
indent(1): Capsicumify

This is a nice and trivial program for sandboxing.  One input file, one
output file.

Reviewed by: pfg
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7920

7 years agotr(1): Capsicumify
cem [Mon, 19 Sep 2016 16:14:38 +0000 (16:14 +0000)]
tr(1): Capsicumify

This is a straightforward single input, single output program for
capsicum.

Reviewed by: bapt
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7928

7 years agocmp(1): Capsicumify
cem [Mon, 19 Sep 2016 16:13:00 +0000 (16:13 +0000)]
cmp(1): Capsicumify

Reviewed by: allanjude, bapt, oshogbo
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7912

7 years agouefisign: Remove backwards-compatibility sys/capability.h support
emaste [Mon, 19 Sep 2016 16:07:32 +0000 (16:07 +0000)]
uefisign: Remove backwards-compatibility sys/capability.h support

uefisign previously included sys/capability.h or sys/capsicum.h based
on __FreeBSD_version in order to facilitate development on the stable
branch. The Capsicum header is now installed as sys/capsicum.h in
stable/10 and FreeBSD 10.3, so there's no need for the backwards
compatibility support.

Reviewed by: trasz
Sponsored by: The FreeBSD Foundation

7 years agoDetect x2APIC mode on boot and obey it.
kib [Mon, 19 Sep 2016 15:58:45 +0000 (15:58 +0000)]
Detect x2APIC mode on boot and obey it.

If BIOS performed hand-off to OS with BSP LAPIC in the x2APIC mode,
system usually consumes such configuration without a notice, since
x2APIC is turned on by OS if possible (nop).  But if BIOS
simultaneously requested OS to not use x2APIC, code assumption that
that xAPIC is active breaks.

In my opinion, we cannot safely turn off x2APIC if control is passed
in this mode.  Make madt.c ignore user or BIOS requests to turn x2APIC
off, and do not check the x2APIC black list.  Just trust the config
and try to continue, giving a warning in dmesg.

Reported and tested by: Slawa Olhovchenkov <slw@zxy.spb.ru> (previous version)
Diagnosed by and discussed with: avg
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoBe more strict when selecting between snapshot/regular mount.
kib [Mon, 19 Sep 2016 15:58:33 +0000 (15:58 +0000)]
Be more strict when selecting between snapshot/regular mount.

Reclaimed vnode type is VBAD, so succesful comparision like
devvp->v_type != VREG does not imply that the devvp references
snapshot, it might be due to a reclaimed vnode.  Explicitely check the
vnode type.

In the the most important case of ffs_blkfree(), the devfs vnode is
locked and its type is stable.  In other cases, if the vnode is
reclaimed right after the check, hopefully the buffer methods return
right error codes.

Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoAttach the cortex strings library to the build. Only a subset of functions
andrew [Mon, 19 Sep 2016 15:08:03 +0000 (15:08 +0000)]
Attach the cortex strings library to the build. Only a subset of functions
have been added as some don't seem to be improvements over the libc C
implementation.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoFix the asm on the memchr and strchr functions.
andrew [Mon, 19 Sep 2016 14:36:16 +0000 (14:36 +0000)]
Fix the asm on the memchr and strchr functions.
Add an alias from index to strchr as is done in the libc C implementation.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoImport the Linaro Cortex Strings library into contrib.
andrew [Mon, 19 Sep 2016 13:12:09 +0000 (13:12 +0000)]
Import the Linaro Cortex Strings library into contrib.

Sponsored by: The FreeBSD Foundation

7 years agoRemove change accidentally committed via r305963 for upcoming tests/sys/fs/...
ngie [Mon, 19 Sep 2016 09:15:12 +0000 (09:15 +0000)]
Remove change accidentally committed via r305963 for upcoming tests/sys/fs/...
work

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoMake autofs use the "noatime" flag for msdosfs, ntfs, and ufs
trasz [Mon, 19 Sep 2016 08:55:36 +0000 (08:55 +0000)]
Make autofs use the "noatime" flag for msdosfs, ntfs, and ufs
filesystems mounted on /media.

MFC after: 1 month

7 years agoMake autofs use the "async" flag for msdosfs and ufs filesystems mounted
trasz [Mon, 19 Sep 2016 08:51:27 +0000 (08:51 +0000)]
Make autofs use the "async" flag for msdosfs and ufs filesystems mounted
on /media.

MFC after: 1 month

7 years agohyperv/hn: Allow RSS capability flipping upon attach/reinit.
sephe [Mon, 19 Sep 2016 07:47:56 +0000 (07:47 +0000)]
hyperv/hn: Allow RSS capability flipping upon attach/reinit.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7927

7 years agohyperv/hn: Stringent RSS sysctl checks
sephe [Mon, 19 Sep 2016 07:39:42 +0000 (07:39 +0000)]
hyperv/hn: Stringent RSS sysctl checks

- Don't change RNDIS RSS configuration for RSS key sysctl, if the
  interface is not capable of RSS yet.
- Don't change RSS indirect table (both cached one and RNDIS RSS
  configuration), if the interface is not capable of RSS yet.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7924

7 years agohyperv/hn: Don't allow MTU change, if it is not supported by the NVS.
sephe [Mon, 19 Sep 2016 07:32:08 +0000 (07:32 +0000)]
hyperv/hn: Don't allow MTU change, if it is not supported by the NVS.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7923

7 years agohyperv/hn: Save capabilities for later use.
sephe [Mon, 19 Sep 2016 07:17:43 +0000 (07:17 +0000)]
hyperv/hn: Save capabilities for later use.

And don't allow capability changes during reinitialization, which
breaks too much static configuration.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7922

7 years agoReindent TESTSDIR definition for consistency/readability
ngie [Mon, 19 Sep 2016 07:07:55 +0000 (07:07 +0000)]
Reindent TESTSDIR definition for consistency/readability

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agohyperv/hn: Don't allow NVS and NDIS version change upon reinitailization
sephe [Mon, 19 Sep 2016 07:07:23 +0000 (07:07 +0000)]
hyperv/hn: Don't allow NVS and NDIS version change upon reinitailization

NVS and NDIS version change would break too much assumption and static
configuration.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7919

7 years agoRe-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and add
ngie [Mon, 19 Sep 2016 06:59:17 +0000 (06:59 +0000)]
Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and add
it to lib/libc/tests/sys/Makefile [*]

Even though make -VPACKAGE and make -n install seem to do the right thing,
the effects are a bit different, depending on the build host.

MFC after: 1 week
Obtained from: HardenedBSD (af602f0db) [*]
Reported by: Oliver Pinter <oliver.pinter@hardenedbsd.org> [*]
Sponsored by: Dell EMC Isilon

7 years agohyperv/hn: Apply RSS indirect table fixup before configure RNDIS RSS.
sephe [Mon, 19 Sep 2016 06:46:22 +0000 (06:46 +0000)]
hyperv/hn: Apply RSS indirect table fixup before configure RNDIS RSS.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7916

7 years agoRevert capsicum support
bapt [Mon, 19 Sep 2016 06:39:11 +0000 (06:39 +0000)]
Revert capsicum support

In some corner case VFS lookup is not working and I do not have time to debug
it for now.

7 years agoRemove expected failure for :basic (effectively reverting r305007, r305031)
ngie [Mon, 19 Sep 2016 06:39:08 +0000 (06:39 +0000)]
Remove expected failure for :basic (effectively reverting r305007, r305031)

This no longer fails as of r305952

PR: 212193
Sponsored by: Dell EMC Isilon

7 years agoFix typo introduced in r305949 with the stable/10 bootstrapping logic
ngie [Mon, 19 Sep 2016 03:02:43 +0000 (03:02 +0000)]
Fix typo introduced in r305949 with the stable/10 bootstrapping logic

The header is sys/capability.h, not sys/capabilities.h

X-MFC with: r305949
Pointyhat to: bapt
Reported by: allanjude, Jenkins
Sponsored by:  Dell EMC Isilon

7 years agoAdd manpage for rctl_* system calls
badger [Mon, 19 Sep 2016 02:25:30 +0000 (02:25 +0000)]
Add manpage for rctl_* system calls

Reviewed by: trasz, wblock
Approved by: kib (mentor)
MFC after: 3 days
Sponsored by: Dell Technologies
Differential Revision: https://reviews.freebsd.org/D7877

7 years agoRegen.
kib [Sun, 18 Sep 2016 22:03:26 +0000 (22:03 +0000)]
Regen.

7 years agoAdd compat32 support for capsicum.
kib [Sun, 18 Sep 2016 22:03:07 +0000 (22:03 +0000)]
Add compat32 support for capsicum.

Reviewed by: bapt, emaste
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D7942

7 years agoSplit bcm_mipscore.c into bcm_bmips (BMIPS32/BMIPS3300) and bcm_mips74k
landonf [Sun, 18 Sep 2016 21:28:09 +0000 (21:28 +0000)]
Split bcm_mipscore.c into bcm_bmips (BMIPS32/BMIPS3300) and bcm_mips74k
drivers.

The BMIPS32/BMIPS3300 cores use a register layout distinct from the MIPS74K
core, and are only found on siba(4) devices.

Reviewed by: mizhka
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D7791

7 years agoReplace dirname(3) by a copy that complies to POSIX.
ed [Sun, 18 Sep 2016 20:47:55 +0000 (20:47 +0000)]
Replace dirname(3) by a copy that complies to POSIX.

It turns out that the path normalization that our brand new copy of
dirname(3) does is actually not allowed by the draft version of the
upcoming version of POSIX. It has to behave identically to the
dirname(1) utility.

This change replaces our new dirname(3) implementation by yet another
version that doesn't implement the path normalization logic; it merely
looks for the end of the directory name and overwrites that with a null
byte.

More details: See note #3370 at http://austingroupbugs.net/view.php?id=1073

PR: 212193
Reviewed by: emaste, jilles
Differential Revision: https://reviews.freebsd.org/D7790

7 years agoelfdump: adjust stdout/stderr capabilities
emaste [Sun, 18 Sep 2016 20:23:26 +0000 (20:23 +0000)]
elfdump: adjust stdout/stderr capabilities

stdio uses fstat and the TIOCGETA ioctl. Also collapse the
cap_rights_limit and new cap_ioctls_limit calls into one if statement.
Errors here are not actionable by the user and distinguishing stdout
from stderr doesn't really have value.

Reported by: kib
Reviewed by: allanjude, bapt
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7944

7 years agoSimplify the fix for bootstrap tools
bapt [Sun, 18 Sep 2016 19:16:48 +0000 (19:16 +0000)]
Simplify the fix for bootstrap tools

building head is not supported from prior to stable/10 where sys/capsicum.h was
named sys/capabilities.h

Reported by: kib

7 years agoFix building as bootstrap tools on pre-capsicum.h systems
bapt [Sun, 18 Sep 2016 18:49:18 +0000 (18:49 +0000)]
Fix building as bootstrap tools on pre-capsicum.h systems

7 years agoAdd comment for the closing guard.
kib [Sun, 18 Sep 2016 18:40:27 +0000 (18:40 +0000)]
Add comment for the closing guard.

Requested by: tsoome
MFC after: 1 week

7 years agoSperify that users can find rcs and rcs57 in ports
bapt [Sun, 18 Sep 2016 18:27:28 +0000 (18:27 +0000)]
Sperify that users can find rcs and rcs57 in ports

Reported by: cy

7 years agoBetter error checking
bapt [Sun, 18 Sep 2016 18:03:06 +0000 (18:03 +0000)]
Better error checking

if getcwd fails: just ignore it and do not try to adding to the list of possible
path where to find the files.

if fdopen fails, warn and return NULL the rest of the code knows how to deal
with it

Reported by: oshogbo

7 years agostyle(9) fix
bapt [Sun, 18 Sep 2016 17:56:14 +0000 (17:56 +0000)]
style(9) fix

Reported by: oshogbo

7 years agoUtilize pmap.h names for constants and types used to construct EFI
kib [Sun, 18 Sep 2016 17:41:16 +0000 (17:41 +0000)]
Utilize pmap.h names for constants and types used to construct EFI
trampoline page table.  Also do some style cleanup.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D7934

7 years agoConsolidate four efi_next_descriptor() definitions.
kib [Sun, 18 Sep 2016 17:38:02 +0000 (17:38 +0000)]
Consolidate four efi_next_descriptor() definitions.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoAdd double-inclusion protection.
kib [Sun, 18 Sep 2016 17:35:24 +0000 (17:35 +0000)]
Add double-inclusion protection.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoMove opcode rewriter init and destroy handlers into non-VENT code.
ae [Sun, 18 Sep 2016 17:35:17 +0000 (17:35 +0000)]
Move opcode rewriter init and destroy handlers into non-VENT code.

PR: 212576,212649,212077
Submitted by: John Zielinski
MFC after: 1 week

7 years agoRemove trailing space.
kib [Sun, 18 Sep 2016 17:33:49 +0000 (17:33 +0000)]
Remove trailing space.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

7 years agoFix badly computed register/stack offset of system call output arguments.
ed [Sun, 18 Sep 2016 17:23:53 +0000 (17:23 +0000)]
Fix badly computed register/stack offset of system call output arguments.

Bugs in the Python code used to generate this vDSO caused us to
miscompute the register numbers/stack offsets at which addresses of the
system call output arguments were stored.

Together with some other patches, this vDSO allows us to make all of the
cloudlibc unit tests pass.

Obtained from: https://github.com/NuxiNL/cloudabi

7 years agoCapsicum-ize tee(1)
bapt [Sun, 18 Sep 2016 16:34:40 +0000 (16:34 +0000)]
Capsicum-ize tee(1)

Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D7940

7 years agoCapsicum-ize soelim(1).
bapt [Sun, 18 Sep 2016 16:25:41 +0000 (16:25 +0000)]
Capsicum-ize soelim(1).

As a trick to be able to access all files passed in arguments (readonly) within
the sandbox we first open the root directory, then consider all files as
relative to this file descriptor.

This might be improved once casper add supports for filesystem.

MFC after: 1 month
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D7936

7 years agoUse the proper word
bapt [Sun, 18 Sep 2016 15:55:57 +0000 (15:55 +0000)]
Use the proper word

Reported by: danfe

7 years agoApparently we are supposed to use 2 spaces after full stop
bapt [Sun, 18 Sep 2016 15:51:34 +0000 (15:51 +0000)]
Apparently we are supposed to use 2 spaces after full stop

Reported by: danfe

7 years agoModify manually given makeman is broken due to errors in share/mk/*
bapt [Sun, 18 Sep 2016 15:40:36 +0000 (15:40 +0000)]
Modify manually given makeman is broken due to errors in share/mk/*

7 years agoRemove cruft that accidently crept in r305931
bapt [Sun, 18 Sep 2016 15:06:28 +0000 (15:06 +0000)]
Remove cruft that accidently crept in r305931

7 years agoDisable GNU rcs by default
bapt [Sun, 18 Sep 2016 15:01:11 +0000 (15:01 +0000)]
Disable GNU rcs by default

All remaining tools using rcs has been switched to directly use diff3(1):
- etcupdate(8)
- freebsd-update(8)

Note that the ident(1) tool is been already replaced long ago with a BSD
licensed version, as such it remains installed.

GNU rcs is still available from ports:
- rcs: newer GPLv3 version
- rcs57: the latest version from base (GPLv2)

7 years agoIn preparation for removal of GNU rcs, replace merge(1) usage with direct
bapt [Sun, 18 Sep 2016 14:48:28 +0000 (14:48 +0000)]
In preparation for removal of GNU rcs, replace merge(1) usage with direct
diff3(1) usage

7 years agoRemove backup_uses_rcs from rc.subr
bapt [Sun, 18 Sep 2016 12:49:23 +0000 (12:49 +0000)]
Remove backup_uses_rcs from rc.subr

In preparation for the removal of GNU rcs from base, remove the backup_uses_rcs
functionality from the rc.subr backup_file feature. This functionnality was off
by default

Reviewed by: wblock
Differential Revision: https://reviews.freebsd.org/D7883

7 years agoAdd very preliminary support for CloudABI for ARMv6.
ed [Sun, 18 Sep 2016 11:36:54 +0000 (11:36 +0000)]
Add very preliminary support for CloudABI for ARMv6.

In order to make CloudABI work on ARMv6, start off by copying over the
sysvec for ARM64 and adjust it to use 32-bit registers. Also add code
for fetching arguments from the stack if needed, as there are fewer
register than on ARM64.

Also import the vDSO that is needed to invoke system calls. This vDSO
uses the intra procedure call register (ip) to store the system call
number. This is a bit simpler than what native FreeBSD does, as FreeBSD
uses r7, while preserving the original r7 into ip.

This sysvec seems to be complete enough to start CloudABI processes.
These processes are capable of linking in the vDSO and are therefore
capable of executing (most?) system calls successfully. Unfortunately,
the biggest show stopper is still that TLS is completely broken:

- The linker used by CloudABI, LLD, still has troubles with some of the
  relocations needed for TLS. See LLVM bug 30218 for more details.

- Whereas FreeBSD uses the tpidruro register for TLS, for CloudABI I
  want to make use of tpidrurw, so that userspace can modify the base
  address directly. This is needed for efficient emulation.
  Unfortunately, this register doesn't seem to be preserved across
  context switches yet.

Obtained from: https://github.com/NuxiNL/cloudabi (the vDSO)

7 years agoRemove reference of z(s)diff which was dropped before importing
bapt [Sun, 18 Sep 2016 10:06:35 +0000 (10:06 +0000)]
Remove reference of z(s)diff which was dropped before importing

7 years agohyperv/hn: Add sysctls to dynamic adjust RSS key and indirect table
sephe [Sun, 18 Sep 2016 08:19:33 +0000 (08:19 +0000)]
hyperv/hn: Add sysctls to dynamic adjust RSS key and indirect table

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7890

7 years agohyperv/hn: Don't mess up RSS key and indirect table after attachment.
sephe [Sun, 18 Sep 2016 08:10:40 +0000 (08:10 +0000)]
hyperv/hn: Don't mess up RSS key and indirect table after attachment.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7889

7 years agohyperv/hn: Put debug message under bootverbose
sephe [Sun, 18 Sep 2016 07:47:57 +0000 (07:47 +0000)]
hyperv/hn: Put debug message under bootverbose

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7875

7 years agohyperv/hn: Regroup ifnet setup code.
sephe [Sun, 18 Sep 2016 07:37:59 +0000 (07:37 +0000)]
hyperv/hn: Regroup ifnet setup code.

While I'm here, add comment along the attach DEVMETHOD.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7874

7 years agoFix LINT building.
sephe [Sun, 18 Sep 2016 07:37:00 +0000 (07:37 +0000)]
Fix LINT building.

Sponsored by: Microsoft

7 years agoSimilar to r305920, remove spurious newlines from ATF_REQUIRE_MSG calls
ngie [Sun, 18 Sep 2016 06:00:07 +0000 (06:00 +0000)]
Similar to r305920, remove spurious newlines from ATF_REQUIRE_MSG calls

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoRemove spurious newlines from atf_tc_fail calls
ngie [Sun, 18 Sep 2016 05:54:13 +0000 (05:54 +0000)]
Remove spurious newlines from atf_tc_fail calls

This changes the results from broken (incorrect) to failed (correct) on
i386

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoDon't define PACKAGE in lib/libc/tests/{iconv,net/getaddrinfo}
ngie [Sun, 18 Sep 2016 05:12:23 +0000 (05:12 +0000)]
Don't define PACKAGE in lib/libc/tests/{iconv,net/getaddrinfo}
needlessly

This is already being done by bsd.test.mk

The other subdirectory Makefiles were intentionally left alone

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoOnly chmod $TMPDIR if it's not /tmp
ngie [Sun, 18 Sep 2016 05:10:15 +0000 (05:10 +0000)]
Only chmod $TMPDIR if it's not /tmp

This is a safety belt to ensure that the /tmp sticky bit stuff doesn't
get whacked by accident if someone runs the script outright

MFC after: 1 week
X-MFC with: r305916
Sponsored by: Dell EMC Isilon

7 years ago[iwm] fix up RSSI calculations for both scan results and normal RX operations.
adrian [Sun, 18 Sep 2016 05:07:18 +0000 (05:07 +0000)]
[iwm] fix up RSSI calculations for both scan results and normal RX operations.

* hard code a noise floor of -96 for now. The noise floor update code returns
  some "interesting" values that I can't map to anything useful right now.
* Ensure a default noise floor is set - otherwise the initial scan results
  have a noise floor of '0'.
* Fix up the RSSI calculation to be correctly relative to the noise floor.
  The RSSI routines return an absolute value in dBm - so fix this up.
* Cap RSSI values appropriately.
* Ensure we pass in a 1/2 dB unit value in to net80211.

Tested:

* Intel 7260, STA mode

iwm0: <Intel Dual Band Wireless AC 7260> mem 0xf1400000-0xf1401fff irq 17 at device 0.0 on pci2
iwm0: hw rev 0x140, fw ver 16.242414.0, address xx:xx:xx:xx:xx:xx

7 years agoMake sure $TMPDIR is created with 0755 permissions
ngie [Sun, 18 Sep 2016 05:06:15 +0000 (05:06 +0000)]
Make sure $TMPDIR is created with 0755 permissions

This is required to ensure that the temporary script can be executed,
as the default mode is apparently too restrictive

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agocxgbe/t4_tom: Update the active/passive open code to support T6. Data
np [Sat, 17 Sep 2016 23:08:49 +0000 (23:08 +0000)]
cxgbe/t4_tom: Update the active/passive open code to support T6.  Data
path works as-is.

Sponsored by: Chelsio Communications

7 years agobhnd(4): Fix regression in BCM4331 SPROM pin reference counting.
landonf [Sat, 17 Sep 2016 22:18:32 +0000 (22:18 +0000)]
bhnd(4): Fix regression in BCM4331 SPROM pin reference counting.

In r304870, refcount handling was lifted out into a common OTP/SPROM code
path, but the refcount assertions in chipc_disable_sprom_pins() were not
updated accordingly; this triggered an assertion on BCM4331 devices when
releasing a SPROM pin reservation.

Approved by: adrian (mentor, implicit)

7 years agocxgbe/t4_tom: The SMAC entry for a VI is at a different location in the T6.
np [Sat, 17 Sep 2016 22:13:03 +0000 (22:13 +0000)]
cxgbe/t4_tom: The SMAC entry for a VI is at a different location in the T6.

Sponsored by: Chelsio Communications

7 years agobapt stepped down from portmgr
rene [Sat, 17 Sep 2016 21:49:11 +0000 (21:49 +0000)]
bapt stepped down from portmgr

7 years agoFix libprocstat build after r305902.
kib [Sat, 17 Sep 2016 18:14:31 +0000 (18:14 +0000)]
Fix libprocstat build after r305902.
- Use _Bool to not require userspace to include stdbool.h.
- Make extattr.h usable without vnode_if.h.
- Follow i_ump to get cdev pointer.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoReduce size of ufs inode.
kib [Sat, 17 Sep 2016 16:47:34 +0000 (16:47 +0000)]
Reduce size of ufs inode.

Remove redunand i_dev and i_fs pointers, which are available as
ip->i_ump->um_dev and ip->i_ump->um_fs, and reorder members by size to
reduce padding.  To compensate added derefences, the most often i_ump
access to differentiate between UFS1 and UFS2 dinode layout is
removed, by addition of the new i_flag IN_UFS2.  Overall, this
actually reduces the amount of memory dereferences.

On 64bit machine, original struct inode size is 176, reduced to 152
bytes with the change.

Tested by: pho (previous version)
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoCreate aliases for named virtio-console ports.
jceel [Sat, 17 Sep 2016 16:03:33 +0000 (16:03 +0000)]
Create aliases for named virtio-console ports.

Make virtio_console(4) create `/dev/vtcon/<port_name>` alias pointing
to /dev/ttyVx.y upon receiving PORT_NAME (id = 7) event over the control
queue.

Approved by: trasz
MFC after: 1 month
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D7182

7 years agoRemove all kernel uses of pcb_psl, but keep in in the struct to
bde [Sat, 17 Sep 2016 14:00:52 +0000 (14:00 +0000)]
Remove all kernel uses of pcb_psl, but keep in in the struct to
preserve the ABI and API for applications.  It was removed in the port
to amd64, but was remained as garbage giving a micro-pessimization and
spurious single-step traps on i386.

pcb_psl was intended to be used just to do a context switch of PSL_I,
but this context switch was null in most or all versions, and
mis-switching of PSL_T was done instead.

Some history:
- in 386BSD-0.0, cpu_switch() ran at splhigh() and splhigh() did too
  much interrupt disabling, so interrupts were hard-disabled across
  cpu_switch() and too many other places
- in 386BSD-0.0-patchkit through FreeBSD-4 and FreeBSD-5 before
  SMPng, splhigh() did soft interrupt masking, and cpu_switch() was
  excessively cautious and did a cli at the start and a sti at the
  end to hard-disable interrupts across the switch
- SMPng replaced the spl's and cli's by spinlocks (just sched_lock?),
  so interrupts were hard-disabled across cpu_switch() and too many
  other places again
- initial attempts to fix this intended to restore some soft
  interrupt disabling, but to support variations in this cpu_switch()
  used pushfl/popfl into pcb_psl to avoid hard-coding the assumption
  that the initial and final states have PSL_I enabled.  But the
  version with soft interrupt disabling wasn't used for long, or was
  never committed, (except I always used my different version of it
  for UP) so the pushfl/popl and pcb_psl to hold them have been doing
  less than nothing for about 14 years.

7 years agoAdd virtio-console support to bhyve.
jceel [Sat, 17 Sep 2016 13:48:01 +0000 (13:48 +0000)]
Add virtio-console support to bhyve.

Adds virtio-console device support to bhyve, allowing to create
bidirectional character streams between host and guest.

Syntax:
-s <slotnum>,virtio-console,port1=/path/to/port1.sock,anotherport=...

Maximum of 16 ports per device can be created. Every port is named
and corresponds to an Unix domain socket created by bhyve. bhyve
accepts at most one connection per port at a time.

Limitations:
- due to lack of destructors of in bhyve, sockets on the filesystem
  must be cleaned up manually after bhyve exits
- there's no way to use "console port" feature, nor the console port
  resize as of now
- emergency write is advertised, but no-op as of now

Approved by: trasz
MFC after: 1 month
Relnotes: yes
Sponsored by: iXsystems, Inc.
Differential Revision: D7185

7 years agoSilently ignore unexpected single-step traps (except for turning
bde [Sat, 17 Sep 2016 11:43:51 +0000 (11:43 +0000)]
Silently ignore unexpected single-step traps (except for turning
off single-stepping).  Only do this on arches (only x86 so far)
which classify single-step traps unambiguously.

This allows other parts of the kernel to be intentionally and
unintentionally sloppy about generating single-step traps.  On
x86, at least the following places were unintentionally sloppy:
- all operations that context-switched [er]flags.  Especially
  spinlock_enter()/exit() and cpu_switch().  When single-stepped,
  saving the flags leaves PSL_T set in the saved flags, so
  restoring gives a trap that is spurious if it occurs after
  single-step mode has been left.  Switching contexts away from
  a low priority thread gives especially long-lived saved copies.
- the vm86 emulation allows user mode to set PSL_T.  This was
  correct until vm86 bios call mode was unintentionally given
  access to kdb handling its single-step traps.
Now these places are intentionally sloppy, but unexpected
debugger traps still cause panics if no debugger that handles
the trap is attached when the trap is delivered.

7 years agoImplement BLKSSZGET ioctl for the Linuxulator.
dchagin [Sat, 17 Sep 2016 08:10:01 +0000 (08:10 +0000)]
Implement BLKSSZGET ioctl for the Linuxulator.

PR: 212700
Submitted by: Erik Cederstrand
Reported by: Erik Cederstrand
MFC after: 1 week

7 years ago[net80211] add a HT method to populate HTCAP based on IBSS requirements.
adrian [Sat, 17 Sep 2016 05:44:57 +0000 (05:44 +0000)]
[net80211] add a HT method to populate HTCAP based on IBSS requirements.

IBSS negotiation is a subset of the STA/AP negotiation.  We always have a
current channel, so base the HT capabilities on the current channel.
This is then put into IBSS probe requests to inform peers of our
11n capabilities.

7 years agoIncrease the boot1 file size on the HFS boot image.
jhibbits [Fri, 16 Sep 2016 22:51:37 +0000 (22:51 +0000)]
Increase the boot1 file size on the HFS boot image.

The boot1.elf is too fat for 30k, it's not 32k on powerpc64, and 34k on powerpc.
Without this, boot1 will fail with odd behaviors.

MFC after: 1 day

7 years agoRemove generated files that shouldn't have been added
andrew [Fri, 16 Sep 2016 15:25:44 +0000 (15:25 +0000)]
Remove generated files that shouldn't have been added

Reported by: cognet
Sponsored by: The FreeBSD Foundation

7 years agoImport the Linaro Cortex Strings library from
andrew [Fri, 16 Sep 2016 15:19:31 +0000 (15:19 +0000)]
Import the Linaro Cortex Strings library from
https://git.linaro.org/toolchain/cortex-strings.git

Sponsored by: The FreeBSD Foundation

7 years agoUpdate history. Patch supplied by Sevan Janiyan <venture37@geeklan.co.uk>.
wblock [Fri, 16 Sep 2016 14:23:16 +0000 (14:23 +0000)]
Update history.  Patch supplied by Sevan Janiyan <venture37@geeklan.co.uk>.

PR: 181390
Submitted by: ksmakoto@dd.iij4u.or.jp
MFC after: 1 week

7 years agomlx5en: Fix duplicate mbuf free-by-code.
hselasky [Fri, 16 Sep 2016 11:57:48 +0000 (11:57 +0000)]
mlx5en: Fix duplicate mbuf free-by-code.

When mlx5e_sq_xmit() returns an error code and the mbuf pointer is set,
we should not free the mbuf, because the caller will keep the mbuf in
the drbr. Make sure the mbuf pointer is correctly set upon function
exit.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agomlx5en: Remove unused pdev pointer.
hselasky [Fri, 16 Sep 2016 11:55:38 +0000 (11:55 +0000)]
mlx5en: Remove unused pdev pointer.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agomlx5en: Verify port type is ethernet before creating network device
hselasky [Fri, 16 Sep 2016 11:53:53 +0000 (11:53 +0000)]
mlx5en: Verify port type is ethernet before creating network device

Else the mlx5en driver might attach to infiniband ports.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agomlx5en: Allow setting the software MTU size below 1500 bytes
hselasky [Fri, 16 Sep 2016 11:51:31 +0000 (11:51 +0000)]
mlx5en: Allow setting the software MTU size below 1500 bytes

The hardware MTU size can't be set to a value less than 1500 bytes due
to side-band management support. Allow setting the software MTU size
below 1500 bytes, thus creating a mismatch between hardware and
software MTU sizes.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agomlx5en: Factor out common sendqueue code for use with rate limiting SQs.
hselasky [Fri, 16 Sep 2016 11:47:16 +0000 (11:47 +0000)]
mlx5en: Factor out common sendqueue code for use with rate limiting SQs.

Try to reuse code to setup sendqueues when possible by making some static
functions global. Further split the mlx5e_close_sq_wait() function to
separate out reusable parts.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agomlx5en: Properly declare doorbell lock for 32-bit CPUs.
hselasky [Fri, 16 Sep 2016 11:45:35 +0000 (11:45 +0000)]
mlx5en: Properly declare doorbell lock for 32-bit CPUs.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agomlx5en: Optimise away duplicate UAR pointers.
hselasky [Fri, 16 Sep 2016 11:40:45 +0000 (11:40 +0000)]
mlx5en: Optimise away duplicate UAR pointers.

This change also reduces the size of the mlx5e_sq structure so that the last
queue_state element will fit into the previous cacheline and then the mlx5e_sq
structure becomes one cacheline less for amd64.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agomlx5en: Make the mlx5e_open_cq() and mlx5e_close_cq() functions global.
hselasky [Fri, 16 Sep 2016 11:39:15 +0000 (11:39 +0000)]
mlx5en: Make the mlx5e_open_cq() and mlx5e_close_cq() functions global.

Make some functions and structures global to allow for code reuse
when creating rate limiting sendqueues.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agomlx5en: Minor completion queue control path code refactor.
hselasky [Fri, 16 Sep 2016 11:37:35 +0000 (11:37 +0000)]
mlx5en: Minor completion queue control path code refactor.

Move setting of CQ moderation mode together with the other
CQ moderation parameters. Pass completion event vector as
a separate argument to mlx5e_open_cq(), because its value is
different for each call. Pass mlx5e_priv pointer instead of
mlx5e_channel pointer so that code can be used by rate
limiting sendqueues.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agomlx5en: Separate the sendqueue from using the mlx5e_channel structure.
hselasky [Fri, 16 Sep 2016 11:35:45 +0000 (11:35 +0000)]
mlx5en: Separate the sendqueue from using the mlx5e_channel structure.

This change allows for reusing the transmit path for so called
rate limited senqueues. While at it optimise some pointer lookups
in the fast path.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoUpdate the MLX5 core module:
hselasky [Fri, 16 Sep 2016 11:28:16 +0000 (11:28 +0000)]
Update the MLX5 core module:
- Add new firmware commands and update existing ones.
- Add more firmware related structures and update existing ones.
- Some minor fixes, like adding missing \n to some prints.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoFix decoding of tf_rsp on amd64, and move TF_HAS_STACKREGS() to the
bde [Fri, 16 Sep 2016 07:09:35 +0000 (07:09 +0000)]
Fix decoding of tf_rsp on amd64, and move TF_HAS_STACKREGS() to the
i386-only section, and fix a comment about the amd64 kernel trapframe
not having stackregs.

tf_rsp doesn't need decoding on amd64, but had an old clone of i386
code to do this in 1 place, and since the amd64 kernel trapframe does
have stackregs, the result was an off-by-16 error for %rsp in an error
message.

7 years agoStatically initialize the run mode to the one that will become
bde [Fri, 16 Sep 2016 06:31:10 +0000 (06:31 +0000)]
Statically initialize the run mode to the one that will become
current on first entry.  This fixes a spurious "Stepping aborted"
message when the first entry is for a breakpoint.

Don't reset to the run mode to STEP_NONE when stopping, and remove
STEP_NONE.  This mode was never really used, except transiently to
mis-decide whether to print the message on first entry.

7 years agoInvert calloc(3) argument order.
araujo [Fri, 16 Sep 2016 05:33:08 +0000 (05:33 +0000)]
Invert calloc(3) argument order.

Reviewed by: ed.
MFC after: 4 weeks.
Differential Revision: https://reviews.freebsd.org/D7902

7 years ago(1) Ifdef the new dr6 variable for KDB.
bde [Fri, 16 Sep 2016 04:58:37 +0000 (04:58 +0000)]
(1) Ifdef the new dr6 variable for KDB.

While here, avoid using the old variable 'code' and remove it
in trap().  ('code' was meant for holding things like %dr6,
but is too small to hold %dr6 on amd64 and was reduced to an
obfuscation of tf_err, with early truncation on amd64.)

Submitted by: Michael Butler (imb@...)