summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/uaccess.c
diff options
context:
space:
mode:
authorGennady Sharapov <Gennady.V.Sharapov@intel.com>2005-11-07 00:58:50 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:31 -0800
commitbb578426253ab9950cc20b4e5dd6aefb5500144f (patch)
treecd1b874512440f739dc555a40efb5edd51de275b /arch/um/kernel/uaccess.c
parent0e76422ca5f34bb43b97c0945646ef072bcc1776 (diff)
downloadblackbird-op-linux-bb578426253ab9950cc20b4e5dd6aefb5500144f.tar.gz
blackbird-op-linux-bb578426253ab9950cc20b4e5dd6aefb5500144f.zip
[PATCH] uml: separate libc-dependent uaccess code
The serial UML OS-abstraction layer patch (um/kernel dir). This moves all systemcalls from uaccess_user.c file under os-Linux dir Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/uaccess.c')
-rw-r--r--arch/um/kernel/uaccess.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/um/kernel/uaccess.c b/arch/um/kernel/uaccess.c
new file mode 100644
index 000000000000..054e3de0784e
--- /dev/null
+++ b/arch/um/kernel/uaccess.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2001 Chris Emerson (cemerson@chiark.greenend.org.uk)
+ * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
+ * Licensed under the GPL
+ */
+
+/* These are here rather than tt/uaccess.c because skas mode needs them in
+ * order to do SIGBUS recovery when a tmpfs mount runs out of room.
+ */
+
+#include <linux/string.h>
+#include "os.h"
+
+void __do_copy(void *to, const void *from, int n)
+{
+ memcpy(to, from, n);
+}
+
+
+int __do_copy_to_user(void *to, const void *from, int n,
+ void **fault_addr, void **fault_catcher)
+{
+ unsigned long fault;
+ int faulted;
+
+ fault = __do_user_copy(to, from, n, fault_addr, fault_catcher,
+ __do_copy, &faulted);
+ if(!faulted) return(0);
+ else return(n - (fault - (unsigned long) to));
+}
OpenPOWER on IntegriCloud