Commit Graph

207833 Commits

Author SHA1 Message Date
Devin Teske
4c7395be90 Fix bad title on script (caused by copy/paste)
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r294548
2016-01-22 07:22:30 +00:00
Devin Teske
abac203368 Add scripts for watching common entry points.
MFC after:	3 days
X-MFC-to:	stable/10
2016-01-22 07:19:30 +00:00
Wojciech Macek
a8d8da1b1f Provide busdma stubs for loader/kshim
Simple bus space stubs require the VA-PA mapping
    to be identical.

Approved by:           hselasky, cognet (mentor)
Differential revision: https://reviews.freebsd.org/D4314
2016-01-22 06:26:11 +00:00
Wojciech Macek
9526c20a50 Fix compilation errors in usb/kshim
Remove old header from the include list and declare extern symbol
    for delay() function.

Approved by:           hselasky, cognet (mentor)
Differential revision: https://reviews.freebsd.org/D5012
2016-01-22 06:05:31 +00:00
Adrian Chadd
1b46803833 [flash] Teach mx25l SPI flash driver to interact with fdt_slicer and geom_flashmap
This teaches the mx25l driver (sys/dev/flash/mx25l.c) to interact with
sys/dev/fdt/fdt_slicer.c and sys/geom/geom_flashmap.c.

This allows systems with SPI flash to benefit from the possibility to define
flash 'slices' via FDT, just the same way that it's currently possible for
CFI and NAND flashes.

Tested:

* Carambola 2, AR9331 + SPI NOR flash

PR:		kern/206227
Submitted by:	Stanislav Galabov <sgalabov@gmail.com>
2016-01-22 03:15:53 +00:00
Marcelo Araujo
db891e2149 Switch from FD_SETSIZE to getdtablesize(2) as it can make the FD to be
tunable. Also it gets more close with the original implementation from
OpenBSD.

Requested by:	rodrigc
Approved by:	rodrigc (mentor)
Differential Revision:	https://reviews.freebsd.org/D4970
2016-01-22 03:02:38 +00:00
Ed Maste
ba86521396 Remove old generated unwind.h when using LLVM libunwind
When not using LLVM libunwind, unwind.h is a generated header and a stale
copy may remain in the OBJDIR after enabling LLVM libunwind. Explicitly
remove it.

Reported by:	bz
Reviewed by:	bdrewery
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5019
2016-01-22 02:28:17 +00:00
Gleb Smirnoff
33a2a37b86 - Separate sendfile(2) implementation from uipc_syscalls.c into
separate file.  Claim my copyright.
- Provide more comments, better function and structure names.
- Sort out unneeded includes from resulting two files.

No functional changes.
2016-01-22 02:23:18 +00:00
Gleb Smirnoff
d519cedbad Provide new socket option TCP_CCALGOOPT, which stands for TCP congestion
control algorithm options.  The argument is variable length and is opaque
to TCP, forwarded directly to the algorithm's ctl_output method.

Provide new includes directory netinet/cc, where algorithm specific
headers can be installed.

The new API doesn't yet have any in tree consumers.

The original code written by lstewart.
Reviewed by:	rrs, emax
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D711
2016-01-22 02:07:48 +00:00
John Baldwin
5e766348d2 Add an atomic_fetchadd_64() wrapper on sparc64.
Reviewed by:	marius
2016-01-22 00:29:11 +00:00
Gleb Smirnoff
73e263b182 Refactor TCP_CONGESTION setsockopt handling:
- Use M_TEMP instead of stack variable.
- Unroll error handling, removing several levels of indentation.
2016-01-21 22:53:12 +00:00
Gleb Smirnoff
2de3e790f5 - Rename cc.h to more meaningful tcp_cc.h.
- Declare it a kernel only include, which it already is.
- Don't include tcp.h implicitly from tcp_cc.h
2016-01-21 22:34:51 +00:00
Gleb Smirnoff
b66d74c138 Cleanup TCP files from unnecessary interface related includes. 2016-01-21 22:24:20 +00:00
Kirk McKusick
0815129dfe Update comment to note the function, prison_priv_check(), that needs to
be updated in kern_jail.c when a new priviledge is added.
2016-01-21 20:52:20 +00:00
Ed Maste
7c5f267651 Add STB_GNU_UNIQUE symbol binding definition
Red Hat created STB_GNU_UNIQUE to handle certain special cases relating
to dynamically loading C++ DSOs[1].

We don't (currently) have support for STB_GNU_UNIQUE, but ought to
reserve the value in ELFNN_ST_BIND. This will also be used by an
upcoming ELF Tool Chain import.

[1] https://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-01-21 20:44:21 +00:00
Hans Petter Selasky
c1ecb7e114 Add missing atomic wrapper macro.
Reviewed by:	alfred @
Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-01-21 18:22:50 +00:00
Alexander V. Chernikov
fa7c058bf8 Fix panic on table/table entry delete. The panic could have happened
if more than 64 distinct values had been used.

Table value code uses internal objhash API which requires unique key
  for each object. For value code, pointer to the actual value data
  is used. The actual problem arises from the fact that 'actual' e.g.
  runtime data is stored in array and that array is auto-growing. There is
  special hook (update_tvalue() function) which is used to update the pointers
  after the change. For some reason, object 'key' was not updated.
  Fix this by adding update code to the update_tvalue().

Sponsored by:	Yandex LLC
2016-01-21 18:20:40 +00:00
Brooks Davis
af6f4233fd Replace the last non-optional use of sbrk() in the tree with mmap().
All gmon want's is a region of memory without the overhead of malloc().
Just mapping some pages with mmap is an easy way to accomplish this.

Approved by:	jhb, cem, emaste
Obtained from:	CheriBSD (bf33e1e70b)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D5005
2016-01-21 18:17:19 +00:00
Hans Petter Selasky
f919b7a664 Implement 64-bit atomic operations for the LinuxKPI.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-21 17:56:23 +00:00
Hans Petter Selasky
29cbb3bef2 LinuxKPI atomic fixes:
- Fix implementation of atomic_add_unless(). The atomic_cmpset_int()
  function returns a boolean and not the previous value of the atomic
  variable.
- The atomic counters should be signed according to Linux.
- Some minor cosmetics and styling while at it.

Reviewed by:	alfred @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-21 17:52:55 +00:00
Hans Petter Selasky
1f6112d50a Use function macro instead of non-function macro to reduce chance of
incorrect expansion.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-21 17:36:06 +00:00
Brooks Davis
1e3a2e82aa Fix the implementations of PSEUDO_NOERROR and PSEUDO.
The PSEUDO* macros should not declare <syscall>, only _<syscall> and
__sys_<syscall>.  This was causing the interposing C wrappers to be
ignored due to link order.

Reviewed by:	kib
Obtained from:	CheriBSD (4e8e13c90f)
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D4097
2016-01-21 17:29:01 +00:00
Bjoern A. Zeeb
df56caeeb1 The variable is write once only and not used.
Recover the vertical space.

Sponsored by:		The FreeBSD Foundation
MFC After:		3 days
Obtained from:		p4 CH=180830
Reviewed by:		gnn, hiren
Differential Revision:	https://reviews.freebsd.org/D4898
2016-01-21 17:25:41 +00:00
Andrew Turner
252a329b5b Remove fdt_fixup_table from architectures where it's unneeded. We only make
use of fdt_fixup_table on PowerPC and ARM. As such we can remove it from
other architectures as it's unneeded.

Reviewed by:	nwhitehorn
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D5013
2016-01-21 16:48:01 +00:00
Andrew Turner
026ffbb8ed Remove an extra '!' found by clang 3.8. 2016-01-21 16:42:52 +00:00
Hartmut Brandt
5edd0d3a4d Fill the ifAlias leaf of the ifXTable with the interface description
if there is one available and it fits into the maximum size (64 characters).
2016-01-21 16:11:20 +00:00
Steven Hartland
9e055ad144 Prevent loader.conf load failure due to unknown console entries
When processing loader.conf if console contained an entry for an unsupported
console then cons_set would return an error refusing to set any console.

This has two side effects:

1. Forth would throw a syntax error and stop processing loader.conf at that
  point.
2. The value of console is ignored.

#1 Means other important loader.conf entries may not be processed, which is
   clearly undesirable.
#2 Means the users preference for console aren't applied even if they did
   contain valid options. Now we have support for multi boot paths from a
   single image e.g. bios and efi mode the console preference needs to deal
   with the need to set preference for more than one source.

Fix this by:
* Returning CMD_OK where possible from cons_set.
* Allowing set with at least one valid console to proceed.

Reviewed by:	allanjude
MFC after:	1 week
Sponsored by:	Multiplay
Differential Revision:	https://reviews.freebsd.org/D5018
2016-01-21 15:27:44 +00:00
Hans Petter Selasky
2d1bee654a Implement idr_preload(), idr_preload_end(), idr_alloc() and
idr_alloc_cyclic() in the LinuxKPI. Bump the FreeBSD version to
force recompilation of all KLDs due to IDR structure size change.

MFC after:	2 weeks
Sponsored by:	Mellanox Technologies
2016-01-21 14:57:45 +00:00
Pedro F. Giffuni
9824e4adbe ext2fs: Bring back the htree dir_index implementation.
The htree dir_index is perhaps one of the most characteristic
features of the linux ext3 implementation. It was removed
in r281670, due to repeated bug reports.

Damjan Jovanic detected and fixed three bugs and did some
stress testing by building Apache OpenOffice on top of it
so it is now in good shape to bring back.

Differential Revision:	https://reviews.freebsd.org/D5007

Submitted by:	Damjan Jovanovic
Reviewed by:	pfg
Tested by:	pho
Relnotes:	Yes
MFC after:	2 months (only 10.x)
2016-01-21 14:50:28 +00:00
Andrew Turner
9beacb6f22 Disable -mlong-calls for the clang libraries for now, it increases the
size of the clang binary for people with a crt1.o from before r293832.
2016-01-21 12:59:54 +00:00
Dag-Erling Smørgrav
0591b689c2 Update the instructions and the list of major local modifications. 2016-01-21 12:42:31 +00:00
Dag-Erling Smørgrav
a067b78c9c Explain why we don't include VersionAddendum in the debug mode banner. 2016-01-21 12:41:02 +00:00
Dag-Erling Smørgrav
fc1ba28a5c Upgrade to OpenSSH 7.1p2. 2016-01-21 11:54:34 +00:00
Dag-Erling Smørgrav
acf8e75eb0 Enable DSA keys by default. They were disabled in OpenSSH 6.9p1.
Noticed by:	glebius
2016-01-21 11:10:14 +00:00
Dag-Erling Smørgrav
ca04c57ca9 Take care not to pick up the wrong version of OpenSSL when running in an
environment that has OpenSSL from ports in addition to the base version.
2016-01-21 10:57:45 +00:00
Steven Hartland
ba76113f61 Fix EFI UFS caching
EFI was mixing caching in two separate places causing issues when multiple
partitions where tested.

Eliminate this by removing fsstat and re-factoring fsread into fsread_size,
adding basic parameter validation.

Also:
* Enhance some error print outs.
* Fix compilation under UFS1_ONLY and UFS2_ONLY
* Use sizeof on vars instead of structs.
* Add basic parameter validation to fsread_size.

MFC after:	1 week
X-MFC-With:	r293268
Sponsored by:	Multiplay
Differential Revision:	https://reviews.freebsd.org/D4989
2016-01-21 08:58:39 +00:00
Gleb Smirnoff
405b75f94c Note that new ssh(1) doesn't allow to use DSA keys by default. 2016-01-21 07:54:05 +00:00
John Baldwin
39314b7d99 AIO daemons have always been kernel processes to facilitate switching to
user VM spaces while servicing jobs.  Update various comments and data
structures that refer to AIO daemons as threads to refer to processes
instead.

Reviewed by:	kib
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D4999
2016-01-21 02:20:38 +00:00
John Baldwin
4429f0e2e3 Remove unused variables for socket AIO.
In r55943, a per-process queue of pending socket AIO requests (requests
waiting for the socket to become ready) was added so that they could be
cancelled during process rundown.  In r154765, the rundown code was
changed to handle jobs in this state (JOBST_JOBQSOCK) directly removing
the need for the extra queue.  However, the per-process queue head and
global lock were never removed.

Reviewed by:	kib
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D4997
2016-01-21 01:28:31 +00:00
Mateusz Guzik
b0632ab432 cache: minor changes
1. vhold and zap immediately instead of postponing few lines later
2. increment numneg after new entry is added

No functional changes.

No objections:		kib
2016-01-21 01:09:39 +00:00
Mateusz Guzik
baa2bcf572 cache: perform . lockup without the namecache lock
Reviewed by:	kib
2016-01-21 01:07:05 +00:00
Mateusz Guzik
db709ecbcc cache: provide a helper for computing the hash
Reviewed by:	kib
2016-01-21 01:05:41 +00:00
Mateusz Guzik
76583fa294 cache: use counter(9) API to maintain statistics
Previously the code would just increment statistics while only holding a
shared lock, in effect losing updates.

Separate tracking for nchstats is removed as values can be obtained from
existing counters. Note that some fields are updated by external
consumers and are left unfixed. This should not be a serious issue as
this structure looks quite obsolete.

No strong objections: kib
2016-01-21 01:04:03 +00:00
Navdeep Parhar
a34ec16adb iw_cxgbe: fix a couple of problems int the RDMA_TERMINATE handler.
a) Look for the CPL in the payload buffer instead of the descriptor.
b) Retrieve the socket associated with the tid with the inpcb lock held.

Submitted by:	Krishnamraju Eraparaju @ Chelsio
2016-01-21 00:42:48 +00:00
Andriy Voskoboinyk
218592ceed urtwn: add temperature calibration
Redo LC calibration if temperature changed significantly since last
calibration.

Tested with RTL8188EU/RTL8188CUS in STA mode.

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Obtained from:	NetBSD (mostly)
Differential Revision:	https://reviews.freebsd.org/D4966
2016-01-20 23:55:39 +00:00
Mateusz Guzik
17182b1351 session: avoid proctree lock on proc exit when possible
We can get away with the common case with only proc lock held.

Reviewed by:	kib
2016-01-20 23:33:58 +00:00
Andriy Voskoboinyk
01ff64089c urtwn: rework debug handling
- Use bitmap for debug output selection.
- Add few new messages (one for URTWN_DEBUG_BEACON
and another one for URTWN_DEBUG_INTR).
- Replace an undocumented URTWN_DEBUG definition with USB_DEBUG.

Tested with RTL8188EU / RTL8188CUS in IBSS / HOSTAP modes.

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4959
2016-01-20 23:27:02 +00:00
Alexander Kabaev
832b947305 Fix initlist_add_object invocation parameters.
The tail parameter should point to the last object for
which dependencies should be processed. In most cases,
this is the object itself.
2016-01-20 23:26:35 +00:00
Dag-Erling Smørgrav
0b0dd5086b Remove RCS tags from files in which we no longer have any local
modifications, and add them to two files in which we do.
2016-01-20 23:23:08 +00:00
Mateusz Guzik
6760182c5d session: tidy up fixjobc
This stops abusing the 'p' pointer for iteration over children processes
and gets rid of useless locking around PRS_ZOMBIE check.

Suggested by:	kib
2016-01-20 23:22:36 +00:00