diff options
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/Makefile | 16 | ||||
-rw-r--r-- | arch/um/Makefile-x86_64 | 1 | ||||
-rw-r--r-- | arch/um/kernel/asm-offsets.c | 1 | ||||
-rw-r--r-- | arch/um/kernel/skas/include/uaccess-skas.h | 14 | ||||
-rw-r--r-- | arch/um/kernel/tt/include/uaccess-tt.h | 14 | ||||
-rw-r--r-- | arch/um/scripts/Makefile.rules | 5 |
6 files changed, 37 insertions, 14 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile index b15f6048caae..577b8d1cf1a6 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -197,6 +197,22 @@ define filechk_umlconfig | |||
197 | sed 's/ CONFIG/ UML_CONFIG/' | 197 | sed 's/ CONFIG/ UML_CONFIG/' |
198 | endef | 198 | endef |
199 | 199 | ||
200 | define filechk_gen-asm-offsets | ||
201 | (set -e; \ | ||
202 | echo "#ifndef __ASM_OFFSETS_H__"; \ | ||
203 | echo "#define __ASM_OFFSETS_H__"; \ | ||
204 | echo "/*"; \ | ||
205 | echo " * DO NOT MODIFY."; \ | ||
206 | echo " *"; \ | ||
207 | echo " * This file was generated by arch/$(ARCH)/Makefile"; \ | ||
208 | echo " *"; \ | ||
209 | echo " */"; \ | ||
210 | echo ""; \ | ||
211 | sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ | ||
212 | echo ""; \ | ||
213 | echo "#endif" ) | ||
214 | endef | ||
215 | |||
200 | $(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h | 216 | $(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h |
201 | $(call filechk,umlconfig) | 217 | $(call filechk,umlconfig) |
202 | 218 | ||
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index baddb5d64ca5..436abbba409b 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 | |||
@@ -8,6 +8,7 @@ START := 0x60000000 | |||
8 | #it's needed for headers to work! | 8 | #it's needed for headers to work! |
9 | CFLAGS += -U__$(SUBARCH)__ -fno-builtin | 9 | CFLAGS += -U__$(SUBARCH)__ -fno-builtin |
10 | USER_CFLAGS += -fno-builtin | 10 | USER_CFLAGS += -fno-builtin |
11 | CHECKFLAGS += -m64 | ||
11 | 12 | ||
12 | ELF_ARCH := i386:x86-64 | 13 | ELF_ARCH := i386:x86-64 |
13 | ELF_FORMAT := elf64-x86-64 | 14 | ELF_FORMAT := elf64-x86-64 |
diff --git a/arch/um/kernel/asm-offsets.c b/arch/um/kernel/asm-offsets.c new file mode 100644 index 000000000000..c13a64a288f6 --- /dev/null +++ b/arch/um/kernel/asm-offsets.c | |||
@@ -0,0 +1 @@ | |||
/* Dummy file to make kbuild happy - unused! */ | |||
diff --git a/arch/um/kernel/skas/include/uaccess-skas.h b/arch/um/kernel/skas/include/uaccess-skas.h index cd6c280482cb..6ee3f3902e68 100644 --- a/arch/um/kernel/skas/include/uaccess-skas.h +++ b/arch/um/kernel/skas/include/uaccess-skas.h | |||
@@ -18,18 +18,18 @@ | |||
18 | ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \ | 18 | ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \ |
19 | ((unsigned long) (addr) + (size) >= (unsigned long)(addr)))) | 19 | ((unsigned long) (addr) + (size) >= (unsigned long)(addr)))) |
20 | 20 | ||
21 | static inline int verify_area_skas(int type, const void * addr, | 21 | static inline int verify_area_skas(int type, const void __user * addr, |
22 | unsigned long size) | 22 | unsigned long size) |
23 | { | 23 | { |
24 | return(access_ok_skas(type, addr, size) ? 0 : -EFAULT); | 24 | return(access_ok_skas(type, addr, size) ? 0 : -EFAULT); |
25 | } | 25 | } |
26 | 26 | ||
27 | extern int copy_from_user_skas(void *to, const void *from, int n); | 27 | extern int copy_from_user_skas(void *to, const void __user *from, int n); |
28 | extern int copy_to_user_skas(void *to, const void *from, int n); | 28 | extern int copy_to_user_skas(void __user *to, const void *from, int n); |
29 | extern int strncpy_from_user_skas(char *dst, const char *src, int count); | 29 | extern int strncpy_from_user_skas(char *dst, const char __user *src, int count); |
30 | extern int __clear_user_skas(void *mem, int len); | 30 | extern int __clear_user_skas(void __user *mem, int len); |
31 | extern int clear_user_skas(void *mem, int len); | 31 | extern int clear_user_skas(void __user *mem, int len); |
32 | extern int strnlen_user_skas(const void *str, int len); | 32 | extern int strnlen_user_skas(const void __user *str, int len); |
33 | 33 | ||
34 | #endif | 34 | #endif |
35 | 35 | ||
diff --git a/arch/um/kernel/tt/include/uaccess-tt.h b/arch/um/kernel/tt/include/uaccess-tt.h index 3fbb5fe26f49..aa6db384af80 100644 --- a/arch/um/kernel/tt/include/uaccess-tt.h +++ b/arch/um/kernel/tt/include/uaccess-tt.h | |||
@@ -33,7 +33,7 @@ extern unsigned long uml_physmem; | |||
33 | (((unsigned long) (addr) <= ((unsigned long) (addr) + (size))) && \ | 33 | (((unsigned long) (addr) <= ((unsigned long) (addr) + (size))) && \ |
34 | (under_task_size(addr, size) || is_stack(addr, size)))) | 34 | (under_task_size(addr, size) || is_stack(addr, size)))) |
35 | 35 | ||
36 | static inline int verify_area_tt(int type, const void * addr, | 36 | static inline int verify_area_tt(int type, const void __user * addr, |
37 | unsigned long size) | 37 | unsigned long size) |
38 | { | 38 | { |
39 | return(access_ok_tt(type, addr, size) ? 0 : -EFAULT); | 39 | return(access_ok_tt(type, addr, size) ? 0 : -EFAULT); |
@@ -50,12 +50,12 @@ extern int __do_clear_user(void *mem, size_t len, void **fault_addr, | |||
50 | extern int __do_strnlen_user(const char *str, unsigned long n, | 50 | extern int __do_strnlen_user(const char *str, unsigned long n, |
51 | void **fault_addr, void **fault_catcher); | 51 | void **fault_addr, void **fault_catcher); |
52 | 52 | ||
53 | extern int copy_from_user_tt(void *to, const void *from, int n); | 53 | extern int copy_from_user_tt(void *to, const void __user *from, int n); |
54 | extern int copy_to_user_tt(void *to, const void *from, int n); | 54 | extern int copy_to_user_tt(void __user *to, const void *from, int n); |
55 | extern int strncpy_from_user_tt(char *dst, const char *src, int count); | 55 | extern int strncpy_from_user_tt(char *dst, const char __user *src, int count); |
56 | extern int __clear_user_tt(void *mem, int len); | 56 | extern int __clear_user_tt(void __user *mem, int len); |
57 | extern int clear_user_tt(void *mem, int len); | 57 | extern int clear_user_tt(void __user *mem, int len); |
58 | extern int strnlen_user_tt(const void *str, int len); | 58 | extern int strnlen_user_tt(const void __user *str, int len); |
59 | 59 | ||
60 | #endif | 60 | #endif |
61 | 61 | ||
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index 17f305b6bade..59a1291f477e 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules | |||
@@ -9,6 +9,11 @@ USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) | |||
9 | 9 | ||
10 | $(USER_OBJS) : c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \ | 10 | $(USER_OBJS) : c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \ |
11 | $(CFLAGS_$(notdir $@)) | 11 | $(CFLAGS_$(notdir $@)) |
12 | $(USER_OBJS): cmd_checksrc = | ||
13 | $(USER_OBJS): quiet_cmd_checksrc = | ||
14 | $(USER_OBJS): cmd_force_checksrc = | ||
15 | $(USER_OBJS): quiet_cmd_force_checksrc = | ||
16 | |||
12 | 17 | ||
13 | # The stubs and unmap.o can't try to call mcount or update basic block data | 18 | # The stubs and unmap.o can't try to call mcount or update basic block data |
14 | define unprofile | 19 | define unprofile |