Commit 5a8f43ae authored by Russell King's avatar Russell King Committed by Linus Torvalds

[PATCH] Make /proc/kcore configurable

This allows /proc/kcore to be entirely disabled and dropped out of the
kernel - we already select between a.out and ELF.

Right now it only drops /proc/kcore out of the kernel for ARM.
parent a712d6ff
......@@ -761,6 +761,10 @@ config PROC_FS
This option will enlarge your kernel by about 67 KB. Several
programs depend on this, so everyone should say Y here.
config PROC_KCORE
bool
default y if !ARM
config DEVFS_FS
bool "/dev file system support (EXPERIMENTAL)"
depends on EXPERIMENTAL
......
......@@ -8,6 +8,7 @@ proc-y := task_nommu.o
proc-$(CONFIG_MMU) := task_mmu.o
proc-y += inode.o root.o base.o generic.o array.o \
kmsg.o proc_tty.o proc_misc.o kcore.o
kmsg.o proc_tty.o proc_misc.o
proc-$(CONFIG_PROC_KCORE) += kcore.o
proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o
......@@ -685,12 +685,14 @@ void __init proc_misc_init(void)
#ifdef CONFIG_MODULES
create_seq_entry("modules", 0, &proc_modules_operations);
#endif
#ifdef CONFIG_PROC_KCORE
proc_root_kcore = create_proc_entry("kcore", S_IRUSR, NULL);
if (proc_root_kcore) {
proc_root_kcore->proc_fops = &proc_kcore_operations;
proc_root_kcore->size =
(size_t)high_memory - PAGE_OFFSET + PAGE_SIZE;
}
#endif
if (prof_on) {
entry = create_proc_entry("profile", S_IWUSR | S_IRUGO, NULL);
if (entry) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment