Commit Graph

218512 Commits

Author SHA1 Message Date
Navdeep Parhar
5a8b662ea6 cxgbe(4): Fix typo in an unused macro.
MFC after:	3 days
Sponsored by:	Chelsio Communications
2016-12-16 06:30:07 +00:00
Navdeep Parhar
07b5fdfd01 cxgbe(4): Changes to the default T6 firmware configuration file.
- Disable features that are not supported or not used on FreeBSD.
- Increase the RSS table slice per interface.
- Increase the share of the TCAM reserved for filtering.

MFH:		2 weeks
Sponsored by:	Chelsio Communications
2016-12-16 06:25:51 +00:00
Justin Hibbits
8d58dade1a Fix disassembly by adding back some deleted lines.
When importing for r309309, as part of conflict resolution, too much extra was
removed, resulting in bad disassembly for branches.  Correct this.

Also re-apply the 0->NULL change from r298052.

X-MFC-With:	r309309
2016-12-16 04:47:29 +00:00
Adrian Chadd
df85a9edd9 Bump FreeBSD_version . 2016-12-16 04:44:46 +00:00
Adrian Chadd
7aebd3e55d [net80211] sigh, course I would miss a commit from the 11ac prep commit. 2016-12-16 04:44:14 +00:00
Adrian Chadd
fdbc9e6e82 [net80211] start laying down the foundation for 11ac support.
This is a work in progress and some of this stuff may change;
but hopefully I'm laying down enough stuff and space in fields
to allow it to grow without another major recompile.

We'll see!

* Add a net80211 PHY type for VHT 2G and VHT 5G.

  Note - yes, VHT is supposed to be for 5GHZ, however some vendors
  (*cough* most of them) support some subset of VHT rate support
  in 2GHz.  No - not 80MHz wide channels, but at least some MCS8-9
  support, maybe some beamforming, and maybe some longer A-MPDU
  aggregates.  I don't want to even think about MU-MIMO on 2GHz.

* Add an ifmedia placeholder type for VHT rates.

* Add channel flags for VHT, VHT20/40U/40D/80/80+80/160
* Add channel macros for the above
* Add ieee80211_channel fields for the VHT information and flags,
  along with some padding (so this struct definitely grows.)
* Add a phy type flag for VHT - 'v'

* Bump the number of channels to a much higher amount - until we get
  something like the linux mac80211 chanctx abstraction (where the
  stack provides a current channel configuration via callbacks,
  versus the driver ever checking ic->ic_curchan or similar) we'll
  have to populate VHT+HT combinations.

Eg, there'll likely be a full set of duplicate VHT20/40 channels to match
HT channels.  There will also be a full set of duplicate VHT80 channels -
note that for VHT80, its assumed you're doing VHT40 as a base, so we
don't need a duplicate of VHT80 + 20MHz only primary channels, only
a duplicate of all the VHT40 combinations.

I don't want to think about VHT80+80 or VHT160 for now - and I won't,
as the current device I'm doing 11ac bringup on (QCA9880) only does
VHT80.

I'll likely revisit the channel configuration and scanning related
stuff after I get VHT20/40 up.

* Add vht flags and the basic MCS rate setup to ieee80211com, ieee80211vap
  and ieee80211_node in preparation for 11ac configuration.
  There is zero code that uses this right now.
* Whilst here, add some more placeholders in case I need to extend
  out things by some uint32_t flag sized fields.  Hopefully I won't!

What I haven't yet done:

* any of the code that uses this
* any of the beamforming related fields
* any of the MU-MIMO fields required for STA/AP operation
* any of the IE fields in beacon frame / probe request/response handling
  and the calculations required for shifting beacon contents around
  when the TIM grows/shrinks

This will require a full rebuild of net80211 related programs -
ifconfig, hostapd, wpa_supplicant.
2016-12-16 04:43:31 +00:00
Justin Hibbits
fa133b6bf0 Use the right bitwise OR operation for clearing single-step at trap time.
DBCR0_IDM || DBCRO_IC yields 1, which in this register is DBCR0_FT, not what we
want.
Reported by:	Mark Millard
MFC after:	2 weeks
2016-12-16 04:38:53 +00:00
Conrad Meyer
1ea1b27578 ident(1): Capsicumify
Preopen input file list before entering Capsicum capability mode.

Feedback by:	allanjude@, bapt@, emaste@ (earlier versions)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7918
2016-12-16 02:09:48 +00:00
Conrad Meyer
280dd9fc2e iconv(1): Capsicumify
This takes the usual shortcut of only sandboxing the last input file.
It's a first cut and this program will be easy to adapt to sandbox all
files in the future.

iconv(1) has been changed to only open the conversion descriptor once,
since the input and output encodings are fixed over all inputs.
Instead, the descriptor is simply reset after each use (documented in
iconv(3) API).

Reviewed by:	no one, unfortunately
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7917
2016-12-16 02:06:34 +00:00
Conrad Meyer
327240c75f hexdump(1): First cut capsicumification
For now, only enter the sandbox for the last file processed (including
stdin for zero-argument mode).

Sandboxing all inputs will require a little restructuring of the
program.

Feedback by:	emaste@ (earlier versions)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7915
2016-12-16 02:03:40 +00:00
Conrad Meyer
208a859459 ktrdump(8): Capsicumify
We restrict the (optional) input file and output files. It would be
nice to restrict the KVM files, but that's up to libkvm.

We wait until after kvm_nlist() is invoked to cap_enter() because
kldsym() isn't supported in the Capsicum sandbox.

Feedback from:	emaste@ (earlier versions)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7921
2016-12-16 01:59:28 +00:00
Conrad Meyer
20502a13a0 ministat(1): Capsicumify
Separate dataset opening from reading/parsing. The number of input
files is already capped to a small number, so just open all input files
before sandboxing.

Feedback from:	allanjude@ (earlier version), emaste@ (earlier version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7925
2016-12-16 01:51:12 +00:00
Conrad Meyer
9716e7d4e4 dma-mbox-create: Restrict with Capsicum
The restriction here is pretty late and pretty minimal. We need a lot
of authority to open password databases, and don't do much after that
point.

Feedback from:	lifanov at mail.lifanov.com (earlier version), emaste (earlier version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7988
2016-12-16 01:48:55 +00:00
Conrad Meyer
941e22d17d Capsicumify last(1)
Reviewed by:	ed (earlier version), emaste (earlier version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8001
2016-12-16 01:47:08 +00:00
Conrad Meyer
ec055aeff5 vfprintf(3): Add support for kernel %b format
This is a direct port of the kernel %b format.

I'm unclear on if (more) non-portable printf extensions will be a
problem. I think it's desirable to have userspace formats include all
kernel formats, but there may be competing goals I'm not aware of.

Reviewed by:	no one, unfortunately
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8426
2016-12-16 01:44:50 +00:00
Conrad Meyer
93326017f6 gelf_getphdr: Allow extended indices
Needed for 'readelf -l' of extended phnum files.  (Parity with GNU
binutils.)

Reviewed by:	no one, unfortunately
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8703
2016-12-16 01:42:51 +00:00
Conrad Meyer
1d1bfbbb38 libelf: Fix extended numbering detection
Extended numbering is used for any of these fields overflowing.

Reviewed by:	emaste@
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8701
2016-12-16 01:39:06 +00:00
Conrad Meyer
6a1c4d1efc capsicum_helpers: Add LOOKUP flag
Add a helper routine for opening a directory that is restricted to being
used for opening relative files as stdio streams.

I think this will really help basic adaptation of multi-file programs to
Capsicum. Rather than having each program initialize a rights object and
ioctl/fcntl arrays for their root fd for relative opens, consolidate in the
logical place.

Reviewed by:	oshogbo@
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8743
2016-12-16 01:37:44 +00:00
Pedro F. Giffuni
6e183b4b25 libbfd: make sure variables are initialized before using them.
Initialize l_sec_contents to make sure that free(l_sec_contents) is called
on valid pointers.

Obtained from:	OpenBSD (partial CVS rev 1.18)
MFC after:	5 days
2016-12-16 00:35:59 +00:00
Pedro F. Giffuni
d90714d2c5 libbfd: drop unnecessary variable increment.
Do not increment `s' before it is initialized. At the time
of the increment, `s' is otherwise unused anyway.

Obtained from:	OpenBSD (CVS rev 1.11)
2016-12-16 00:23:59 +00:00
Adrian Chadd
26eae5c681 [ar933x] don't waste memory/flash; drop the UMTX_CHAINS count down to 16. 2016-12-16 00:04:32 +00:00
Ed Maste
602f95d4c4 Add WITH_REPRODUCIBLE_BUILD src.conf(5) knob to disable kernel metadata
The kernel builds reproducibly, except for the time, date, user, and
hostname baked into the kernel (reported at startup and via the
kern.version sysctl for uname).  Add a build knob to disable the
inclusion of this metadata.

Reviewed by:	jhb
MFC after:	1 month
Relnotes:	Yes
Sponsored by:	Reproducible Builds World Summit 2, Berlin
Differential Revision:	https://reviews.freebsd.org/D8809
2016-12-15 21:26:58 +00:00
Andrew Turner
6eef858694 Add -fPIC to the ubldr build. Without this the self relocation code will
try to use an absolute address in a switch statement, jumping to an invalid
memory location.

Sponsored by:	ABT Systems Ltd
2016-12-15 17:36:54 +00:00
Emmanuel Vadot
74b66ae149 Fix building arm64 kernel after r310117
Pointy hat: me

MFC after:	3 days
2016-12-15 17:26:16 +00:00
Alan Somers
f698b621da Fix ls_tests:o_flag with ZFS TMPDIR
Unlike UFS or TMPFS, ZFS sets uarch automatically whenever a file is
updated. The test must explicitly clear uarch to be portable across
filesystems. Also, it doesn't need to run as root.

PR:		215179
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D8741
2016-12-15 16:13:52 +00:00
Emmanuel Vadot
15b2342cf3 Add information about interrupts in the Allwinner padconf files and
correct some pin numbering.

While here switch to my freebsd mail address in the copyright.

MFC after:	3 days
2016-12-15 15:52:13 +00:00
Ed Schouten
669a25b50d Document the existence of the {0, 6, ...} sysctl. 2016-12-15 15:45:11 +00:00
Martin Matuska
8e86d3576b Update vendor/libarchive to git to 30528ed7a9f479f1c363ee8cfa1c5eb4c7d9be10
Vendor bugfixes:

PR 826: OpenSSL 1.1 support
PR 830, 831, 833: Spelling fixes
OSS-Fuzz 227, 230, 239: Fix possible memory leak in archive_read_free()
OSS-Fuzz 237: Fix heap buffer overflow when reading invalid ar archives
2016-12-15 15:35:53 +00:00
Ed Maste
e77cf5967a newvers.sh: correct typo in comment
Submitted by:	lidl
2016-12-15 15:14:02 +00:00
Andrew Turner
cf1db37a45 Directly include openfirm.h rather than through fdt_common.h as none of the
latter file is needed.

Sponsored by:	ABT Systems Ltd
2016-12-15 13:31:44 +00:00
Ed Maste
7e9de36c3a newvers.sh: add option to eliminate kernel build metadata
Build metadata (username, hostname, etc.) prevents the FreeBSD kernel
from building reproducibly. Add an option to disable inclusion of that
metadata but retain the release information and SVN/git VCS details.
See https://reproducible-builds.org/ for additional background.

Reviewed by:	bapt
Obtained from:	NetBSD
MFC after:	1 month
Sponsored by:	Reproducible Builds World Summit 2, Berlin
Differential Revision:	https://reviews.freebsd.org/D4347
2016-12-15 12:57:03 +00:00
Alexander Motin
c5f74c4873 Revert r310023 for now.
After another look my new variable mapping was not exactly right.
2016-12-15 08:03:16 +00:00
Sepherosa Ziehau
9622c93ae8 hyperv: Allow userland to ro-mmap reference TSC page
This paves way to implement VDSO for the enlightened time counter.

Reviewed by:	kib
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8768
2016-12-15 03:32:24 +00:00
Navdeep Parhar
1de8c69de7 cxgbe(4): Deal with compressed error vectors.
MFC after:	3 days
Sponsored by:	Chelsio Communications
2016-12-15 02:05:29 +00:00
Konstantin Belousov
a1e9a3bba3 Provide introductory description of the default pager.
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-12-14 23:36:32 +00:00
Konstantin Belousov
a41ece0840 Remove locking around accounting initialization of the default object.
The object is not yet fully constructed and must not be available to
other threads.  This makes default_pager_alloc() almost identical to
swap_pager_alloc_init().

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-12-14 23:34:25 +00:00
Jilles Tjoelker
b9a6fb9343 reaper: Make REAPER_KILL_SUBTREE actually work.
MFC after:	2 weeks
2016-12-14 22:49:20 +00:00
Brooks Davis
facc3cb0ff Use nmount(2) rather than the obsolete mount(2).
Reviewed by:	cem
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8513
2016-12-14 21:30:44 +00:00
Brooks Davis
b32720888a Add a free_iovec() function to reset iovec's.
The primary purpose is to call nmount() in a loop with new iovec's so
free_iovec takes arguments by reference and resets their values.

Reviewed by:	cem
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8513
2016-12-14 21:26:43 +00:00
Pedro F. Giffuni
f50fae318d ed(1): drop redundant parenthesis.
These were Left-over from the cleanup in r309936.
2016-12-14 21:14:43 +00:00
Brooks Davis
9dad1250d7 Mount filesystems without executable permissions since they should never
be used.

Reviewed by:	cem
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8513
2016-12-14 21:13:10 +00:00
Andriy Voskoboinyk
bdad1bcea4 ifconfig: do not truncate SSID in verbose mode.
Fix 32-character SSID abbreviation for 'ifconfig -v wlan0 scan' command.

PR:		215301
Submitted by:	<ms-freebsd-bugzilla@stoffnet.at>
MFC after:	4 days
2016-12-14 21:12:43 +00:00
Brooks Davis
176d3efd2b Put the undocumented df feature of mounting filesystems from device nodes
under an ifdef.  Leave enabled.

Reviewed by:	cem
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D8513
2016-12-14 21:11:42 +00:00
Rene Ladan
e61e40a204 Add adamw, feld and rene to the portmgr organization 2016-12-14 20:53:46 +00:00
Dimitry Andric
085def3f0a In xbd_connect(), use correct scanf conversion specifiers for the
feature_barrier and feature_flush variables.  Otherwise, adjacent
variables on the stack, such as sector_size, may be overwritten, with
disastrous results.

Note that I did not see a good reason to revert the addition of zero
checks introduced in r310013.  Better safe than sorry.

PR:		215209
Tested by:	royger
MFC after:	3 days
2016-12-14 19:28:19 +00:00
Mark Johnston
90556839e9 Skip a ustack test that triggers an assertion on INVARIANTS kernels.
Reported by:	ngie
Sponsored by:	Dell EMC Isilon
X-MFC-With:	r309698
2016-12-14 19:01:43 +00:00
Mark Johnston
f85ea63d69 Don't run the MCA record refill task during boot.
The MCA taskqueue is not initialized until some time after CMCIs are
enabled on the BSP.

Reviewed by:	cem, jhb
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8783
2016-12-14 19:00:08 +00:00
Alan Cox
3d026d871f Tidy up. Mostly, remove or replace stale comments. Most of the comments
in this file actually described the operation of the swap pager, not the
default pager.  Given that this is the wrong place to discuss the
implementation of the swap pager, it shouldn't come as a surprise that as
the swap pager evolved these comments became increasingly stale.  In
addition, apply some style fixes, like modernizing a few remaining old-
style function definitions.

Reviewed by:	kib, markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D8781
2016-12-14 17:28:55 +00:00
Emmanuel Vadot
2b0f0faeb6 Add new compatible string "allwinner,sun7i-a20-mmc".
New upstream DTS is using this now for A20 SoC.

MFC after:	3 days
2016-12-14 15:00:24 +00:00
Hans Petter Selasky
d3e8d4784d Fix initialisation of mlx4_pci_table's .driver_data fields.
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D8791
Sponsored by:		Mellanox Technologies
Submitted by:		Dexuan Cui <decui@microsoft.com>
2016-12-14 14:13:44 +00:00