Debian Codegraph @

gcc/testsuite/gcc.dg/analyzer/test-uaccess.h

raw
1 /* Shared header for testcases for copy_from_user/copy_to_user. */
2
3 /* Adapted from include/linux/compiler.h */
4
5 #define __user
6
7 /* Adapted from include/asm-generic/uaccess.h */
8
9 extern int copy_from_user(void *to, const void __user *from, long n)
10 __attribute__((access (write_only, 1, 3),
11 access (read_only, 2, 3)));
12
13 extern long copy_to_user(void __user *to, const void *from, unsigned long n)
14 __attribute__((access (write_only, 1, 3),
15 access (read_only, 2, 3)));