Commit Graph

215990 Commits

Author SHA1 Message Date
Pedro F. Giffuni
8967299b33 mount(1): Simplify by using asprintf(3)
Instead of strlen() + malloc() + snprintf, just use asprintf().
No functional change.

Obtained from:	OpenBSD (CVS Rev. 1.67)
2016-09-19 18:42:58 +00:00
Andriy Voskoboinyk
07fa0846ca 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
2016-09-19 18:36:26 +00:00
Pedro F. Giffuni
0c9426b684 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)
2016-09-19 18:35:22 +00:00
Ed Maste
568415f29d tcpdump: remove sys/capability.h #include
sys/capability.h is just a backwards compatibility wrapper around
sys/capsicum.h, which is already #included.
2016-09-19 17:51:56 +00:00
Edward Tomasz Napierala
bbdd6614bd Remove unused bio_taskqueue().
MFC after:	1 month
2016-09-19 17:46:15 +00:00
Ed Schouten
cbf42683f8 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.
2016-09-19 17:31:05 +00:00
Navdeep Parhar
0459a175eb 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
2016-09-19 17:16:51 +00:00
Conrad Meyer
10cc720c25 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
2016-09-19 16:16:14 +00:00
Conrad Meyer
875cba632b 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
2016-09-19 16:14:38 +00:00
Conrad Meyer
e75a7302d3 cmp(1): Capsicumify
Reviewed by:	allanjude, bapt, oshogbo
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7912
2016-09-19 16:13:00 +00:00
Ed Maste
bd24e9a105 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
2016-09-19 16:07:32 +00:00
Konstantin Belousov
36596c2a29 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
2016-09-19 15:58:45 +00:00
Konstantin Belousov
bf9c87c813 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
2016-09-19 15:58:33 +00:00
Andrew Turner
5a3a700931 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
2016-09-19 15:08:03 +00:00
Andrew Turner
27044e1770 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
2016-09-19 14:36:16 +00:00
Andrew Turner
09a53ad8f1 Import the Linaro Cortex Strings library into contrib.
Sponsored by:	The FreeBSD Foundation
2016-09-19 13:12:09 +00:00
Enji Cooper
bddfc749fa Remove change accidentally committed via r305963 for upcoming tests/sys/fs/...
work

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2016-09-19 09:15:12 +00:00
Edward Tomasz Napierala
1f902c4a09 Make autofs use the "noatime" flag for msdosfs, ntfs, and ufs
filesystems mounted on /media.

MFC after:	1 month
2016-09-19 08:55:36 +00:00
Edward Tomasz Napierala
0d0d6e4842 Make autofs use the "async" flag for msdosfs and ufs filesystems mounted
on /media.

MFC after:	1 month
2016-09-19 08:51:27 +00:00
Sepherosa Ziehau
8377ced7ee hyperv/hn: Allow RSS capability flipping upon attach/reinit.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7927
2016-09-19 07:47:56 +00:00
Sepherosa Ziehau
12fe8fd761 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
2016-09-19 07:39:42 +00:00
Sepherosa Ziehau
6be919751f 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
2016-09-19 07:32:08 +00:00
Sepherosa Ziehau
ae75f7ee26 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
2016-09-19 07:17:43 +00:00
Enji Cooper
34ccb11831 Reindent TESTSDIR definition for consistency/readability
MFC after:		3 days
Sponsored by:		Dell EMC Isilon
2016-09-19 07:07:55 +00:00
Sepherosa Ziehau
363b7d88f6 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
2016-09-19 07:07:23 +00:00
Enji Cooper
b3ef7604b9 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
2016-09-19 06:59:17 +00:00
Sepherosa Ziehau
7547506a79 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
2016-09-19 06:46:22 +00:00
Baptiste Daroussin
3ba0c99044 Revert capsicum support
In some corner case VFS lookup is not working and I do not have time to debug
it for now.
2016-09-19 06:39:11 +00:00
Enji Cooper
97bb4528d9 Remove expected failure for :basic (effectively reverting r305007, r305031)
This no longer fails as of r305952

PR:		212193
Sponsored by:	Dell EMC Isilon
2016-09-19 06:39:08 +00:00
Enji Cooper
720ca50063 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
2016-09-19 03:02:43 +00:00
Eric Badger
5c07002e67 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
2016-09-19 02:25:30 +00:00
Konstantin Belousov
94ffabd5ce Regen. 2016-09-18 22:03:26 +00:00
Konstantin Belousov
84a30d33a3 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
2016-09-18 22:03:07 +00:00
Landon J. Fuller
f75615f26f 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
2016-09-18 21:28:09 +00:00
Ed Schouten
fd85bff53e 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
2016-09-18 20:47:55 +00:00
Ed Maste
06403dbce5 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
2016-09-18 20:23:26 +00:00
Baptiste Daroussin
e645c6addb 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
2016-09-18 19:16:48 +00:00
Baptiste Daroussin
8197e93d39 Fix building as bootstrap tools on pre-capsicum.h systems 2016-09-18 18:49:18 +00:00
Konstantin Belousov
2fb709ef75 Add comment for the closing guard.
Requested by:	tsoome
MFC after:	1 week
2016-09-18 18:40:27 +00:00
Baptiste Daroussin
452e188911 Sperify that users can find rcs and rcs57 in ports
Reported by:	cy
2016-09-18 18:27:28 +00:00
Baptiste Daroussin
160af93197 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
2016-09-18 18:03:06 +00:00
Baptiste Daroussin
b2c71bcefc style(9) fix
Reported by:	oshogbo
2016-09-18 17:56:14 +00:00
Konstantin Belousov
7d144ba6dc 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
2016-09-18 17:41:16 +00:00
Konstantin Belousov
944e0bab86 Consolidate four efi_next_descriptor() definitions.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-09-18 17:38:02 +00:00
Konstantin Belousov
35a22bcbf7 Add double-inclusion protection.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-09-18 17:35:24 +00:00
Andrey V. Elsukov
0d9cbb874c Move opcode rewriter init and destroy handlers into non-VENT code.
PR:		212576,212649,212077
Submitted by:	John Zielinski
MFC after:	1 week
2016-09-18 17:35:17 +00:00
Konstantin Belousov
bd773b6abb Remove trailing space.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2016-09-18 17:33:49 +00:00
Ed Schouten
9bc326d18b 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
2016-09-18 17:23:53 +00:00
Baptiste Daroussin
d33dad44da Capsicum-ize tee(1)
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D7940
2016-09-18 16:34:40 +00:00
Baptiste Daroussin
224d9e3ed2 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
2016-09-18 16:25:41 +00:00