Commit Graph

214546 Commits

Author SHA1 Message Date
Konstantin Belousov
50c22263bb Cache getbintime(9) answer in timehands, similarly to getnanotime(9)
and getmicrotime(9).

Suggested and reviewed by:	bde (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
2016-07-30 09:25:57 +00:00
Marcelo Araujo
6cf1bae2d9 Use nitems() from sys/param.h.
MFC after:	2 weeks.
Sponsored by:	gandi.net (BSD Day Taiwan)
2016-07-30 07:28:15 +00:00
Marcelo Araujo
f18e52f46e Use nitems() from sys/param.h.
MFC after:	2 weeks.
Sponsored by:	gandi.net (BSD Day Taiwan)
2016-07-30 07:15:54 +00:00
Marcelo Araujo
d19ba08a16 Use nitems() from sys/param.h.
MFC after:	2 weeks.
Sponsored by:	gandi.net (BSD Day Taiwan)
2016-07-30 07:06:23 +00:00
Mark Johnston
57185c52de Restore an ifdef that should not have been removed in r303535.
X-MFC-With:	r303535
2016-07-30 07:05:32 +00:00
Marcelo Araujo
d7d0513c31 Use nitems() from sys/param.h.
MFC after:	2 weeks.
Sponsored by:	gandi.net (BSD Day Taiwan)
2016-07-30 07:04:46 +00:00
Marcelo Araujo
d61c7fc026 Use nitems() from sys/param.h.
MFC after:	2 weeks.
Sponsored by:	gandi.net (BSD Day Taiwan)
2016-07-30 07:02:33 +00:00
Marcelo Araujo
09a47cc7e6 Use nitems() from sys/param.h.
Sponsored by:	gandi.net (BSD Day Taiwan)
MFC after: 	2 weeks.
2016-07-30 06:35:49 +00:00
Marcelo Araujo
268b75a878 Use nitems() from sys/param.h
Sponsored by:	gandi.net (BSD Day Taiwan)
2016-07-30 06:32:18 +00:00
Marcelo Araujo
02c8c1182b Use nitems() from sys/param.h.
Sponsored by:	gandi.net (BSD Day Taiwan)
2016-07-30 06:19:34 +00:00
Enji Cooper
131cac80e1 Explicitly test for cu_fgets returning NULL or !NULL
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-07-30 04:40:44 +00:00
Mark Johnston
87ae82101f Add libprocstat prebuild library dependencies.
X-MFC-With:	r303531
2016-07-30 03:43:55 +00:00
Andrey A. Chernov
15cb786674 Rework r303074 case 4. Don't immediatelly skip directory entries which
cause MAXPATHLEN exceeded. Process them first through gl_errfunc() and
GLOB_ERR.
2016-07-30 03:11:54 +00:00
Mark Johnston
6d1ffb50fc Include fasttrap handling for DATAMODEL_ILP32 when compiling for amd64.
MFC after:	1 month
2016-07-30 03:11:53 +00:00
Mark Johnston
907b59d769 libdtrace: Don't hard-code the native data model.
MFC after:	1 month
2016-07-30 03:09:57 +00:00
Mark Johnston
4808a67805 libproc: Add proc_getmodel().
This is used by libdtrace to determine the data model of target processes.
This allows for the creation of pid provider probes in 32-bit processes on
amd64.

MFC after:	1 month
2016-07-30 03:09:23 +00:00
Mark Johnston
700244a246 Add descriptions for fields in struct proc_handle.
Remove the unused kq field and some unnecessary includes.

MFC after:	1 month
2016-07-30 03:07:14 +00:00
Mark Johnston
a7e13d50fe librtld_db: Use the auxv to figure out where to look up loader symbols.
Previously, librtld_db just hardcoded /libexec/ld-elf.so, which isn't
correct for processes that aren't using the native ABI. With this change,
librtld_db can be used to inspect non-native processes; in particular,
dtrace -c now works for 32-bit executables on amd64.

MFC after:	1 month
2016-07-30 03:05:23 +00:00
Andrey A. Chernov
e04d8562b6 Reset errno for readdirfunc() before contunue. 2016-07-30 02:09:11 +00:00
Baptiste Daroussin
999c1fd64b Remove usage of _WITH_DPRINTF 2016-07-30 01:16:06 +00:00
Baptiste Daroussin
04f36dc654 Remove last traces of _WITH_GETLINE 2016-07-30 01:13:54 +00:00
Baptiste Daroussin
7556d9b06a Remove usage of _WITH_GETLINE from usr.sbin 2016-07-30 01:10:05 +00:00
Baptiste Daroussin
a43d43d574 Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
Pedro F. Giffuni
e643b783e3 indent(1): Yet more style issues.
strchr(3) returns a pointer not a boolean.
Attempt to make the style somewhat more ocnsistent with what indent
had before recent changes.

Pointed out by:	bde
2016-07-30 01:04:18 +00:00
Baptiste Daroussin
dd47921eac Remove _WITH_GETLINE and _WITH_DPRINTF guards
When adding getline(3) and dprintf(3) into libc, those guards were added
to prevent breaking too many ports.

7 years later the ports tree have been fixed, it is time to remove this
FreeBSDism

While here remove the extra parenthesis surrounding dprintf(3)
2016-07-30 01:00:16 +00:00
Pedro F. Giffuni
9b4009b417 indent(1): Attempt to preserve some consistent style.
Remove the excessive braces from r303485 and align the comments to the
right as done in the rest of the code. This is not nice but there is no
clear way to make it nice (and KNF).

Pointed out by:	bde
2016-07-29 23:30:33 +00:00
John Baldwin
8dd07eab0e Various fixes to the t4/5nex character device.
- Remove null open/close methods.
- Don't set d_flags to 0 explicitly.
- Remove t5_cdevsw as the .d_name member isn't really used and doesn't
  warrant a separate cdevsw just for the name.
- Use ENOTTY as the error value for an unknown ioctl request.
- Use make_dev_s() to close race with setting si_drv1.

Sponsored by:	Chelsio Communications
2016-07-29 22:11:29 +00:00
Ed Maste
03f124f737 libunwind: correct return code in unwinding trace log message
Obtained from:	LLVM r277215
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2016-07-29 21:37:00 +00:00
Eric van Gyzen
c05d9feb7f Fix markup for -j in cpuset(1) synopsis
MFC after:	3 days
Sponsored by:	Dell Inc.
2016-07-29 21:18:20 +00:00
Eric van Gyzen
71aa6fbfe9 Fix two return types in the cpuset(9) and bitset(9) man pages
The *_FFS() and *_COUNT() functions return int, not size_t.

MFC after:	3 days
Sponsored by:	Dell Inc.
2016-07-29 21:12:48 +00:00
Kurt Lidl
4e9ac06d0d libblacklist: Do not use %m for logging, use strerror(errno)
The blacklist library can accept a function to use for logging,
defaulting to vsyslog(), if no function is specified.  Make the
blacklist library use strerror(errno) explicitly, instead of %m,
so that the passed in function does not need to support the
syslog specific placeholder.

This matches a change already submitted and accepted upstream.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-07-29 21:11:32 +00:00
Mark Johnston
897d0c6617 Use vm_page_undirty() instead of manually setting a page field.
Reviewed by:	alc
MFC after:	3 days
2016-07-29 21:05:37 +00:00
Kurt Lidl
2dc39caa91 Make resizewin.1 manpage use .Fx macro
Fix capitalization of "PuTTY" also.

MFC after:	1 week
2016-07-29 21:05:17 +00:00
Alexander Motin
718e8abba9 Fix NTBT_QP_LINKS negotiation.
I believe it never worked correctly for more the one queue even in Linux.
This fixes case when one of consumer drivers is not loaded on one side,
but its queues still announced as ready if something else brought link up.

While there, remove some pointless NULL checks.
2016-07-29 21:03:30 +00:00
Mark Johnston
adaf3c4906 sdp: Destroy the RDMA ID after destroying the connection's queue pair.
This is the ordering documented by rdma_destroy_qp(). Also add a useful
KASSERT to sdp_pcbfree().

Sponsored by:	EMC / Isilon Storage Division
2016-07-29 21:03:02 +00:00
Mark Johnston
d3461164e0 sdp: Use malloc(9) instead of the Linux compat layer.
SDP transmit and receive rings are always created in a sleepable context,
so we can use M_WAITOK and remove error checks.

Sponsored by:	EMC / Isilon Storage Division
2016-07-29 21:01:04 +00:00
Mark Johnston
f66ec15275 sdp: Use the correct socket buffer in sdp_post_recvs_needed().
Sponsored by:	EMC / Isilon Storage Division
2016-07-29 20:54:43 +00:00
Alexander Motin
75b94efd08 Clear scratchpad after MSIX negotiation to not leak garbage. 2016-07-29 20:52:18 +00:00
Mark Johnston
7e968dab6d sdp: Always free received control packets after they're handled.
Sponsored by:	EMC / Isilon Storage Division
2016-07-29 20:51:52 +00:00
Mark Johnston
3b3e6d882f Fix the KASSERT format string arguments after r303507. 2016-07-29 20:48:42 +00:00
Mark Johnston
a3c0b052b7 sdp: Use the PCB as the rx completion handler argument.
The generic socket may be detached from the PCB before the completion
queue is drained and destroyed, so this change closes a race condition
in connection teardown.

Sponsored by:	EMC / Isilon Storage Division
2016-07-29 20:39:32 +00:00
Mark Johnston
fa46ade837 sdp: Destroy the PCB lock before freeing to the zone.
Sponsored by:	EMC / Isilon Storage Division
2016-07-29 20:36:01 +00:00
Mark Johnston
2cefa87b0b sdp: Use an mbufq for received control packets.
This is simpler than the hand-rolled queue, and fixes a use-after-free.

Sponsored by:	EMC / Isilon Storage Division
2016-07-29 20:35:04 +00:00
Mark Johnston
30a71b3c30 sdp: Remove Linux build files.
They aren't useful here, and Linux seems to have largely abandoned SDP
anyway.

Sponsored by:	EMC / Isilon Storage Division
2016-07-29 20:33:43 +00:00
John Baldwin
e2325d8285 Don't treat NOCPU as a valid CPU to CPU_ISSET.
If a thread is created bound to a cpuset it might already be bound before
it's very first timeslice, and td_lastcpu will be NOCPU in that case.

MFC after:	1 week
2016-07-29 20:19:14 +00:00
Pedro F. Giffuni
c917a54b26 indent(1): Use NULL instead of zero for pointers. 2016-07-29 19:36:10 +00:00
John Baldwin
005ce8e4e6 Fix locking issues with aio_fsync().
- Use correct lock in aio_cancel_sync when dequeueing job.
- Add _locked variants of aio_set/clear_cancel_function and use those
  to avoid lock recursion when adding and removing fsync jobs to the
  per-process sync queue.
- While here, add a basic test for aio_fsync().

PR:		211390
Reported by:	Randy Westlund <rwestlun@gmail.com>
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D7339
2016-07-29 18:26:15 +00:00
Pedro F. Giffuni
9f827409fb indent(1): Support "f" and "F" floating constant suffixes.
Actually this just brings back r303487 with the correct commit log.

Differential Revision: https://reviews.freebsd.org/D6966  (Partial)
Obtained from:	Piotr Stefaniak
2016-07-29 18:00:10 +00:00
Pedro F. Giffuni
b58cc20a1a Revert r303487: Wrong commit log.
Will be brought back with the correct log.
2016-07-29 17:55:38 +00:00
John Baldwin
25a57bd64b Add a loader tunable (hw.pci.enable_pcie_hp) to disable PCI-e HotPlug.
Some systems and/or devices (such as riser cards) do not include a
non-compliant implementation of PCI-e HotPlug that can result in devices
not being attached (e.g. the HotPlug code might assume that a card is
being unplugged and will power the slot off and detach it).  This
tunable can be set to 0 to disable support for PCI-e HotPlug ignoring
the incorrect HotPlug state on these slots.

PR:		211081
Reported by:	Sergey Renkas <serg_ic@mail.ru> (SuperMicro X7 riser card)
Reported by:	Jeffrey E Pieper <jeffrey.e.pieper@intel.com>
	 	(Intel X520 adapter)
MFC after:	1 week
Relnotes:	yes
2016-07-29 17:54:21 +00:00