Commit Graph

198389 Commits

Author SHA1 Message Date
Ian Lepore
93c3ad10f1 Fix minor fallout from sysctl strings being nulterminated now. The dmesg
code can read the buffer via sysctl or from a core file.  In the core file
case there will be no nulterm, and the code copes with that, but now in the
sysctl case there is a nulterm (there didn't used to be).  The least
disruptive way to restore the old behavior (and eliminate a spurious '\000'
at the end of the output) is to remove the nulterm (by decrementing the
buffer length) in the sysctl case.
2015-03-16 21:09:11 +00:00
Gregory Neil Shapiro
0232255f90 Default to turning off OpenSSL SSL_OP_TLSEXT_PADDING as it breaks
compatibility with some sites

This change comes from 8.15 but is being backported to FreeBSD releases
not yet using 8.15.

MFC after:	3 days
Noted by:	julian@
2015-03-16 20:24:37 +00:00
Alexander Motin
cb5c792950 Report that we may have write cache, and that we do support FLUSH.
FreeBSD guest driver does not use that legacy flag, but Linux seems does.

MFC after:	2 weeks
2015-03-16 20:13:25 +00:00
Benno Rice
43348dc2ad Reset bp->bio_done to unmapped_buf when removing a transient map in biodone.
Submitted by:	Scott Ferris <scott.ferris@isilon.com>
Sponsored by:	EMC / Isilon Storage Division
Reviewed by:	kib
2015-03-16 20:00:09 +00:00
Ian Lepore
f62fbd30cb Trivial change / forced-commit to document prior change that slipped in
without a commit message...

Use sbuf_new() + SYSCTL_OUT() instead of wiring the userland buffer and
using sbuf_new_for_sysctl().  The preallocated 256 byte buffer is always
going to be big enough to hold these results, and this should be more
efficient than wiring the old buffer.
2015-03-16 19:29:19 +00:00
Ian Lepore
ff352d8978 2015-03-16 19:25:03 +00:00
Ian Lepore
ba00885515 Use a regular sbuf + SYSCTL_OUT() rather than sbuf_new_for_sysctl() with
auto-draining, to avoid a potential copyout fault while holding a lock.

Pointed out by:	  jhb
Pointy hat to:	  ian
2015-03-16 19:18:45 +00:00
Ian Lepore
8d5628fdb8 Update an sbuf assertion to allow for the new SBUF_INCLUDENUL flag. If
INCLUDENUL is set and sbuf_finish() has been called, the length has been
incremented to count the nulterm byte, and in that case current length is
allowed to be equal to buffer size, otherwise it must be less than.

Add a predicate macro to test for SBUF_INCLUDENUL, and use it in tests, to
be consistant with the style in the rest of this file.
2015-03-16 17:45:41 +00:00
Robert Watson
d2925cccc1 Introduce a cap_ioctl_t used for the 'cmds' arguments to cap_ioctls_limit()
and cap_ioctls_get().  On FreeBSD, these are 'unsigned long', but on Linux,
ioctl(2) takes an 'int', making mild abstraction desirable.

MFC after:	3 days
Sponsored by:	Google, Inc.
2015-03-16 17:42:53 +00:00
Nathan Whitehorn
ad7ea69dce Convert PTE eviction lock from an RW lock to a RM lock. It is held for
writing approximately never (< 0.00000001% under heavy VM load, and it can
go for months without ever being acquired in normal operation). This
provides a 10% (2-minute) improvement in wall clock time for make -j32
buildworld on a 4-core 32-thread POWER8.
2015-03-16 16:29:33 +00:00
John Baldwin
b12c0a9eeb Move special DDP handling for closing a connection into a new
handle_ddp_close() function in t4_ddp.c as the logic is similar
to handle_ddp_data().  This allows all knowledge of the special
DDP mbufs to be private to t4_ddp.c as well.
2015-03-16 15:56:06 +00:00
Glen Barber
70306bc375 Document r279663, qsort(3) enhancements.
Sponsored by:	The FreeBSD Foundation
2015-03-16 15:54:53 +00:00
Glen Barber
9f6b34fb0c Document r279571, freebsd-update(8) will not download updates when
a previous upgrade is not complete.
Add ScaleEngine Inc to sponsors.ent.

Sponsored by:	The FreeBSD Foundation
2015-03-16 15:54:50 +00:00
Glen Barber
5004b8647a Document r279463, iovctl(8) rc(8) script.
Add Sandvine Inc to sponsors.ent.

Sponsored by:	The FreeBSD Foundation
2015-03-16 15:54:47 +00:00
Glen Barber
5950cfe39b Document r279361, kern.osrelease and kern.osreldate sysctls are
now configurable jail(8) parameters.

Sponsored by:	The FreeBSD Foundation
2015-03-16 15:54:43 +00:00
Glen Barber
ac2456f1bd Document r279315, uefisign(8) addition.
Sponsored by:	The FreeBSD Foundation
2015-03-16 15:54:41 +00:00
Glen Barber
d658573212 Document r279252, pmap(9) overhaul for 64-bit PowerPC processors.
Sponsored by:	The FreeBSD Foundation
2015-03-16 15:54:38 +00:00
Glen Barber
bd847ded77 Document r279189, VSX support.
Sponsored by:	The FreeBSD Foundation
2015-03-16 15:54:35 +00:00
Glen Barber
3abb14e977 Document r279186, setmode(3) set errno on failure.
Sponsored by:	The FreeBSD Foundation
2015-03-16 15:54:32 +00:00
Glen Barber
881a1e7b53 Document r278970, acpi(4) update to 20150204.
Sponsored by:	The FreeBSD Foundation
2015-03-16 15:54:29 +00:00
Gleb Smirnoff
41c895a888 Provide a comment explaining r279688.
Suggested by:	alc
2015-03-16 14:24:47 +00:00
Alexander Motin
c077e6287f Report ARAT (APIC-Timer-always-running) feature for virtual CPU.
This makes FreeBSD guest to not avoid using LAPIC timer, preferring HPET
due to worries about non-existing for virtual CPUs deep sleep states.

Benchmarks of usleep(1) on guest and host show such extra latencies:
 - 51us for virtual HPET,
 - 22us for virtual LAPIC timer,
 - 22us for host HPET and
 - 3us for host LAPIC timer.

MFC after:	2 weeks
2015-03-16 11:57:03 +00:00
Alexander Motin
54b7bb7626 Increase S/G list size of 32 to 33 entries.
32 entries are not enough for the worst case of misaligned 128KB request,
that made FreeBSD to chunk large quests in odd pieces.

MFC after:	2 weeks
2015-03-16 09:15:59 +00:00
Mark Johnston
97f2f66479 Remove unused upstream DTrace provider implementations that are duplicates
of providers under sys/cddl/dev/. Also remove sdt_subr.c, which isn't used
in FreeBSD's SDT implementation.

Suggested by:	rwatson
2015-03-16 01:15:08 +00:00
Mateusz Guzik
fbe503d462 proc: get rid of proc lock + unlock pair in proc_reap
A comment in the code stated we PROC_LOCK and as a side effect guarantee
all writers released process lock. But at that point such lock was already
taken while we were removing the process from all lists, so it should be already
unreachable.
2015-03-16 01:09:49 +00:00
Mateusz Guzik
daf63fd2f9 cred: add proc_set_cred helper
The goal here is to provide one place altering process credentials.

This eases debugging and opens up posibilities to do additional work when such
an action is performed.
2015-03-16 00:10:03 +00:00
Baptiste Daroussin
95246f3d83 Fix DESTDIR support 2015-03-15 23:40:50 +00:00
Baptiste Daroussin
ba44fb709d Remove bad and useless LINKS 2015-03-15 23:31:20 +00:00
Konstantin Belousov
69a2ec4a19 Fix build with clang 3.6, silence -Wcast-qual warning.
Sponsored by:	The FreeBSD Foundation
Acked by:	adrian
2015-03-15 23:05:36 +00:00
Alexander Motin
e365f36c32 Pre-allocate one extra request per processing thread.
Processing threads call callbacks before freeing requests.  As result,
new requests may arrive before old ones are freed.

MFC after:	2 weeks
2015-03-15 22:44:53 +00:00
Mark Johnston
ad6fc754f3 Add a missing format string argument.
PR:		197391
MFC after:	3 days
2015-03-15 21:57:44 +00:00
Adrian Chadd
943571a7c3 Use ar71xx_mac_addr_random_init() instead of a hand-rolled random
MAC address.
2015-03-15 21:56:41 +00:00
Adrian Chadd
3bd3e39e1a Start fleshing out some MAC address helper functions.
A lot of these embedded boards don't have a unique MAC address per
device stored somewhere unique - sometimes they'll have one MAC
for both arge NICs; someties they'll have one MAC for both arge NICs
/and/ the ath NICs.  In these instances, we need to derive device
specific MAC addresses from the base MAC address.

These functions will be used by some follow-up code that'll slot
into if_arge and if_ath.
2015-03-15 21:56:12 +00:00
Baptiste Daroussin
08d4b586d8 Symplify links installation by using multi variable for loop
Using multi variable for loop not only simplify the code, it also ensures that
the LINKS and SYMLINKS input have the right number of words

Differential Revision:	https://reviews.freebsd.org/D2069
Reviewed by:	imp
2015-03-15 21:50:58 +00:00
Mateusz Guzik
eb0b6ba016 audit: fix cred assignment when A_SETPMASK is used
The code used to modify curproc instead of the target process.

Discussed with: rwatson
MFC after:	3 days
2015-03-15 21:43:43 +00:00
Adrian Chadd
e2ad437112 Add a new taskqueue (device specific, not net80211 ic->tq); use it for
device restart.

(Committers note - once scan overhaul and a few other things have been
fixed in net80211 to not block things in the taskqueue, this can disappear
and the device specific taskqueues in other drivers can also go away.)

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:32:11 +00:00
Adrian Chadd
a5403e3157 Workaround delays caused by vmem_check().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:30:20 +00:00
Adrian Chadd
2e79e29307 Fix scan timeouts with powersave enabled.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:29:36 +00:00
Jilles Tjoelker
7a970ca937 unzip: Don't subvert vfs.timestamp_precision when setting atime to now.
Also, preserve nanoseconds from libarchive, even though the zip file format
does not currently support nanoseconds in timestamps.
2015-03-15 21:29:20 +00:00
Adrian Chadd
fd06b53774 Don't unlock mutex in interrupt thread (except for wpi_rx_done() - for now) -
fixes various races between wpi_notif_intr() and wpi_stop_locked().

(attachment 154381)

Committers note: yes, unlock/if_input/lock has to go away, but that'll
have to be done later.

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:29:18 +00:00
Adrian Chadd
062c813943 Reformatting changes.
(attachment 154380)

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:27:50 +00:00
Adrian Chadd
b52207dbd2 Use correct types
(attachment 154379)

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:27:03 +00:00
Adrian Chadd
5effcbfd6c Add another lock for the TX path.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:26:22 +00:00
Adrian Chadd
fc5870b418 Add an extra mutex for qfullmsk / ring->queued variables.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:25:06 +00:00
Adrian Chadd
a6b6ca52c6 Regroup ring state checks in wpi_tx_done().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:24:11 +00:00
Adrian Chadd
84ad7b3667 Don't use sc->qfullmsk in wpi_start().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:23:45 +00:00
Adrian Chadd
d74e544a1d turn sc_tx_timeout into its own callout, rather than a global watchdog
timer.

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:22:03 +00:00
Adrian Chadd
446685e49c Add mutex for RXON structure; convert some callouts/lock use to use
RXON rather than the global WPI lock.

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:20:58 +00:00
Adrian Chadd
9e7aab73cd Use WPI_FILTER_BSS for checking current state.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:19:52 +00:00
Adrian Chadd
0bc39fc6f8 Split TX and scan timeouts; use a callout now for the scan timeout.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:19:15 +00:00