Commit Graph

114813 Commits

Author SHA1 Message Date
Ed Maste
cd03a7b7ce libmd: add noexec stack annotation in skein_block_asm.s
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2017-01-07 19:26:25 +00:00
Nikolai Lifanov
1c1cb6e087 Restore priority value for OGIO_KEYMAP
PR:		206678
Submitted by:	ecturt@gmail.com
Reviewed by:	cem
Approved by:	cem, matthew (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5095
2017-01-07 15:58:57 +00:00
Konstantin Belousov
c9eddd660c Define _POSIX_PRIORITY_SCHEDULING as 0.
sched_*(2) syscalls might be not available at runtime.  Defining this
constant as zero directs POSIX-compliant code to call sysconf(3) to
detect the feature at runtime, and forces libc sysconf(3) to ask
kernel.

Noted by:	ngie
Reviewed by:	jilles, ngie
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D9055
2017-01-07 12:24:45 +00:00
Andrew Rybchenko
6a09b20655 sfxge(4): allow DMA descs to cross 4k boundary on EF10
Siena has limitation on maximum byte count and 4k boundary crosssing
(which is stricter than maximum byte count).
EF10 has limitation on maximum byte count only.

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9061
2017-01-07 10:55:38 +00:00
Andrew Rybchenko
1eec14756f sfxge(4): treat EFX_LINK_UNKOWN as link down
It is safer to consider EFX_LINK_UNKNOWN as link down.
link_mode is set to EFX_LINK_UNKNOWN on port stop and fini.

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9060
2017-01-07 10:52:02 +00:00
Andrew Rybchenko
f788eb2dd6 sfxge(4): use SFXGE_LINK_UP() to report link up state
Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9059
2017-01-07 10:51:12 +00:00
Alexander Motin
54644e21e8 Make 'camcontrol modepage' support subpages.
MFC after:	2 weeks
2017-01-07 09:56:12 +00:00
Adrian Chadd
8e71a4aa83 [net80211] add syncflags methods for the VHT flags configuration.
I missed this in my last commit.  Pointy hat to me.
2017-01-07 07:35:27 +00:00
Adrian Chadd
4222790f35 [net80211] add some more bits. 2017-01-07 02:16:48 +00:00
Adrian Chadd
35bcfd1c70 [net80211] add VHT ioctl parameters and driver capabilities
* Add the VHT capability element to the driver capabilities so ifconfig
  can see if VHT is available
* Add ioctl plumbing for enabling/disabling VHT and each of the VHT
  widths.

Note: this DOES change the ABI (the driver caps ioctl struct size, sigh)
so this will require a recompile of at least ifconfig.
2017-01-07 01:59:39 +00:00
Adrian Chadd
55c68c64a4 [net80211] add VHT IEs to scan elements.
In preparation for VHT station support, we need to store VHT IEs when
scanning so we can choose to upgrade to VHT.

This doesn't change the ABI - it just steals spare[] entries.
2017-01-07 01:54:32 +00:00
Adrian Chadd
6d0ef1b905 [net80211] add VHT node flag; parsed chanwidth.
The VHT operational element (VHTOPMODE) isn't a uint32_t - it's
the MCS sets, freq1/freq2 parameters and channel width.
So, store the channel width too in lieu of just storing the
IE struct.

This changes the VHT parameter layout in ieee80211_node but it
doesn't change ABI at all.
2017-01-07 01:53:27 +00:00
Adrian Chadd
02527029a5 [net80211] add FVHT flags for channel widths.
The 11n code uses these bits for both configuration /and/ controlling
the channel width on softmac chips - it uses it to find the widest
width for all VAPs (eg a HT20 vap and a HT40 vap) to know what to
configure the ic_curchan.

For fullmac devices it isn't /as/ important, as each virtual device
exposed by the firmware will likely have its own configuration and the
firmware figures out what to do to enable it.
2017-01-07 01:51:54 +00:00
Adrian Chadd
efda3f5684 [net80211] Remove duplicate VHTOPMODE configuration bits.
These came from Linux mac80211 headers and are configuration bits, not
VHTOPMODE field parameters.

Whilst here, add the field names for the VHTCAP bits.

Tested:

* ath10k, 11ac STA mode
2017-01-07 01:49:34 +00:00
Navdeep Parhar
e4612db2cd Fix comment in t4_tom. No functional change.
MFC after:	3 days
2017-01-07 00:08:55 +00:00
John Baldwin
14da48cbe4 Set MORETOCOME for AIO write requests on a socket.
Add a MSG_MOREOTOCOME message flag. When this flag is set, sosend*
set PRUS_MOREOTOCOME when invoking the protocol send method. The aio
worker tasks for sending on a socket set this flag when there are
additional write jobs waiting on the socket buffer.

Reviewed by:	adrian
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D8955
2017-01-06 23:41:45 +00:00
John Baldwin
69b4d461be Enable /usr/lib32 for o32 binaries on mips64.
Build and install an o32 set of libraries on mips64 suitable for
running o32 binaries via COMPAT_FREEBSD32. Enable COMPAT_FREEBSD32 in
MALTA64.

Reviewed by:	jmallett, imp
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D9032
2017-01-06 23:30:54 +00:00
Mateusz Guzik
3b622fc857 tmpfs: perform a lockless check in tmpfs_itimes
Most of the time the status is 0 as the function is repeatedly
called from tmpfs_getattr.
2017-01-06 19:58:20 +00:00
Jung-uk Kim
172ae88fec Remove '-vd' option to make iasl(8) reproducible.
PR:		215421
2017-01-06 18:08:53 +00:00
Mateusz Guzik
31e73fd434 tmpfs: enabled MNTK_EXTENDED_SHARED
Discussed with:	kib
2017-01-06 18:01:46 +00:00
Konstantin Belousov
5dc1128656 Lock tmpfs node tn_status updates done under the shared vnode lock.
If tmpfs vnode is only shared locked, tn_status field still needs
updates to note the access time modification.  Use the same locking
scheme as for UFS, protect tn_status with the node interlock + shared
vnode lock.

Fix nearby style.

Noted and reviewed by:	mjg
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-06 17:43:36 +00:00
Konstantin Belousov
305b422966 Use vnode lock assertion expression, and upgrade it to assert the
required exclusive state of the vnode lock in tmpfs chflags, chmod,
chown, chsize, chtimes operations.

Fix nearby style.

Reviewed by:	mjg
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-06 17:32:44 +00:00
Konstantin Belousov
9a4d5dbbac Remove dead code.
Fifos overwrite file ops vector, and fifo VOP_KQFILTER is VOP_PANIC().

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-06 17:03:08 +00:00
Konstantin Belousov
1c32456953 Use type-independent formats for printing nlink_t and ino_t.
Extracted from:	ino64 work by gleb, mckusick
Discussed with:	mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-06 16:59:33 +00:00
Konstantin Belousov
6e89d383c7 Explicitely add "opt_compat.h" to kern_exec.c: fix powerpc LINT builds.
sys/ptrace.h includes sys/signal.h, which includes sys/_sigset.h.
Note that sys/_sigset.h only defines osigset_t if COMPAT_43 was defined.

Two lines later, sys/ptrace.h includes machine/reg.h, which in case of
powerpc, includes opt_compat.h.

After the include headers reordering in r311345, we have sys/ptrace.h
included before sys/sysproto.h.

If COMPAT_43 was requested in the kernel config, the result is that
sys/_sigset.h does not define osigset_t, but sys/sysproto.h sees
COMPAT_43 and uses osigset_t.

Fix this by explicitely including opt_compat.h to cover the whole
kern/kern_exec.c scope.

Sponsored by:	The FreeBSD Foundation
2017-01-06 16:56:24 +00:00
Kevin Lo
094fba962f Add new USB device ID. 2017-01-06 14:05:31 +00:00
Sepherosa Ziehau
cc5bb78be1 if: Defer the if_up until the ifnet.if_ioctl is called.
This ensures the interface is initialized by the interface driver
before it can be used by the rest of the system.

Reviewed by:	jhb, karels, gnn
MFC after:	3 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8905
2017-01-06 05:10:49 +00:00
Gleb Smirnoff
9565357905 Use getsock_cap() instead of fgetsock().
Reviewed by:	dchagin
2017-01-06 04:38:38 +00:00
John Baldwin
9f0968c616 Add uintmax_t casts to silence printf format warnings.
The format strings weren't checked when stacksave_subr() used a function
pointer for printf instead of directly using db_printf().

Reported by:	kib
Sponsored by:	DARPA / AFRL
2017-01-06 00:41:30 +00:00
Alexander Kabaev
631f432b0d Remove redundant cache initialization in JZ4780 SMP startup code
This was done out of pure paranoia when hunting for bugs in cache
and is not really required.
2017-01-06 00:07:36 +00:00
Jung-uk Kim
284829482e Merge ACPICA 20161222. 2017-01-05 21:28:25 +00:00
Alexander Kabaev
f20a27e327 Use compiler driver to link BERI boot loaders
Do not hardcode elf64-tradbigmips as output format in BERI linker scrips.
Unfortunately, in-tree toolchain and external newer versions of binutils
mean two different things under that. When creating elf binaries using
external toolchain, gcc uses elf64-tradbigmips-freebsd and so linker
script file has to match in order for ld to be able to create the final loader
binary.

Rather than trying to guess, remove hardcoded output format directive from
the linker directive files and use CC to invoke the linker instead.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D9050
2017-01-05 19:17:14 +00:00
Zbigniew Bodek
2833497cae Add DTS file for Armada 385 DB-AP board
Armada38x is already supported in the tree.
This commit adds support for DB-AP board.
File was taken from Linux v4.8 and accustomed to FreeBSD
in minimal possible way.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D7327
2017-01-05 17:27:50 +00:00
Zbigniew Bodek
3471cb6e63 Add DTS file for Solidrun ClearFog board
ClearFog is equipped with Marvell Armada 388 SoC, which is already
supported in FreeBSD.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D7326
2017-01-05 17:25:16 +00:00
Hiren Panchasara
b8a2fb91f6 sysctl net.inet.tcp.hostcache.list in a jail can see connections from other
jails and the host. This commit fixes it.

PR:		200361
Submitted by:	bz (original version), hiren (minor corrections)
Reported by:	Marcus Reid <marcus at blazingdot dot com>
Reviewed by:	bz, gnn
Tested by:	Lohith Bellad <lohithbsd at gmail dot com>
MFC after:	1 week
Sponsored by:	Limelight Networks (minor corrections)
2017-01-05 17:22:09 +00:00
Konstantin Belousov
2f304845e2 Do not allocate struct statfs on kernel stack.
Right now size of the structure is 472 bytes on amd64, which is
already large and stack allocations are indesirable.  With the ino64
work, MNAMELEN is increased to 1024, which will make it impossible to have
struct statfs on the stack.

Extracted from:	ino64 work by gleb
Discussed with:	mckusick
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-05 17:19:26 +00:00
Zbigniew Bodek
2677b6e77f Correct CESA node in armada-38x.dtsi
CESA resources were invalid, what caused driver to fail
during attach call.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D8180
2017-01-05 17:14:56 +00:00
Zbigniew Bodek
414a6b11c2 Add buffer management entries to armada-38x.dtsi
Hardware buffer management entries are not used yet by FreeBSD.
They were added for compliance with Linux Armada 38x device tree
representation and will be used in future network support.

Submitted by:  Bartosz Szczepanek <bsz@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Stormshield
Differential revision: https://reviews.freebsd.org/D8179
2017-01-05 17:12:53 +00:00
Zbigniew Bodek
b3d8a7757b Include e6000sw driver in ARMADA38X configuration
e6000sw Marvell switch driver was added to files
and Armada38x kernel configuration file.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D8178
2017-01-05 17:10:52 +00:00
Zbigniew Bodek
f7c13d78db Improve ports handling in e6000sw driver
- recognize ports and vlangroups based on DTS file
- support multi-chip addresing mode (required in upcoming
  Armada-388-Clearfog support)
- refactor attachment function

Each port in 'dsa' node should have 'vlangroup' property. Otherwise,
e6000sw will fail to attach.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
		Konrad Adamczyk <ka@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D7328
2017-01-05 17:08:10 +00:00
Konstantin Belousov
607fa849d2 Some style fixes for getfstat(2)-related code.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-05 17:03:35 +00:00
Alexander Motin
f9b66e4c7d Fix bootverbose affecting code logic in r294558.
Reported by:	Jilles Tjoelker <jilles@stack.nl>
2017-01-05 16:30:13 +00:00
Adrian Chadd
4747f0df83 [net80211] correct VHT ieee80211com state bits.
* rename the ieee80211com field for vht mcsinfo to be ic_, not iv;
* add a vht config field, stealing from the spares I left there.

This doesn't change the ABI.
2017-01-05 05:03:11 +00:00
Adrian Chadd
eee8e3627b [ath_hal] mad, mad hacks to get some semblence of correct HT/40 channels populated.
The HT40 channel population logic was "just" doing pairs of channels starting with
the band entry frequency.  Trouble is, a lot of the rules start way off at 5120MHz,
which isn't a valid 5GHz channel.  Then, eg for HT40U, it would populate:

* (5120,5140)
* (5160,5180)
* (5200,5220)
* (5240,5260)

.. as the HT40U pairs, with the first being the primary channel.  Channel 36
is 5180MHz, and since it's not a primary channel here, it wouldn't populate it.
Then, the next HT40U would be 5200/5220, which is highly wrong.

HT40D had the same problem.

So, this just forces that 5GHz HT40 channels start at channel 36 (5180),
no matter what the band edge says.  This includes eg doing 4.9GHz channels.

This erm, meant that the HT40 channels for the low band was always wrong.

Oops!

Tested:

* AR9380, STA mode
* AR9344 SoC, AP mode

MFC after:	1 week
2017-01-05 04:56:04 +00:00
Adrian Chadd
f69a29b5f9 [net80211] add VHT media types in the media layer. 2017-01-05 04:49:23 +00:00
Mark Johnston
8d65cba217 Remove a redundant use of min().
Reported by:	rpokala
X-MFC With:	r311346
2017-01-05 03:13:45 +00:00
Ravi Pokala
d3c06026c2 In the same vein as r311350, fix whitespace in handling of XPT_PATH_INQ in
several more drivers.

Sponsored by:	Panasas
2017-01-05 03:08:57 +00:00
Ravi Pokala
fa2c752c00 Fix whitespace in handling of XPT_PATH_INQ in adw(4).
Came across this while doing some other minor CAM cleanup. Whitespace-only
change, so not bothering w/ a review.

Sponsored by:	Panasas
2017-01-05 02:54:03 +00:00
Kevin Lo
d01f7b29a9 In rtl8188eu, read R92C_HSSI_PARAM2(0)) register to detect whether it needs
to enable CCK high power feature or not.

Reviewed by:	avos
2017-01-05 02:04:53 +00:00
Mark Johnston
ec492b13f1 Add a small allocator for exec_map entries.
Upon each execve, we allocate a KVA range for use in copying data to the
new image. Pages must be faulted into the range, and when the range is
freed, the backing pages are freed and their mappings are destroyed. This
is a lot of needless overhead, and the exec_map management becomes a
bottleneck when many CPUs are executing execve concurrently. Moreover, the
number of available ranges is fixed at 16, which is insufficient on large
systems and potentially excessive on 32-bit systems.

The new allocator reduces overhead by making exec_map allocations
persistent. When a range is freed, pages backing the range are marked clean
and made easy to reclaim. With this change, the exec_map is sized based on
the number of CPUs.

Reviewed by:	kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D8921
2017-01-05 01:44:12 +00:00