summaryrefslogtreecommitdiff
path: root/sys/miscfs/procfs
AgeCommit message (Collapse)Author
2003-12-10a little bit more namespace sanitydrochner
2003-12-04Dynamic sysctl.atatat
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(), vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all nodes are registered with the tree, and nodes can be added (or removed) easily, and I/O to and from the tree is handled generically. Since the nodes are registered with the tree, the mapping from name to number (and back again) can now be discovered, instead of having to be hard coded. Adding new nodes to the tree is likewise much simpler -- the new infrastructure handles almost all the work for simple types, and just about anything else can be done with a small helper function. All existing nodes are where they were before (numerically speaking), so all existing consumers of sysctl information should notice no difference. PS - I'm sorry, but there's a distinct lack of documentation at the moment. I'm working on sysctl(3/8/9) right now, and I promise to watch out for buses.
2003-10-30t_pgrp can be null.christos
2003-10-30Remove some assigned-to but otherwise unused variables.simonb
2003-10-03terminate snprintb 'new' format strings correctly.yamt
(fixes overrun in mount_*)
2003-09-27Put pfsnode in the #ifdef _KERNEL too, so this actually compiles.mycroft
2003-09-27Changes as discussed with itojun on tech-kern. I have modified the enumsdarcy
to have KFS or PFS differentiators. Further I have wrapped the enum in procfs in "#ifdef _KERNEL" as it is done in kernfs. To see the discussion go to http://mail-index.NetBSD.org/tech-kern/2003/09/ and look for "Mismatched enums in include files" in the list.
2003-09-07remove meaningless line (variable overwritten 2 lines below)itojun
2003-08-21Add casts of LINUX_USRSTACK and USRSTACK to handle the caseshe
where these are not constants.
2003-08-09LINUX_USRSTACK is only defined on i386. Thanks Izumi!christos
2003-08-09Only choose the linux usrstack if the netbsd usrstack was higher.christos
2003-08-09Change the way we compute the top of the stack. This makes java-1.4.2 work.christos
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-06-29Back out the lwp/ktrace changes. They contained a lot of colateral damage,fvdl
and need to be examined and discussed more.
2003-06-29Undo part of the ktrace/lwp changes. In particular:thorpej
* Remove the "lwp *" argument that was added to vget(). Turns out that nothing actually used it! * Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(), and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted above, didn't use it). * Remove all of the "lwp *" arguments to internal functions that were added just to appease the above.
2003-06-28Pass lwp pointers throughtout the kernel, as required, so that the lwpid candarrenr
be inserted into ktrace records. The general change has been to replace "struct proc *" with "struct lwp *" in various function prototypes, pass the lwp through and use l_proc to get the process pointer when needed. Bump the kernel rev up to 1.6V
2003-05-29Change "%qu" to "PRIu64" to make it compile on sparc64.hannken
2003-05-28Add /proc/<pid>/stat for linux compat. j2sdk1.4.2 depends on it.christos
2003-05-08Add breaks which were forgotten in rev. 1.2 change.nakayama
Inspired from a report by HIRATSUKA Kouichirou in tech-pkg-ja mailing list.
2003-04-18Make the mode of /proc/<pid>/fd dr-x------christos
2003-04-18Make symlinks for directories that point to the actual directory.christos
Make symlinks to [kqueue] and [misc] for kqueue and misc fds.
2003-04-18change PROCFS_FILENO() to use 5 bits for 'type', since there are more thanjdolecek
16 types nowadays (i.e. Pfd is 17)
2003-04-17do not show nodes corresponding to directory descriptors for processjdolecek
in fd/ subdirectory, nor allow lookup/open for the nodes this fixes PR kern/21187 for good, and also avoids interesting directory locking issues
2003-04-17procfs_readdir(): in Pfd case, only show descriptors of types we wantjdolecek
how to represent (vnodes, fifo, pipes); also use fd_getfile() et al this avoids annoying EOPNOTSUPP error messages from ls -F and such
2003-04-17procfs_lookup(): use fd_getfile() et al in Pfd casejdolecek
2003-04-17use fd_getfile() in procfs_getfp(), and FILE_USE()/FILE_UNUSE() thejdolecek
returned file descriptor pointer appropriately
2003-04-17g/c, it's outdated and the info wouldn't belong here anywayjdolecek
2003-04-17make some local arrays/variables static + constjdolecek
2003-04-16PR/1796: John Kohl: statfs misbehaves under chrooted environments.christos
- Under chroot it displays only the visible filesystems with appropriate paths. - The statfs f_mntonname gets adjusted to contain the real path from root. - While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(), and factored out some of the vfsop statfs() code to copy_statfs_info(). This fixes the problem where some filesystems forgot to set fsid. - Made coda look more like a normal fs.
2003-04-10use former genfs_eopnotsupp_rele() as genfs_eopnotsupp(), so that vnodesjdolecek
are vput()/vrele()d as necessary - some filesystems did use the wrong one for some ops, and it's just safer to not take the chance based on suggestion by Bill Studenmund
2003-04-05Remove pointless check against PID_MAX. Let pfind() do the validation.dsl
(The new pid allocation code may decide to allocate pids above PID_MAX.)
2003-03-15Release the hash lock on failure.enami
2003-03-04Teach procfs_allocvp() about Puptime to avoid panics if "/proc/uptime"tron
is opened.
2003-02-27Change "%llu" to "PRIu64" to make it compile on sparc64.hannken
2003-02-25This addresses PR kerm/19989. Thanks to hamajima@nagoya.ydc.co.jp for ↵jrf
submitting this patch which enables /proc/uptime for linux emul. Patch reviewed by atatat@netbsd.org and tron@netbsd.org, approved by tron@netbsd.org.
2003-02-03don't bother special-casing DTYPE_KQUEUE/DTYPE_MISC nor panic for unknownjdolecek
descriptors; just return with EOPNOTSUPP for any unsupported descriptor type
2003-02-03procfs_allocvp():jdolecek
* do not set *vpp unless successful, otherwise we'd trigger DIAGNOSTIC panic in lookup(9) on error return * on error, make sure to free malloc'ed memory and ungetnewvnode() the previously acquired vnode this fixes panic on 'tail -f <file> &; ls -l /proc/$!/fd' reported by Andrew Brown fix reviewed by Christos Zoulas
2003-01-18Merge the nathanw_sa branch.thorpej
2003-01-04Cast off_t expression to long long to match format even on 64 bitmartin
plattforms. Shouldn't we introduce a PRIoff_t macro to create such format strings?
2003-01-03add LK_CANRECURSE in the locking of /dev/<pid>/fd/<n> and remove the curprocchristos
kludge. Thanks to fvdl.
2003-01-03Implement /proc/<pid>/fd/<n>. This is work in progress. Questionable things:christos
- Is it ok to convert DTYPE_PIPE to VFIFO and DTYPE_SOCKET to VSOCK? - XXX: Avoid locking issue in ls -Rl /proc by avoiding curproc - Does I/O to pipes work? - XXX: Are there security implications?
2002-11-07Fix a signed/unsigned comparison warning.thorpej
2002-11-07Fix signed/unsigned comparison warnings.thorpej
2002-09-21MNT_GETARGS supportchristos
2002-08-03Just use the "time" variable in the *_getattr functions instead of a callsimonb
to (the potentially expensive) microtime().
2002-07-30Die, qaddr_t, die! - mnt_data in struct mount is already effectivelysoren
a void *, so stop pretending otherwise.
2002-07-25Make sure that the pointer to old parent process for ptraced childrenjdolecek
gets reset properly when the old parent exits before the child. A flag is set in old parent process when the child is reparented in ptrace(2). If it's set when process is exiting, all running processes have their 'old parent process' pointer checked and reset if appropriate. Also change to use 'struct proc *' pointer directly, rather than pid_t. This fixes security/14444 by David Sainty. Reviewed by Christos Zoulas.
2002-05-09Move code shared by procfs and the kernel proper out of procfs andthorpej
into the kernel proper (renaming functions from procfs_* to process_*).
2002-04-16Cleanup how file system configuration information is declared, groupingthorpej
related information together, with the file system code itself. This is just low-hanging fruit -- more to come.
2002-01-12Don't hide the real return code with EPERM.christos