summaryrefslogtreecommitdiffstats
path: root/sys/compat/linprocfs/linprocfs.c
Commit message (Collapse)AuthorAgeFilesLines
* Correct for proper vn_fullpath() failure mode: "== -1" -> "!= 0"rwatson2004-01-121-1/+1
| | | | Discussed with: des
* Lock the traversal of the vm object list. Use TAILQ_FOREACH consistently.alc2004-01-021-0/+2
|
* Use mp_ncpus instead of the hw.ncpu sysctl.des2003-12-071-22/+11
|
* Various style and type fixes in my last commit.cognet2003-10-201-16/+12
| | | | Suggested by: mux
* Implement partially /proc/<pid>/maps.cognet2003-10-191-5/+96
| | | | | | It looks enough to make SImics run. Reviewed by: des
* make kernel_sysctl()'s args match its prototype in order to fix thegallatin2003-10-081-1/+1
| | | | alpha build
* Fix a (fortunately harmless) signed / unsigned bug.des2003-09-301-1/+2
|
* Previous commit contained too-smart-for-its-own-good code that mightdes2003-09-221-8/+9
| | | | produce incorrect (though harmless) output on single-CPU systems.
* Fake multi-cpu statistics for proc/stat by dividing the totals by thedes2003-09-221-5/+18
| | | | | | number of CPUs. PR: kern/27522
* Fix some broken comments.des2003-09-091-3/+3
|
* Add cwd, root and statm (modeled on a 2.4.20 kernel). De-obfuscatedes2003-09-091-17/+96
| | | | linprocfs_init() a little and remove some gratuitous whitespace.
* Whitespace cleanup.des2003-08-181-14/+14
|
* Cleanup <machine/cpu.h> by moving MD prototypes to <machine/md_var.h>marcel2003-08-171-0/+1
| | | | | | | | | | | | | | | like we have on other platforms. Move savectx() to <machine/pcb.h>. A lot of files got these MD prototypes through the indirect inclusion of <machine/cpu.h> and now need to include <machine/md_var.h>. The number of which is unexpectedly large... osf1_misc.c especially is tricky because szsigcode is redefined in one of the osf1 header files. Reordering of the include files was needed. linprocfs.c now needs an explicit extern declaration. Tested with: LINT
* Add support for multiple CPUs to cpuinfo.des2003-08-041-8/+18
|
* Add a new function swap_pager_status() which reports the total size of thephk2003-07-181-8/+5
| | | | | | | paging space and how much of it is in use (in pages). Use this interface from the Linuxolator instead of groping around in the internals of the swap_pager.
* Use __FBSDID().obrien2003-06-101-2/+33
|
* - Merge struct procsig with struct sigacts.jhb2003-05-131-2/+6
| | | | | | | | | | | | | | | | | - Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson)
* P_SHOULDSTOP used to be p_stat == SSTOP and needed the sched_lock, now itjhb2003-04-171-3/+3
| | | | | is protected by the proc lock and doesnt' need sched_lock, so adjust the locking appropriately.
* Fix multiple printf warnings on Alpha:jhb2003-04-161-19/+19
| | | | | | - Prefer long long to quad_t to match printf args. - Use uintmax_t and %j to print segsz_t and vm_size_t values. - Fix others in Alpha-specific code.
* - Change the linux_[gs]et_os{name, release, s_version}() functions tojhb2003-03-131-2/+2
| | | | | | | | | | | | | take a thread instead of a proc for their first argument. - Add a mutex to protect the system-wide Linux osname, osrelease, and oss_version variables. - Change linux_get_prison() to take a thread instead of a proc for its first argument and to use td_ucred rather than p_ucred. This is ok because a thread's prison does not change even though it's ucred might. - Also, change linux_get_prison() to return a struct prison * instead of a struct linux_prison * since it returns with the struct prison locked and this makes it easier to safely unlock the prison when we are done messing with it.
* Remove #include <sys/dkstat.h>phk2003-02-161-1/+0
|
* SMP locking for ifnet list.hsu2002-12-221-0/+2
|
* Remove the process state PRS_WAIT.julian2002-10-211-3/+0
| | | | | | It is never used. I left it there from pre-KSE days as I didn't know if I'd need it or not but now I know I don't.. It's functionality is in TDI_IWAIT in the thread.
* Back our kernel support for reliable signal queues.jmallett2002-10-011-1/+1
| | | | Requested by: rwatson, phk, and many others
* First half of implementation of ksiginfo, signal queues, and such. Thisjmallett2002-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | gets signals operating based on a TailQ, and is good enough to run X11, GNOME, and do job control. There are some intricate parts which could be more refined to match the sigset_t versions, but those require further evaluation of directions in which our signal system can expand and contract to fit our needs. After this has been in the tree for a while, I will make in kernel API changes, most notably to trapsignal(9) and sendsig(9), to use ksiginfo more robustly, such that we can actually pass information with our (queued) signals to the userland. That will also result in using a struct ksiginfo pointer, rather than a signal number, in a lot of kern_sig.c, to refer to an individual pending signal queue member, but right now there is no defined behaviour for such. CODAFS is unfinished in this regard because the logic is unclear in some places. Sponsored by: New Gold Technology Reviewed by: bde, tjr, jake [an older version, logic similar]
* Use the fields in the sysentvec and in the vm map header in place of thejake2002-09-211-1/+2
| | | | | | | | constants VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK and PS_STRINGS. This is mainly so that they can be variable even for the native abi, based on different machine types. Get stack protections from the sysentvec too. This makes it trivial to map the stack non-executable for certain abis, on machines that support it.
* Completely redo thread states.julian2002-09-111-6/+1
| | | | Reviewed by: davidxu@freebsd.org
* Part 1 of KSE-IIIjulian2002-06-291-19/+44
| | | | | | | | | | | | | The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test program (in tools) Reviewed by: Almost everyone who counts (at various times, peter, jhb, matt, alfred, mini, bernd, and a cast of thousands) NOTE: this is still Beta code, and contains lots of debugging stuff. expect slight instability in signals..
* Change p_can{debug,see,sched,signal}()'s first argument to be a threadjhb2002-05-191-1/+1
| | | | | | | pointer instead of a proc pointer and require the process pointed to by the second argument to be locked. We now use the thread ucred reference for the credential checks in p_can*() as a result. p_canfoo() should now no longer need Giant.
* - p_cansee() needs the target process locked.jhb2002-04-131-17/+15
| | | | - We need the proc lock held for more of procfs_doprocstatus().
* - Change fill_kinfo_proc() to require that the process is locked when itjhb2002-04-091-2/+2
| | | | | | | | | | | | | | is called. - Change sysctl_out_proc() to require that the process is locked when it is called and to drop the lock before it returns. If this proves too complex we can change sysctl_out_proc() to simply acquire the lock at the very end and have the calling code drop the lock right after it returns. - Lock the process we are going to export before the p_cansee() in the loop in sysctl_kern_proc() and hold the lock until we call sysctl_out_proc(). - Don't call p_cansee() on the process about to be exported twice in the aforementioned loop.
* Protect proc struct (p_args and p_comm) when doing procfs IO that pullsalfred2002-03-291-11/+17
| | | | | | data from it. Submitted by: Jonathan Mini <mini@haikugeek.com>
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-201-1/+0
|
* remove "discards qualifier" erro by not potentially writing tojulian2002-02-261-2/+5
| | | | a const *.
* Lock struct pgrp, session and sigio.tanimura2002-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | New locks are: - pgrpsess_lock which locks the whole pgrps and sessions, - pg_mtx which protects the pgrp members, and - s_mtx which protects the session members. Please refer to sys/proc.h for the coverage of these locks. Changes on the pgrp/session interface: - pgfind() needs the pgrpsess_lock held. - The caller of enterpgrp() is responsible to allocate a new pgrp and session. - Call enterthispgrp() in order to enter an existing pgrp. - pgsignal() requires a pgrp lock held. Reviewed by: jhb, alfred Tested on: cvsup.jp.FreeBSD.org (which is a quad-CPU machine running -current)
* Pull in more stuff from procfs now that it's been pseudofsized.des2001-12-091-31/+3
|
* o Introduce pr_mtx into struct prison, providing protection for therwatson2001-12-031-3/+8
| | | | | | | | | | | | | | | | | | mutable contents of struct prison (hostname, securelevel, refcount, pr_linux, ...) o Generally introduce mtx_lock()/mtx_unlock() calls throughout kern/ so as to enforce these protections, in particular, in kern_mib.c protection sysctl access to the hostname and securelevel, as well as kern_prot.c access to the securelevel for access control purposes. o Rewrite linux emulator abstractions for accessing per-jail linux mib entries (osname, osrelease, osversion) so that they don't return a pointer to the text in the struct linux_prison, rather, a copy to an array passed into the calls. Likewise, update linprocfs to use these primitives. o Update in_pcb.c to always use prison_getip() rather than directly accessing struct prison. Reviewed by: jhb
* promote tv_sec in printf to make it type agnosticdillon2001-10-291-4/+4
|
* Reporting device drivers by traversing cdevsw[] is at best a hackphk2001-10-261-2/+6
| | | | | | | | | | | which may or may not return something which is partially right. Disable the "devices" file until we find out what this is needed for, and what exactly those apps need. This will allow cdevsw to become static again. Approved by: DES
* Add proc/mtab which simulates a Linux system's /etc/mtab.des2001-10-211-1/+72
|
* #if 0 out some code that depends on other uncommitted patches.des2001-10-191-0/+2
|
* Adapt to pseudofs changes (dynamic initialization, not static).des2001-10-191-67/+60
| | | | | Use the new linux_ifname() function from the linuxulator rather than roll our own interface name translation.
* Catch up with the visibility callback stuff, and give up trying to keep thedes2001-10-011-19/+37
| | | | file definitions on single lines.
* Specify readability and / or writeability for all nodes that need it.des2001-09-301-18/+18
|
* Adapt to pseudofs version 2. Sorry about the breakage - I had this readydes2001-09-291-20/+18
| | | | to commit along with the pseudofs patches, but just plain forgot.
* Clean up my source tree to avoid getting hit too badly by the next KSE ordes2001-09-251-20/+37
| | | | | whatever mega-commit. No real functional changes, just some experiments / work in progress.
* KSE Milestone 2julian2001-09-121-7/+7
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* o Replace calls to p_can(..., P_CAN_xxx) with calls to p_canxxx().rwatson2001-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | The p_can(...) construct was a premature (and, it turns out, awkward) abstraction. The individual calls to p_canxxx() better reflect differences between the inter-process authorization checks, such as differing checks based on the type of signal. This has a side effect of improving code readability. o Replace direct credential authorization checks in ktrace() with invocation of p_candebug(), while maintaining the special case check of KTR_ROOT. This allows ktrace() to "play more nicely" with new mandatory access control schemes, as well as making its authorization checks consistent with other "debugging class" checks. o Eliminate "privused" construct for p_can*() calls which allowed the caller to determine if privilege was required for successful evaluation of the access control check. This primitive is currently unused, and as such, serves only to complicate the API. Approved by: ({procfs,linprocfs} changes) des Obtained from: TrustedBSD Project
* Say one thing, do the other... nextpid -> lastpiddes2001-06-111-1/+1
|
* Implement proc/cpuinfo for the Alpha (thanks to gallatin).des2001-06-111-10/+160
| | | | Implement proc/pid/cmdline.
OpenPOWER on IntegriCloud