Up to [DragonFly] / src / lib / libkvm
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Don't forget to set internal error message in kvm_nlist(). Obtained-from: FreeBSD
Some trivial changes from FreeBSD that allow to use kgdb on /dev/fwmem0.0. It also fixes an obvious typo (vmfd -> pmfd). Dragonfly-bug: <http://bugs.dragonflybsd.org/issue839> Submitted-by: Aggelos Economopoulos <email@example.com> Obtained-from: FreeBSD
When <sys/user.h> is included, it MUST be included first because it sets a preprocessor variable that effects other header files.
Change kinfo_proc interface between kernel and userland. Before, we were embedding a struct proc (among others) into struct kinfo_proc. Every time we change implementation details in the kernel, userland has to be adapted (recompiled). In preparation for the coming LWP changes this interface has been reworked. Now kinfo_proc is a structure which does not depend on other structures on the kernel which are subject to change. Instead, the routines fill_kinfo_proc and fill_kinfo_lwp copy all values which are of interest between the kernel structure and the stable kinfo_proc structure. Furthermore, this change adds infrastructure to export LWP-specific data. If userland requests LWP data, it sets the flag KERN_PROC_FLAG_LWP in the sysctl oid. This leads to multiple kinfo_procs being exported. If not set, the first LWP will used. This is like FreeBSD do it, and it seems easy and simple. Note that userland was not yet adjusted to actually request LWPs and aggregate this information if necessary. Besides, the kernel does not yet have more than one LWP per process anyways. This introduces a new file, kern/kern_kinfo.c, which is shared between kernel and libkvm. This was done to avoid and remove code duplication. Now kvm_getprocs constructs a complete struct proc, including pointers, and then calls fill_kinfo_proc to do its job. In-collaboration-with: Thomas E. Spanjaard <firstname.lastname@example.org>
Add kvm_readstr, a convenience helper which lets you read C strings from kernel cores/kmem.
Temporarily work around a race in the kernel. The kernel does a sanity check on the KVM memory range read via /dev/[k]mem. However, if the user buffer takes a VM fault and blocks the process, the related kernel memory could become invalid while the process was blocked. Try to avoid taking faults on the user buffer by touching it first. Reported-by: =?ISO-8859-1?Q?Stefan_Kr=FCger?= <email@example.com>
Remove register keyword usage. Add missing $DragonFly$ keyword to the following files: src/lib/libc/db/btree/bt_utils.c src/lib/libc/db/hash/hash_log2.c src/lib/libc/net/getproto.c src/lib/libc/net/getprotoent.c src/lib/libc/net/getprotoname.c src/lib/libc/net/getservbyname.c src/lib/libc/net/getservbyport.c src/lib/libc/net/iso_addr.c src/lib/libc/net/linkaddr.c src/lib/libc/net/ns_ntoa.c src/lib/libc/quad/muldi3.c src/lib/libc/quad/qdivrem.c src/lib/libc/rpc/authdes_prot.c src/lib/libc/rpc/key_prot_xdr.c src/lib/libcompat/4.3/insque.c src/lib/libcompat/4.3/lsearch.c src/lib/libcompat/4.3/remque.c src/lib/libcompat/4.4/cuserid.c src/lib/libcompat/regexp/regexp.c src/lib/libcompat/regexp/regsub.c src/lib/libcr/db/btree/bt_utils.c src/lib/libcr/db/hash/hash_log2.c src/lib/libcr/net/getproto.c src/lib/libcr/net/getprotoent.c src/lib/libcr/net/getprotoname.c src/lib/libcr/net/getservbyname.c src/lib/libcr/net/getservbyport.c src/lib/libcr/net/iso_addr.c src/lib/libcr/net/linkaddr.c src/lib/libcr/net/ns_ntoa.c src/lib/libcr/quad/muldi3.c src/lib/libcr/quad/qdivrem.c src/lib/libcr/rpc/authdes_prot.c src/lib/libcr/rpc/key_prot_xdr.c src/lib/libedit/common.c src/lib/libedit/emacs.c src/lib/libipx/ipx_ntoa.c src/lib/libm/common_source/fmod.c src/lib/libstand/ether.c src/lib/libstand/fstat.c src/lib/libstand/gets.c src/lib/libstand/ioctl.c src/lib/libstand/netif.c src/lib/libstand/rarp.c src/lib/libstand/rpc.c src/lib/libstand/strcasecmp.c src/lib/libstand/strtol.c src/lib/libstand/write.c
Style(9) cleanup. - Convert K&R-style function definitions to ANSI style. - Remove `register' keywords. - Use stdarg.h instead of varargs.h for variable numbers of arguments. - #define _KERNEL_STRUCTURES when accessing kernel structures. - No functional changes.
* Removed the __P macros from lib/ * Small fixups by me in lib/libcr, there was some stale ')' after the __P( was removed from the line above. Submitted-by: Craig Dooley <firstname.lastname@example.org>
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most ids have been removed from !lint sections and moved into comment sections.
import from FreeBSD RELENG_4 22.214.171.124