2 * Copyright (c) 2000 Dag-Erling Coïdan Smørgrav
3 * Copyright (c) 1999 Pierre Beyssac
4 * Copyright (c) 1993, 1995 Jan-Simon Pendry
5 * Copyright (c) 1993, 1995
6 * The Regents of the University of California. All rights reserved.
8 * This code is derived from software contributed to Berkeley by
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
41 * $FreeBSD: src/sys/i386/linux/linprocfs/linprocfs_vnops.c,v 1.3.2.5 2001/08/12 14:29:19 rwatson Exp $
42 * $DragonFly: src/sys/emulation/linux/i386/linprocfs/linprocfs_vnops.c,v 1.27 2006/03/24 18:35:32 dillon Exp $
46 * procfs vnode interface
49 #include <sys/param.h>
50 #include <sys/systm.h>
52 #include <sys/kernel.h>
54 #include <sys/fcntl.h>
56 #include <sys/signalvar.h>
57 #include <sys/vnode.h>
58 #include <sys/mount.h>
59 #include <sys/namei.h>
60 #include <sys/dirent.h>
61 #include <sys/malloc.h>
62 #include <machine/reg.h>
63 #include <vm/vm_zone.h>
64 #include "linprocfs.h"
65 #include <sys/pioctl.h>
67 #include <machine/limits.h>
69 extern struct vnode *procfs_findtextvp (struct proc *);
71 static int linprocfs_access (struct vop_access_args *);
72 static int linprocfs_badop (void);
73 static int linprocfs_bmap (struct vop_bmap_args *);
74 static int linprocfs_close (struct vop_close_args *);
75 static int linprocfs_getattr (struct vop_getattr_args *);
76 static int linprocfs_inactive (struct vop_inactive_args *);
77 static int linprocfs_ioctl (struct vop_ioctl_args *);
78 static int linprocfs_lookup (struct vop_old_lookup_args *);
79 static int linprocfs_open (struct vop_open_args *);
80 static int linprocfs_print (struct vop_print_args *);
81 static int linprocfs_readdir (struct vop_readdir_args *);
82 static int linprocfs_readlink (struct vop_readlink_args *);
83 static int linprocfs_reclaim (struct vop_reclaim_args *);
84 static int linprocfs_setattr (struct vop_setattr_args *);
86 static int linprocfs_readdir_proc(struct vop_readdir_args *);
87 static int linprocfs_readdir_root(struct vop_readdir_args *);
90 * This is a list of the valid names in the
91 * process-specific sub-directories. It is
92 * used in linprocfs_lookup and linprocfs_readdir
94 static struct proc_target {
99 int (*pt_valid) (struct proc *p);
101 #define N(s) sizeof(s)-1, s
102 /* name type validp */
103 { DT_DIR, N("."), Pproc, NULL },
104 { DT_DIR, N(".."), Proot, NULL },
105 { DT_REG, N("mem"), Pmem, NULL },
106 { DT_LNK, N("exe"), Pexe, NULL },
107 { DT_REG, N("stat"), Pprocstat, NULL },
108 { DT_REG, N("status"), Pprocstatus, NULL },
111 static const int nproc_targets = sizeof(proc_targets) / sizeof(proc_targets[0]);
113 static pid_t atopid (const char *, u_int);
116 * set things up for doing i/o on
117 * the pfsnode (vp). (vp) is locked
118 * on entry, and should be left locked
121 * for procfs we don't need to do anything
122 * in particular for i/o. all that is done
123 * is to support exclusive open on process
127 linprocfs_open(struct vop_open_args *ap)
129 struct pfsnode *pfs = VTOPFS(ap->a_vp);
132 p2 = PFIND(pfs->pfs_pid);
135 if (pfs->pfs_pid && !PRISON_CHECK(ap->a_cred, p2->p_ucred))
138 switch (pfs->pfs_type) {
140 if (((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL)) ||
141 ((pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE)))
144 if (p_trespass(ap->a_cred, p2->p_ucred))
147 if (ap->a_mode & FWRITE)
148 pfs->pfs_flags = ap->a_mode & (FWRITE|O_EXCL);
160 * close the pfsnode (vp) after doing i/o.
161 * (vp) is not locked on entry or exit.
163 * nothing to do for procfs other than undo
164 * any exclusive open flag (see _open above).
167 linprocfs_close(struct vop_close_args *ap)
169 struct pfsnode *pfs = VTOPFS(ap->a_vp);
172 switch (pfs->pfs_type) {
174 if ((ap->a_fflag & FWRITE) && (pfs->pfs_flags & O_EXCL))
175 pfs->pfs_flags &= ~(FWRITE|O_EXCL);
177 * If this is the last close, then it checks to see if
178 * the target process has PF_LINGER set in p_pfsflags,
179 * if this is *not* the case, then the process' stop flags
180 * are cleared, and the process is woken up. This is
181 * to help prevent the case where a process has been
182 * told to stop on an event, but then the requesting process
183 * has gone away or forgotten about it.
185 if ((ap->a_vp->v_usecount < 2)
186 && (p = pfind(pfs->pfs_pid))
187 && !(p->p_pfsflags & PF_LINGER)) {
201 * do an ioctl operation on a pfsnode (vp).
202 * (vp) is not locked on entry or exit.
205 linprocfs_ioctl(struct vop_ioctl_args *ap)
207 struct pfsnode *pfs = VTOPFS(ap->a_vp);
212 struct procfs_status *psp;
216 procp = pfind(pfs->pfs_pid);
221 if (p_trespass(ap->a_cred, procp->p_ucred))
224 switch (ap->a_command) {
226 procp->p_stops |= *(unsigned int*)ap->a_data;
229 procp->p_stops &= ~*(unsigned int*)ap->a_data;
233 * NFLAGS is "non-suser_xxx flags" -- currently, only
234 * PFS_ISUGID ("ignore set u/g id");
236 #define NFLAGS (PF_ISUGID)
237 flags = (unsigned char)*(unsigned int*)ap->a_data;
238 if (flags & NFLAGS && (error = suser_cred(ap->a_cred, 0)))
240 procp->p_pfsflags = flags;
243 *(unsigned int*)ap->a_data = (unsigned int)procp->p_pfsflags;
245 psp = (struct procfs_status *)ap->a_data;
246 psp->state = (procp->p_step == 0);
247 psp->flags = procp->p_pfsflags;
248 psp->events = procp->p_stops;
250 psp->why = procp->p_stype;
251 psp->val = procp->p_xstat;
253 psp->why = psp->val = 0; /* Not defined values */
257 psp = (struct procfs_status *)ap->a_data;
258 if (procp->p_step == 0) {
259 error = tsleep(&procp->p_stype, PCATCH, "piocwait", 0);
263 psp->state = 1; /* It stopped */
264 psp->flags = procp->p_pfsflags;
265 psp->events = procp->p_stops;
266 psp->why = procp->p_stype; /* why it stopped */
267 psp->val = procp->p_xstat; /* any extra info */
269 case PIOCCONT: /* Restart a proc */
270 if (procp->p_step == 0)
271 return EINVAL; /* Can only start a stopped process */
272 if ((signo = *(int*)ap->a_data) != 0) {
273 if (signo >= NSIG || signo <= 0)
275 psignal(procp, signo);
278 wakeup(&procp->p_step);
287 * do block mapping for pfsnode (vp).
288 * since we don't use the buffer cache
289 * for procfs this function should never
290 * be called. in any case, it's not clear
291 * what part of the kernel ever makes use
292 * of this function. for sanity, this is the
293 * usual no-op bmap, although returning
294 * (EIO) would be a reasonable alternative.
297 linprocfs_bmap(struct vop_bmap_args *ap)
299 if (ap->a_vpp != NULL)
300 *ap->a_vpp = ap->a_vp;
301 if (ap->a_doffsetp != NULL)
302 *ap->a_doffsetp = ap->a_loffset;
303 if (ap->a_runp != NULL)
305 if (ap->a_runb != NULL)
311 * linprocfs_inactive is called when the pfsnode
312 * is vrele'd and the reference count is about
313 * to go to zero. (vp) will be on the vnode free
314 * list, so to get it back vget() must be
317 * (vp) is locked on entry and must remain locked
321 linprocfs_inactive(struct vop_inactive_args *ap)
323 /*struct vnode *vp = ap->a_vp;*/
329 * _reclaim is called when getnewvnode()
330 * wants to make use of an entry on the vnode
331 * free list. at this time the filesystem needs
332 * to free any private data and remove the node
333 * from any private lists.
336 linprocfs_reclaim(struct vop_reclaim_args *ap)
338 return (linprocfs_freevp(ap->a_vp));
342 * _print is used for debugging.
343 * just print a readable description
347 linprocfs_print(struct vop_print_args *ap)
349 struct pfsnode *pfs = VTOPFS(ap->a_vp);
351 printf("tag VT_PROCFS, type %d, pid %ld, mode %x, flags %lx\n",
352 pfs->pfs_type, (long)pfs->pfs_pid, pfs->pfs_mode, pfs->pfs_flags);
357 * generic entry point for unsupported operations
360 linprocfs_badop(void)
367 * Invent attributes for pfsnode (vp) and store
369 * Directories lengths are returned as zero since
370 * any real length would require the genuine size
371 * to be computed, and nothing cares anyway.
373 * this is relatively minimal for procfs.
376 linprocfs_getattr(struct vop_getattr_args *ap)
378 struct pfsnode *pfs = VTOPFS(ap->a_vp);
379 struct vattr *vap = ap->a_vap;
384 * First make sure that the process and its credentials
387 switch (pfs->pfs_type) {
394 procp = PFIND(pfs->pfs_pid);
395 if (procp == 0 || procp->p_ucred == NULL)
401 /* start by zeroing out the attributes */
404 /* next do all the common fields */
405 vap->va_type = ap->a_vp->v_type;
406 vap->va_mode = pfs->pfs_mode;
407 vap->va_fileid = pfs->pfs_fileno;
409 vap->va_blocksize = PAGE_SIZE;
410 vap->va_bytes = vap->va_size = 0;
411 vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
414 * Make all times be current TOD.
415 * It would be possible to get the process start
416 * time from the p_stat structure, but there's
417 * no "file creation" time stamp anyway, and the
418 * p_stat structure is not addressible if u. gets
419 * swapped out for that process.
421 nanotime(&vap->va_ctime);
422 vap->va_atime = vap->va_mtime = vap->va_ctime;
425 * now do the object specific fields
427 * The size could be set from struct reg, but it's hardly
428 * worth the trouble, and it puts some (potentially) machine
429 * dependent data into this machine-independent code. If it
430 * becomes important then this function should break out into
431 * a per-file stat function in the corresponding .c file.
436 vap->va_uid = procp->p_ucred->cr_uid;
437 vap->va_gid = procp->p_ucred->cr_gid;
440 switch (pfs->pfs_type) {
443 * Set nlink to 1 to tell fts(3) we don't actually know.
448 vap->va_size = vap->va_bytes = DEV_BSIZE;
452 char buf[16]; /* should be enough */
455 vap->va_size = vap->va_bytes =
456 snprintf(buf, sizeof(buf), "%ld", (long)curproc->p_pid);
461 vap->va_nlink = nproc_targets;
462 vap->va_size = vap->va_bytes = DEV_BSIZE;
466 char *fullpath, *freepath;
467 error = vn_fullpath(procp, NULL, &fullpath, &freepath);
469 vap->va_size = strlen(fullpath);
470 free(freepath, M_TEMP);
472 vap->va_size = sizeof("unknown") - 1;
475 vap->va_bytes = vap->va_size;
485 vap->va_bytes = vap->va_size = 0;
492 * If we denied owner access earlier, then we have to
493 * change the owner to root - otherwise 'ps' and friends
494 * will break even though they are setgid kmem. *SIGH*
496 if (procp->p_flag & P_SUGID)
499 vap->va_uid = procp->p_ucred->cr_uid;
504 vap->va_bytes = vap->va_size = 0;
505 /* uid, gid are already set */
509 panic("linprocfs_getattr");
516 linprocfs_setattr(struct vop_setattr_args *ap)
519 if (ap->a_vap->va_flags != VNOVAL)
523 * just fake out attribute setting
524 * it's not good to generate an error
525 * return, otherwise things like creat()
526 * will fail when they try to set the
527 * file length to 0. worse, this means
528 * that echo $note > /proc/$pid/note will fail.
535 * implement access checking.
537 * something very similar to this code is duplicated
538 * throughout the 4bsd kernel and should be moved
539 * into kern/vfs_subr.c sometime.
541 * actually, the check for super-user is slightly
542 * broken since it will allow read access to write-only
543 * objects. this doesn't cause any particular trouble
544 * but does mean that the i/o entry points need to check
545 * that the operation really does make sense.
548 linprocfs_access(struct vop_access_args *ap)
555 * If you're the super-user,
556 * you always get access.
558 if (ap->a_cred->cr_uid == 0)
562 error = VOP_GETATTR(ap->a_vp, vap, ap->a_td);
567 * Access check is based on only one of owner, group, public.
568 * If not owner, then check group. If not a member of the
569 * group, then check public access.
571 if (ap->a_cred->cr_uid != vap->va_uid) {
576 gp = ap->a_cred->cr_groups;
577 for (i = 0; i < ap->a_cred->cr_ngroups; i++, gp++)
578 if (vap->va_gid == *gp)
585 if ((vap->va_mode & ap->a_mode) == ap->a_mode)
592 * lookup. this is incredibly complicated in the general case, however
593 * for most pseudo-filesystems very little needs to be done.
596 linprocfs_lookup(struct vop_old_lookup_args *ap)
598 struct componentname *cnp = ap->a_cnp;
599 struct vnode **vpp = ap->a_vpp;
600 struct vnode *dvp = ap->a_dvp;
601 char *pname = cnp->cn_nameptr;
602 struct proc_target *pt;
611 if (cnp->cn_nameiop == NAMEI_DELETE ||
612 cnp->cn_nameiop == NAMEI_RENAME ||
613 cnp->cn_nameiop == NAMEI_CREATE) {
619 if (cnp->cn_namelen == 1 && *pname == '.') {
626 switch (pfs->pfs_type) {
628 if (cnp->cn_flags & CNP_ISDOTDOT)
631 if (CNEQ(cnp, "self", 4)) {
632 error = linprocfs_allocvp(dvp->v_mount, vpp, 0, Pself);
635 if (CNEQ(cnp, "meminfo", 7)) {
636 error = linprocfs_allocvp(dvp->v_mount, vpp, 0, Pmeminfo);
639 if (CNEQ(cnp, "cpuinfo", 7)) {
640 error = linprocfs_allocvp(dvp->v_mount, vpp, 0, Pcpuinfo);
643 if (CNEQ(cnp, "stat", 4)) {
644 error = linprocfs_allocvp(dvp->v_mount, vpp, 0, Pstat);
647 if (CNEQ(cnp, "uptime", 6)) {
648 error = linprocfs_allocvp(dvp->v_mount, vpp, 0, Puptime);
651 if (CNEQ(cnp, "version", 7)) {
652 error = linprocfs_allocvp(dvp->v_mount, vpp, 0, Pversion);
655 if (CNEQ(cnp, "loadavg", 7)) {
656 error = linprocfs_allocvp(dvp->v_mount, vpp, 0, Ploadavg);
660 pid = atopid(pname, cnp->cn_namelen);
668 if (!PRISON_CHECK(ap->a_cnp->cn_cred, p->p_ucred))
671 if (ps_showallprocs == 0 && ap->a_cnp->cn_cred->cr_uid != 0 &&
672 ap->a_cnp->cn_cred->cr_uid != p->p_ucred->cr_uid)
675 error = linprocfs_allocvp(dvp->v_mount, vpp, pid, Pproc);
679 if (cnp->cn_flags & CNP_ISDOTDOT) {
680 error = linprocfs_root(dvp->v_mount, vpp);
684 p = PFIND(pfs->pfs_pid);
688 if (!PRISON_CHECK(ap->a_cnp->cn_cred, p->p_ucred))
691 if (ps_showallprocs == 0 && ap->a_cnp->cn_cred->cr_uid != 0 &&
692 ap->a_cnp->cn_cred->cr_uid != p->p_ucred->cr_uid)
695 for (pt = proc_targets, i = 0; i < nproc_targets; pt++, i++) {
696 if (cnp->cn_namelen == pt->pt_namlen &&
697 bcmp(pt->pt_name, pname, cnp->cn_namelen) == 0 &&
698 (pt->pt_valid == NULL || (*pt->pt_valid)(p)))
704 error = linprocfs_allocvp(dvp->v_mount, vpp, pfs->pfs_pid,
713 if (cnp->cn_nameiop == NAMEI_LOOKUP)
719 * If no error occured *vpp will hold a referenced locked vnode.
720 * dvp was passed to us locked and *vpp must be returned locked
721 * so if dvp != *vpp and CNP_LOCKPARENT is not set, unlock dvp.
725 if (*vpp != dvp && (cnp->cn_flags & CNP_LOCKPARENT) == 0) {
726 cnp->cn_flags |= CNP_PDIRUNLOCK;
727 VOP_UNLOCK(dvp, 0, cnp->cn_td);
734 * Does this process have a text file?
737 linprocfs_validfile(struct proc *p)
740 return (procfs_findtextvp(p) != NULLVP);
744 * readdir() returns directory entries from pfsnode (vp).
746 * We generate just one directory entry at a time, as it would probably
747 * not pay off to buffer several entries locally to save uiomove calls.
749 * linprocfs_readdir(struct vnode *a_vp, struct uio *a_uio,
750 * struct ucred *a_cred, int *a_eofflag,
751 * int *a_ncookies, u_long **a_cookies)
754 linprocfs_readdir(struct vop_readdir_args *ap)
759 if (ap->a_uio->uio_offset < 0 || ap->a_uio->uio_offset > INT_MAX)
762 pfs = VTOPFS(ap->a_vp);
764 switch (pfs->pfs_type) {
766 * this is for the process-specific sub-directories.
767 * all that is needed to is copy out all the entries
768 * from the procent[] table (top of this file).
771 error = linprocfs_readdir_proc(ap);
775 * this is for the root of the procfs filesystem
776 * what is needed is a special entry for "self"
777 * followed by an entry for each process on allproc
781 error = linprocfs_readdir_root(ap);
793 linprocfs_readdir_proc(struct vop_readdir_args *ap)
796 int error, i, retval;
798 struct proc_target *pt;
799 struct uio *uio = ap->a_uio;
801 pfs = VTOPFS(ap->a_vp);
802 p = PFIND(pfs->pfs_pid);
805 if (!PRISON_CHECK(ap->a_cred, p->p_ucred))
811 for (pt = &proc_targets[i];
812 !error && uio->uio_resid > 0 && i < nproc_targets; pt++, i++) {
813 if (pt->pt_valid && (*pt->pt_valid)(p) == 0)
816 retval = vop_write_dirent(&error, uio,
817 PROCFS_FILENO(pfs->pfs_pid, pt->pt_pfstype), pt->pt_type,
818 pt->pt_namlen, pt->pt_name);
829 linprocfs_readdir_root(struct vop_readdir_args *ap)
831 int error, i, pcnt, retval;
832 struct uio *uio = ap->a_uio;
833 struct proc *p = LIST_FIRST(&allproc);
844 for (; p && uio->uio_resid > 0 && !error; i++, pcnt++) {
847 d_ino = PROCFS_FILENO(0, Proot);
853 d_ino = PROCFS_FILENO(0, Proot);
860 d_ino = PROCFS_FILENO(0, Proot);
867 d_ino = PROCFS_FILENO(0, Pmeminfo);
874 d_ino = PROCFS_FILENO(0, Pcpuinfo);
881 d_ino = PROCFS_FILENO(0, Pstat);
888 d_ino = PROCFS_FILENO(0, Puptime);
895 d_ino = PROCFS_FILENO(0, Pversion);
902 d_ino = PROCFS_FILENO(0, Ploadavg);
910 p = LIST_NEXT(p, p_list);
913 if (!PRISON_CHECK(ap->a_cred, p->p_ucred))
917 while (!PRISON_CHECK(ap->a_cred, p->p_ucred)) {
918 p = LIST_NEXT(p, p_list);
922 if (ps_showallprocs == 0 &&
923 ap->a_cred->cr_uid != 0 &&
924 ap->a_cred->cr_uid != p->p_ucred->cr_uid) {
925 p = LIST_NEXT(p, p_list);
930 d_ino = PROCFS_FILENO(p->p_pid, Pproc);
931 d_namlen = snprintf(d_name_pid, sizeof(d_name_pid),
932 "%ld", (long)p->p_pid);
935 p = LIST_NEXT(p, p_list);
941 retval = vop_write_dirent(&error, uio,
942 d_ino, d_type, d_namlen, d_name);
955 * readlink reads the link of `self' or `exe'
958 linprocfs_readlink(struct vop_readlink_args *ap)
960 char buf[16]; /* should be enough */
962 struct vnode *vp = ap->a_vp;
963 struct pfsnode *pfs = VTOPFS(vp);
964 char *fullpath, *freepath;
967 switch (pfs->pfs_type) {
969 if (pfs->pfs_fileno != PROCFS_FILENO(0, Pself))
972 len = snprintf(buf, sizeof(buf), "%ld", (long)curproc->p_pid);
974 return (uiomove(buf, len, ap->a_uio));
976 * There _should_ be no way for an entire process to disappear
980 procp = PFIND(pfs->pfs_pid);
981 if (procp == NULL || procp->p_ucred == NULL) {
982 printf("linprocfs_readlink: pid %d disappeared\n",
984 return (uiomove("unknown", sizeof("unknown") - 1,
987 error = vn_fullpath(procp, NULL, &fullpath, &freepath);
989 return (uiomove("unknown", sizeof("unknown") - 1,
991 error = uiomove(fullpath, strlen(fullpath), ap->a_uio);
992 free(freepath, M_TEMP);
1000 * convert decimal ascii to pid_t
1003 atopid(const char *b, u_int len)
1009 if (c < '0' || c > '9')
1011 p = 10 * p + (c - '0');
1020 * procfs vnode operations.
1022 struct vnodeopv_entry_desc linprocfs_vnodeop_entries[] = {
1023 { &vop_default_desc, (vnodeopv_entry_t)vop_defaultop },
1024 { &vop_access_desc, (vnodeopv_entry_t)linprocfs_access },
1025 { &vop_advlock_desc, (vnodeopv_entry_t)linprocfs_badop },
1026 { &vop_bmap_desc, (vnodeopv_entry_t)linprocfs_bmap },
1027 { &vop_close_desc, (vnodeopv_entry_t)linprocfs_close },
1028 { &vop_old_create_desc, (vnodeopv_entry_t)linprocfs_badop },
1029 { &vop_getattr_desc, (vnodeopv_entry_t)linprocfs_getattr },
1030 { &vop_inactive_desc, (vnodeopv_entry_t)linprocfs_inactive },
1031 { &vop_old_link_desc, (vnodeopv_entry_t)linprocfs_badop },
1032 { &vop_old_lookup_desc, (vnodeopv_entry_t)linprocfs_lookup },
1033 { &vop_old_mkdir_desc, (vnodeopv_entry_t)linprocfs_badop },
1034 { &vop_old_mknod_desc, (vnodeopv_entry_t)linprocfs_badop },
1035 { &vop_open_desc, (vnodeopv_entry_t)linprocfs_open },
1036 { &vop_pathconf_desc, (vnodeopv_entry_t)vop_stdpathconf },
1037 { &vop_print_desc, (vnodeopv_entry_t)linprocfs_print },
1038 { &vop_read_desc, (vnodeopv_entry_t)linprocfs_rw },
1039 { &vop_readdir_desc, (vnodeopv_entry_t)linprocfs_readdir },
1040 { &vop_readlink_desc, (vnodeopv_entry_t)linprocfs_readlink },
1041 { &vop_reclaim_desc, (vnodeopv_entry_t)linprocfs_reclaim },
1042 { &vop_old_remove_desc, (vnodeopv_entry_t)linprocfs_badop },
1043 { &vop_old_rename_desc, (vnodeopv_entry_t)linprocfs_badop },
1044 { &vop_old_rmdir_desc, (vnodeopv_entry_t)linprocfs_badop },
1045 { &vop_setattr_desc, (vnodeopv_entry_t)linprocfs_setattr },
1046 { &vop_old_symlink_desc, (vnodeopv_entry_t)linprocfs_badop },
1047 { &vop_write_desc, (vnodeopv_entry_t)linprocfs_rw },
1048 { &vop_ioctl_desc, (vnodeopv_entry_t)linprocfs_ioctl },