diff options
author | Ley Foon Tan <ley.foon.tan@intel.com> | 2017-05-08 12:14:14 +0300 |
---|---|---|
committer | Ley Foon Tan <ley.foon.tan@intel.com> | 2017-05-08 12:14:14 +0300 |
commit | 7f1e614113ffe75f5ea7c99f641bf1b56f85be03 (patch) | |
tree | 18c95adccb9ce60cddd4f1407639678bcc74dbfd /arch/nios2/include | |
parent | edebea98777d7090ea14bdce2e38e6798557729d (diff) | |
download | linux-7f1e614113ffe75f5ea7c99f641bf1b56f85be03.tar.xz |
nios2: use generic strncpy_from_user() and strnlen_user()
This change enables the generic strncpy_from_user() and strnlen_user()
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Diffstat (limited to 'arch/nios2/include')
-rw-r--r-- | arch/nios2/include/asm/uaccess.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/nios2/include/asm/uaccess.h b/arch/nios2/include/asm/uaccess.h index 727bd9504899..dfa3c7cb30b4 100644 --- a/arch/nios2/include/asm/uaccess.h +++ b/arch/nios2/include/asm/uaccess.h @@ -42,6 +42,8 @@ # define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n" +#define user_addr_max() (uaccess_kernel() ? ~0UL : TASK_SIZE) + /* * Zero Userspace */ @@ -81,8 +83,9 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n); #define INLINE_COPY_TO_USER extern long strncpy_from_user(char *__to, const char __user *__from, - long __len); -extern long strnlen_user(const char __user *s, long n); + long __len); +extern __must_check long strlen_user(const char __user *str); +extern __must_check long strnlen_user(const char __user *s, long n); /* Optimized macros */ #define __get_user_asm(val, insn, addr, err) \ |