1 #include "check_debug.h"
3 int copy_from_user(void *dest
, void *src
, int size
);
10 int returns_user_data(void)
14 copy_from_user(&x
, src
, sizeof(int));
19 struct ear
*returns_user_member(void)
21 copy_from_user(&dest
->x
, src
, sizeof(int));
29 x
= returns_user_data();
30 __smatch_state("check_user_data", "x");
31 p
= returns_user_member();
32 __smatch_state("check_user_data", "p");
33 __smatch_state("check_user_data", "p->x");
37 * check-name: smatch user data #4
38 * check-command: smatch -p=kernel -I.. sm_user_data4.c
41 sm_user_data4.c:30 test() 'x' = 'user_data_set'
42 sm_user_data4.c:32 test() check_user_data 'p' not found
43 sm_user_data4.c:33 test() 'p->x' = 'user_data_set'