summaryrefslogtreecommitdiff
path: root/include/linux/proc_fs.h
AgeCommit message (Collapse)Author
2004-11-07[PATCH] /proc/kcore - enable/disable.Pawel Sikora
The presence of /proc/kcore is supposed to be configurable. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-20USB: fix build error in the USB core if CONFIG_PROCFS is disabled Greg Kroah-Hartman
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-09-28[NET]: Generic network statisticsHarald Welte
This patch moves the following files in /proc: /proc/net/rt_cache_stat /proc/net/stat/rt_cache /proc/net/ip_conntrack_stat /proc/net/stat/ip_conntrack /proc/net/arp_cache_stat /proc/net/stat/arp_cache /proc/net/clip_arp_cache_stat /proc/net/stat/clip_arp_cache /proc/net/dn_neigh_cache_stat /proc/net/stat/dn_neigh_cache This allows a generic statistics tool to scan for all available statistics by doing readdir(2) on /proc/net/stat It also adds a special first 'template' line to rt_cache and ip_conntrack in order to facilitate compatibility once somebody adds new fields to the output lines. WARNING: This breaks existing rtstat.c and ctstat.c userspace programs (hopefully for the last time). rtstat is non-existant or broken in major distributions anyway, and ctstat is too new for any distros having it picked up. Therefore, we justify this breakage. A new unified statistics tool for routing cache, connection tracking and neighbour cache is under development and will be included with iproute2. Signed-off-by: Harald Welte <laforge@gnumonks.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-02[PATCH] fix proc_symlink() warning with CONFIG_PROC_FS=nRoland Dreier
The last parameter of proc_symlink is usually a "const char *", but the stub in <linux/proc_fs.h> for CONFIG_PROC_FS=n omits the const and makes its last parameter a "char *". This causes a warning about discarding qualifiers for any code that passes something const for that last parameter. This patch fixes that up and also, for neatness's sake, makes the stub for create_proc_read_entry() match the usual prototype more exactly (use read_proc_t rather than the underlying function pointer type). Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-26[PATCH] O(1) proc_pid_statm()William Lee Irwin III
Merely removing down_read(&mm->mmap_sem) from task_vsize() is too half-assed to let stand. The following patch removes the vma iteration as well as the down_read(&mm->mmap_sem) from both task_mem() and task_statm() and callers for the CONFIG_MMU=y case in favor of accounting the various stats reported at the times of vma creation, destruction, and modification. Unlike the 2.4.x patches of the same name, this has no per-pte-modification overhead whatsoever. This patch quashes end user complaints of top(1) being slow as well as kernel hacker complaints of per-pte accounting overhead simultaneously. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-26[PATCH] task_vsize() locking cleanupWilliam Lee Irwin III
task_vsize() doesn't need mm->mmap_sem for the CONFIG_MMU case; the semaphore doesn't prevent mm->total_vm from going stale or getting inconsistent with other numbers regardless. Also, KSTK_EIP() and KSTK_ESP() don't want or need protection from mm->mmap_sem either. So this pushes mm->mmap_sem to task_vsize() in the CONFIG_MMU=n task_vsize(). Also, hoist the prototype of task_vsize() into proc_fs.h The net result of this is a small speedup of procps for CONFIG_MMU. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-04-21[PATCH] dynamic proc cleanupsAndrew Morton
From: Matt Mackall <mpm@selenic.com> Delete obsolete comment and kill test of obsolete define.
2004-04-18[PATCH] Increase number of dynamic inodes in procfsAndrew Morton
From: Nathan Lynch <nathanl@austin.ibm.com> On some larger ppc64 configurations /proc/device-tree is exhausting procfs' dynamic (non-pid) inode range (16K). This patch makes the dynamic inode range 0xf0000000-0xffffffff and changes the inode number allocator to use the idr.c allocator for the first-fit allocations.
2004-03-16[PATCH] fix ppc rtas compileAnton Blanchard
The proc_rtas_init call in procfs was removed (replaced with an initcall) but the prototype was still hiding. Kill it.
2004-01-30[PATCH] ppc64: fixes for compile with CONFIG_PROC_DEVICETREE=n, from Nathan ↵Andrew Morton
Lynch From: Anton Blanchard <anton@samba.org> - nop out proc_device_tree_add_node if CONFIG_PROC_DEVICETREE=n - stubs for procfs-related functions when CONFIG_PROC_DEVICETREE=n
2004-01-18[PATCH] ppc64: UP compile fixes, from Paul MackerrasAndrew Morton
From: Anton Blanchard <anton@samba.org> Minor fixes to make the UP case compile, export cpu_possible_map, fix up whitespace etc.
2004-01-18[PATCH] ppc64: support for runtime updates of /proc/device-tree, from Nathan ↵Andrew Morton
Lynch From: Anton Blanchard <anton@samba.org> support for runtime updates of /proc/device-tree, from Nathan Lynch
2003-12-29[PATCH] make /proc/tty/driver/ S_IRUSR | S_IXUSR for root onlyAndrew Morton
From: Chris Wright <chrisw@osdl.org> Fix for CAN-2003-0461: /proc/tty/driver/serial in Linux 2.4.x reveals the exact number of characters used in serial links, which could allow local users to obtain potentially sensitive information such as the length of passwords.
2003-09-12[NET]: Better proc_net macros for non-procfs case.Stephen Hemminger
2003-08-31[PATCH] kill CONFIG_KCORE_AOUTAndrew Morton
From: Adrian Bunk <bunk@fs.tum.de> Remove CONFIG_KCORE_AOUT: the ability to present /proc/kcore in a.out format. I've checked with various arch maintainers. It won't be missed.
2003-08-31[PATCH] Fix build with CONFIG_KCORE_AOUTAndrew Morton
We get a linkage error with CONFIG_KCORE_AOUT because there is no implementation of kclist_add() and kclist_del(). Also fix a warning in the a.out version of read_kcore(). Maybe we should just remove kcore a.out support. m68knommu and h8300 are setting CONFIG_KCORE_AOUT in their defconfigs though.
2003-07-10[PATCH] remove proc_mknod()Andrew Morton
From: Christoph Hellwig <hch@lst.de> It's not used anymore since ALSA switched to traditional devices and device nodes in procfs are a bad idea in general.. Also update the docs.
2003-07-03[PATCH] Add open intent information to the 'struct nameidata'Trond Myklebust
- Add open intent information to the 'struct nameidata'. - Pass the struct nameidata as an optional parameter to the lookup() inode operation. - Pass the struct nameidata as an optional parameter to the d_revalidate() dentry operation. - Make link_path_walk() set the LOOKUP_CONTINUE flag in nd->flags instead of passing it as an extra parameter to d_revalidate(). - Make open_namei(), and sys_uselib() set the open()/create() intent data.
2003-06-07[PATCH] remove_proc_entry() fixAndrew Morton
From Bartlomiej Zolnierkiewicz With !CONFIG_PROC_FS, ieee1394_core fails to compile because the argument to this inline is still evaluated. But it doesn't exist. A general fix is to not evaluate the arg at all.
2003-06-07[PATCH] Fix the build with !CONFIG_PROC_FSAndrew Morton
From: Adrian Bunk <bunk@fs.tum.de>
2003-06-02[PATCH] /proc/kcore fixesAndrew Morton
From: Tony Luck <tony.luck@intel.com> /proc/kcore has been broken on some architectures for a long time. Problems surround the fact that some architectures allocate memory for vmalloc() and thus modules at addresses below PAGE_OFFSET, which results in negative file offsets in the virtual core file image provided by /proc/kcore. There are also pending problems for discontig memory systems as /proc/kcore just pretends that there are no holes between "PAGE_OFFSET" and "high_memory", so an unwary user (ok super-user) can read non-existant memory which may do bad things. There may also be kernel objects that would be nice to view in /proc/kcore, but do not show up there. A pending change on ia64 to allow booting on machines that don't have physical memory in any convenient pre-determined place will make things even worse, because the kernel itself won't show up in the current implementation of /proc/kcore! The patch attached provides enough hooks that each architecture should be able to make /proc/kcore useful. The patch is INCOMPLETE in that *use* of those hooks is ONLY PROVIDED FOR IA64. Here's how it works. The default code in fs/proc/kcore.c doesn't set up any "elf_phdr" sections ... it is left to each architecture to make appropriate calls to "kclist_add()" to specify a base address and size for each piece of kernel virtual address space that needs to be made accessible through /proc/kcore. To get the old functionality, you'll need two calls that look something like: kclist_add(&kcore_mem, __va(0), max_low_pfn * PAGE_SIZE); kclist_add(&kcore_vmem, (void *)VMALLOC_START, VMALLOC_END-VMALLOC_START); The first makes all of memory visible (__i386__, __mc68000__ and __x86_64__ should use __va(PAGE_SIZE) to duplicate the original lack of access to page 0). The second provides a single map for all "vmalloc" space (the code still searches the vmlist to see what actually exists before accessing it). Other blocks of kernel virtual space can be added as needed, and removed again (with kclist_del()). E.g. discontiguous memory machines can add an entry for each block of memory. Architectures that allocate memory for modules someplace outside of vmalloc-land can add/remove entries on module insert and remove. The second piece of abstraction is the kc_vaddr_to_offset() and kc_offset_to_vaddr() macros. These provide mappings from kernel virtual addresses to offsets in the virtual file that /proc/kcore instantiates. I hope they are sufficient to avoid negative offset problems that plagued the old /proc/kcore. Default versions are provided for the old behaviour (mapping simply adds/subtracts PAGE_OFFSET). For ia64 I just need to use a different offset as all kernel virtual allocations are in the high 37.5% of the 64-bit virtual address space. x86_64 was the other architecture with this problem. I don't know enough (anything) about the kernel memory map on x86_64, so I hope these provide a big enough hook. I'm hoping that you have some low stuff, and some high stuff with a big hole in the middle ... in which case the macros might look something like: #define kc_vaddr_to_offset(v) ((v) < 0x1000000000000000 ? (v) : \ ((v) - 0xF000000000000000)) But if you have interesting stuff scattered across *every* part of the unsigned address range, then you won't be able to squeeze it all into a signed file offset. There are a couple of bug fixes too: 1) get_kcore_size() didn't account for the elf_prstatus, elf_prpsinfo and task_struct that are placed in the PT_NOTE section that is part of the header. We were saved on most configurations by the round-up to PAGE_SIZE ... but it's possible that some architectures or machines corrupted memory beyond the space allocated for the header. 2) The size of the PT_NOTES section was incorrectly set to the size of the last note, rather than the sum of the sizes of all the notes.
2003-05-29[PATCH] Fix CONFIG_PROCFS=nAndrew Morton
From: Manfred Spraul <manfred@colorfullife.com> three build fixes for CONFIG_PROC_FS=n: include/linux/procfs.h: - add missing proc_pid_unhash, proc_pid_flush declarations. static inline functions that do nothing. - move semicolons around for kclist_{add,del}. gcc-3.2.2 doesn't like the current syntax. drivers/net/pppoe.c: - proc_net doesn't exist if CONFIG_PROC_FS=n. drivers/scsi/scsi_priv.h: - add missing brackets to macro definition.
2003-05-25[PATCH] Fix dcache_lock/tasklist_lock ranking bugAndrew Morton
__unhash_process acquires the dcache_lock while holding the tasklist_lock for writing. This can deadlock. Additionally, fs/proc/base.c incorrectly assumed that p->pid would be set to 0 during release_task. The patch fixes that by adding a new spinlock to the task structure and fixing all references to (!p->pid). The alternative to the new spinlock would be to hold dcache_lock around __unhash_process. - fs/proc/base.c assumed that p->pid is reset to 0 during exit. This is not the case anymore. I now look at the count of the pid structure for PIDTYPE_PID. - de_thread now tested - as broken as it was before: open handles to /proc/<pid> are either stale or invalid after an exec of a nptl process, if the exec was call from a secondary thread. - a few lock_kernels removed - that part of /proc doesn't need it. - additional instances of 'if(current->pid)' replaced with pid_alive.
2003-05-11Add user pointer annotations.Linus Torvalds
2003-05-05[FS]: Add seq_release_private and proc_net_fops_create helpers.Steven Whitehouse
2002-08-12Get rid of /proc dependency on inode numbersLinus Torvalds
2002-07-23[PATCH] type safe(r) list_entry repacement: container_ofNeil Brown
Define container_of which cast from member to struct with some type checking. This is much like list_entry but is cearly for things other than lists. List_entry now uses container_of.
2002-06-19[PATCH] fix lots of warnings about 'struct tty_driver'Arnd Bergmann
When compiling 2.5.20 (and ealier, likely) without procfs, the declaration for struct tty_driver is missing in proc_fs.h, causing many compiler warnings that are fixed by this patch.
2002-04-21[PATCH] (4/5) sane procfs/dcache interactionAlexander Viro
- preparation for sane policy for /proc/<pid>/fd/* - don't store struct file * in these inodes anymore.
2002-04-07[PATCH] increase dynamic proc entries for ppc64Anton Blanchard
Unfortunately the proc filesystem has a limit on the number of dynamic proc entries it can create. On large systems we can exhaust the default (4096) very quickly. The following patch increases the default to something more reasonable.
2002-02-10Remove warning in /proc inode conversions.Linus Torvalds
2002-02-06[PATCH] (4/8) ->get_sb() switchoverAlexander Viro
convert procfs to ->get_sb(). Similar to ext2, except that we use get_sb_single() instead of get_sb_bdev(). Notice the we _don't_ keep FS_SINGLE in flags - as the matter of fact, with ->get_sb() FS_SINGLE is useless.
2002-02-05[PATCH] (2/2) inode trimmingAlexander Viro
procfs switched to alloc_inode/destroy_inode.
2002-02-04v2.5.1.3 -> v2.5.1.4Linus Torvalds
- Jens Axboe: more bio updates, fix some request list bogosity under load - Al Viro: export seq_xxx functions - Manfred Spraul: include file cleanups, pc110pad compile fix - David Woodhouse: fix JFFS2 write error handling - Dave Jones: start merging up with 2.4.x patches - Manfred Spraul: coredump fixes, FS event counter cleanups - me: fix SCSI CD-ROM sectorsize BIO breakage
2002-02-04v2.4.6.1 -> v2.4.6.2Linus Torvalds
- merge with Alan (USB, zoran, sony motion-eye, rio, dmi-scan)
2002-02-04v2.4.4.3 -> v2.4.4.4Linus Torvalds
- Russell King: ARM updates - Al Viro: more init cleanups - Cort Dougan: more PPC updates - David Miller: cleanups, pci mmap updates - Neil Brown: raid resync by sector - Alan Cox: more merging with -ac - Johannes Erdfelt: USB updates - Kai Germaschewski: ISDN updates - Tobias Ringstrom: dmfe.c network driver update - Trond Myklebust: NFS client updates and cleanups
2002-02-04v2.4.3.5 -> v2.4.3.6Linus Torvalds
- Chris Mason: daemonize reiserfs commit thread - Alan Cox: syncup (AFFS might even work, and official VIA workarounds) - Jeff Garzik: network driver updates - Paul Mackerras: PPP update - David Howells: more rw-sem cleanups, updates. Slowly getting somewhere.
2002-02-04v2.4.3.4 -> v2.4.3.5Linus Torvalds
- Mike Phillips: olympic driver update - Alan Cox: continued resyncing (lots of small stuff, big NTFS merge from Anton) - Martin Dalecki: cleanup (remove unused and unnecessary get_hardblocksize) - Chris Mason: fix potential reiserfs journal overflow - Jeff Garzik: network driver updates - David Miller: sparc fixes, some network cleanups
2002-02-04v2.4.1.2 -> v2.4.1.3Linus Torvalds
- Jens: better ordering of requests when unable to merge - Neil Brown: make md work as a module again (we cannot autodetect in modules, not enough background information) - Neil Brown: raid5 SMP locking cleanups - Neil Brown: nfsd: handle Irix NFS clients named pipe behavior and dentry leak fix - maestro3 shutdown fix - fix dcache hash calculation that could cause bad hashes under certain circumstances (Dean Gaudet) - David Miller: networking and sparc updates - Jeff Garzik: include file cleanups - Andy Grover: ACPI update - Coda-fs error return fixes - rth: alpha Jensen update
2002-02-04Import changesetLinus Torvalds