uaccess.h (222ca305c9fd39e5ed8104da25c09b2b79a516a8) | uaccess.h (12700c17fc286149324f92d6d380bc48e43f253d) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#ifndef __ASM_CSKY_UACCESS_H 4#define __ASM_CSKY_UACCESS_H 5 6#define user_addr_max() (current_thread_info()->addr_limit.seg) 7 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#ifndef __ASM_CSKY_UACCESS_H 4#define __ASM_CSKY_UACCESS_H 5 6#define user_addr_max() (current_thread_info()->addr_limit.seg) 7 |
8static inline int __access_ok(unsigned long addr, unsigned long size) 9{ 10 unsigned long limit = user_addr_max(); 11 12 return (size <= limit) && (addr <= (limit - size)); 13} 14#define __access_ok __access_ok 15 | |
16/* 17 * __put_user_fn 18 */ 19extern int __put_user_bad(void); 20 21#define __put_user_asm_b(x, ptr, err) \ 22do { \ 23 int errcode; \ --- 191 unchanged lines hidden --- | 8/* 9 * __put_user_fn 10 */ 11extern int __put_user_bad(void); 12 13#define __put_user_asm_b(x, ptr, err) \ 14do { \ 15 int errcode; \ --- 191 unchanged lines hidden --- |