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

instrumented.h: Fix all kernel-doc format warnings

Fix 26 kernel-doc notation warnings by converting the function
documentation to kernel-doc format.

Warning example:

instrumented.h:155: warning: Function parameter or member 'to' not described in 'instrument_copy_from_user_after'
instrumented.h:155: warning: Function parameter or member 'from' not described in 'instrument_copy_from_user_after'
instrumented.h:155: warning: Function parameter or member 'n' not described in 'instrument_copy_from_user_after'
instrumented.h:155: warning: Function parameter or member 'left' not described in 'instrument_copy_from_user_after'

Fixes: 36e4d4dd4fc4 ("include/linux: Add instrumented.h infrastructure")
Fixes: 00047c2e6d7c ("instrumented.h: Introduce read-write instrumentation hooks")
Fixes: 33b75c1d884e ("instrumented.h: allow instrumenting both sides of copy_from_user()")
Fixes: 888f84a6da4d ("x86: asm: instrument usercopy in get_user() and put_user()")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

authored by

Randy Dunlap and committed by
Paul E. McKenney
d70e2ecb fe15c26e

+26 -37
+26 -37
include/linux/instrumented.h
··· 15 15 16 16 /** 17 17 * instrument_read - instrument regular read access 18 + * @v: address of access 19 + * @size: size of access 18 20 * 19 21 * Instrument a regular read access. The instrumentation should be inserted 20 22 * before the actual read happens. 21 - * 22 - * @ptr address of access 23 - * @size size of access 24 23 */ 25 24 static __always_inline void instrument_read(const volatile void *v, size_t size) 26 25 { ··· 29 30 30 31 /** 31 32 * instrument_write - instrument regular write access 33 + * @v: address of access 34 + * @size: size of access 32 35 * 33 36 * Instrument a regular write access. The instrumentation should be inserted 34 37 * before the actual write happens. 35 - * 36 - * @ptr address of access 37 - * @size size of access 38 38 */ 39 39 static __always_inline void instrument_write(const volatile void *v, size_t size) 40 40 { ··· 43 45 44 46 /** 45 47 * instrument_read_write - instrument regular read-write access 48 + * @v: address of access 49 + * @size: size of access 46 50 * 47 51 * Instrument a regular write access. The instrumentation should be inserted 48 52 * before the actual write happens. 49 - * 50 - * @ptr address of access 51 - * @size size of access 52 53 */ 53 54 static __always_inline void instrument_read_write(const volatile void *v, size_t size) 54 55 { ··· 57 60 58 61 /** 59 62 * instrument_atomic_read - instrument atomic read access 63 + * @v: address of access 64 + * @size: size of access 60 65 * 61 66 * Instrument an atomic read access. The instrumentation should be inserted 62 67 * before the actual read happens. 63 - * 64 - * @ptr address of access 65 - * @size size of access 66 68 */ 67 69 static __always_inline void instrument_atomic_read(const volatile void *v, size_t size) 68 70 { ··· 71 75 72 76 /** 73 77 * instrument_atomic_write - instrument atomic write access 78 + * @v: address of access 79 + * @size: size of access 74 80 * 75 81 * Instrument an atomic write access. The instrumentation should be inserted 76 82 * before the actual write happens. 77 - * 78 - * @ptr address of access 79 - * @size size of access 80 83 */ 81 84 static __always_inline void instrument_atomic_write(const volatile void *v, size_t size) 82 85 { ··· 85 90 86 91 /** 87 92 * instrument_atomic_read_write - instrument atomic read-write access 93 + * @v: address of access 94 + * @size: size of access 88 95 * 89 96 * Instrument an atomic read-write access. The instrumentation should be 90 97 * inserted before the actual write happens. 91 - * 92 - * @ptr address of access 93 - * @size size of access 94 98 */ 95 99 static __always_inline void instrument_atomic_read_write(const volatile void *v, size_t size) 96 100 { ··· 99 105 100 106 /** 101 107 * instrument_copy_to_user - instrument reads of copy_to_user 108 + * @to: destination address 109 + * @from: source address 110 + * @n: number of bytes to copy 102 111 * 103 112 * Instrument reads from kernel memory, that are due to copy_to_user (and 104 113 * variants). The instrumentation must be inserted before the accesses. 105 - * 106 - * @to destination address 107 - * @from source address 108 - * @n number of bytes to copy 109 114 */ 110 115 static __always_inline void 111 116 instrument_copy_to_user(void __user *to, const void *from, unsigned long n) ··· 116 123 117 124 /** 118 125 * instrument_copy_from_user_before - add instrumentation before copy_from_user 126 + * @to: destination address 127 + * @from: source address 128 + * @n: number of bytes to copy 119 129 * 120 130 * Instrument writes to kernel memory, that are due to copy_from_user (and 121 131 * variants). The instrumentation should be inserted before the accesses. 122 - * 123 - * @to destination address 124 - * @from source address 125 - * @n number of bytes to copy 126 132 */ 127 133 static __always_inline void 128 134 instrument_copy_from_user_before(const void *to, const void __user *from, unsigned long n) ··· 132 140 133 141 /** 134 142 * instrument_copy_from_user_after - add instrumentation after copy_from_user 143 + * @to: destination address 144 + * @from: source address 145 + * @n: number of bytes to copy 146 + * @left: number of bytes not copied (as returned by copy_from_user) 135 147 * 136 148 * Instrument writes to kernel memory, that are due to copy_from_user (and 137 149 * variants). The instrumentation should be inserted after the accesses. 138 - * 139 - * @to destination address 140 - * @from source address 141 - * @n number of bytes to copy 142 - * @left number of bytes not copied (as returned by copy_from_user) 143 150 */ 144 151 static __always_inline void 145 152 instrument_copy_from_user_after(const void *to, const void __user *from, ··· 149 158 150 159 /** 151 160 * instrument_get_user() - add instrumentation to get_user()-like macros 161 + * @to: destination variable, may not be address-taken 152 162 * 153 163 * get_user() and friends are fragile, so it may depend on the implementation 154 164 * whether the instrumentation happens before or after the data is copied from 155 165 * the userspace. 156 - * 157 - * @to destination variable, may not be address-taken 158 166 */ 159 167 #define instrument_get_user(to) \ 160 168 ({ \ ··· 165 175 166 176 /** 167 177 * instrument_put_user() - add instrumentation to put_user()-like macros 178 + * @from: source address 179 + * @ptr: userspace pointer to copy to 180 + * @size: number of bytes to copy 168 181 * 169 182 * put_user() and friends are fragile, so it may depend on the implementation 170 183 * whether the instrumentation happens before or after the data is copied from 171 184 * the userspace. 172 - * 173 - * @from source address 174 - * @ptr userspace pointer to copy to 175 - * @size number of bytes to copy 176 185 */ 177 186 #define instrument_put_user(from, ptr, size) \ 178 187 ({ \