Skip to contentSkip to conversation

module cleanup (5/5)

PATCH New Roman Zippel 1 participant 1 message Aug 6, 2002

Subsystems (9)
Arm (32-bit) MIPS s390 SuperH +5 more subsystems
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 module cleanup (5/5)

Hi,

This patch removes the obsolete get_kernel_syms system call.

arch/alpha/kernel/entry.S +1 -1
diff -ur linux-2.5/arch/alpha/kernel/entry.S linux-mod/arch/alpha/kernel/entry.S
@@ -1041,7 +1041,7 @@
 	.quad alpha_create_module
 	.quad sys_init_module
 	.quad sys_delete_module
-	.quad sys_get_kernel_syms
+	.quad sys_ni_syscall	/* get_kernel_syms */
 	.quad sys_syslog			/* 310 */
 	.quad sys_reboot
 	.quad sys_clone
arch/arm/kernel/calls.S +1 -1
diff -ur linux-2.5/arch/arm/kernel/calls.S linux-mod/arch/arm/kernel/calls.S
@@ -144,7 +144,7 @@
 		.long	sys_create_module
 		.long	sys_init_module
 		.long	sys_delete_module
-/* 130 */	.long	sys_get_kernel_syms
+/* 130 */	.long	sys_ni_syscall		/* get_kernel_syms */
 		.long	sys_quotactl
 		.long	sys_getpgid
 		.long	sys_fchdir
arch/cris/kernel/entry.S +1 -1
diff -ur linux-2.5/arch/cris/kernel/entry.S linux-mod/arch/cris/kernel/entry.S
@@ -919,7 +919,7 @@
 	.long sys_create_module
 	.long sys_init_module
 	.long sys_delete_module
-	.long sys_get_kernel_syms	/* 130 */
+	.long sys_ni_syscall	/* 130 */	/* get_kernel_syms */
 	.long sys_quotactl
 	.long sys_getpgid
 	.long sys_fchdir
arch/i386/kernel/entry.S +1 -1
diff -ur linux-2.5/arch/i386/kernel/entry.S linux-mod/arch/i386/kernel/entry.S
@@ -639,7 +639,7 @@
 	.long sys_create_module
 	.long sys_init_module
 	.long sys_delete_module
-	.long sys_get_kernel_syms	/* 130 */
+	.long sys_ni_syscall	/* 130 */	/* get_kernel_syms */
 	.long sys_quotactl
 	.long sys_getpgid
 	.long sys_fchdir
arch/ia64/kernel/entry.S +1 -1
diff -ur linux-2.5/arch/ia64/kernel/entry.S linux-mod/arch/ia64/kernel/entry.S
@@ -1121,7 +1121,7 @@
 	data8 ia64_create_module
 	data8 sys_init_module
 	data8 sys_delete_module
-	data8 sys_get_kernel_syms		// 1135
+	data8 sys_ni_syscall			// 1135		/* was: get_kernel_syms */
 	data8 sys_query_module
 	data8 sys_quotactl
 	data8 sys_bdflush
arch/m68k/kernel/entry.S +1 -1
diff -ur linux-2.5/arch/m68k/kernel/entry.S linux-mod/arch/m68k/kernel/entry.S
@@ -558,7 +558,7 @@
 	.long sys_create_module
 	.long sys_init_module
 	.long sys_delete_module
-	.long sys_get_kernel_syms	/* 130 */
+	.long sys_ni_syscall	/* 130 */		/* get_kernel_syms */
 	.long sys_quotactl
 	.long sys_getpgid
 	.long sys_fchdir
arch/mips/kernel/syscalls.h +1 -1
diff -ur linux-2.5/arch/mips/kernel/syscalls.h linux-mod/arch/mips/kernel/syscalls.h
@@ -144,7 +144,7 @@
 SYS(sys_create_module, 2)
 SYS(sys_init_module, 5)
 SYS(sys_delete_module, 1)
-SYS(sys_get_kernel_syms, 1)			/* 4130 */
+SYS(sys_ni_syscall, 0)	/* get_kernel_syms */	/* 4130 */
 SYS(sys_quotactl, 0)
 SYS(sys_getpgid, 1)
 SYS(sys_fchdir, 1)
arch/mips64/kernel/scall_64.S +1 -1
diff -ur linux-2.5/arch/mips64/kernel/scall_64.S linux-mod/arch/mips64/kernel/scall_64.S
@@ -263,7 +263,7 @@
 	PTR	sys_create_module
 	PTR	sys_init_module
 	PTR	sys_delete_module
-	PTR	sys_get_kernel_syms 			/* 5130 */
+	PTR	sys_ni_syscall	 	/* get_kernel_syms */ /* 5130 */
 	PTR	sys_quotactl
 	PTR	sys_getpgid
 	PTR	sys_fchdir
arch/mips64/kernel/scall_o32.S +1 -1
diff -ur linux-2.5/arch/mips64/kernel/scall_o32.S linux-mod/arch/mips64/kernel/scall_o32.S
@@ -363,7 +363,7 @@
 	sys	sys_create_module 2
 	sys	sys_init_module	5
 	sys	sys_delete_module 1
-	sys	sys_get_kernel_syms 1			/* 4130 */
+	sys	sys_ni_syscall	0	/* get_kernel_syms */ /* 4130 */
 	sys	sys_quotactl	0
 	sys	sys_getpgid	1
 	sys	sys_fchdir	1
arch/parisc/kernel/syscall.S +1 -2
diff -ur linux-2.5/arch/parisc/kernel/syscall.S linux-mod/arch/parisc/kernel/syscall.S
@@ -459,8 +459,7 @@
 	 * if running under a 64 bit kernel */
 	ENTRY_SAME(init_module)
 	ENTRY_SAME(delete_module)
-	/* struct kernel_sym contains a long. Linus never heard of size_t? */
-	ENTRY_DIFF(get_kernel_syms)	/* 130 */
+	ENTRY_SAME(ni_syscall)	/* 130 */	/* get_kernel_syms */
 	ENTRY_SAME(quotactl)
 	ENTRY_SAME(getpgid)
 	ENTRY_SAME(fchdir)
arch/ppc/kernel/misc.S +1 -1
diff -ur linux-2.5/arch/ppc/kernel/misc.S linux-mod/arch/ppc/kernel/misc.S
@@ -1202,7 +1202,7 @@
 	.long sys_create_module
 	.long sys_init_module
 	.long sys_delete_module
-	.long sys_get_kernel_syms	/* 130 */
+	.long sys_ni_syscall	/* 130 */	/* get_kernel_syms */
 	.long sys_quotactl
 	.long sys_getpgid
 	.long sys_fchdir
arch/ppc64/kernel/misc.S +2 -2
diff -ur linux-2.5/arch/ppc64/kernel/misc.S linux-mod/arch/ppc64/kernel/misc.S
@@ -634,7 +634,7 @@
 	.llong .sys32_create_module
 	.llong .sys32_init_module
 	.llong .sys32_delete_module
-	.llong .sys32_get_kernel_syms	/* 130 */
+	.llong .sys_ni_syscall	/* 130 */	/* get_kernel_syms */
 	.llong .sys_quotactl
 	.llong .sys32_getpgid
 	.llong .sys_fchdir
@@ -867,7 +867,7 @@
 	.llong .sys_create_module
 	.llong .sys_init_module
 	.llong .sys_delete_module
-	.llong .sys_get_kernel_syms	/* 130 */
+	.llong .sys_ni_syscall	/* 130 */	/* get_kernel_syms */
 	.llong .sys_quotactl
 	.llong .sys_getpgid
 	.llong .sys_fchdir
arch/ppc64/kernel/sys_ppc32.c +0 -45

57 lines not on this page · raw message

arch/s390/kernel/entry.S +1 -1
diff -ur linux-2.5/arch/s390/kernel/entry.S linux-mod/arch/s390/kernel/entry.S
@@ -470,7 +470,7 @@
         .long  sys_create_module
         .long  sys_init_module
         .long  sys_delete_module
-        .long  sys_get_kernel_syms       /* 130 */
+        .long  sys_ni_syscall            /* 130 */ /* get_kernel_syms */
         .long  sys_quotactl
         .long  sys_getpgid
         .long  sys_fchdir
arch/s390x/kernel/entry.S +1 -1
diff -ur linux-2.5/arch/s390x/kernel/entry.S linux-mod/arch/s390x/kernel/entry.S
@@ -501,7 +501,7 @@
         .long  SYSCALL(sys_create_module,sys32_create_module_wrapper)
         .long  SYSCALL(sys_init_module,sys32_init_module_wrapper)
         .long  SYSCALL(sys_delete_module,sys32_delete_module_wrapper)
-        .long  SYSCALL(sys_get_kernel_syms,sys32_get_kernel_syms_wrapper) /* 130 */
+        .long  SYSCALL(sys_ni_syscall,sys_ni_syscall) /* 130 */ /* get_kernel_syms */
         .long  SYSCALL(sys_quotactl,sys32_quotactl_wrapper)
         .long  SYSCALL(sys_getpgid,sys32_getpgid_wrapper)
         .long  SYSCALL(sys_fchdir,sys32_fchdir_wrapper)
arch/s390x/kernel/linux32.c +0 -36
diff -ur linux-2.5/arch/s390x/kernel/linux32.c linux-mod/arch/s390x/kernel/linux32.c
@@ -3459,36 +3459,6 @@
 	return err;
 }
 
-struct kernel_sym32 {
-	u32 value;
-	char name[60];
-};
-		 
-extern asmlinkage int sys_get_kernel_syms(struct kernel_sym *table);
-
-asmlinkage int sys32_get_kernel_syms(struct kernel_sym32 *table)
-{
-	int len, i;
-	struct kernel_sym *tbl;
-	mm_segment_t old_fs;
-	
-	len = sys_get_kernel_syms(NULL);
-	if (!table) return len;
-	tbl = kmalloc (len * sizeof (struct kernel_sym), GFP_KERNEL);
-	if (!tbl) return -ENOMEM;
-	old_fs = get_fs();
-	set_fs (KERNEL_DS);
-	sys_get_kernel_syms(tbl);
-	set_fs (old_fs);
-	for (i = 0; i < len; i++, table += sizeof (struct kernel_sym32)) {
-		if (put_user (tbl[i].value, &table->value) ||
-		    copy_to_user (table->name, tbl[i].name, 60))
-			break;
-	}
-	kfree (tbl);
-	return i;
-}
-
 #else /* CONFIG_MODULES */
 
 asmlinkage unsigned long
@@ -3518,12 +3488,6 @@
 	if (which == 0)
 		return 0;
 
-	return -ENOSYS;
-}
-
-asmlinkage int
-sys32_get_kernel_syms(struct kernel_sym *table)
-{
 	return -ENOSYS;
 }
 
arch/s390x/kernel/wrapper32.S +0 -5
diff -ur linux-2.5/arch/s390x/kernel/wrapper32.S linux-mod/arch/s390x/kernel/wrapper32.S
@@ -581,11 +581,6 @@
 	llgtr	%r2,%r2			# const char *
 	jg	sys32_delete_module	# branch to system call
 
-	.globl  sys32_get_kernel_syms_wrapper 
-sys32_get_kernel_syms_wrapper:
-	llgtr	%r2,%r2			# struct kernel_sym_emu31 *
-	jg	sys32_get_kernel_syms	# branch to system call
-
 	.globl  sys32_quotactl_wrapper 
 sys32_quotactl_wrapper:
 	lgfr	%r2,%r2			# int
arch/sh/kernel/entry.S +1 -1
diff -ur linux-2.5/arch/sh/kernel/entry.S linux-mod/arch/sh/kernel/entry.S
@@ -1103,7 +1103,7 @@
 	.long sys_create_module
 	.long sys_init_module
 	.long sys_delete_module
-	.long sys_get_kernel_syms	/* 130 */
+	.long sys_ni_syscall	/* 130 */ /* get_kernel_syms */
 	.long sys_quotactl
 	.long sys_getpgid
 	.long sys_fchdir
arch/sparc/kernel/systbls.S +1 -1
diff -ur linux-2.5/arch/sparc/kernel/systbls.S linux-mod/arch/sparc/kernel/systbls.S
@@ -62,7 +62,7 @@
 /*205*/	.long sys_readahead, sys_socketcall, sys_syslog, sys_nis_syscall, sys_nis_syscall
 /*210*/	.long sys_nis_syscall, sys_nis_syscall, sys_waitpid, sys_swapoff, sys_sysinfo
 /*215*/	.long sys_ipc, sys_sigreturn, sys_clone, sys_nis_syscall, sys_adjtimex
-/*220*/	.long sys_sigprocmask, sys_create_module, sys_delete_module, sys_get_kernel_syms, sys_getpgid
+/*220*/	.long sys_sigprocmask, sys_create_module, sys_delete_module, sys_nis_syscall, sys_getpgid
 /*225*/	.long sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16
 /*230*/	.long sys_select, sys_time, sys_nis_syscall, sys_stime, sys_nis_syscall
 					  /* "We are the Knights of the Forest of Ni!!" */
arch/sparc64/kernel/sys_sparc32.c +0 -36
diff -ur linux-2.5/arch/sparc64/kernel/sys_sparc32.c linux-mod/arch/sparc64/kernel/sys_sparc32.c
@@ -3322,36 +3322,6 @@
 	return err;
 }
 
-struct kernel_sym32 {
-	u32 value;
-	char name[60];
-};
-		 
-extern asmlinkage int sys_get_kernel_syms(struct kernel_sym *table);
-
-asmlinkage int sys32_get_kernel_syms(struct kernel_sym32 *table)
-{
-	int len, i;
-	struct kernel_sym *tbl;
-	mm_segment_t old_fs;
-	
-	len = sys_get_kernel_syms(NULL);
-	if (!table) return len;
-	tbl = kmalloc (len * sizeof (struct kernel_sym), GFP_KERNEL);
-	if (!tbl) return -ENOMEM;
-	old_fs = get_fs();
-	set_fs (KERNEL_DS);
-	sys_get_kernel_syms(tbl);
-	set_fs (old_fs);
-	for (i = 0; i < len; i++, table++) {
-		if (put_user (tbl[i].value, &table->value) ||
-		    copy_to_user (table->name, tbl[i].name, 60))
-			break;
-	}
-	kfree (tbl);
-	return i;
-}
-
 #else /* CONFIG_MODULES */
 
 asmlinkage unsigned long
@@ -3381,12 +3351,6 @@
 	if (which == 0)
 		return 0;
 
-	return -ENOSYS;
-}
-
-asmlinkage int
-sys32_get_kernel_syms(struct kernel_sym *table)
-{
 	return -ENOSYS;
 }
 
arch/sparc64/kernel/systbls.S +2 -2
diff -ur linux-2.5/arch/sparc64/kernel/systbls.S linux-mod/arch/sparc64/kernel/systbls.S
@@ -63,7 +63,7 @@
 	.word sys32_readahead, sys32_socketcall, sys_syslog, sys_nis_syscall, sys_nis_syscall
 /*210*/	.word sys_nis_syscall, sys_nis_syscall, sys_waitpid, sys_swapoff, sys32_sysinfo
 	.word sys32_ipc, sys32_sigreturn, sys_clone, sys_nis_syscall, sys32_adjtimex
-/*220*/	.word sys32_sigprocmask, sys32_create_module, sys32_delete_module, sys32_get_kernel_syms, sys_getpgid
+/*220*/	.word sys32_sigprocmask, sys32_create_module, sys32_delete_module, sys_nis_syscall, sys_getpgid
 	.word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16
 /*230*/	.word sys32_select, sys_time, sys_nis_syscall, sys_stime, sys_nis_syscall
 	.word sys_nis_syscall, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
@@ -122,7 +122,7 @@
 	.word sys_readahead, sys_socketcall, sys_syslog, sys_nis_syscall, sys_nis_syscall
 /*210*/	.word sys_nis_syscall, sys_nis_syscall, sys_waitpid, sys_swapoff, sys_sysinfo
 	.word sys_ipc, sys_nis_syscall, sys_clone, sys_nis_syscall, sys_adjtimex
-/*220*/	.word sys_nis_syscall, sys_create_module, sys_delete_module, sys_get_kernel_syms, sys_getpgid
+/*220*/	.word sys_nis_syscall, sys_create_module, sys_delete_module, sys_nis_syscall, sys_getpgid
 	.word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid
 /*230*/	.word sys_select, sys_nis_syscall, sys_nis_syscall, sys_stime, sys_nis_syscall
 	.word sys_nis_syscall, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
include/linux/module.h +0 -7
diff -ur linux-2.5/include/linux/module.h linux-mod/include/linux/module.h
@@ -17,13 +17,6 @@
 /* Don't need to bring in all of uaccess.h just for this decl.  */
 struct exception_table_entry;
 
-/* Used by get_kernel_syms, which is obsolete.  */
-struct kernel_sym
-{
-	unsigned long value;
-	char name[60];		/* should have been 64-sizeof(long); oh well */
-};
-
 struct module_symbol
 {
 	unsigned long value;
kernel/module.c +0 -68

80 lines not on this page · raw message