summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/procfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup our filesystem pathconf() code a little bit to make it easiermatthew2012-06-201-9/+12
| | | | | | to diff against FreeBSD's. From Brad; no object file change on amd64.
* Make the KERN_NPROCS and KERN_MAXPROC sysctl()s and the RLIMIT_NPROC rlimitguenther2012-04-101-3/+3
| | | | | | | | count processes instead of threads. New sysctl()s KERN_NTHREADS and KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel variables are replaced by nprocess, maxprocess, nthreads, and maxthread. ok tedu@ mikeb@
* Make rusage totals, itimers, and profile settings per-process insteadguenther2012-03-231-3/+3
| | | | | | | of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
* Add PS_EXITING to better differentiate between the process exiting andguenther2012-03-101-2/+2
| | | | the main thread exiting. c.f. regress/sys/kern/main-thread-exited/
* First steps for making ptrace work with rthreads:guenther2012-02-201-2/+2
| | | | | | | | | | - 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@
* Remove the ability to ptrace via procfs, as no one is using it, so fixingguenther2011-12-245-409/+17
| | | | | | | | 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@
* Every single vop_default is set to eopnotsupp, so retire itthib2011-04-051-2/+1
| | | | | | | | and return EOPNOTSUPP directly from the VOP_* functions. Filesystems should, at some point fill in every function in the vop_default struct so we can get rid of the 'if' statements in VOP_*.
* Move P_SUGID and P_SUGIDEXEC from struct proc to struct process, soguenther2011-04-021-2/+2
| | | | | | that you can't evade the checks by doing the dirty work in an rthread ok blambert@, deraadt@
* Bring back the "End the VOP experiment." diff, naddy's issues wherethib2010-12-213-43/+39
| | | | | | unrelated, and his alpha is much happier now. OK deraadt@
* In procfs_root(), while the vn_lock on a newly-allocated vnode can notoga2010-09-231-2/+2
| | | | | | | | | | | | fail it is still good practise to either check the return value or to provide a flag that won't (to avoid copy pasted code that gets it wrong). So change LK_EXCLUSIVE to LK_EXCLUSIVE | LK_RETRY, removing the one caller of vn_lock in the tree that doesn't either pass LK_RETRY or check the return value. ok thib@, jsing@ as part of a larger diff.
* Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)thib2010-09-103-39/+43
| | | | have been resolved.
* End the VOP experiment. Instead of the ridicolusly complicated operationthib2010-09-063-43/+39
| | | | | | | | | | | | | | | | | | | vector setup that has questionable features (that have, as far as I can tell never been used in practice, atleast not in OpenBSD), remove all the gunk and favor a simple struct full of function pointers that get set directly by each of the filesystems. Removes gobs of ugly code and makes things simpler by a magnitude. The only downside of this is that we loose the vnoperate feature so the spec/fifo operations of the filesystems need to be kept in sync with specfs and fifofs, this is no big deal as the API it self is pretty static. Many thanks to armani@ who pulled an earlier version of this diff to current after c2k10 and Gabriel Kihlman on tech@ for testing. Liked by many. "come on, find your balls" deraadt@.
* Correct the links between threads, processes, pgrps, and sessions,guenther2010-07-262-19/+20
| | | | | | | | | 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
* remove crappy old README filestedu2010-07-011-128/+0
|
* - remove super-obvious comments from $fs_vnodeop_entries[]jasper2009-08-131-33/+33
| | | | | prodded by and ok thib@ agreed by art@ and blambert@
* lockmgr -> rwlockoga2009-08-101-8/+6
| | | | | | same diff as before, with the uninitalized variable fixed. ok toby@
* Remove the VREF() macro and replaces all instances with a call to verf(),thib2009-07-091-3/+3
| | | | | | | | | | | which is exactly what the macro does. Macro's that are nothing more then: #define FUNCTION(arg) function(arg) are almost always pointless and should go away. OK blambert@ Agreed by many.
* this rwlock conversion breaks procfs (in linux compat), as found outderaadt2009-04-221-5/+7
| | | | | by Antoine Jacoutot. back out for oga to look at when he gets back in touch with earth.
* Convert lockmgr to rwlock. Been in snaps for a while.oga2009-04-021-7/+5
| | | | ok deraadt@
* same vmspace song and dance as in kern_sysctl.c 1.167; ok kurtderaadt2008-11-101-6/+8
|
* Update access(2) to have modern semantics with respect to X_OK andmillert2008-06-091-3/+3
| | | | | | the superuser. access(2) will now only indicate success for X_OK on non-directories if there is at least one execute bit set on the file. OK deraadt@ thib@ otto@
* procfs can use vop_generic_bmap too;thib2008-05-091-25/+2
|
* retire vn_default_error() and replace all instancesthib2008-05-081-2/+2
| | | | | | with eopnotsupp() instead; ok blambert@
* remove useless defines for the vnode operations, and insteadthib2008-04-241-29/+15
| | | | | | | init the op array functions with whatever the define was set too. ok dlg@,blambert@
* MALLOC/FREE -> malloc/freehshoexer2007-12-091-3/+3
| | | | ok gilles
* replace the machine dependant bytes-to-clicks macro by the MI ptoa()martin2007-09-011-2/+2
| | | | | | | | version for i386 more architectures and ctob() replacement is being worked on prodded by and ok miod
* declare "pid" as pid_t instead of long, and remove unneeded cast to pid_tjasper2007-06-222-5/+5
| | | | ok pedro@ thib@
* ansify/de-register.jasper2007-06-188-126/+49
| | | | no binary change
* pedro ok'd this ~3500 line diff which removes the vop argumentderaadt2007-06-011-75/+15
| | | | | "ap = v" comments in under 8 seconds, so it must be ok. and it compiles too.
* 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
* Allow reads of /proc/meminfo to be correctly terminated, okay thib@pedro2007-01-011-2/+2
|
* Kernel stack can be swapped. This means that stuff that's on the stackmiod2006-11-293-12/+5
| | | | | | | | | | 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@
* Use more queue macros rather than doing it by hand; ok otto@ krw@miod2006-03-052-5/+5
|
* Replace procfs_domem() with a similar interface, process_domem(), which livesmiod2005-12-116-143/+10
| | | | | | | 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@
* Remove unnecessary lockmgr() archaism that was costing too much in termspedro2005-11-191-3/+3
| | | | | | of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
* Add an extra flags argument to uvm_io(), to specify whether we want to fixmiod2005-11-042-6/+7
| | | | | | | | | the protection of the memory mapping we're doing I/O on, or if we want to leave them as they are. This should only be necessary for breakpoint insertion in code, so we'll only use it for ptrace requests. Initially from art@ after discussion with kettenis@ millert@ and I, tested by many.
* 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.
* careful strlcpy and snprintf return handling; ok pedro beckderaadt2005-04-212-6/+15
|
* Remove regs and fpregs pseudo-files from procfs.kettenis2005-04-164-222/+2
| | | | ok deraadt@, miod@
* calling pfind() and checking that the process doesn't exist is notpedro2005-04-011-4/+5
| | | | | | enough to allow us to call vgone() from procfs_inactive(). to avoid a deadlock, check for VXLOCK as well, in case we were called from vclean(). problem report from Sho Fujita, okay tedu@.
* use queue.h provided macro when traversing the process list, no changespedro2004-10-191-3/+3
| | | | in generated object file. from Joris Vink.
* This moves access to wall and uptime variables in MI code,tholo2004-06-241-4/+2
| | | | | | | | | | | | | | encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
* remove more caddr_ttedu2004-05-203-13/+11
|
* Properly flush instruction cache for ptrace(PT_WRTIE_{DI}, ...) on powerpckettenis2004-05-201-2/+10
| | | | | and m68k. ok drahn@, millert@
* make sure uio_offset is a safe value, with suggestions from millert@tedu2004-05-057-27/+24
| | | | | ok deraadt@ millert@ problem noticed by deprotect.com
* repair status by not repeating fields. fixes pr2101 from jim razmustedu2004-03-031-5/+6
|
* save room for nul, so we can unmount later. pr2327 from peter wernertedu2004-03-031-2/+2
|