Skip to contentSkip to conversation

Make user-copy operations run-time configurable.

S390 Martin Schwidefsky 1 participant 1 message Sep 12, 2006 s390

lore
Share & tools
lore
#0 lore raw

From: Gerald Schaefer <[email protected]>

[S390] Make user-copy operations run-time configurable.

Introduces a struct uaccess_ops which allows setting user-copy operations at run-time.

---

 arch/s390/kernel/s390_ksyms.c |    6 
 arch/s390/kernel/setup.c      |    7 
 arch/s390/lib/Makefile        |    3 
 arch/s390/lib/uaccess.S       |  211 --------------------------
 arch/s390/lib/uaccess64.S     |  207 -------------------------
 arch/s390/lib/uaccess_std.c   |  340 ++++++++++++++++++++++++++++++++++++++++++
 include/asm-s390/futex.h      |   87 ----------
 include/asm-s390/uaccess.h    |  171 ++++++---------------
 8 files changed, 411 insertions(+), 621 deletions(-)
arch/s390/kernel/s390_ksyms.c +0 -6
diff -urpN linux-2.6/arch/s390/kernel/s390_ksyms.c linux-2.6-patched/arch/s390/kernel/s390_ksyms.c
@@ -25,12 +25,6 @@ EXPORT_SYMBOL(_oi_bitmap);
 EXPORT_SYMBOL(_ni_bitmap);
 EXPORT_SYMBOL(_zb_findmap);
 EXPORT_SYMBOL(_sb_findmap);
-EXPORT_SYMBOL(__copy_from_user_asm);
-EXPORT_SYMBOL(__copy_to_user_asm);
-EXPORT_SYMBOL(__copy_in_user_asm);
-EXPORT_SYMBOL(__clear_user_asm);
-EXPORT_SYMBOL(__strncpy_from_user_asm);
-EXPORT_SYMBOL(__strnlen_user_asm);
 EXPORT_SYMBOL(diag10);
 
 /*
arch/s390/kernel/setup.c +7 -0
diff -urpN linux-2.6/arch/s390/kernel/setup.c linux-2.6-patched/arch/s390/kernel/setup.c
@@ -51,6 +51,12 @@
 #include <asm/sections.h>
 
 /*
+ * User copy operations.
+ */
+struct uaccess_ops uaccess;
+EXPORT_SYMBOL_GPL(uaccess);
+
+/*
  * Machine setup..
  */
 unsigned int console_mode = 0;
@@ -641,6 +647,7 @@ setup_arch(char **cmdline_p)
 
 	memory_end = memory_size;
 
+	memcpy(&uaccess, &uaccess_std, sizeof(uaccess));
 	parse_early_param();
 
 #ifndef CONFIG_64BIT
arch/s390/lib/Makefile +1 -2
diff -urpN linux-2.6/arch/s390/lib/Makefile linux-2.6-patched/arch/s390/lib/Makefile
@@ -4,6 +4,5 @@
 
 EXTRA_AFLAGS := -traditional
 
-lib-y += delay.o string.o
-lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o)
+lib-y += delay.o string.o uaccess_std.o
 lib-$(CONFIG_SMP) += spinlock.o
arch/s390/lib/uaccess64.S +0 -207

207 lines not on this page · raw message

arch/s390/lib/uaccess.S +0 -211

211 lines not on this page · raw message

arch/s390/lib/uaccess_std.c +340 -0

340 lines not on this page · raw message

include/asm-s390/futex.h +7 -80

114 lines not on this page · raw message

include/asm-s390/uaccess.h +56 -115

302 lines not on this page · raw message