Commit Graph

202166 Commits

Author SHA1 Message Date
Konstantin Belousov
9b3df93bf1 Typo in comment. 2015-07-20 19:51:41 +00:00
Alexander Motin
d575325b81 Increase output amp on ASUS UX31A by +5dB.
While there, implement couple helper functions.
2015-07-20 17:48:00 +00:00
Brad Davis
a54bd5953b Add support for building VirtualBox Vagrant images.
Abstract the build, package and upload to handle building either type.

Approved by:	re (gjb)
2015-07-20 16:27:44 +00:00
Pedro F. Giffuni
5a5c6e994c libusb: Fix minor cast-qual warning.
Fix a warning triggered by the gcc + FORTIFY_SOURCE patches:

In function 'libusb20_parse_config_desc': lib/libusb/libusb20_desc.c:141:
warning: passing argument 1 of 'memcpy' discards qualifiers from pointer
target type

Submitted by:	hselansky
2015-07-20 16:15:56 +00:00
Pedro F. Giffuni
d37cb73c79 snmp_hostres(3): Fix buffer overflow.
Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches.

CID:		1007594
MFC after:	3 days
2015-07-20 16:08:01 +00:00
Ed Schouten
62c31cffae Make forking of CloudABI processes work.
Just like FreeBSD+Capsicum, CloudABI uses process descriptors. Return
the file descriptor number to the parent process.

To the child process we both return a special value for the file
descriptor number (CLOUDABI_PROCESS_CHILD). We also return the thread ID
of the new thread in the copied process, so the threading library can
reinitialize itself.

Obtained from:	https://github.com/NuxiNL/freebsd
2015-07-20 13:46:22 +00:00
Ed Schouten
5a170c1b0e Add an API for easily creating userspace threads in kernelspace.
This change refactors the existing create_thread() function to be more
generic. It replaces almost all of its arguments by a callback that can
be used to extract the thread ID and copy it out to the right place, but
also to perform additional initialization steps, such as setting the
trapframe. This also makes the difference between thr_new() and
thr_create() more clear in my opinion.

This function is going to be used by the CloudABI compatibility layer.

It looks like the OpenSolaris compatibility framework already provides a
function called thread_create(). Rename this function to
do_thread_create() and use a macro to deal with the namespacing
conflict. A similar approach is already used for thread_exit().

MFC after:	1 month
2015-07-20 10:20:04 +00:00
Alexander Motin
d3e2e28e74 Fix typo in comment.
Submitted by:	Masao Uebayashi
2015-07-20 09:37:42 +00:00
Marko Zec
22a9384098 Prevent null-pointer dereferencing.
MFC after:	3 days
2015-07-20 08:21:51 +00:00
Andrey V. Elsukov
af9aa0a837 Add helper functions for IP checksum adjusting. Use these functions in
dummynet code and for setdscp. This fixes wrong checksums in some cases.

Obtained from:	Yandex LLC
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2015-07-20 07:26:31 +00:00
Andrey V. Elsukov
30aee13117 Add LLE event handler to report ND6 events to userland via rtsock.
Obtained from:	Yandex LLC
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2015-07-20 06:58:32 +00:00
Andrey V. Elsukov
585753c432 Invoke LLE event handler when entry is deleted.
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2015-07-20 06:54:50 +00:00
Mark Johnston
bd2519480e Declare lockstat_enabled even when KDTRACE_HOOKS is not defined.
Reported by:	bz
X-MFC-With:	r285704
2015-07-20 04:41:25 +00:00
Mark Johnston
4ffc6e480d Fix some libxo format string errors in the pfkey stats code.
PR:	201700
2015-07-20 02:38:51 +00:00
Marcel Moolenaar
be00e09818 Check the hw.proto.attach environment variable for devices that
proto(4) should attach to instead of the normal driver.

Document the variable.
2015-07-19 23:37:45 +00:00
Mark Johnston
97cc6870f6 Don't increment the spin count until after the first attempt to acquire a
rwlock read lock. Otherwise the lockstat:::rw-spin probe will fire
spuriously.

MFC after:	1 week
2015-07-19 22:26:02 +00:00
Kirk McKusick
1b79b9498b Restructure code for readability improvement. No functional change.
Reviewed by: kib
2015-07-19 22:25:16 +00:00
Mark Johnston
de2c95cc00 Consistently use a reader/writer flag for lockstat probes in rwlock(9) and
sx(9), rather than using the probe function name to determine whether a
given lock is a read lock or a write lock. Update lockstat(1) accordingly.
2015-07-19 22:24:33 +00:00
Mark Johnston
32cd0147fa Implement the lockstat provider using SDT(9) instead of the custom provider
in lockstat.ko. This means that lockstat probes now have typed arguments and
will utilize SDT probe hot-patching support when it arrives.

Reviewed by:	gnn
Differential Revision:	https://reviews.freebsd.org/D2993
2015-07-19 22:14:09 +00:00
Baptiste Daroussin
dbfbf7ae92 Drop libarchive.pc
We want to ensure we always use libarchive from ports in the ports tree.
It simplifies ports maintainance and anyway libarchive.pc was not reflecting the
different way libarchive can be built in base
2015-07-19 21:31:52 +00:00
Xin LI
788aa07e34 Use fixed date/time (the time choosen was the time the import was done on
-HEAD) in libntp so we can make reproducible build.

PR:		bin/201661
Reviewed by:	gjb, cy, roberto
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D3122
2015-07-19 19:23:38 +00:00
Mark Murray
eda4aaeb3f Fix some untidy logic. I committed the wrong local fix; please pass the pointy hat.
Approved by:        so (/dev/random blanket)
2015-07-19 18:07:35 +00:00
Luigi Rizzo
847adfb7b3 add a use count so the netmap module cannot be unloaded while in use. 2015-07-19 18:07:25 +00:00
Luigi Rizzo
10b8ef3d6a properly destroy persistent vale ports 2015-07-19 18:06:30 +00:00
Luigi Rizzo
9694aad375 do not free NULL if pipe allocation fails 2015-07-19 18:05:49 +00:00
Luigi Rizzo
05f7605789 release a reference when stopping a monitor 2015-07-19 18:04:51 +00:00
Luigi Rizzo
85fe4e7c6b small documentation update 2015-07-19 17:54:42 +00:00
Andrew Turner
70888b7ed5 Fix atomic_store_64, it should write the value passed in, not the value
read by the load.

Pointy Hat:	andrew
2015-07-19 16:55:47 +00:00
Mark Murray
f703e79990 Remove out-of-date comments.
Approved by:        so (/dev/random blanket)
2015-07-19 16:05:34 +00:00
Mark Murray
dbefaadca8 Fix the read blocking so that it is interruptable and slow down the rate of console warning spamming while blocked.
Approved by:	so (/dev/random blanket)
2015-07-19 16:05:30 +00:00
Mark Murray
d657959305 Clarify the intent of the RANDOM_* options.
Approved by:	so (/dev/random blanket)
2015-07-19 16:05:26 +00:00
Mark Murray
95b184a048 Optimise the buffer-size calculation. It was possible to get one block too many.
Approved by:	so (/dev/random blanket)
2015-07-19 16:05:23 +00:00
Andrew Turner
a612bbfa12 Clean up the style of the armv6 atomic code.
Sponsored by:	ABT Systems Ltd
2015-07-19 15:44:51 +00:00
Mark Murray
abb4c3dbfe Clean up some trailing whitespace. 2015-07-19 14:34:35 +00:00
Andrew Turner
d6a2102846 Sort the ARM atomic functions to be in alphabetical order.
Sponsored by:	ABT Systems Ltd
2015-07-19 13:10:47 +00:00
Konstantin Belousov
a8e1bc2e14 Revert bit of the r285627, locore.s does not need include of
opt_kstack_pages.h.  The asm gets the right KSTACK_PAGES from the
assym.s.

Reported by:	bz
Sponsored by:	The FreeBSD Foundation
2015-07-19 10:45:58 +00:00
Marcelo Araujo
f19e47d691 Add support to the jail framework to be able to mount linsysfs(5) and
linprocfs(5).

Differential Revision:	D2846
Submitted by:		Nikolai Lifanov <lifanov@mail.lifanov.com>
Reviewed by:		jamie
2015-07-19 08:52:35 +00:00
Marius Strobl
cab0e8ff75 - Record dependencies of gdb/gdbtui/kgdb on binutils/lib{bfd,iberty,opcodes},
fixing parallel builds.
- Don't build gdb/gdbtui/kgdb or libreadline when MK_BINUTILS is "no" for
  obvious reasons.

MFC after:	3 days
2015-07-19 00:38:19 +00:00
John-Mark Gurney
02bee582d0 move the prototype to the lib.h header.. This makes more sense, and
it's an API between boot2.c and arm_init.S which calls it..
2015-07-18 22:47:46 +00:00
John-Mark Gurney
c09626461f other fixes to make boot2 compile for IXP... Properly end the asm
sections, and for some reason, main needs a prototype... If someone
has a better fix, I'm all ears...

Pointed out by:	Berislav Purgar
2015-07-18 20:21:25 +00:00
John-Mark Gurney
8d0440e04b revert r278579, this is in a different compile environment than the
kernel, and needs to be named cpu_id...

Pointed out by:	Berislav Purgar
2015-07-18 20:19:51 +00:00
Konstantin Belousov
283dfee925 Further cleanup after r285607.
Remove useless release semantic for some stores to it_need.  For
stores where the release is needed, add a comment explaining why.

Fence after the atomic_cmpset() op on the it_need should be acquire
only, release is not needed (see above).  The combination of
atomic_cmpset() + fence_acq() is better expressed there as
atomic_cmpset_acq().

Use atomic_cmpset() for swi' ih_need read and clear.

Discussed with:	alc, bde
Reviewed by:	bde
Comments wording provided by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-07-18 19:59:29 +00:00
Allan Jude
7059fa6ff8 Add support for two workarounds for known issues booting GPT in legacy mode on some hardware
For Lenovo laptops with buggy bios (x220, t420, t520):
	Write the 0xee entry into the second slot in the pmbr instead of the first

For some Dell and HP models:
	The BIOS gives a warning message when booting in legacy mode from a GPT partitioned disk where the 0xee partition in the pmbr is not flagged active
	For models known to have this problem, mark the pmbr active during installation

Use smbios data to identify machines known to be affected by any of the above, and offer the user the option to apply the workaround

In bsdinstall's ufs auto mode (autopart partition wizard):
	Allow users to select which type of partition table to use
	Keep current defaults: MBR for BIOS, GPT for UEFI
	This allows users to choose GPT for legacy boot if they wish

PR:		184910
PR:		194359
Reviewed by:	Michael Dexter
Approved by:	marcel
MFC after:	3 days
X-MFC-With:	r285594
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3091
2015-07-18 18:49:44 +00:00
Ian Lepore
e7b25f9168 Deselect the sd card before re-selecting it when working around a problem
with some cards that causes them to become deselected after probing for
switch capabilities.  The old workaround fixes the behavior with some cards,
but causes problems with the cards the behave correctly and don't become
deselected.  Forcing a deselect then reselect appears to work correctly
with all cards in initial testing.
2015-07-18 16:56:51 +00:00
Luigi Rizzo
a6e8e92404 fix a typo in a comment 2015-07-18 15:28:32 +00:00
Edward Tomasz Napierala
bd425507b7 Expand sysctl descriptions in iscsi(4) and ctl(4).
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-07-18 15:27:12 +00:00
Edward Tomasz Napierala
467fa589ce Remove a comment in the wrong place.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-07-18 12:25:47 +00:00
Edward Tomasz Napierala
4a2a044965 Document suspend/resume notification in devd.conf(5).
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-07-18 12:24:54 +00:00
Edward Tomasz Napierala
cdff99588e Add CARP events description to devd.conf(5).
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-07-18 12:17:59 +00:00
Edward Tomasz Napierala
f36b09c457 fstyp(8) ships with 10.2.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-07-18 12:03:51 +00:00