Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] remove verify_area(): remove verify_area() from various uaccess.h headers

Remove the deprecated (and unused) verify_area() from various uaccess.h
headers.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Jesper Juhl and committed by
Linus Torvalds
97de50c0 5e5d7a22

-197
-7
arch/um/include/um_uaccess.h
··· 20 20 #define access_ok(type, addr, size) \ 21 21 CHOOSE_MODE_PROC(access_ok_tt, access_ok_skas, type, addr, size) 22 22 23 - /* this function will go away soon - use access_ok() instead */ 24 - static inline int __deprecated verify_area(int type, const void __user *addr, unsigned long size) 25 - { 26 - return (CHOOSE_MODE_PROC(verify_area_tt, verify_area_skas, type, addr, 27 - size)); 28 - } 29 - 30 23 static inline int copy_from_user(void *to, const void __user *from, int n) 31 24 { 32 25 return(CHOOSE_MODE_PROC(copy_from_user_tt, copy_from_user_skas, to,
-6
include/asm-alpha/uaccess.h
··· 48 48 __access_ok(((unsigned long)(addr)),(size),get_fs()); \ 49 49 }) 50 50 51 - /* this function will go away soon - use access_ok() instead */ 52 - extern inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 53 - { 54 - return access_ok(type,addr,size) ? 0 : -EFAULT; 55 - } 56 - 57 51 /* 58 52 * These are the main single-value transfer routines. They automatically 59 53 * use the right size if we just have the right pointer type.
-6
include/asm-arm/uaccess.h
··· 77 77 78 78 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) 79 79 80 - /* this function will go away soon - use access_ok() instead */ 81 - static inline int __deprecated verify_area(int type, const void __user *addr, unsigned long size) 82 - { 83 - return access_ok(type, addr, size) ? 0 : -EFAULT; 84 - } 85 - 86 80 /* 87 81 * Single-value transfer routines. They automatically use the right 88 82 * size if we just have the right pointer type. Note that the functions
-6
include/asm-arm26/uaccess.h
··· 40 40 41 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) 42 42 43 - /* this function will go away soon - use access_ok() instead */ 44 - static inline int __deprecated verify_area(int type, const void * addr, unsigned long size) 45 - { 46 - return access_ok(type, addr, size) ? 0 : -EFAULT; 47 - } 48 - 49 43 /* 50 44 * Single-value transfer routines. They automatically use the right 51 45 * size if we just have the right pointer type. Note that the functions
-7
include/asm-cris/uaccess.h
··· 91 91 #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) 92 92 #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) 93 93 94 - /* this function will go away soon - use access_ok() instead */ 95 - extern inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 96 - { 97 - return access_ok(type,addr,size) ? 0 : -EFAULT; 98 - } 99 - 100 - 101 94 #include <asm/arch/uaccess.h> 102 95 103 96 /*
-6
include/asm-frv/uaccess.h
··· 67 67 #define access_ok(type,addr,size) (__range_ok((addr), (size)) == 0) 68 68 #define __access_ok(addr,size) (__range_ok((addr), (size)) == 0) 69 69 70 - /* this function will go away soon - use access_ok() / __range_ok() instead */ 71 - static inline int __deprecated verify_area(int type, const void * addr, unsigned long size) 72 - { 73 - return __range_ok(addr, size); 74 - } 75 - 76 70 /* 77 71 * The exception table consists of pairs of addresses: the first is the 78 72 * address of an instruction that is allowed to fault, and the second is
-6
include/asm-h8300/uaccess.h
··· 24 24 return(RANGE_CHECK_OK(addr, size, 0L, (unsigned long)&_ramend)); 25 25 } 26 26 27 - /* this function will go away soon - use access_ok() instead */ 28 - static inline int __deprecated verify_area(int type, const void *addr, unsigned long size) 29 - { 30 - return access_ok(type,addr,size)?0:-EFAULT; 31 - } 32 - 33 27 /* 34 28 * The exception table consists of pairs of addresses: the first is the 35 29 * address of an instruction that is allowed to fault, and the second is
-24
include/asm-i386/uaccess.h
··· 83 83 */ 84 84 #define access_ok(type,addr,size) (likely(__range_ok(addr,size) == 0)) 85 85 86 - /** 87 - * verify_area: - Obsolete/deprecated and will go away soon, 88 - * use access_ok() instead. 89 - * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE 90 - * @addr: User space pointer to start of block to check 91 - * @size: Size of block to check 92 - * 93 - * Context: User context only. This function may sleep. 94 - * 95 - * This function has been replaced by access_ok(). 96 - * 97 - * Checks if a pointer to a block of memory in user space is valid. 98 - * 99 - * Returns zero if the memory block may be valid, -EFAULT 100 - * if it is definitely invalid. 101 - * 102 - * See access_ok() for more details. 103 - */ 104 - static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 105 - { 106 - return access_ok(type,addr,size) ? 0 : -EFAULT; 107 - } 108 - 109 - 110 86 /* 111 87 * The exception table consists of pairs of addresses: the first is the 112 88 * address of an instruction that is allowed to fault, and the second is
-7
include/asm-ia64/uaccess.h
··· 72 72 }) 73 73 #define access_ok(type, addr, size) __access_ok((addr), (size), get_fs()) 74 74 75 - /* this function will go away soon - use access_ok() instead */ 76 - static inline int __deprecated 77 - verify_area (int type, const void __user *addr, unsigned long size) 78 - { 79 - return access_ok(type, addr, size) ? 0 : -EFAULT; 80 - } 81 - 82 75 /* 83 76 * These are the main single-value transfer routines. They automatically 84 77 * use the right size if we just have the right pointer type.
-25
include/asm-m32r/uaccess.h
··· 120 120 } 121 121 #endif /* CONFIG_MMU */ 122 122 123 - /** 124 - * verify_area: - Obsolete/deprecated and will go away soon, 125 - * use access_ok() instead. 126 - * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE 127 - * @addr: User space pointer to start of block to check 128 - * @size: Size of block to check 129 - * 130 - * Context: User context only. This function may sleep. 131 - * 132 - * This function has been replaced by access_ok(). 133 - * 134 - * Checks if a pointer to a block of memory in user space is valid. 135 - * 136 - * Returns zero if the memory block may be valid, -EFAULT 137 - * if it is definitely invalid. 138 - * 139 - * See access_ok() for more details. 140 - */ 141 - static inline int __deprecated verify_area(int type, const void __user *addr, 142 - unsigned long size) 143 - { 144 - return access_ok(type, addr, size) ? 0 : -EFAULT; 145 - } 146 - 147 - 148 123 /* 149 124 * The exception table consists of pairs of addresses: the first is the 150 125 * address of an instruction that is allowed to fault, and the second is
-6
include/asm-m68k/uaccess.h
··· 14 14 /* We let the MMU do all checking */ 15 15 #define access_ok(type,addr,size) 1 16 16 17 - /* this function will go away soon - use access_ok() instead */ 18 - static inline int __deprecated verify_area(int type, const void *addr, unsigned long size) 19 - { 20 - return access_ok(type,addr,size) ? 0 : -EFAULT; 21 - } 22 - 23 17 /* 24 18 * The exception table consists of pairs of addresses: the first is the 25 19 * address of an instruction that is allowed to fault, and the second is
-6
include/asm-m68knommu/uaccess.h
··· 23 23 (is_in_rom(addr) && is_in_rom(addr+size))); 24 24 } 25 25 26 - /* this function will go away soon - use access_ok() instead */ 27 - extern inline int __deprecated verify_area(int type, const void * addr, unsigned long size) 28 - { 29 - return access_ok(type,addr,size)?0:-EFAULT; 30 - } 31 - 32 26 /* 33 27 * The exception table consists of pairs of addresses: the first is the 34 28 * address of an instruction that is allowed to fault, and the second is
-23
include/asm-mips/uaccess.h
··· 112 112 likely(__access_ok((unsigned long)(addr), (size),__access_mask)) 113 113 114 114 /* 115 - * verify_area: - Obsolete/deprecated and will go away soon, 116 - * use access_ok() instead. 117 - * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE 118 - * @addr: User space pointer to start of block to check 119 - * @size: Size of block to check 120 - * 121 - * Context: User context only. This function may sleep. 122 - * 123 - * This function has been replaced by access_ok(). 124 - * 125 - * Checks if a pointer to a block of memory in user space is valid. 126 - * 127 - * Returns zero if the memory block may be valid, -EFAULT 128 - * if it is definitely invalid. 129 - * 130 - * See access_ok() for more details. 131 - */ 132 - static inline int __deprecated verify_area(int type, const void * addr, unsigned long size) 133 - { 134 - return access_ok(type, addr, size) ? 0 : -EFAULT; 135 - } 136 - 137 - /* 138 115 * put_user: - Write a simple value into user space. 139 116 * @x: Value to copy to user space. 140 117 * @ptr: Destination address, in user space.
-4
include/asm-parisc/uaccess.h
··· 40 40 return 1; 41 41 } 42 42 43 - #define verify_area(type,addr,size) (0) /* FIXME: all users should go away soon, 44 - * and use access_ok instead, then this 45 - * should be removed. */ 46 - 47 43 #define put_user __put_user 48 44 #define get_user __get_user 49 45
-7
include/asm-ppc/uaccess.h
··· 37 37 #define access_ok(type, addr, size) \ 38 38 (__chk_user_ptr(addr),__access_ok((unsigned long)(addr),(size))) 39 39 40 - /* this function will go away soon - use access_ok() instead */ 41 - extern inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 42 - { 43 - return access_ok(type, addr, size) ? 0 : -EFAULT; 44 - } 45 - 46 - 47 40 /* 48 41 * The exception table consists of pairs of addresses: the first is the 49 42 * address of an instruction that is allowed to fault, and the second is
-7
include/asm-ppc64/uaccess.h
··· 56 56 #define access_ok(type,addr,size) \ 57 57 __access_ok(((__force unsigned long)(addr)),(size),get_fs()) 58 58 59 - /* this function will go away soon - use access_ok() instead */ 60 - static inline int __deprecated verify_area(int type, const void __user *addr, unsigned long size) 61 - { 62 - return access_ok(type,addr,size) ? 0 : -EFAULT; 63 - } 64 - 65 - 66 59 /* 67 60 * The exception table consists of pairs of addresses: the first is the 68 61 * address of an instruction that is allowed to fault, and the second is
-7
include/asm-s390/uaccess.h
··· 65 65 66 66 #define access_ok(type,addr,size) __access_ok(addr,size) 67 67 68 - /* this function will go away soon - use access_ok() instead */ 69 - extern inline int __deprecated verify_area(int type, const void __user *addr, 70 - unsigned long size) 71 - { 72 - return access_ok(type, addr, size) ? 0 : -EFAULT; 73 - } 74 - 75 68 /* 76 69 * The exception table consists of pairs of addresses: the first is the 77 70 * address of an instruction that is allowed to fault, and the second is
-6
include/asm-sh/uaccess.h
··· 146 146 return __access_ok(addr, size); 147 147 } 148 148 149 - /* this function will go away soon - use access_ok() instead */ 150 - static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 151 - { 152 - return access_ok(type,addr,size) ? 0 : -EFAULT; 153 - } 154 - 155 149 /* 156 150 * Uh, these should become the main single-value transfer routines ... 157 151 * They automatically use the right size if we just have the right
-6
include/asm-sh64/uaccess.h
··· 60 60 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) 61 61 #define __access_ok(addr,size) (__range_ok(addr,size) == 0) 62 62 63 - /* this function will go away soon - use access_ok() instead */ 64 - extern inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 65 - { 66 - return access_ok(type,addr,size) ? 0 : -EFAULT; 67 - } 68 - 69 63 /* 70 64 * Uh, these should become the main single-value transfer routines ... 71 65 * They automatically use the right size if we just have the right
-6
include/asm-sparc/uaccess.h
··· 47 47 #define access_ok(type, addr, size) \ 48 48 ({ (void)(type); __access_ok((unsigned long)(addr), size); }) 49 49 50 - /* this function will go away soon - use access_ok() instead */ 51 - static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 52 - { 53 - return access_ok(type,addr,size) ? 0 : -EFAULT; 54 - } 55 - 56 50 /* 57 51 * The exception table consists of pairs of addresses: the first is the 58 52 * address of an instruction that is allowed to fault, and the second is
-6
include/asm-sparc64/uaccess.h
··· 59 59 return 1; 60 60 } 61 61 62 - /* this function will go away soon - use access_ok() instead */ 63 - static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 64 - { 65 - return 0; 66 - } 67 - 68 62 /* 69 63 * The exception table consists of pairs of addresses: the first is the 70 64 * address of an instruction that is allowed to fault, and the second is
-6
include/asm-v850/uaccess.h
··· 27 27 return val >= (0x80 + NUM_CPU_IRQS*16) && val < 0xFFFFF000; 28 28 } 29 29 30 - /* this function will go away soon - use access_ok() instead */ 31 - extern inline int __deprecated verify_area (int type, const void *addr, unsigned long size) 32 - { 33 - return access_ok (type, addr, size) ? 0 : -EFAULT; 34 - } 35 - 36 30 /* 37 31 * The exception table consists of pairs of addresses: the first is the 38 32 * address of an instruction that is allowed to fault, and the second is
-7
include/asm-x86_64/uaccess.h
··· 49 49 50 50 #define access_ok(type, addr, size) (__range_not_ok(addr,size) == 0) 51 51 52 - /* this function will go away soon - use access_ok() instead */ 53 - extern inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) 54 - { 55 - return access_ok(type,addr,size) ? 0 : -EFAULT; 56 - } 57 - 58 - 59 52 /* 60 53 * The exception table consists of pairs of addresses: the first is the 61 54 * address of an instruction that is allowed to fault, and the second is