aboutsummaryrefslogtreecommitdiff
path: root/fs/proc
AgeCommit message (Collapse)AuthorFilesLines
2008-10-23proc: move /proc/vmstat boilerplate to mm/vmstat.cAlexey Dobriyan1-12/+0
Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Christoph Lameter <[email protected]>
2008-10-23proc: move /proc/pagetypeinfo boilerplate to mm/vmstat.cAlexey Dobriyan1-13/+0
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move /proc/buddyinfo boilerplate to mm/vmstat.cAlexey Dobriyan1-14/+0
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move /proc/vmallocinfo to mm/vmalloc.cAlexey Dobriyan1-28/+0
Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Christoph Lameter <[email protected]>
2008-10-23proc: move /proc/slabinfo boilerplate to mm/slub.c, mm/slab.cAlexey Dobriyan1-17/+0
Lose dummy ->write hook in case of SLUB, it's possible now. Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Pekka Enberg <[email protected]>
2008-10-23proc: move /proc/slab_allocators boilerplate to mm/slab.cAlexey Dobriyan1-30/+0
Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Pekka Enberg <[email protected]>
2008-10-23proc: move /proc/interrupts boilerplate code to fs/proc/interrupts.cAlexey Dobriyan3-40/+54
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move /proc/stat to fs/proc/stat.cAlexey Dobriyan3-134/+154
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move rest of /proc/partitions code to block/genhd.cAlexey Dobriyan1-14/+0
Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Jens Axboe <[email protected]>
2008-10-23proc: move /proc/cpuinfo code to fs/proc/cpuinfo.cAlexey Dobriyan3-14/+25
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move /proc/devices code to fs/proc/devices.cAlexey Dobriyan3-60/+71
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move rest of /proc/locks to fs/locks.cAlexey Dobriyan1-17/+0
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move /proc/kmsg creation to fs/proc/kmsg.cAlexey Dobriyan3-7/+9
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: remove remnants of ->read_proc in proc_misc.cAlexey Dobriyan1-27/+0
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move /proc/execdomains to kernel/exec_domain.cAlexey Dobriyan1-9/+0
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: switch /proc/cmdline to seq_fileAlexey Dobriyan3-10/+30
and move it to fs/proc/cmdline.c while I'm at it. Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move /proc/filesystems to fs/filesystems.cAlexey Dobriyan1-8/+0
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move /proc/stram to m68k-specific codeAlexey Dobriyan1-13/+0
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: move /proc/hardware to m68k-specific codeAlexey Dobriyan1-13/+0
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: switch /proc/version to seq_fileAlexey Dobriyan3-13/+35
and move it to fs/proc/version.c while I'm at it. Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: switch /proc/meminfo to seq_fileAlexey Dobriyan3-137/+169
and move it to fs/proc/meminfo.c while I'm at it. Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: switch /proc/uptime to seq_fileAlexey Dobriyan3-21/+44
and move it to fs/proc/uptime.c while I'm at it. Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: switch /proc/loadavg to seq_fileAlexey Dobriyan3-27/+52
and move it to fs/proc/loadavg.c while I'm at it. Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: use WARN() rather than printk+backtraceArjan van de Ven1-2/+1
Use WARN() rather than a printk() + backtrace(); this gives a more standard format message as well as complete information (including line numbers etc) that will be collected by kerneloops.org Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: spread __initAlexey Dobriyan2-3/+4
Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: proc_init_inodecache() can't failAlexey Dobriyan3-6/+5
kmem_cache creation code will panic, don't return anything. Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23proc: fix vma display mismatch between /proc/pid/{maps,smaps}Joe Korty1-9/+16
Commit 4752c369789250eafcd7813e11c8fb689235b0d2 aka "maps4: simplify interdependence of maps and smaps" broke /proc/pid/smaps, causing it to display some vmas twice and other vmas not at all. For example: grep .- /proc/1/smaps >/tmp/smaps; diff /proc/1/maps /tmp/smaps 1 25d24 2 < 7fd7e23aa000-7fd7e23ac000 rw-p 7fd7e23aa000 00:00 0 3 28a28 4 > ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] The bug has something to do with setting m->version before all the seq_printf's have been performed. show_map was doing this correctly, but show_smap was doing this in the middle of its seq_printf sequence. This patch arranges things so that the setting of m->version in show_smap is also done at the end of its seq_printf sequence. Testing: in addition to the above grep test, for each process I summed up the 'Rss' fields of /proc/pid/smaps and compared that to the 'VmRSS' field of /proc/pid/status. All matched except for Xorg (which has a /dev/mem mapping which Rss accounts for but VmRSS does not). This result gives us some confidence that neither /proc/pid/maps nor /proc/pid/smaps are any longer skipping or double-counting vmas. Signed-off-by: Joe Korty <[email protected]> Cc: Matt Mackall <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-23[PATCH] move executable checking into ->permission()Miklos Szeredi1-2/+8
For execute permission on a regular files we need to check if file has any execute bits at all, regardless of capabilites. This check is normally performed by generic_permission() but was also added to the case when the filesystem defines its own ->permission() method. In the latter case the filesystem should be responsible for performing this check. Move the check from inode_permission() inside filesystems which are not calling generic_permission(). Create a helper function execute_ok() that returns true if the inode is a directory or if any execute bits are present in i_mode. Also fix up the following code: - coda control file is never executable - sysctl files are never executable - hfs_permission seems broken on MAY_EXEC, remove - hfsplus_permission is eqivalent to generic_permission(), remove Signed-off-by: Miklos Szeredi <[email protected]>
2008-10-23[PATCH] fix ->llseek for more directoriesChristoph Hellwig1-0/+1
With this patch all directory fops instances that have a readdir that doesn't take the BKL are switched to generic_file_llseek. Signed-off-by: Christoph Hellwig <[email protected]>
2008-10-21[PATCH] introduce fmode_t, do annotationsAl Viro1-2/+2
Signed-off-by: Al Viro <[email protected]>
2008-10-20Merge branch 'genirq-v28-for-linus' of ↵Linus Torvalds1-21/+19
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip This merges branches irq/genirq, irq/sparseirq-v4, timers/hpet-percpu and x86/uv. The sparseirq branch is just preliminary groundwork: no sparse IRQs are actually implemented by this tree anymore - just the new APIs are added while keeping the old way intact as well (the new APIs map 1:1 to irq_desc[]). The 'real' sparse IRQ support will then be a relatively small patch ontop of this - with a v2.6.29 merge target. * 'genirq-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (178 commits) genirq: improve include files intr_remapping: fix typo io_apic: make irq_mis_count available on 64-bit too genirq: fix name space collisions of nr_irqs in arch/* genirq: fix name space collision of nr_irqs in autoprobe.c genirq: use iterators for irq_desc loops proc: fixup irq iterator genirq: add reverse iterator for irq_desc x86: move ack_bad_irq() to irq.c x86: unify show_interrupts() and proc helpers x86: cleanup show_interrupts genirq: cleanup the sparseirq modifications genirq: remove artifacts from sparseirq removal genirq: revert dynarray genirq: remove irq_to_desc_alloc genirq: remove sparse irq code genirq: use inline function for irq_to_desc genirq: consolidate nr_irqs and for_each_irq_desc() x86: remove sparse irq from Kconfig genirq: define nr_irqs for architectures with GENERIC_HARDIRQS=n ...
2008-10-20Merge branch 'v28-timers-for-linus' of ↵Linus Torvalds1-4/+4
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'v28-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (36 commits) fix documentation of sysrq-q really Fix documentation of sysrq-q timer_list: add base address to clock base timer_list: print cpu number of clockevents device timer_list: print real timer address NOHZ: restart tick device from irq_enter() NOHZ: split tick_nohz_restart_sched_tick() NOHZ: unify the nohz function calls in irq_enter() timers: fix itimer/many thread hang, fix timers: fix itimer/many thread hang, v3 ntp: improve adjtimex frequency rounding timekeeping: fix rounding problem during clock update ntp: let update_persistent_clock() sleep hrtimer: reorder struct hrtimer to save 8 bytes on 64bit builds posix-timers: lock_timer: make it readable posix-timers: lock_timer: kill the bogus ->it_id check posix-timers: kill ->it_sigev_signo and ->it_sigev_value posix-timers: sys_timer_create: cleanup the error handling posix-timers: move the initialization of timer->sigq from send to create path posix-timers: sys_timer_create: simplify and s/tasklist/rcu/ ... Fix trivial conflicts due to sysrq-q description clahes in Documentation/sysrq.txt and drivers/char/sysrq.c
2008-10-20kdump: add is_vmcore_usable() and vmcore_unusable()Simon Horman1-1/+1
The usage of elfcorehdr_addr has changed recently such that being set to ELFCORE_ADDR_MAX is used by is_kdump_kernel() to indicate if the code is executing in a kernel executed as a crash kernel. However, arch/ia64/kernel/setup.c:reserve_elfcorehdr will rest elfcorehdr_addr to ELFCORE_ADDR_MAX on error, which means any subsequent calls to is_kdump_kernel() will return 0, even though they should return 1. Ok, at this point in time there are no subsequent calls, but I think its fair to say that there is ample scope for error or at the very least confusion. This patch add an extra state, ELFCORE_ADDR_ERR, which indicates that elfcorehdr_addr was passed on the command line, and thus execution is taking place in a crashdump kernel, but vmcore can't be used for some reason. This is tested for using is_vmcore_usable() and set using vmcore_unusable(). A subsequent patch makes use of this new code. To summarise, the states that elfcorehdr_addr can now be in are as follows: ELFCORE_ADDR_MAX: not a crashdump kernel ELFCORE_ADDR_ERR: crashdump kernel but vmcore is unusable any other value: crash dump kernel and vmcore is usable Signed-off-by: Simon Horman <[email protected]> Cc: Vivek Goyal <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-10-20kdump: make elfcorehdr_addr independent of CONFIG_PROC_VMCOREVivek Goyal1-3/+0
o elfcorehdr_addr is used by not only the code under CONFIG_PROC_VMCORE but also by the code which is not inside CONFIG_PROC_VMCORE. For example, is_kdump_kernel() is used by powerpc code to determine if kernel is booting after a panic then use previous kernel's TCE table. So even if CONFIG_PROC_VMCORE is not set in second kernel, one should be able to correctly determine that we are booting after a panic and setup calgary iommu accordingly. o So remove the assumption that elfcorehdr_addr is under CONFIG_PROC_VMCORE. o Move definition of elfcorehdr_addr to arch dependent crash files. (Unfortunately crash dump does not have an arch independent file otherwise that would have been the best place). o kexec.c is not the right place as one can Have CRASH_DUMP enabled in second kernel without KEXEC being enabled. o I don't see sh setup code parsing the command line for elfcorehdr_addr. I am wondering how does vmcore interface work on sh. Anyway, I am atleast defining elfcoredhr_addr so that compilation is not broken on sh. Signed-off-by: Vivek Goyal <[email protected]> Acked-by: "Eric W. Biederman" <[email protected]> Acked-by: Simon Horman <[email protected]> Acked-by: Paul Mundt <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-10-20vmstat: mlocked pages statisticsNick Piggin1-0/+2
Add NR_MLOCK zone page state, which provides a (conservative) count of mlocked pages (actually, the number of mlocked pages moved off the LRU). Reworked by lts to fit in with the modified mlock page support in the Reclaim Scalability series. [[email protected]: fix incorrect Mlocked field of /proc/meminfo] [[email protected]: mlocked-pages: add event counting with statistics] Signed-off-by: Nick Piggin <[email protected]> Signed-off-by: Lee Schermerhorn <[email protected]> Signed-off-by: Rik van Riel <[email protected]> Signed-off-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-10-20Unevictable LRU Page StatisticsLee Schermerhorn1-0/+6
Report unevictable pages per zone and system wide. Kosaki Motohiro added support for memory controller unevictable statistics. [[email protected]: fix printk in show_free_areas()] [[email protected]: fix units in /proc/vmstats] Signed-off-by: Lee Schermerhorn <[email protected]> Signed-off-by: Rik van Riel <[email protected]> Signed-off-by: KOSAKI Motohiro <[email protected]> Debugged-by: Hiroshi Shimamoto <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-10-20vmscan: split LRU lists into anon & file setsRik van Riel1-32/+45
Split the LRU lists in two, one set for pages that are backed by real file systems ("file") and one for pages that are backed by memory and swap ("anon"). The latter includes tmpfs. The advantage of doing this is that the VM will not have to scan over lots of anonymous pages (which we generally do not want to swap out), just to find the page cache pages that it should evict. This patch has the infrastructure and a basic policy to balance how much we scan the anon lists and how much we scan the file lists. The big policy changes are in separate patches. [[email protected]: collect lru meminfo statistics from correct offset] [[email protected]: prevent incorrect oom under split_lru] [[email protected]: fix pagevec_move_tail() doesn't treat unevictable page] [[email protected]: memcg swapbacked pages active] [[email protected]: splitlru: BDI_CAP_SWAP_BACKED] [[email protected]: fix /proc/vmstat units] [[email protected]: memcg: fix handling of shmem migration] [[email protected]: adjust Quicklists field of /proc/meminfo] [[email protected]: fix style issue of get_scan_ratio()] Signed-off-by: Rik van Riel <[email protected]> Signed-off-by: Lee Schermerhorn <[email protected]> Signed-off-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Signed-off-by: Daisuke Nishimura <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-10-20Merge branches 'timers/clocksource', 'timers/hrtimers', 'timers/nohz', ↵Thomas Gleixner11-142/+43
'timers/ntp', 'timers/posixtimers' and 'timers/debug' into v28-timers-for-linus
2008-10-16proc: move sysrq-trigger out of fs/proc/Alexey Dobriyan1-26/+0
Move it into sysrq.c, along with the rest of the sysrq implementation. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-10-16proc: fixup irq iteratorThomas Gleixner1-5/+2
There is no need for irq_desc here. Even for sparse_irq we can handle this clever in for_each_irq_nr(). Signed-off-by: Thomas Gleixner <[email protected]>
2008-10-16genirq: remove sparse irq codeThomas Gleixner1-38/+5
This code is not ready, but we need to rip it out instead of rebasing as we would lose the APIC/IO_APIC unification otherwise. Signed-off-by: Thomas Gleixner <[email protected]>
2008-10-16x86: use 28 bits irq NR for pci msi/msix and htYinghai Lu1-1/+1
also print out irq no in /proc/interrups and /proc/stat in hex, so could tell bus/dev/func. Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-10-16x86_64: make /proc/interrupts work with dyn irq_descYinghai Lu1-4/+24
loop with irq_desc list Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-10-16irq, fs/proc: replace loop with nr_irqs for proc/statYinghai Lu1-14/+28
Replace another nr_irqs loop to avoid the allocation of all sparse irq entries - use for_each_irq_desc instead. v2: make sure arch without GENERIC_HARDIRQS works too Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-10-16x86: move kstat_irqs from kstat to irq_descYinghai Lu1-1/+1
based on Eric's patch ... together mold it with dyn_array for irq_desc, will allcate kstat_irqs for nr_irq_desc alltogether if needed. -- at that point nr_cpus is known already. v2: make sure system without generic_hardirqs works they don't have irq_desc v3: fix merging v4: [[email protected]] fix typo [ [email protected] ] irq: build fix fix: arch/x86/xen/spinlock.c: In function 'xen_spin_lock_slow': arch/x86/xen/spinlock.c:90: error: 'struct kernel_stat' has no member named 'irqs' Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-10-16fs/proc: use nr_irqsYinghai Lu1-5/+5
Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-10-14Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linuxLinus Torvalds1-0/+4
* 'for-2.6.28' of git://linux-nfs.org/~bfields/linux: (59 commits) svcrdma: Fix IRD/ORD polarity svcrdma: Update svc_rdma_send_error to use DMA LKEY svcrdma: Modify the RPC reply path to use FRMR when available svcrdma: Modify the RPC recv path to use FRMR when available svcrdma: Add support to svc_rdma_send to handle chained WR svcrdma: Modify post recv path to use local dma key svcrdma: Add a service to register a Fast Reg MR with the device svcrdma: Query device for Fast Reg support during connection setup svcrdma: Add FRMR get/put services NLM: Remove unused argument from svc_addsock() function NLM: Remove "proto" argument from lockd_up() NLM: Always start both UDP and TCP listeners lockd: Remove unused fields in the nlm_reboot structure lockd: Add helper to sanity check incoming NOTIFY requests lockd: change nlmclnt_grant() to take a "struct sockaddr *" lockd: Adjust nlmsvc_lookup_host() to accomodate AF_INET6 addresses lockd: Adjust nlmclnt_lookup_host() signature to accomodate non-AF_INET lockd: Support non-AF_INET addresses in nlm_lookup_host() NLM: Convert nlm_lookup_host() to use a single argument svcrdma: Add Fast Reg MR Data Types ...
2008-10-10proc: remove kernel.maps_protectAlexey Dobriyan4-25/+1
After commit 831830b5a2b5d413407adf380ef62fe17d6fcbf2 aka "restrict reading from /proc/<pid>/maps to those who share ->mm or can ptrace" sysctl stopped being relevant because commit moved security checks from ->show time to ->start time (mm_for_maps()). Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Kees Cook <[email protected]>
2008-10-10proc: remove now unneeded ADDBUF macroAlexey Dobriyan1-5/+0
After local seq_file conversion it was forgotten. Signed-off-by: Alexey Dobriyan <[email protected]>
2008-10-10[PATCH] proc: show personality via /proc/pid/personalityKees Cook1-0/+9
Make process personality flags visible in /proc. Since a process's personality is potentially sensitive (e.g. READ_IMPLIES_EXEC), make this file only readable by the process owner. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Alexey Dobriyan <[email protected]>