summaryrefslogtreecommitdiff
path: root/lib/libkvm
AgeCommit message (Collapse)Author
2024-07-08Adjust code since FILL_KPROC() got another argument since struct tusageClaudio Jeker
accounting was modified. OK dlg@ jca@
2024-05-21remove prototypes with no matching functionJonathan Gray
2024-05-10Correct display the details of COMMAND using the ps command from the kernelASOU Masato
crash dump. OK millert@
2024-04-11Stop making <machine/pmap.h> include <machine/pte.h>, and fix the very fewMiod Vallat
files which really need <machine/pte.h> guts.
2024-02-11Remove needless includes of netinet6/ip6_var.h header in userland.Alexander Bluhm
OK millert@
2023-03-08Delete obsolete /* ARGSUSED */ lint comments.Philip Guenther
ok miod@ millert@
2023-01-04Leo Weppelman agreed to rescind clause 3 and 4 inJonathan Gray
NetBSD kvm_dump.3 rev 1.15 kcore.h rev 1.3 https://mail-index.netbsd.org/source-changes/2009/10/20/msg002169.html
2022-02-22MAXCOMLEN is no longer needed in these programs, so remove the annotationTheo de Raadt
from sys/param.h include lines, or remove the include lines entirely if it this was the least requirement. ok millert
2022-02-20sys/proc.h requires sys/signal.h (will become visible when sys/param.hTheo de Raadt
is removed)
2022-02-14Revert change to ps for displaying chrooted process.Rob Pierce
Ok deraadt
2022-02-08Using FILL_KPROC() from sysctl.h after rev 1.223 requires a definitionJonathan Gray
of struct filedesc. Include sys/filedesc.h here to unbreak the build. problem found by and ok tb@
2021-12-01sys/core.h is not needed by these files, therefore sys/param.h isn'tTheo de Raadt
needed for MAXCOMLEN either
2021-12-01Reduce use of sys/param.h, or annotate the reason why it is neededTheo de Raadt
(pretty much MAXCOMLEN for struct process or struct core), and remove sys/vnode.h where not needed
2021-12-01Use system _ALIGN to reduce the reasons why this uses sys/param.hTheo de Raadt
2021-10-06annotate sys/param.h uses as required, and pull in standard userlandTheo de Raadt
.h files as required.... preparing for a potential future when sys/proc.h might be more clean... do not touch the MD .c files yet, the dragons remain full of fire
2021-09-10annotate what symbols are used from sys/param.h lines, or delete themTheo de Raadt
if not required. when deleting, add sys/signal.h or other lines which were not being pulled in
2021-04-29riscv64 libkvm supportDale Rahn
copied from aarch64 with minimal changes
2021-03-11that 0 should be NULLTheo de Raadt
2021-02-08Revert the convertion of per-process thread into a SMR_TAILQ.Martin Pieuchot
We did not reach a consensus about using SMR to unlock single_thread_set() so there's no point in keeping this change.
2020-12-07Convert the per-process thread list into a SMR_TAILQ.Martin Pieuchot
Currently all iterations are done under KERNEL_LOCK() and therefor use the *_LOCKED() variant. From and ok claudio@
2020-10-14Accommodate POSIX basename(3) that takes a non-const parameter andChristian Weisgerber
may modify the string buffer. ok millert@
2020-10-12make fixed-sized fixed-value mib[] arrays be constTheo de Raadt
ok guenther tb millert
2020-06-28Add stub implementation; derived from kvm_sh.c which has our preferredMark Kettenis
copyright license.
2020-06-28Fix grammar in comment.Mark Kettenis
2020-06-25Add missing kvm_dump(3) and kvm_getfiles(3) under SEE ALSO for completenesskn
2019-12-11add sys/wait.h to unbreak builds; following "Replace p_xstat with ps_xexit andStuart Henderson
ps_xsig" (sysctl.h r1.198 and friends) FILL_KPROC requires W_EXITCODE from there. cc -static -pie -o ps keyword.o nlist.o print.o ps.o utf8.o -lkvm ld: error: undefined symbol: W_EXITCODE >>> referenced by kvm_proc2.c:293 (/usr/src/lib/libkvm/kvm_proc2.c:293) [...]
2019-10-22struct proc: change ps_start from utc time to uptimecheloha
Allows us to determine how long a process has been running, even if the UTC clock jumps. With help from bluhm@ and millert@, who squashed several bugs. ok bluhm@ millert@
2019-08-11No specific called "exec(3)", so move primary manpage to a name whichTheo de Raadt
does exist -- execv(3). Still call this a family but without "Nm". Adjust Xr in various pages to refer to the precise function used rather than the family, in most cases the semantics of execve(2) are being referenced, so change the Xr. ok jmc
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-06-23Export unveil state so that ps(8) can show it. Two new status flags,Theo de Raadt
you'll see one, or neither. 'u' - process installed unveils, but not yet locked with unveil(0,0) or pledge w/o "unveil" 'U' - process has installed unveils, and locked. ok rob
2019-06-07fix print not specified process.asou
ok guenther@ yasuoka@
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.Todd C. Miller
2018-09-07Fix "_nfiles" reference for crash dump.YASUOKA Masahiko
Diff from fukaumi at soum.co.jp ok mpi
2018-05-15fix format strings; ok @kettenisOtto Moerbeek
2018-05-03Cleanup usage of free() in libkvm.Vadim Zhukov
okay deraadt@, otto@, tb@
2018-05-03A few fixes for kvm_getargv(3)/kvm_getenv(3):Vadim Zhukov
1. Most notable: this splits argv buffer into argv-specific one and environ-specific one. This makes ps -eww totally happy. 2. realloc() usage in kvm_argv() is now ENOMEM-prone. 3. The "int off" changed to "ptrdiff_t off", as it should be. input & okay deraadt@, millert@
2018-01-02Stop assuming <sys/file.h> will pull in fcntl.h when _KERNEL is defined.Philip Guenther
ok millert@ sthen@
2017-12-14Add Symbols.map to explicitly define the ABIs, hiding linker defined symbols.Philip Guenther
Use hidden aliases for internal invocations of exported symbols to avoid PLT. ok deraadt@ kettenis@ jca@
2017-01-21p_comm is the process's command and isn't per thread, so move it fromPhilip Guenther
struct proc to struct process. ok deraadt@ kettenis@
2017-01-11Add "support" for OpenBSD/arm64 so that it compiles. It's a copy ofPatrick Wildt
the 32-bit ARM version and might need updates.
2016-11-07Split PID from TID, giving processes a PID unrelated to the TID of theirPhilip Guenther
initial thread ok jsing@ kettenis@
2016-10-02Add va_nlink information to struct kinfo_file (so bump the shlib minor)Philip Guenther
from Sebastien Marie
2016-09-16handle fallout of moving the address maps to RBT code.David Gwynne
because userland doesnt have subr_tree, and the tree traversal in this file is simple, this inlines the logic that the functions in the kernel do.
2016-09-01remove references to sparcTed Unangst
2016-07-10use offsetof to create an offset instead of illegal unaligned pointersTed Unangst
ok guenther
2016-05-26Make amaps use less kernel memory (2nd try)Stefan Kempf
The original diff would crash at least i386 and powerpc, as spotted by guenther@ The reason was an incorrect use of sizeof in amap_lookups(). Confirmation that powerpc works by mpi@ and mglocker@ "throw it in" deraadt@ Original commit message: This is achieved by grouping amap slots into chunks that are allocated on-demand by pool(9). Endless "fltamapcopy" loops because of kmem shortage should be solved now. The kmem savings are also important to later enable vmm(4) to use larged shared memory mappings for guest VM RAM. This adapts libkvm also because the amap structure layout has changed. Testing and fix of libkvm glitch in initial diff by tb@ Feedback and "time to get this in" kettenis@
2016-05-22Revert previous: breaks i386 and powerpc, probably all non-PMAP_DIRECT archsPhilip Guenther
2016-05-22Make amaps use less kernel memoryStefan Kempf
This is achieved by grouping amap slots into chunks that are allocated on-demand by pool(9). Endless "fltamapcopy" loops because of kmem shortage should be solved now. The kmem savings are also important to later enable vmm(4) to use larged shared memory mappings for guest VM RAM. This adapts libkvm also because the amap structure layout has changed. Testing and fix of libkvm glitch in initial diff by tb@ Feedback and "time to get this in" kettenis@
2016-05-14Revert previous commit. Converting bcopy into memcpy is never safe whenMark Kettenis
there is a big fat comment saying "Avoid alignment issues" immediately above them.
2016-05-11remove hppa64 port, which we never got going beyond broken single users.Theo de Raadt
hppa reverse-stack gives us a valuable test case, but most developers don't have a 2nd one to proceed further with this. ok kettenis