claudio
dde46bf86d
Adjust code since FILL_KPROC() got another argument since struct tusage
...
accounting was modified.
OK dlg@ jca@
2024-07-08 13:18:26 +00:00
jsg
e1cb6e2e7f
remove prototypes with no matching function
2024-05-21 11:13:08 +00:00
asou
6e552b66ad
Correct display the details of COMMAND using the ps command from the kernel
...
crash dump.
OK millert@
2024-05-10 06:46:14 +00:00
miod
f28d1820ab
Stop making <machine/pmap.h> include <machine/pte.h>, and fix the very few
...
files which really need <machine/pte.h> guts.
2024-04-11 18:58:44 +00:00
bluhm
6c2b9309fc
Remove needless includes of netinet6/ip6_var.h header in userland.
...
OK millert@
2024-02-11 21:29:12 +00:00
guenther
5b133f3f27
Delete obsolete /* ARGSUSED */ lint comments.
...
ok miod@ millert@
2023-03-08 04:43:04 +00:00
jsg
108b671b24
Leo Weppelman agreed to rescind clause 3 and 4 in
...
NetBSD kvm_dump.3 rev 1.15 kcore.h rev 1.3
https://mail-index.netbsd.org/source-changes/2009/10/20/msg002169.html
2023-01-04 10:59:34 +00:00
deraadt
4ec73a1227
MAXCOMLEN is no longer needed in these programs, so remove the annotation
...
from sys/param.h include lines, or remove the include lines entirely if
it this was the least requirement.
ok millert
2022-02-22 17:35:01 +00:00
deraadt
3736a0a00a
sys/proc.h requires sys/signal.h (will become visible when sys/param.h
...
is removed)
2022-02-20 00:09:29 +00:00
rob
0407a8a124
Revert change to ps for displaying chrooted process.
...
Ok deraadt
2022-02-14 18:09:08 +00:00
jsg
07ec8e1473
Using FILL_KPROC() from sysctl.h after rev 1.223 requires a definition
...
of struct filedesc. Include sys/filedesc.h here to unbreak the build.
problem found by and ok tb@
2022-02-08 12:10:39 +00:00
deraadt
d415763e8e
sys/core.h is not needed by these files, therefore sys/param.h isn't
...
needed for MAXCOMLEN either
2021-12-01 21:45:19 +00:00
deraadt
0e64ee4c2b
Reduce use of sys/param.h, or annotate the reason why it is needed
...
(pretty much MAXCOMLEN for struct process or struct core), and remove
sys/vnode.h where not needed
2021-12-01 16:53:28 +00:00
deraadt
aa7e1ceda2
Use system _ALIGN to reduce the reasons why this uses sys/param.h
2021-12-01 16:51:57 +00:00
deraadt
c23ad1796f
annotate sys/param.h uses as required, and pull in standard userland
...
.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-10-06 00:42:46 +00:00
deraadt
0b082c0ec8
annotate what symbols are used from sys/param.h lines, or delete them
...
if not required. when deleting, add sys/signal.h or other lines which
were not being pulled in
2021-09-10 00:02:43 +00:00
drahn
96ef40f845
riscv64 libkvm support
...
copied from aarch64 with minimal changes
2021-04-29 20:00:18 +00:00
deraadt
50500a5f44
that 0 should be NULL
2021-03-11 07:43:34 +00:00
mpi
193f316ca4
Revert the convertion of per-process thread into a SMR_TAILQ.
...
We did not reach a consensus about using SMR to unlock single_thread_set()
so there's no point in keeping this change.
2021-02-08 10:51:01 +00:00
mpi
b21c774f96
Convert the per-process thread list into a SMR_TAILQ.
...
Currently all iterations are done under KERNEL_LOCK() and therefor use
the *_LOCKED() variant.
From and ok claudio@
2020-12-07 16:55:28 +00:00
naddy
4070ddb0e0
Accommodate POSIX basename(3) that takes a non-const parameter and
...
may modify the string buffer. ok millert@
2020-10-14 19:28:22 +00:00
deraadt
87afc19ed9
make fixed-sized fixed-value mib[] arrays be const
...
ok guenther tb millert
2020-10-12 22:08:32 +00:00
kettenis
558cf89c3d
Add stub implementation; derived from kvm_sh.c which has our preferred
...
copyright license.
2020-06-28 09:46:58 +00:00
kettenis
fd50b86ca8
Fix grammar in comment.
2020-06-28 09:45:12 +00:00
kn
602083f5e6
Add missing kvm_dump(3) and kvm_getfiles(3) under SEE ALSO for completeness
2020-06-25 12:20:17 +00:00
sthen
4b7f768d91
add sys/wait.h to unbreak builds; following "Replace p_xstat with ps_xexit and
...
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-12-11 12:36:28 +00:00
cheloha
fe57de6bf8
struct proc: change ps_start from utc time to uptime
...
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-10-22 21:19:22 +00:00
deraadt
d4db6826f2
No specific called "exec(3)", so move primary manpage to a name which
...
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-08-11 15:48:08 +00:00
deraadt
df69c215c7
When system calls indicate an error they return -1, not some arbitrary
...
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-28 13:32:41 +00:00
deraadt
8d8661ad57
Export unveil state so that ps(8) can show it. Two new status flags,
...
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-23 16:57:00 +00:00
asou
9865b3a930
fix print not specified process.
...
ok guenther@ yasuoka@
2019-06-07 10:55:41 +00:00
millert
bf198cc6eb
I am retiring my old email address; replace it with my OpenBSD one.
2019-01-25 00:19:25 +00:00
yasuoka
d9ca134e8a
Fix "_nfiles" reference for crash dump.
...
Diff from fukaumi at soum.co.jp
ok mpi
2018-09-07 07:24:05 +00:00
otto
a74b360276
fix format strings; ok @kettenis
2018-05-15 10:04:44 +00:00
zhuk
32ac5daa90
Cleanup usage of free() in libkvm.
...
okay deraadt@, otto@, tb@
2018-05-03 16:42:07 +00:00
zhuk
59133b9f84
A few fixes for kvm_getargv(3)/kvm_getenv(3):
...
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-05-03 15:47:41 +00:00
guenther
4b1f64dcf5
Stop assuming <sys/file.h> will pull in fcntl.h when _KERNEL is defined.
...
ok millert@ sthen@
2018-01-02 06:38:45 +00:00
guenther
cfd60b50b9
Add Symbols.map to explicitly define the ABIs, hiding linker defined symbols.
...
Use hidden aliases for internal invocations of exported symbols to avoid PLT.
ok deraadt@ kettenis@ jca@
2017-12-14 17:06:33 +00:00
guenther
8fda72b7e0
p_comm is the process's command and isn't per thread, so move it from
...
struct proc to struct process.
ok deraadt@ kettenis@
2017-01-21 05:42:03 +00:00
patrick
3c3e641947
Add "support" for OpenBSD/arm64 so that it compiles. It's a copy of
...
the 32-bit ARM version and might need updates.
2017-01-11 14:32:36 +00:00
guenther
3b7181b7c1
Split PID from TID, giving processes a PID unrelated to the TID of their
...
initial thread
ok jsing@ kettenis@
2016-11-07 00:26:32 +00:00
guenther
8cdd1cc481
Add va_nlink information to struct kinfo_file (so bump the shlib minor)
...
from Sebastien Marie
2016-10-02 23:11:55 +00:00
dlg
815ff53b8d
handle fallout of moving the address maps to RBT code.
...
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-16 04:03:27 +00:00
tedu
c6383cbeae
remove references to sparc
2016-09-01 10:08:03 +00:00
tedu
50e7fddbb8
use offsetof to create an offset instead of illegal unaligned pointers
...
ok guenther
2016-07-10 23:06:48 +00:00
stefan
1dd3716cfc
Make amaps use less kernel memory (2nd try)
...
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-26 13:37:26 +00:00
guenther
212e4cb1e4
Revert previous: breaks i386 and powerpc, probably all non-PMAP_DIRECT archs
2016-05-22 22:52:01 +00:00
stefan
3278328672
Make amaps use less kernel memory
...
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-22 16:18:26 +00:00
kettenis
cd70aa850f
Revert previous commit. Converting bcopy into memcpy is never safe when
...
there is a big fat comment saying "Avoid alignment issues" immediately
above them.
2016-05-14 14:24:54 +00:00
deraadt
0f52757250
remove hppa64 port, which we never got going beyond broken single users.
...
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
2016-05-11 21:52:48 +00:00