1212#include <stdint.h>
1313
1414struct kfuzztest_target {
15- const char * name ;
16- const char * arg_type_name ;
15+ const char * name ;
16+ const char * arg_type_name ;
1717 uintptr_t write_input_cb ;
1818} __attribute__((aligned (32 )));
1919
@@ -28,8 +28,8 @@ enum kfuzztest_constraint_type {
2828};
2929
3030struct kfuzztest_constraint {
31- const char * input_type ;
32- const char * field_name ;
31+ const char * input_type ;
32+ const char * field_name ;
3333 uintptr_t value1 ;
3434 uintptr_t value2 ;
3535 enum kfuzztest_constraint_type type ;
@@ -42,40 +42,40 @@ enum kfuzztest_annotation_attribute {
4242};
4343
4444struct kfuzztest_annotation {
45- const char * input_type ;
46- const char * field_name ;
47- const char * linked_field_name ;
45+ const char * input_type ;
46+ const char * field_name ;
47+ const char * linked_field_name ;
4848 enum kfuzztest_annotation_attribute attrib ;
4949} __attribute__((aligned (32 )));
5050
51- #define DEFINE_FUZZ_TARGET (test_name , test_arg_type ) \
52- struct kfuzztest_target __fuzz_test__##test_name \
53- __attribute__((section(".kfuzztest_target"), __used__)) = { \
54- .name = #test_name, \
55- .arg_type_name = #test_arg_type, \
56- }; \
57- /* Avoid the compiler optimizing out the struct definition. */ \
51+ #define DEFINE_FUZZ_TARGET (test_name , test_arg_type ) \
52+ struct kfuzztest_target __fuzz_test__##test_name \
53+ __attribute__((section(".kfuzztest_target"), __used__)) = { \
54+ .name = #test_name, \
55+ .arg_type_name = #test_arg_type, \
56+ }; \
57+ /* Avoid the compiler optimizing out the struct definition. */ \
5858 static test_arg_type arg ;
5959
6060#define DEFINE_CONSTRAINT (arg_type , field , val1 , val2 , tpe ) \
6161 static struct kfuzztest_constraint __constraint_##arg_type##_##field \
62- __attribute__((section(".kfuzztest_constraint"), \
63- __used__)) = { \
64- .input_type = "struct " #arg_type, \
65- .field_name = #field, \
66- .value1 = (uintptr_t)val1, \
67- .value2 = (uintptr_t)val2, \
68- .type = tpe, \
69- }
62+ __attribute__((section(".kfuzztest_constraint"), \
63+ __used__)) = { \
64+ .input_type = "struct " #arg_type, \
65+ .field_name = #field, \
66+ .value1 = (uintptr_t)val1, \
67+ .value2 = (uintptr_t)val2, \
68+ .type = tpe, \
69+ }
7070
7171#define DEFINE_ANNOTATION (arg_type , field , linked_field , attribute ) \
7272 static struct kfuzztest_annotation __annotation_##arg_type##_##field \
73- __attribute__((section(".kfuzztest_annotation"), \
74- __used__)) = { \
75- .input_type = "struct " #arg_type, \
76- .field_name = #field, \
77- .linked_field_name = #linked_field, \
78- .attrib = attribute, \
79- }
73+ __attribute__((section(".kfuzztest_annotation"), \
74+ __used__)) = { \
75+ .input_type = "struct " #arg_type, \
76+ .field_name = #field, \
77+ .linked_field_name = #linked_field, \
78+ .attrib = attribute, \
79+ }
8080
8181#endif /* COMMON_H */
0 commit comments