| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
also fix the confusing comment. ok guethner.
|
|
|
|
|
|
|
|
| |
per-process value, and therefpore turns the VM_PSSTRINGS sysctl into a
per-process one as well. This gets rid of a pointer to the bottom of the
stack at a fixed location. Also clears the road for unmapping the stackgap.
ok deraadt@
|
|
|
|
|
|
| |
controls whether you can ptrace any process with appropriate privileges
or only one own's children.
ok deraadt
|
|
|
|
|
|
| |
months that I broke it before the 5.5 release.
confirmed as not being required by ports by sthen@, ajacoutot@, dcoppa@
|
| |
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
| |
Remember initprocess instead of initproc.
ok matthew@ blambert@
|
|
|
|
|
|
|
| |
and FORK_SYSTEM as a flag to set them. This eliminates needing to
peek into other processes threads in various places. Inspired by NetBSD
ok miod@ matthew@
|
|
|
|
|
|
|
|
|
| |
struct ucred; struct process then directly links to the ucred
Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.
ok matthew@
|
|
|
|
|
|
|
|
|
| |
Tweak the handling of ktrace EMUL when changing ktracing: only
generate one per process (not one per thread) and pass the correct
proc pointer down to the VFS layer. Permit generating of NAMI and
CSW records inside ktrace(2) itself.
ok deraadt@ millert@
|
| |
|
|
|
|
|
| |
stop, just like we do for PT_CONTINUE/PT_STEP. The current code isn't
ready for directing signals to other threads yet.
|
|
|
|
|
|
|
|
|
|
| |
It implements a full-stop model where all threads are stopped before handing
over control to the debugger. Events are reported as before through wait(2);
you will have to call ptrace(PT_GET_PROCESS_STATE, ...) to find out which
thread hit the event. Since this changes the size of struct ptrace_state,
you will have to recompile gdb.
ok guenther@
|
|
|
|
|
|
|
|
|
|
| |
threads list. Calling TAILQ_NEXT on them is a bad idea and will panic
the kernel. So check the P_WEXIT flag and pretend the thread doesn't
exist if it is set. Also make PT_GET_THREAD_FIRST return the first
thread on the threads list instead of the "main" thread, such that you
can actually keep enumerating the threads in this case.
ok guenther@, miod@
|
| |
|
|
|
|
| |
ok guenther@
|
|
|
|
| |
ok miod@
|
|
|
|
| |
the main thread exiting. c.f. regress/sys/kern/main-thread-exited/
|
|
|
|
| |
in previous rev.
|
|
|
|
|
|
|
|
|
|
| |
- move the P_TRACED and P_INEXEC flags, and p_oppid, p_ptmask, and
p_ptstat member from struct proc to struct process
- sort the PT_* requests into those that take a PID vs those that
can also take a TID
- stub in PT_GET_THREAD_FIRST and PT_GET_THREAD_NEXT
ok kettenis@
|
|
|
|
|
|
| |
that you can't evade the checks by doing the dirty work in an rthread
ok blambert@, deraadt@
|
|
|
|
|
|
|
|
|
| |
so that the process-level stuff is to/from struct process and not
struct proc. This fixes a bunch of problem cases in rthreads.
Based on earlier work by blambert and myself, but mostly written
at c2k10.
Tested by many: deraadt, sthen, krw, ray, and in snapshots
|
|
|
|
|
|
|
|
| |
it defines. In some cases, this means pulling in uvm.h or pcb.h
instead, but most of the inclusions were just noise. Tested on
alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax,
mostly by krw and naddy.
ok krw@
|
|
|
|
|
|
|
| |
gcc4 from complaining about casting a pointer to an integer type of different
size.
ok guenther@, jsg@
|
|
|
|
|
|
|
|
| |
of a direct ancestor, closing a localhost DoS. As an exception,
do permit ptrace() of pid 1 and have inferiors() stop climbing if
it hits that.
ok tedu@ hpux_compat suggestion from miod@
|
|
|
|
|
|
|
| |
sleeping calls. Since we are simply operating on another process'
vmspace, grab a (refcounted) copy of that pointer and use that instead.
Similar to the bug just fixed in sysctl_proc_args.
discussed with art
|
| |
|
| |
|
|
|
|
| |
ok miod@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.
Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.
kettenis@ ok
|
|
|
|
|
|
|
|
|
|
| |
should never be referenced outside the context of the process to which
this stack belongs unless we do the PHOLD/PRELE dance. Loads of code
doesn't follow the rules here. Instead of trying to track down all
offenders and fix this hairy situation, it makes much more sense
to not swap kernel stacks.
From art@, tested by many some time ago.
|
|
|
|
| |
help from mickey@, "commit it" miod@
|
| |
|
| |
|
|
|
|
|
|
|
| |
out of procfs and gets a ptrace request PT_{READ,WRITE}_{I,D} as argument;
also procfs_checkioperm() becomes process_checkioperm().
From art@ some time ago; ok kettenis@ pedro@
|
|
|
|
| |
ok miod@
|
| |
|
|
|
|
| |
ok deraadt@, miod@
|
|
|
|
| |
ok deraadt@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@
|
|
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
|
|
| |
is set). deraadt@ and tholo@ OK.
|
| |
|
|
|
|
| |
art@ niklas@ markus@ millert@ deraadt@ ok.
|
|
|
|
| |
the bsd-api-discuss list.
|
|
|
|
|
|
| |
for the single-step. This can slightly break the error handling when
setting the sstep fails, but allows us to emulate single stepping in
software on arch that don't have support for that in hardware.
|
|
|
|
|
|
|
|
| |
They still stay in MD code for backwards compatibility, but a check in
ptrace.h checks if they are defined.
Note - the same thing will be done with PT_{GET,SET}FPREGS once vax implements
them and with PT_STEP when it's implemented by sparc, sparc64 and alpha.
|