summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/procfs/procfs_ctl.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove the ability to ptrace via procfs, as no one is using it, so fixingguenther2011-12-241-312/+0
| | | | | | | | and extending it to support rthreads would be a waste of time. Also, don't show rthreads in the process listing in procfs. Reassurances that compat_linux doesn't need this from ajacoutot@ ok kettenis@
* Correct the links between threads, processes, pgrps, and sessions,guenther2010-07-261-11/+11
| | | | | | | | | 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
* ansify/de-register.jasper2007-06-181-10/+4
| | | | no binary change
* Since p_flag is often manipulated in interrupts and without biglockart2007-03-151-4/+4
| | | | | | | | | | | | 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
* Kernel stack can be swapped. This means that stuff that's on the stackmiod2006-11-291-3/+1
| | | | | | | | | | 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.
* Allow building procfs on systems that don't #define PT_STEP (such as sparc64).tsi2006-08-281-1/+5
| | | | ok pedro@, miod@
* Replace procfs_domem() with a similar interface, process_domem(), which livesmiod2005-12-111-2/+2
| | | | | | | 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@
* Protect the run queues with SCHED_LOCK, not just spl (ot nothing at all inart2005-05-311-1/+8
| | | | | | | one case fixed here). miod@ "appears to be harmless" markus@ ok
* sched work by niklas and art backed out; causes panicsderaadt2005-05-291-8/+1
|
* This patch is mortly art's work and was done *a year* ago. Art wants to thankniklas2005-05-251-1/+8
| | | | | | | | | | | | | | | | everyone for the prompt review and ok of this work ;-) Yeah, that includes me too, or maybe especially me. I am sorry. Change the sched_lock to a mutex. This fixes, among other things, the infamous "telnet localhost &" problem. The real bug in that case was that the sched_lock which is by design a non-recursive lock, was recursively acquired, and not enough releases made us hold the lock in the idle loop, blocking scheduling on the other processors. Some of the other processors would hold the biglock though, which made it impossible for cpu 0 to enter the kernel... A nice deadlock. Let me just say debugging this for days just to realize that it was all fixed in an old diff noone ever ok'd was somewhat of an anti-climax. This diff also changes splsched to be correct for all our architectures.
* remove more caddr_ttedu2004-05-201-6/+4
|
* constify constant namesmickey2003-08-111-4/+4
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* First round of __P removal in sysmillert2002-03-141-2/+2
|
* Turn the ptrace(2) syscall into a kernel compile option, option PTRACE inmiod2002-03-141-2/+13
| | | | | | | | | | | | | your kernel configuration file. By default, GENERIC will enable this. When PTRACE is not enabled, several ptrace-like features of the procfs filesystem will be disabled as well (namely, the ability to read and write any process' registers, as well as attching, single stepping and detaching to/from processes). This should help paranoid people build better sandboxens, and us to build smaller ramdisks.
* Move SET/CLR/ISSET macros to param.h. fgsch@ and millert@ oknordin2002-01-301-6/+1
|
* From NetBSD (thorpej):millert1997-08-291-3/+3
| | | | | Fix a reversed argument which caused procfs_checkioperm() to always return OK". Add a few comments to avoid further confusion.
* 1) pfs_mode should be mode_t, not u_shortmillert1997-08-161-25/+11
| | | | | | | | | | | 2) Fix procfs security hole. This is basically the NetBSD fix (which is based in part on Sean Eric Fagan's FreeBSD fix) with a few minor changes. The change creates as function, procfs_checkioperm(), that has check numbers 3 and 4 from sys_ptrace(). 3) Make procfs_control() use procfs_checkioperm() as well (it already had the same basic checks but some of them were incorrect). 4) Minor stylistic cleanups, including the use of the SET/CLR/ISSET macros to aid general grokability.
* mimic ptrace behaviour; worked out with bitbltderaadt1996-10-141-4/+25
|
* Boy do I feel like a fool. I added a bugfix to Theos' changes, and thenbitblt1996-09-271-15/+1
| | | | | | | | discovered that I had commited a bunch of nonfunctional changes Theo had made, but not debugged. This undoes both my changes, and Theo's. When this code is functional, it will be put back in. Thank you for pointing this out to me David Mazieres.
* It should be possible to trace init if securelevel is at 0, single-user mode,bitblt1996-09-261-1/+16
| | | | without having to peg the system at securelevel -1.
* From NetBSD: update to 960217 sourcesniklas1996-02-271-1/+5
|
* initial import of NetBSD treederaadt1995-10-181-0/+297