1 #include "check_debug.h"
3 int copy_from_user(void *dest
, void *src
, int size
){}
9 struct my_struct
*returns_filter(struct my_struct
*p
)
14 struct my_struct
*src
, *a
, *b
;
17 copy_from_user(a
, src
, sizeof(*a
));
18 b
= returns_filter(a
);
19 __smatch_state("check_user_data", "b->y");
20 b
= returns_filter(src
);
21 __smatch_state("check_user_data", "b->y");
22 b
= returns_filter(a
);
23 __smatch_state("check_user_data", "b->y");
27 * check-name: smatch user data #3
28 * check-command: smatch -p=kernel -I.. sm_user_data3.c
31 sm_user_data3.c:19 test() 'b->y' = 'user_data_set'
32 sm_user_data3.c:21 test() 'b->y' = 'capped'
33 sm_user_data3.c:23 test() 'b->y' = 'user_data_set'