dsl
b2aefec351
Remove pointless check against PID_MAX. Let pfind() do the validation.
...
(The new pid allocation code may decide to allocate pids above PID_MAX.)
2003-04-05 23:32:52 +00:00
enami
464f962310
Release the hash lock on failure.
2003-03-15 00:22:47 +00:00
tron
98e6fa0c08
Teach procfs_allocvp() about Puptime to avoid panics if "/proc/uptime"
...
is opened.
2003-03-04 18:55:02 +00:00
hannken
11d5f11e82
Change "%llu" to "PRIu64" to make it compile on sparc64.
2003-02-27 12:20:28 +00:00
jrf
a2d850baf8
This addresses PR kerm/19989. Thanks to hamajima@nagoya.ydc.co.jp for 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-25 21:00:31 +00:00
jdolecek
b327a5601a
don't bother special-casing DTYPE_KQUEUE/DTYPE_MISC nor panic for unknown
...
descriptors; just return with EOPNOTSUPP for any unsupported descriptor type
2003-02-03 22:29:07 +00:00
jdolecek
b1fc5ffac3
procfs_allocvp():
...
* 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-02-03 22:27:42 +00:00
thorpej
b78f59b443
Merge the nathanw_sa branch.
2003-01-18 08:51:40 +00:00
martin
d30bd703a5
Cast off_t expression to long long to match format even on 64 bit
...
plattforms.
Shouldn't we introduce a PRIoff_t macro to create such format strings?
2003-01-04 15:42:35 +00:00
christos
b5e0c9eb5b
add LK_CANRECURSE in the locking of /dev/<pid>/fd/<n> and remove the curproc
...
kludge. Thanks to fvdl.
2003-01-03 13:54:22 +00:00
christos
dbe6c38bc2
Implement /proc/<pid>/fd/<n>. This is work in progress. Questionable things:
...
- 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?
2003-01-03 13:21:17 +00:00
thorpej
ec2b09dc84
Fix a signed/unsigned comparison warning.
2002-11-07 08:21:36 +00:00
thorpej
b7d2ca250a
Fix signed/unsigned comparison warnings.
2002-11-07 08:13:10 +00:00
christos
6868d0a7d6
MNT_GETARGS support
2002-09-21 18:08:27 +00:00
simonb
c475865f39
Just use the "time" variable in the *_getattr functions instead of a call
...
to (the potentially expensive) microtime().
2002-08-03 04:52:44 +00:00
soren
178d83d503
Die, qaddr_t, die! - mnt_data in struct mount is already effectively
...
a void *, so stop pretending otherwise.
2002-07-30 07:40:07 +00:00
jdolecek
02eb342b57
Make sure that the pointer to old parent process for ptraced children
...
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-07-25 20:04:02 +00:00
thorpej
f1f51aa2b8
Move code shared by procfs and the kernel proper out of procfs and
...
into the kernel proper (renaming functions from procfs_* to process_*).
2002-05-09 15:44:44 +00:00
thorpej
37dc008ca3
Cleanup how file system configuration information is declared, grouping
...
related information together, with the file system code itself.
This is just low-hanging fruit -- more to come.
2002-04-16 23:14:05 +00:00
christos
5ff60a19d9
Don't hide the real return code with EPERM.
2002-01-12 18:51:56 +00:00
christos
5266303896
When checking for permissions, include the P_INEXEC test and return
...
EAGAIN if the process is exec'ing.
2002-01-12 18:51:31 +00:00
christos
67c310f08c
Apply the same P_INEXEC test to avoid the execve/trace problem using
...
the procfs ptrace calls.
2002-01-11 22:02:56 +00:00
chs
8e9cdbbd63
replace "vnode" and "vtext" with "file" and "exec" in uvmexp field names.
2001-12-09 03:07:43 +00:00
chs
5a690c92a1
add a VOP_PUTPAGES method for all the filesystems that don't have pages,
...
just unlock the interlock.
2001-12-06 04:27:40 +00:00
thorpej
03efee5585
* Allow machine-dependent code to specify hooks for ptrace(2)
...
(__HAVE_PTRACE_MACHDEP) and procfs (__HAVE_PROCFS_MACHDEP).
These changes will allow platforms like x86 (XMM) and PowerPC
(AltiVec) to export extended register sets in a sane manner.
* Use __HAVE_PTRACE_MACHDEP to export x86 XMM registers (standard
FP + SSE/SSE2) using PT_{GET,SET}XMMREGS (in the machdep
ptrace request space).
* Use __HAVE_PROCFS_MACHDEP to export x86 XMM registers via
/proc/N/xmmregs in procfs.
2001-12-05 00:58:05 +00:00
lukem
2565646230
don't need <sys/types.h> when including <sys/param.h>
2001-11-15 09:47:59 +00:00
lukem
e4b00f433c
add RCSIDs
2001-11-10 13:33:40 +00:00
simonb
cf63a6b052
Remove some variables that are set but never used.
2001-11-06 07:20:37 +00:00
simonb
86c9e7e6d2
In procfs_domem() the addr variable is only needed if PMAP_NEED_PROCWR is
...
defined.
2001-11-06 07:20:08 +00:00
chs
adf5d360a7
add a new VFS op, vfs_reinit, which is called when desiredvnodes is
...
adjusted via sysctl. file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value. the max number of FFS softdeps is also recalculated.
convert various file systems to use the <sys/queue.h> macros for
their hash tables.
2001-09-15 16:12:54 +00:00
chs
94d6f3ee95
map files are zero-length.
2001-08-31 04:56:26 +00:00
chs
6e2828061f
procfs_bmap() should never be called, make it a "bad op".
...
let procfs_mmap() use the default error method.
2001-06-03 02:21:35 +00:00
chs
821ec03ed9
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
2001-06-02 18:09:08 +00:00
mrg
67afbd6270
use _KERNEL_OPT
2001-05-30 11:57:16 +00:00
kleink
79283614b3
In procfs_readdir(), give /proc/# directories DT_DIR (rather than DT_REG).
2001-04-14 13:25:46 +00:00
pk
3c425b682f
Cast field-width' arguments to type
int'.
2001-04-02 07:16:05 +00:00
fvdl
49b162566a
Bump va_blocksize for the map files some more, so that programs with
...
quite a few mappings have a chance of being handled correctly if
st_blksize is looked at.
2001-03-30 20:25:11 +00:00
fvdl
2e64bebd3b
For -o linux mounts, add some code to emulate /proc/#/maps.
...
Needs NAMECACHE_ENTER_REVERSE to include filenames.
2001-03-29 22:41:52 +00:00
jdolecek
522f569810
make some more constant arrays 'const'
2001-02-21 21:39:52 +00:00
jdolecek
555bbcc02a
g/c pmnt_mp in struct procfs_args
2001-01-25 12:44:56 +00:00
jdolecek
d9466585b7
make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const
2001-01-22 12:17:35 +00:00
jdolecek
34c8ae80da
constify
2001-01-18 20:28:15 +00:00
tv
231789093f
No-op revision to force update of this file to a non-"-kk" version.
2001-01-18 16:39:43 +00:00
fvdl
4e000b75b2
Add a few linux-style files, only enabled when -o linux is specified
...
for the mount. Currently these are /proc/cpuinfo and /proc/meminfo.
The former only does something on i386 right now.
2001-01-17 00:09:07 +00:00
david
d0ec21672f
Increase psbuf size as in FreeBSD patch. We don't have jail(8), so the
...
recent bugtraq exploit doesn't apply, but it could be exploitable in
other ways.
2000-12-30 23:14:52 +00:00
chs
aeda8d3b77
Initial integration of the Unified Buffer Cache project.
2000-11-27 08:39:39 +00:00
chs
b0ec16cc38
remove dead code and other misc cleanup.
2000-11-24 18:58:37 +00:00
ad
642267bcc7
Update for hashinit() change.
2000-11-08 14:28:12 +00:00
eeh
1ecf6779be
Add support for variable end of user stacks needed to support COMPAT_NETBSD32:
...
`struct vmspace' has a new field `vm_minsaddr' which is the user TOS.
PS_STRINGS is deprecated in favor of curproc->p_pstr which is derived
from `vm_minsaddr'.
Bump the kernel version number.
2000-09-28 19:05:06 +00:00
thorpej
94a08f31b3
PHOLD/PRELE around uvm_io() to user address space is unnecessary. There
...
is nothing in the U-area that we need.
2000-09-26 23:28:01 +00:00