summaryrefslogtreecommitdiffstats
path: root/sys/compat/linprocfs
Commit message (Collapse)AuthorAgeFilesLines
* Add a pn_destroy field to pfs_node. This field points to a destructordes2007-03-121-36/+36
| | | | | | | | | | | | | function which is called from pfs_destroy() before the node is reclaimed. Modify pfs_create_{dir,file,link}() to accept a pointer to a destructor function in addition to the usual attr / fill / vis pointers. This breaks both the programming and binary interfaces between pseudofs and its consumers. It is believed that there are no pseudofs consumers outside the source tree, so that the impact of this change is minimal. Submitted by: Aniruddha Bohra <bohra@cs.rutgers.edu>
* MFP4: 113090, 113130, 113132jkim2007-03-021-3/+100
| | | | Add Linux kernel version strings to /proc/sys/kernel.
* Use a printf-modifier which doesn't need a cast.netchild2007-01-211-2/+2
| | | | Submitted by: scottl
* Fix tinderbox build on amd64.netchild2007-01-201-2/+2
|
* Ooops, fix the ratelimit.netchild2007-01-201-1/+3
|
* Convert a KASSERT into a runtime warning (rate limited) + failsafe fallback.netchild2007-01-201-4/+12
| | | | | | | Because of a stupid bug (also fixed with this commit) the KASSERT was triggered when runnung the linux top. Pointy hat to: netchild
* MFP4: Change 109654jkim2006-11-271-0/+60
| | | | | | | | | | | | | | | | Add two linprocfs entries for Linux IPC: /proc/sys/kernel/msgmni -> kern.ipc.msgmni /proc/sys/kernel/sem -> kern.ipc.semmsl kern.ipc.semmns kern.ipc.semopm kern.ipc.semmni This fixes msgget03 and semget05 from Linux Test Project (LTP) test suite. msgctl08 and msgctl09 also use /proc/sys/kernel/msgmni but another fix is required from p4 (Change 110179). Requested by: netchild
* style(9)netchild2006-10-291-0/+1
| | | | Noticed by: rwatson
* Spell proc/sys/kernel/pid_max correctly in a comment.keramida2006-10-111-1/+1
| | | | Submitted by: rdivacky
* Implement /proc/sys/kernel/pid_max.netchild2006-10-081-0/+19
| | | | | Submitted by: rdivacky Tested with: LTP
* Lock the vnode around the call to VOP_GETATTR. Move the locked codekib2006-08-081-5/+16
| | | | | | | | | | | | and vn_fullpath (that call malloc(..., M_WAITOK)) from under the vm object lock, since sleep is not allowed while holding the mutex. Being there, wrap VOP_GETATTR call with conditional Giant aquire. Currently this is (almost) noop because pseudofs is Giant-locked. Tested by: kris Approved by: pjd (mentor) MFC after: 2 weeks
* Improve linprovfs to provide/fix thenetchild2006-06-271-27/+51
| | | | | | | | | | | | | | | | | | | | | | | | | - process state (idle, sleeping, running, ...) [1] - the process group ID of the process which owns the connected tty - some page fault stats - time spend in kernel/userland - priority/nice value - starttime [1] - memory/swap stats - scheduling policy Additionally add some new fields and correct some not filled out ones. This brings us down to 15 dummy fields. The fields marked with [1] are needed to get Oracle 10 running. The starttime field is not completely right, since it displays the _same_ starttime for _every_ process, but at least it is not 0 and Oracle accepts this. This is a RELENG_x_y candidate. Noticed by: Dmitry Ganenko <dima@apk-inform.com> [1] Reviewed by: des, rdivacky MFC after: 1 week
* Add the model name, obtained from the hw.model sysctl variable.des2006-06-121-2/+12
| | | | MFC after: 3 weeks
* As far as I can tell, the correct CPU family for amd64 (which Linux callsdes2006-06-021-2/+2
| | | | | | x86_64) is 15, not 6. MFC after: 3 weeks
* Remove various bits of conditional Alpha code and fixup a few comments.jhb2006-05-121-78/+0
|
* Enhance the Linux emulation layer to make MegaRAID SAS managements tool happy.ambrisko2006-05-051-11/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add back in a scheme to emulate old type major/minor numbers via hooks into stat, linprocfs to return major/minors that Linux app's expect. Currently only /dev/null is always registered. Drivers can register via the Linux type shim similar to the ioctl shim but by using linux_device_register_handler/linux_device_unregister_handler functions. The structure is: struct linux_device_handler { char *bsd_driver_name; char *linux_driver_name; char *bsd_device_name; char *linux_device_name; int linux_major; int linux_minor; int linux_char_device; }; Linprocfs uses this to display the major number of the driver. The soon to be available linsysfs will use it to fill in the driver name. Linux_stat uses it to translate the major/minor into Linux type values. Note major numbers are dynamically assigned via passing in a -1 for the major number so we don't need to keep track of them. This is somewhat needed due to us switching to our devfs. MegaCli will not run until I add in the linsysfs and mfi Linux compat changes. Sponsored by: IronPort Systems
* Fix calculation of meminfo's swaptotal and swapfree on at least amd64.mlaier2005-12-111-2/+2
| | | | MFC after: 3 days
* Remove MNT_NODEV mount option. In RELENG_6, MNT_NODEV was a no-op.rodrigc2005-11-291-1/+0
| | | | | | The presence of MNT_NODEV was confusing the am-utils autoconf scripts. PR: conf/79715
* Always produce cpuX entries, even in the case when there is only one CPUsobomax2005-03-061-7/+6
| | | | | | | | in the system. This is consistent with what real linuxes do. PR: kern/75848 Submitted by: Andriy Gapon <avg@icyb.net.ua> MFC after: 3 days
* Match the LINUX32's style with existing styleobrien2005-01-141-3/+3
| | | | | | Submitted by: Jung-uk Kim <jkim@niksun.com> Use positive, not negative logic.
* Start each of the license/copyright comments with /*-imp2005-01-051-1/+1
|
* Fix unvalidated pointer dereference. This is FreeBSD-SA-04:17.procfs.cperciva2004-12-011-1/+13
|
* Pick up the inode number using VOP_GETATTR() rather than caching itphk2004-11-101-4/+6
| | | | | in all vnodes on the off chance that linprocfs needs it. If we can afford to call vn_fullpath() we can afford the much cheaper VOP_GETATTR().
* Add support for 32-bit Linux binary emulation on amd64:tjr2004-08-161-5/+16
| | | | | | | - include <machine/../linux32/linux.h> instead of <machine/../linux/linux.h> if building with the COMPAT_LINUX32 option. - make minimal changes to the i386 linprocfs_docpuinfo() function to support amd64. We return a fake CPU family of 6 for now.
* Remove ps_argsopen from this check, because of two reasons:pjd2004-04-011-1/+1
| | | | | | 1. This check if wrong, because it is true by default (kern.ps_argsopen is 1 by default) (p_cansee() is not even checked). 2. Sysctl kern.ps_argsopen is going away.
* Remove VFS_STATFS() call which violated the lock order and wasn'tdes2004-02-091-4/+0
| | | | | | | really required anyway. PR: kern/61994 Submitted by: Bjoern Groenvall <bg@sics.se>
* 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
OpenPOWER on IntegriCloud