Debian Codegraph @

crt/s2n/tests/sidetrail/include/ct-verif.h

raw symbols SCIP
1 #ifndef CT_VERIF_H
2 #define CT_VERIF_H
3
4 #ifndef COMPILE
5 #include <smack.h>
6
7 /*
8 Security levels are the following.
9
10 For inputs:
11 - public - function requires (assumes) these to be equal.
12 - private - no requirement (allowed to vary freely)
13
14 For outputs (both by reference and return values):
15 - public - function ensures these are equal
16 can be used on left-hand side of implications everywhere
17 - private - no guarantee (allowed to vary freely)
18 - declassified - we only analyse executions in which these
19 possibly private values are fixed.
20
21 We omit annotations for private since nothing needs to be generated
22 for them. We may need to add them back in for modular analyses.
23 */
24
25 /* The abstract prototypes that form our annotation language */
26 void public_in(smack_value_t);
27 void public_out(smack_value_t);
28 void declassified_out(smack_value_t);
29 void public_invariant(smack_value_t);
30 void benign(void);
31
32 #define __disjoint_regions(addr1,len1,addr2,len2) \
33 assume(addr1 + len1 * sizeof(*addr1) < addr2 || \
34 addr2 + len2 * sizeof(*addr2) < addr1)
35
36 #else /* COMPILE */
37
38 #undef __SMACK_value
39
40 #define __VERIFIER_assume(__a)
41 #define __SMACK_value(__a)
42 #define __SMACK_return_value(__a)
43 #define __SMACK_values(__a,__b)
44 #define __SMACK_return_values(__a)
45
46 #define public_in(__a)
47 #define public_out(__a)
48 #define declassified_out(__a)
49 #define public_invariant(__a)
50
51 #define __disjoint_regions(addr1,len1,addr2,len2)
52
53 #endif /* COMPILE */
54 #endif /* CT_VERIF_H */