Commit Graph

15073 Commits

Author SHA1 Message Date
Mikolaj Golub
eec6cb1cf2 Add procstat_getosrel function to retrieve a process osrel info.
MFC after:	1 month
2013-04-20 08:03:56 +00:00
Mikolaj Golub
4cdf979641 Add procstat_getpathname function to retrieve a process executable.
MFC after:	1 month
2013-04-20 08:02:43 +00:00
Mikolaj Golub
7cc0ebfd10 Add procstat_getrlimit function to retrieve a process resource limits info.
MFC after:	1 month
2013-04-20 07:59:44 +00:00
Mikolaj Golub
5b9bcba971 Add procstat_getumask function to retrieve a process umask.
MFC after:	1 month
2013-04-20 07:57:08 +00:00
Mikolaj Golub
7f1d14e6e6 Add procstat_getgroups function to retrieve process groups.
MFC after:	1 month
2013-04-20 07:54:07 +00:00
Mikolaj Golub
39680c7bfb Add procstat_getvmmap function to get VM layout of a process.
MFC after:	1 month
2013-04-20 07:49:35 +00:00
Mikolaj Golub
7153ad2b72 Make libprocstat(3) extract procstat notes from a process core file.
PR:		kern/173723
Suggested by:	jhb
Glanced by:	kib
MFC after:	1 month
2013-04-20 07:47:26 +00:00
Ed Schouten
7e659f9491 Add the Clang specific -Wmissing-variable-declarations to WARNS=6.
This compiler flag enforces that that people either mark variables
static or use an external declarations for the variable, similar to how
-Wmissing-prototypes works for functions.

Due to the fact that Yacc/Lex generate code that cannot trivially be
changed to not warn because of this (lots of yy* variables), add a
NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this
specific compiler warning.

Announced on:	toolchain@
2013-04-19 19:45:00 +00:00
Tim Kientzle
eb012e1c4c An even more refined version of r249484, until we can come up with
a good fix for the -print-file-name=include breakage.

As suggested by Andrey Chernov.
2013-04-19 05:13:57 +00:00
Tim Kientzle
463f397c4e Fix the symlink creation from r249484 so that repeated
installs work correctly.

Suggested by Tijl Coosemans.
2013-04-19 05:01:14 +00:00
David Xu
31e9d5b85e Remove debug code. 2013-04-18 05:58:07 +00:00
David Xu
8bbeb7e9e0 Avoid copying memory if SIGCANCEL is not masked. 2013-04-18 05:56:00 +00:00
David Xu
acad2b1e22 Revert revision 249323, the PR/177624 is confusing, that bug is caused
by using buggy getcontext/setcontext on same stack, while swapcontext
normally works on different stack, there is no such a problem.
2013-04-18 05:12:11 +00:00
Jilles Tjoelker
00e080be77 pututxline: Don't set errno=0 in subfunctions.
The functions utx_active_add(), utx_active_remove(), utx_lastlogin_add() and
utx_log_add() set errno to 0 if they are successful. This not only violates
POSIX if pututxline() is successful, but may also overwrite a valid error
with 0 if, for example, utx_lastlogin_add() fails while utx_log_add()
succeeds.

Reviewed by:	ed
2013-04-17 21:08:15 +00:00
Gabor Kovesdan
ab3f6b347e - Correct mispellings of the word occurrence
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:40:10 +00:00
Joel Dahl
9adbae037d mdoc: remove superfluous paragraph macro. 2013-04-16 20:31:15 +00:00
John Baldwin
8916af883c - Document that sem_wait() can fail with EINTR if it is interrupted by a
signal.
- Fix the old ksem implementation for POSIX semaphores to not restart
  sem_wait() or sem_timedwait() if interrupted by a signal.

MFC after:	1 week
2013-04-16 20:26:31 +00:00
Robert Watson
a49ab93ce2 Use a suitable code generation when building libstand for MIPS.
Reviewed by:	imp
Sponsored by:	DARPA, AFRL
MFC after:	3 days
2013-04-16 17:20:52 +00:00
Robert Watson
909735d975 Adapt libstand's setjmp/longjmp MIPS support to be portable across 32-bit
and 64-bit MIPS.  Don't use the floating-point coprocessor in the libstand
context for MIPS.

Reviewed by:	imp
MFC after:	3 days
Sponsored by:	DARPA, AFRL
2013-04-16 17:03:35 +00:00
Tim Kientzle
7c83e4431a Install a symlink
/usr/lib/include ==> /usr/include

This fixes -print-file-name=include in clang (and is
arguably a better way to fix the same issue in GCC than
the change I made in r231336).

MFC after:	1 week
2013-04-14 19:13:51 +00:00
Dag-Erling Smørgrav
fb69d3e351 Backport upstream r684 (OPENPAM_DEBUG enables debugging macros but does
not turn debugging on by default) and add OPENPAM_DEBUG to CFLAGS.
2013-04-14 16:49:27 +00:00
Jilles Tjoelker
c9e57bf8be libc: Fix typo in French translation.
PR:		kern/177704
Submitted by:	martymac
MFC after:	1 week
2013-04-14 11:44:47 +00:00
Dag-Erling Smørgrav
f2ffd00a72 Clean up. 2013-04-14 00:59:56 +00:00
Dag-Erling Smørgrav
6abb347c5a Include ldns's b{32,64}_{ntop,pton}(). 2013-04-13 22:45:41 +00:00
Dag-Erling Smørgrav
4056bae982 Use the CONNECT method to proxy HTTPS connections through HTTP proxies.
PR:		bin/80176
Submitted by:	Yuichiro NAITO <naito.yuichiro@gmail.com>
2013-04-12 22:05:15 +00:00
Jilles Tjoelker
706b04b66f libthr: Remove _thr_rtld_fini(), unused since r245630. 2013-04-12 19:47:32 +00:00
Dimitry Andric
139f7f9bf5 Upgrade our copy of llvm/clang to trunk r178860, in preparation of the
upcoming 3.3 release (branching and freezing expected in a few weeks).

Preliminary release notes can be found at the usual location:
<http://llvm.org/docs/ReleaseNotes.html>

An MFC is planned once the actual 3.3 release is finished.
2013-04-12 17:57:40 +00:00
Ed Maste
b4c19408e9 Spelling correction 2013-04-11 20:15:37 +00:00
Mikolaj Golub
f574e90c0a Add sbuf_start_section and sbuf_end_section to the libsbuf symbol map.
MFC after:	1 month
2013-04-11 19:50:10 +00:00
Joel Dahl
aaaade7024 Remove EOL whitespace. 2013-04-11 13:05:38 +00:00
Ed Maste
b4fc4a4c72 Remove unused atomic header 2013-04-11 12:49:42 +00:00
Gleb Smirnoff
8d13912c31 Fix typo. 2013-04-11 10:14:28 +00:00
Gleb Smirnoff
b448b67bbb Include types.h for C99 uintXX_t types. 2013-04-11 07:30:49 +00:00
Gleb Smirnoff
2a2134043c o Provide function kvm_read_zpcpu() to access UMA_ZONE_PCPU allocations.
o Provide function kvm_counter_u64_fetch() to fetch valut of a counter(9).

Sponsored by:	Nginx, Inc.
2013-04-10 20:26:53 +00:00
Michael Tuexen
7f15a8dff2 Remove the number of addresses restriction from sctp_connectx().
Remove unused code.
While there, do some cleanup of the code.

MFC after: 1 week
2013-04-10 11:26:30 +00:00
David Xu
31c18e29cc swapcontext wrapper can not be implemented in C, the stack pointer saved in
the context becomes invalid when the function returns, same as setjmp,
it must be implemented in assemble language, see discussions in PR
misc/177624.
2013-04-10 02:40:03 +00:00
Dimitry Andric
809500fc2c Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
2013-04-08 18:45:10 +00:00
Dimitry Andric
4a16efa3e4 Vendor import of llvm trunk r178860:
http://llvm.org/svn/llvm-project/llvm/trunk@178860
2013-04-08 18:41:23 +00:00
Jung-uk Kim
068f3d2f84 Fix declaration vs. definition inconsistency. No functional change. 2013-04-05 23:41:34 +00:00
George V. Neville-Neil
599c412493 Correct the returned message lengths for timeval and bintime control
messages (SO_BINTIME, SO_TIMEVAL).

Obtained from:	phk
2013-04-05 18:09:43 +00:00
Xin LI
12a6865090 Replace access to /dev/random with the kernel pseudo-random number
source sysctl(KERN_ARND) and remove the fallback code.

Obtained from:	OpenBSD
Reviewed by:	secteam
MFC after:	1 month
2013-04-02 23:41:20 +00:00
Matthew D Fleming
e324bf91e8 Fix return type of extattr_set_* and fix rmextattr(8) utility.
extattr_set_{fd,file,link} is logically a write(2)-like operation and
should return ssize_t, just like extattr_get_*.  Also, the user-space
utility was using an int for the return value of extattr_get_* and
extattr_list_*, both of which return an ssize_t.

MFC after:	1 week
2013-04-02 05:30:41 +00:00
Jilles Tjoelker
70d41b5846 wordexp(): Remove wrong IFS usage.
Words in shell script are separated by spaces or tabs independent of the
value of IFS. The value of IFS is only relevant for the result of
substitutions. Therefore, there should be a space between 'wordexp' and the
words to be expanded, not an IFS character.

Paranoia might dictate that the shell ignore IFS from the environment (even
though our sh currently uses it), so do not depend on it in the new test
case.
2013-04-01 20:50:07 +00:00
Joel Dahl
4a121e0748 Remove EOL whitespace. 2013-03-29 08:32:49 +00:00
Sean Bruno
cc0c1555d3 Update hwpmc to support Haswell class processors.
0x3C:      /* Per Intel document 325462-045US 01/2013. */

Add manpage to document all the goodness that is available in this
processor model.

Submitted by:	hiren panchasara <hiren.panchasara@gmail.com>
Reviewed by:	jimharris, sbruno
Obtained from:	Yahoo! Inc.
MFC after:	2 weeks
2013-03-28 19:15:54 +00:00
Jilles Tjoelker
86bca8fb51 btowc(3), isblank(3): Correct prototypes for _l variants.
MFC after:	1 week
2013-03-27 21:31:40 +00:00
Erwin Lansing
378a72e36a Update to 9.8.4-P2
Removed the check for regex.h in configure in order
to disable regex syntax checking, as it exposes
BIND to a critical flaw in libregex on some
platforms. [RT #32688]

Security:	CVE-2013-2266
Approved by:	delphij (mentor)
Sponsored by:	DK Hostmaster A/S
2013-03-27 10:11:43 +00:00
Bryan Venteicher
a83639a2e6 Add missing space
MFC after:	3 days
2013-03-27 07:11:29 +00:00
Jilles Tjoelker
de9dcfba06 accept(2): Mention inheritance of O_ASYNC and signal destination.
While almost nobody uses O_ASYNC, and rightly so, the inheritance of the
related properties across accept() is a portability issue like the
inheritance of O_NONBLOCK.
2013-03-26 22:46:56 +00:00
Dimitry Andric
7e4de3c228 Compile contrib/tzcode/stdtime/localtime.c with -fwrapv, since it relies
on signed integer overflow wrapping.  Otherwise mktime(3) and timegm(3)
can hang, in case the timestamp passed in struct tm is not representable
in a time_t.  Specifically, any timestamp after 2038-01-19 03:14:07, in
combination with a 32-bit time_t.

Note that it would be better to change the code to not rely on undefined
behaviour, but it is contributed code, and it is not entirely trivial to
fix the issue properly.

MFC after:	3 days
2013-03-24 01:35:37 +00:00