restore /proc/ksyms
PATCH 1/1 restore /proc/ksyms
This patch (against 2.5.63) puts /proc/ksyms back on the map, with a format almost like what used to be there. It's a quick hack, but should ought to be good enough.
Of course, this is somebody's cue to tell me that /proc/ksyms is useless bloat, or some such. I've occasionally found it useful, though. Here it is in case anybody else agrees.
jon
Jonathan Corbet
Executive editor, LWN.net
[email protected]
fs/proc/proc_misc.c +13 -0
@@ -299,6 +299,18 @@ .llseek = seq_lseek, .release = seq_release, }; + +extern struct seq_operations ksyms_op; +static int ksyms_open (struct inode *inode,struct file *file) +{ +return seq_open (file, &ksyms_op); +} +static struct file_operations proc_ksyms_operations = { + .open = ksyms_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +};#endif extern struct seq_operations slabinfo_op;
@@ -582,6 +594,7 @@create_seq_entry ("vmstat" ,S_IRUGO , &proc_vmstat_file_operations);#ifdef CONFIG_MODULES create_seq_entry ("modules" ,0 , &proc_modules_operations); +create_seq_entry ("ksyms" ,0 , &proc_ksyms_operations);#endif proc_root_kcore =create_proc_entry ("kcore" ,S_IRUSR ,NULL );if (proc_root_kcore) {
kernel/module.c +87 -0
93 lines not on this page · raw message