c5389831cd
We need to use TASK_SIZE because for 64-bit tasks the value of STACK_TOP actually sits in the middle of the address space so we'll get false-negatives. Adjust the TASK_SIZE definition on sparc64 to accomodate this, in the context in which user_addr_max() is used we have the test_thread_flag() definition available but not the one for test_tsk_thread_flag(). Signed-off-by: David S. Miller <davem@davemloft.net>
15 lines
344 B
C
15 lines
344 B
C
#ifndef ___ASM_SPARC_UACCESS_H
|
|
#define ___ASM_SPARC_UACCESS_H
|
|
#if defined(__sparc__) && defined(__arch64__)
|
|
#include <asm/uaccess_64.h>
|
|
#else
|
|
#include <asm/uaccess_32.h>
|
|
#endif
|
|
|
|
#define user_addr_max() \
|
|
(segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL)
|
|
|
|
extern long strncpy_from_user(char *dest, const char __user *src, long count);
|
|
|
|
#endif
|