Commit Graph

190691 Commits

Author SHA1 Message Date
Joel Dahl
df2d82e003 mdoc: remove superfluous paragraph macros. 2014-06-23 18:40:21 +00:00
Gavin Atkinson
223fe5b6cb With the move away from GNATS, drop the CTM config file for downloading
the GNATS database, it will be going away soon.
2014-06-23 18:13:42 +00:00
Hajimu UMEMOTO
f4839cbc0a Make nd6_gctimer tunable.
MFC after:	1 week
2014-06-23 16:27:29 +00:00
Hajimu UMEMOTO
290789099b Exclude IPv4 address from doing longest match.
It prevented DNS based load balancing.

MFC after:	1 week
2014-06-23 15:43:27 +00:00
Christian Brueffer
0782e8fa23 Fix markup and grammar. 2014-06-23 13:24:00 +00:00
Christian Brueffer
04d4c8e4ed Several small fixes (typos, grammar, mdoc). 2014-06-23 12:43:30 +00:00
Baptiste Daroussin
a63d6c943d use .Mt to mark up email addresses consistently (part6)
PR:		191174
Submitted by:	Franco Fichtner <franco at lastsummer.de>
2014-06-23 08:27:27 +00:00
Baptiste Daroussin
8fbf3d50e3 use .Mt to mark up email addresses consistently (part4)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:25:03 +00:00
Baptiste Daroussin
2b7af31cf5 use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
Konstantin Belousov
56388ef94b Add documentation for the fpu_kern(9) interfaces.
Many thanks to jmg for reviewing the (previous version) of the text
and providing grammar and content fixes.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-06-23 07:45:44 +00:00
Konstantin Belousov
633034fe0e Add FPU_KERN_KTHR flag to fpu_kern_enter(9), which avoids saving FPU
context into memory for the kernel threads which called
fpu_kern_thread(9).  This allows the fpu_kern_enter() callers to not
check for is_fpu_kern_thread() to get the optimization.

Apply the flag to padlock(4) and aesni(4).  In aesni_cipher_process(),
do not leak FPU context state on error.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-06-23 07:37:54 +00:00
Konstantin Belousov
b5f8c226ab Use correct names for the flags. MAP_ENTRY_GROWS_* have the same
numerical values as MAP_STACK_GROWS_*, but the former is for entries'
eflags, while the later for the cow argument of vm_map_insert().

Submitted by:	alc
2014-06-23 07:03:47 +00:00
Kevin Lo
ea93c6a613 Catch up with r186809, correct comments. 2014-06-23 05:17:39 +00:00
Alexander Kabaev
8cf27a3330 Restore the check for non-NULL dmatag in sndbuf_free.
The sound drivers that use own buffer management can use sndbuf_setup
and not do any busdma allocation, so the driver will end up with the
managed buffer but no valid dma map and tag for it. Avoid calling
bus_dmamem_free in such cases.

Reported by: ache
Missed in review by: kan
2014-06-23 03:45:39 +00:00
Mark Johnston
efa1aff675 Fix some bugs when fetching probe arguments in i386. Firstly ensure that
the 4 byte-aligned dtrace_invop_callsite can be found and that it
immediately follows the call to dtrace_invop(). Secondly, fix some pointer
arithmetic to account for differences between struct i386_frame and illumos'
struct frame. Finally, ensure that dtrace_getarg() isn't inlined. It works
by following a fixed number of frame pointers to the probe site, so inlining
breaks it.

MFC after:	3 weeks
2014-06-23 02:00:14 +00:00
Mateusz Guzik
450570a55e Tidy up fd-related functions called by do_execve
o assert in each one that fdp is not shared
o remove unnecessary NULL checks - all userspace processes have fdtables
and kernel processes cannot execve
o remove comments about the danger of fd_ofiles getting reallocated - fdtable
is not shared and fd_ofiles could be only reallocated if new fd was about to be
added, but if that was possible the code would already be buggy as setugidsafety
work could be undone

MFC after:	1 week
2014-06-23 01:28:18 +00:00
Mark Johnston
8382ec9e6a Fix a couple of bugs on amd64 when fetching probe arguments beyond the
first five for probes entered through a UD fault (i.e. FBT probes).

Specifically, handle the fact that dtrace_invop_callsite must be
16 byte-aligned and thus may not immediately follow the call to
dtrace_invop() in dtrace_invop_start(). Also fetch register arguments and
the stack pointer through a struct trapframe instead of a struct reg.

PR:		191260
Submitted by:	luke.tw@gmail.com
MFC after:	3 weeks
2014-06-23 01:10:56 +00:00
Andrey A. Chernov
1cb207df04 Change suggestion how to set MAKESYSPATH as broken incremental build
workaround. Magic ".../share/mk" (search directories up to /)
does not work for f.e. /usr/src/gnu/lib/libgcc because the path
inside is starting from /usr/obj hierarchy and ends up in
/usr/share/mk, not in the /usr/src/share/mk where src.opts.mk is.
IMHO proper fixing of incremental build is needed urgently.
2014-06-23 00:54:56 +00:00
Navdeep Parhar
327235b3d6 cxgbe(4): Update the bundled T4 and T5 firmwares to versions 1.11.27.0.
Obtained from:	Chelsio
MFC after:	3 days
2014-06-22 23:40:20 +00:00
Andrey A. Chernov
298207c39a Merge intermediate OpenBSD v1.25 changes (almost identical to ours)
to reduce diff and bump OpenBSD patch level to v1.26.

MFC after:      2 weeks
2014-06-22 21:54:57 +00:00
Mateusz Guzik
158627616c Don't take filedesc lock in fdunshare().
We can read refcnt safely and only care if it is equal to 1.

If it could suddenly change from 1 to something bigger the code would be
buggy even in the previous form and transitions from > 1 to 1 are equally racy
and harmless (we copy even though there is no need).

MFC after:	1 week
2014-06-22 21:37:27 +00:00
Pedro F. Giffuni
6aa225165f getopt(3): recognize option:: as GNU extension for "optional options".
Also ANSIfy a function declaration.

While here update the OpenBSD patch level in getopt_long.c as we
already have the corresponding change.

Obtained from:	NetBSD
MFC after:	2 weeks
2014-06-22 20:13:57 +00:00
Gavin Atkinson
872442932b With the migration from GNATS to Bugzilla, we no longer need a tool to
graph GNATS PR statistics.  It would be nice to have a similar tool for
the new bug database, but that would likely be a from-scratch rewrite.
2014-06-22 16:35:03 +00:00
Andrew Turner
8b04766b28 Remove the incomplete Tegra 2 code, nobody was maintaining it. The AC100
never booted to single user mode.

It can be brought back if someone is willing to get it into a stable state
and maintain it.
2014-06-22 15:15:52 +00:00
Alexander V. Chernikov
811985398d Permit changing cpu mask for cpu set 1 in presence of drivers
binding their threads to particular CPU.

Changing ithread cpu mask is now performed by special cpuset_setithread().
It creates additional cpuset root group on first bind invocation.

No objection:	jhb
Tested by:	hiren
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2014-06-22 11:32:23 +00:00
John-Mark Gurney
a061720cbb convert to using pidfile... This prevents multiple wpa_supplicants
running at the same time causing problems w/ wifi not working..

the patch will be submitted upstream...  The next step if someone wants
to push it upstream is to break os_unix.c up so that all these other
utilities don't need libutil..

Reviewed by:	rpaulo
2014-06-22 10:00:33 +00:00
John-Mark Gurney
aae6c4d071 add support for MosChip MCS9922... This is found on an ExpressCard..
tested to work w/ cu talking to itself (the two ports connected via
null modem cable)...
2014-06-22 06:54:36 +00:00
Mitsuru IWASAKI
3f5178b3f5 Add note on SYSCTL VARIABLES. 2014-06-22 02:48:27 +00:00
Mateusz Guzik
adf87ab01c fd: replace fd_nfiles with fd_lastfile where appropriate
fd_lastfile is guaranteed to be the biggest open fd, so when the intent
is to iterate over active fds or lookup one, there is no point in looking
beyond that limit.

Few places are left unpatched for now.

MFC after:	1 week
2014-06-22 01:31:55 +00:00
Mateusz Guzik
0f0b852c73 do_dup: plug redundant adjustment of fd_lastfile
By that time it was already set by fdalloc, or was there in the first place
if fd is replaced.

MFC after:	1 week
2014-06-22 00:53:33 +00:00
Mark Johnston
9338d20884 Allow creation of SDT probes from a module in which no providers are
defined. This ensures that the sdt:zfs:: probes appear despite the fact
the sdt provider is defined in the kernel rather than in zfs.ko.

Reported by:	hiren
Tested by:	hiren
MFC after:	2 weeks
2014-06-21 19:29:40 +00:00
Dimitry Andric
c26daf53f5 Add the llvm patch for r267704. 2014-06-21 18:47:30 +00:00
Dimitry Andric
51297500ac Pull in r211435 from upstream llvm trunk (by Benjamin Kramer):
Legalizer: Add support for splitting insert_subvectors.

  We handle this by spilling the whole thing to the stack and doing the
  insertion as a store.

  PR19492. This happens in real code because the vectorizer creates
  v2i128 when AVX is enabled.

This fixes a "fatal error: error in backend: Do not know how to split
the result of this operator!" message encountered during compilation of
the net-p2p/libtorrent-rasterbar port.

Reported by:	Evgeniy <iron@mail.ua>
MFC after:	3 days
2014-06-21 18:22:23 +00:00
Pedro F. Giffuni
90d81f30ec Drop ifdef nonsense: just use setvbuf(3).
Pointed out by:		kib, bde
2014-06-21 14:07:33 +00:00
Pedro F. Giffuni
0279beeb0e Revert r267675:
The code doesn't really benefit of using reallocf() in this case.
Also, the realloc() results being assigned temporary variable which
makes blind replacement with reallocf() mostly useless.

Pointed out by:		stefanf, bde
2014-06-21 01:43:56 +00:00
Justin Hibbits
0b3a30a65e No need to check if devd is running before posting an event. 2014-06-21 00:53:56 +00:00
Glen Barber
66edec08b0 Fix a bug in bsdgrep(1) where patterns are not correctly
detected.

Certain criteria must be met for this bug to show up:

 * the -w flag is specified, and
 * neither -o or --color are specified, and
 * the pattern is part of another word in the line, and
 * the other word that contains the pattern occurs first

PR:		181973
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-06-20 21:53:50 +00:00
Pedro F. Giffuni
fc39ce9ee1 Add -u (unbuffered output) after GNU sed.
Obtained from:	NetBSD
MFC after:	1 week
2014-06-20 21:41:30 +00:00
Hiren Panchasara
a2e4bd70ec Hide a harmless "QUEUE FULL EVENT" message behind bootverbose.
Requested by: A bunch of users on mailing-lists
Suggested by: scottl
MFC after:	1 week
Sponsored by:	Yahoo! inc.
2014-06-20 21:18:35 +00:00
Navdeep Parhar
0835ddc766 Consider the total number of descriptors available (and not just those
that are ready to be reclaimed) when deciding whether to resume tx after
a stall.

MFC after:	3 days
2014-06-20 20:28:46 +00:00
Michael Tuexen
2f4c57fbe9 Fix a bug which incorrectly allowed two listening SCTP sockets on
the same port bound to the wildcard address.

MFC after: 3 days
2014-06-20 20:17:39 +00:00
John Baldwin
e876f6d052 Cap the percent CPU of individual threads at 100% to fix some of the
more obvious imprecision in the previous top changes.

Specifically, top uses a delta of clock_gettime() calls right after
invoking the kern.proc sysctl to fetch the process/thread list to
compute the time delta between the fetches.  However, the kern.proc
sysctl handler does not run in constant time.  It can spin on locks,
be preempted by an interrupt handler, etc.  As a result, the time
between the gathering of stats for individual processes or threads
between subsequent kern.proc handlers can vary.  If a "slow" kern.proc
run is followed by a "fast" kern.proc run, then the threads/processes
at the start of the "slow" run will have a longer time delta than the
threads/processes at the end.  If the clock_gettime() time delta is
not itself skewed by preemption, then the delta may be too short for
a given thread/process resulting in a higher percent CPU than actual.
However, there is no good way to calculate the exact amount of overage,
nor to know which threads to subtract the overage from.  Instead, just
punt and fix the definitely-wrong case of an individual thread having
more than 100% CPU.

Discussed with:	zonk
2014-06-20 19:54:23 +00:00
Michael Tuexen
8a794ba826 Fix a bug in the setsockopt()-handling of the SCTP
specific option SCTP_PEER_ADDR_THLDS: Use the
provided address as intended.

MFC after: 3 days
2014-06-20 17:45:00 +00:00
Devin Teske
c7136fd54f Fix a code typo that prevented mkdir from firing (unnoticed
usually because another part of the code succeeded in making
the same directory).

MFC after:      3 days
2014-06-20 17:40:38 +00:00
Jonathan Anderson
6b22f423cf Test RTLD's new LD_LIBRARY_PATH_FDS variable.
Test LD_LIBRARY_PATH_FDS by linking a binary that requires a shared
library that isn't in any of the usual search paths.  Ensure this fails
when we don't supply LD_LIBRARY_PATH_FDS or we pass invalid information
in it.  Ensure it works when we pass the correct directory in various
places in the variable.

Approved by:	rwatson (mentor)
MFC after:	3 weeks
Sponsored by:	DARPA/AFRL
2014-06-20 17:14:59 +00:00
Jonathan Anderson
02d3b38e0a Add the LD_LIBRARY_PATH_FDS environmental variable.
This variable allows the loading of shared libraries via directory descriptors
rather than via library paths.  If LD_LIBRARY_PATH_FDS=3:4:12, the directories
represented by file descriptors 3, 4 and 12 will searched for shared libraries
before the normal path-based mechanisms are used.  This allows us to execute
unprivileged binaries from within a Capsicum sandbox even if they require
shared libraries.

Approved by:	rwatson (mentor)
Reviewed by:	kib
MFC after:	3 weeks
Sponsored by:	DARPA/AFRL
2014-06-20 17:08:32 +00:00
Pedro F. Giffuni
eb0fb866de regex: Make use of reallocf().
Use of reallocf is useful in libraries as we are not certain the
application will exit after NULL.

This somewhat reduces portability but if since you are building
this as part of libc it is likely you have our non-standard
reallocf(3) already.

Reviewed by:	ache
MFC after:	5 days
2014-06-20 15:29:09 +00:00
Michael Tuexen
6ba22f19ca Honor jails for unbound SCTP sockets when selecting source addresses,
reporting IP-addresses to the peer during the handshake, adding
addresses to the host, reporting the addresses via the sysctl
interface (used by netstat, for example) and reporting the
addresses to the application via socket options.
This issue was reported by Bernd Walter.

MFC after: 3 days
2014-06-20 13:26:49 +00:00
Konstantin Belousov
cef789cd61 Restore the ABI of the cpuctl(4) ioctl request CPUCTL_CPUID, use
separate argument structure with added level_type field for
CPUID_CPUID_COUNT request.

Reviewed by:	attilio (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-06-20 13:13:38 +00:00
Gavin Atkinson
8c0ddf28da Remove /etc/gnats from here, too. 2014-06-20 11:47:49 +00:00