/src/selinux/DESTDIR/usr/include/sepol/policydb/ebitmap.h
Line | Count | Source |
1 | | /* Author : Stephen Smalley, <stephen.smalley.work@gmail.com> */ |
2 | | |
3 | | /* FLASK */ |
4 | | |
5 | | /* |
6 | | * An extensible bitmap is a bitmap that supports an |
7 | | * arbitrary number of bits. Extensible bitmaps are |
8 | | * used to represent sets of values, such as types, |
9 | | * roles, categories, and classes. |
10 | | * |
11 | | * Each extensible bitmap is implemented as a linked |
12 | | * list of bitmap nodes, where each bitmap node has |
13 | | * an explicitly specified starting bit position within |
14 | | * the total bitmap. |
15 | | */ |
16 | | |
17 | | #ifndef _SEPOL_POLICYDB_EBITMAP_H_ |
18 | | #define _SEPOL_POLICYDB_EBITMAP_H_ |
19 | | |
20 | | #include <stdint.h> |
21 | | #include <string.h> |
22 | | |
23 | | #ifdef __cplusplus |
24 | | extern "C" { |
25 | | #endif |
26 | | |
27 | 69.1k | #define MAPTYPE uint64_t /* portion of bitmap in each node */ |
28 | 33.5M | #define MAPSIZE (sizeof(MAPTYPE) * 8) /* number of bits in node bitmap */ |
29 | 29.9M | #define MAPBIT 1ULL /* a bit in the node bitmap */ |
30 | | |
31 | | typedef struct ebitmap_node { |
32 | | uint32_t startbit; /* starting position in the total bitmap */ |
33 | | MAPTYPE map; /* this node's portion of the bitmap */ |
34 | | struct ebitmap_node *next; |
35 | | } ebitmap_node_t; |
36 | | |
37 | | typedef struct ebitmap { |
38 | | ebitmap_node_t *node; /* first node in the bitmap */ |
39 | | uint32_t highbit; /* highest position in the total bitmap */ |
40 | | } ebitmap_t; |
41 | | |
42 | 1.61M | #define ebitmap_is_empty(e) (((e)->node) == NULL) |
43 | 30.2M | #define ebitmap_length(e) ((e)->node ? (e)->highbit : 0) |
44 | 1.84M | #define ebitmap_startbit(e) ((e)->node ? (e)->node->startbit : 0) |
45 | | #define ebitmap_startnode(e) ((e)->node) |
46 | | |
47 | | static inline unsigned int ebitmap_start(const ebitmap_t *e, ebitmap_node_t **n) |
48 | 1.84M | { |
49 | 1.84M | *n = e->node; |
50 | 1.84M | return ebitmap_startbit(e); |
51 | 1.84M | } Unexecuted instantiation: checkpolicy-fuzzer.c:ebitmap_start Unexecuted instantiation: module_compiler.c:ebitmap_start Unexecuted instantiation: parse_util.c:ebitmap_start policy_define.c:ebitmap_start Line | Count | Source | 48 | 59.3k | { | 49 | 59.3k | *n = e->node; | 50 | 59.3k | return ebitmap_startbit(e); | 51 | 59.3k | } |
Unexecuted instantiation: y.tab.c:ebitmap_start Unexecuted instantiation: assertion.c:ebitmap_start Unexecuted instantiation: avrule_block.c:ebitmap_start Unexecuted instantiation: avtab.c:ebitmap_start Unexecuted instantiation: conditional.c:ebitmap_start Unexecuted instantiation: constraint.c:ebitmap_start Unexecuted instantiation: context.c:ebitmap_start Unexecuted instantiation: context_record.c:ebitmap_start Unexecuted instantiation: ebitmap.c:ebitmap_start Line | Count | Source | 48 | 1.59M | { | 49 | 1.59M | *n = e->node; | 50 | 1.59M | return ebitmap_startbit(e); | 51 | 1.59M | } |
Unexecuted instantiation: hashtab.c:ebitmap_start hierarchy.c:ebitmap_start Line | Count | Source | 48 | 1.56k | { | 49 | 1.56k | *n = e->node; | 50 | 1.56k | return ebitmap_startbit(e); | 51 | 1.56k | } |
kernel_to_cil.c:ebitmap_start Line | Count | Source | 48 | 14.7k | { | 49 | 14.7k | *n = e->node; | 50 | 14.7k | return ebitmap_startbit(e); | 51 | 14.7k | } |
kernel_to_common.c:ebitmap_start Line | Count | Source | 48 | 26.9k | { | 49 | 26.9k | *n = e->node; | 50 | 26.9k | return ebitmap_startbit(e); | 51 | 26.9k | } |
kernel_to_conf.c:ebitmap_start Line | Count | Source | 48 | 14.7k | { | 49 | 14.7k | *n = e->node; | 50 | 14.7k | return ebitmap_startbit(e); | 51 | 14.7k | } |
Line | Count | Source | 48 | 94.5k | { | 49 | 94.5k | *n = e->node; | 50 | 94.5k | return ebitmap_startbit(e); | 51 | 94.5k | } |
Line | Count | Source | 48 | 9.35k | { | 49 | 9.35k | *n = e->node; | 50 | 9.35k | return ebitmap_startbit(e); | 51 | 9.35k | } |
Unexecuted instantiation: module_to_cil.c:ebitmap_start Line | Count | Source | 48 | 2.47k | { | 49 | 2.47k | *n = e->node; | 50 | 2.47k | return ebitmap_startbit(e); | 51 | 2.47k | } |
Line | Count | Source | 48 | 3.86k | { | 49 | 3.86k | *n = e->node; | 50 | 3.86k | return ebitmap_startbit(e); | 51 | 3.86k | } |
Unexecuted instantiation: policydb_public.c:ebitmap_start policydb_validate.c:ebitmap_start Line | Count | Source | 48 | 14.5k | { | 49 | 14.5k | *n = e->node; | 50 | 14.5k | return ebitmap_startbit(e); | 51 | 14.5k | } |
Unexecuted instantiation: services.c:ebitmap_start Unexecuted instantiation: sidtab.c:ebitmap_start Unexecuted instantiation: symtab.c:ebitmap_start Unexecuted instantiation: util.c:ebitmap_start Line | Count | Source | 48 | 1.89k | { | 49 | 1.89k | *n = e->node; | 50 | 1.89k | return ebitmap_startbit(e); | 51 | 1.89k | } |
Unexecuted instantiation: module.c:ebitmap_start Unexecuted instantiation: policydb_convert.c:ebitmap_start Unexecuted instantiation: binpolicy-fuzzer.c:ebitmap_start Unexecuted instantiation: secilc-fuzzer.c:ebitmap_start Unexecuted instantiation: cil.c:ebitmap_start Unexecuted instantiation: cil_binary.c:ebitmap_start Unexecuted instantiation: cil_build_ast.c:ebitmap_start Unexecuted instantiation: cil_copy_ast.c:ebitmap_start Unexecuted instantiation: cil_find.c:ebitmap_start Unexecuted instantiation: cil_fqn.c:ebitmap_start Unexecuted instantiation: cil_list.c:ebitmap_start Unexecuted instantiation: cil_log.c:ebitmap_start Unexecuted instantiation: cil_mem.c:ebitmap_start Unexecuted instantiation: cil_parser.c:ebitmap_start Unexecuted instantiation: cil_policy.c:ebitmap_start Unexecuted instantiation: cil_post.c:ebitmap_start Unexecuted instantiation: cil_resolve_ast.c:ebitmap_start Unexecuted instantiation: cil_stack.c:ebitmap_start Unexecuted instantiation: cil_strpool.c:ebitmap_start Unexecuted instantiation: cil_symtab.c:ebitmap_start Unexecuted instantiation: cil_tree.c:ebitmap_start Unexecuted instantiation: cil_verify.c:ebitmap_start Unexecuted instantiation: cil_write_ast.c:ebitmap_start Unexecuted instantiation: cil_deny.c:ebitmap_start Unexecuted instantiation: cil_lexer.c:ebitmap_start Unexecuted instantiation: cil_reset_ast.c:ebitmap_start |
52 | | |
53 | | static inline void ebitmap_init(ebitmap_t *e) |
54 | 14.0M | { |
55 | 14.0M | memset(e, 0, sizeof(*e)); |
56 | 14.0M | } Unexecuted instantiation: checkpolicy-fuzzer.c:ebitmap_init module_compiler.c:ebitmap_init Line | Count | Source | 54 | 23.3k | { | 55 | 23.3k | memset(e, 0, sizeof(*e)); | 56 | 23.3k | } |
Unexecuted instantiation: parse_util.c:ebitmap_init policy_define.c:ebitmap_init Line | Count | Source | 54 | 90.2k | { | 55 | 90.2k | memset(e, 0, sizeof(*e)); | 56 | 90.2k | } |
Unexecuted instantiation: y.tab.c:ebitmap_init Unexecuted instantiation: assertion.c:ebitmap_init avrule_block.c:ebitmap_init Line | Count | Source | 54 | 1.00M | { | 55 | 1.00M | memset(e, 0, sizeof(*e)); | 56 | 1.00M | } |
Unexecuted instantiation: avtab.c:ebitmap_init Unexecuted instantiation: conditional.c:ebitmap_init constraint.c:ebitmap_init Line | Count | Source | 54 | 1.98M | { | 55 | 1.98M | memset(e, 0, sizeof(*e)); | 56 | 1.98M | } |
Line | Count | Source | 54 | 19.3k | { | 55 | 19.3k | memset(e, 0, sizeof(*e)); | 56 | 19.3k | } |
Unexecuted instantiation: context_record.c:ebitmap_init Line | Count | Source | 54 | 3.60M | { | 55 | 3.60M | memset(e, 0, sizeof(*e)); | 56 | 3.60M | } |
Line | Count | Source | 54 | 1.62M | { | 55 | 1.62M | memset(e, 0, sizeof(*e)); | 56 | 1.62M | } |
Unexecuted instantiation: hashtab.c:ebitmap_init Unexecuted instantiation: hierarchy.c:ebitmap_init Unexecuted instantiation: kernel_to_cil.c:ebitmap_init Unexecuted instantiation: kernel_to_common.c:ebitmap_init Unexecuted instantiation: kernel_to_conf.c:ebitmap_init Unexecuted instantiation: link.c:ebitmap_init Unexecuted instantiation: mls.c:ebitmap_init Unexecuted instantiation: module_to_cil.c:ebitmap_init Unexecuted instantiation: optimize.c:ebitmap_init Line | Count | Source | 54 | 5.67M | { | 55 | 5.67M | memset(e, 0, sizeof(*e)); | 56 | 5.67M | } |
Unexecuted instantiation: policydb_public.c:ebitmap_init policydb_validate.c:ebitmap_init Line | Count | Source | 54 | 55.4k | { | 55 | 55.4k | memset(e, 0, sizeof(*e)); | 56 | 55.4k | } |
Unexecuted instantiation: services.c:ebitmap_init Unexecuted instantiation: sidtab.c:ebitmap_init Unexecuted instantiation: symtab.c:ebitmap_init Unexecuted instantiation: util.c:ebitmap_init Line | Count | Source | 54 | 2.58k | { | 55 | 2.58k | memset(e, 0, sizeof(*e)); | 56 | 2.58k | } |
Unexecuted instantiation: module.c:ebitmap_init Unexecuted instantiation: policydb_convert.c:ebitmap_init Unexecuted instantiation: binpolicy-fuzzer.c:ebitmap_init Unexecuted instantiation: secilc-fuzzer.c:ebitmap_init Unexecuted instantiation: cil.c:ebitmap_init Unexecuted instantiation: cil_binary.c:ebitmap_init Unexecuted instantiation: cil_build_ast.c:ebitmap_init Unexecuted instantiation: cil_copy_ast.c:ebitmap_init Unexecuted instantiation: cil_find.c:ebitmap_init Unexecuted instantiation: cil_fqn.c:ebitmap_init Unexecuted instantiation: cil_list.c:ebitmap_init Unexecuted instantiation: cil_log.c:ebitmap_init Unexecuted instantiation: cil_mem.c:ebitmap_init Unexecuted instantiation: cil_parser.c:ebitmap_init Unexecuted instantiation: cil_policy.c:ebitmap_init Unexecuted instantiation: cil_post.c:ebitmap_init Unexecuted instantiation: cil_resolve_ast.c:ebitmap_init Unexecuted instantiation: cil_stack.c:ebitmap_init Unexecuted instantiation: cil_strpool.c:ebitmap_init Unexecuted instantiation: cil_symtab.c:ebitmap_init Unexecuted instantiation: cil_tree.c:ebitmap_init Unexecuted instantiation: cil_verify.c:ebitmap_init Unexecuted instantiation: cil_write_ast.c:ebitmap_init Unexecuted instantiation: cil_deny.c:ebitmap_init Unexecuted instantiation: cil_lexer.c:ebitmap_init Unexecuted instantiation: cil_reset_ast.c:ebitmap_init |
57 | | |
58 | | static inline unsigned int ebitmap_next(ebitmap_node_t **n, unsigned int bit) |
59 | 28.1M | { |
60 | 28.1M | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { |
61 | 48.5k | *n = (*n)->next; |
62 | 48.5k | return (*n)->startbit; |
63 | 48.5k | } |
64 | | |
65 | 28.0M | return (bit + 1); |
66 | 28.1M | } Unexecuted instantiation: checkpolicy-fuzzer.c:ebitmap_next Unexecuted instantiation: module_compiler.c:ebitmap_next Unexecuted instantiation: parse_util.c:ebitmap_next policy_define.c:ebitmap_next Line | Count | Source | 59 | 3.60M | { | 60 | 3.60M | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 140 | *n = (*n)->next; | 62 | 140 | return (*n)->startbit; | 63 | 140 | } | 64 | | | 65 | 3.60M | return (bit + 1); | 66 | 3.60M | } |
Unexecuted instantiation: y.tab.c:ebitmap_next Unexecuted instantiation: assertion.c:ebitmap_next Unexecuted instantiation: avrule_block.c:ebitmap_next Unexecuted instantiation: avtab.c:ebitmap_next Unexecuted instantiation: conditional.c:ebitmap_next Unexecuted instantiation: constraint.c:ebitmap_next Unexecuted instantiation: context.c:ebitmap_next Unexecuted instantiation: context_record.c:ebitmap_next Unexecuted instantiation: ebitmap.c:ebitmap_next Line | Count | Source | 59 | 21.0M | { | 60 | 21.0M | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 47.9k | *n = (*n)->next; | 62 | 47.9k | return (*n)->startbit; | 63 | 47.9k | } | 64 | | | 65 | 20.9M | return (bit + 1); | 66 | 21.0M | } |
Unexecuted instantiation: hashtab.c:ebitmap_next Line | Count | Source | 59 | 93.2k | { | 60 | 93.2k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 0 | *n = (*n)->next; | 62 | 0 | return (*n)->startbit; | 63 | 0 | } | 64 | | | 65 | 93.2k | return (bit + 1); | 66 | 93.2k | } |
kernel_to_cil.c:ebitmap_next Line | Count | Source | 59 | 448k | { | 60 | 448k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 0 | *n = (*n)->next; | 62 | 0 | return (*n)->startbit; | 63 | 0 | } | 64 | | | 65 | 448k | return (bit + 1); | 66 | 448k | } |
kernel_to_common.c:ebitmap_next Line | Count | Source | 59 | 1.52M | { | 60 | 1.52M | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 40 | *n = (*n)->next; | 62 | 40 | return (*n)->startbit; | 63 | 40 | } | 64 | | | 65 | 1.52M | return (bit + 1); | 66 | 1.52M | } |
kernel_to_conf.c:ebitmap_next Line | Count | Source | 59 | 448k | { | 60 | 448k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 0 | *n = (*n)->next; | 62 | 0 | return (*n)->startbit; | 63 | 0 | } | 64 | | | 65 | 448k | return (bit + 1); | 66 | 448k | } |
Line | Count | Source | 59 | 761k | { | 60 | 761k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 258 | *n = (*n)->next; | 62 | 258 | return (*n)->startbit; | 63 | 258 | } | 64 | | | 65 | 761k | return (bit + 1); | 66 | 761k | } |
Line | Count | Source | 59 | 13.0k | { | 60 | 13.0k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 1 | *n = (*n)->next; | 62 | 1 | return (*n)->startbit; | 63 | 1 | } | 64 | | | 65 | 13.0k | return (bit + 1); | 66 | 13.0k | } |
Unexecuted instantiation: module_to_cil.c:ebitmap_next Line | Count | Source | 59 | 158k | { | 60 | 158k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 0 | *n = (*n)->next; | 62 | 0 | return (*n)->startbit; | 63 | 0 | } | 64 | | | 65 | 158k | return (bit + 1); | 66 | 158k | } |
Line | Count | Source | 59 | 38.5k | { | 60 | 38.5k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 183 | *n = (*n)->next; | 62 | 183 | return (*n)->startbit; | 63 | 183 | } | 64 | | | 65 | 38.3k | return (bit + 1); | 66 | 38.5k | } |
Unexecuted instantiation: policydb_public.c:ebitmap_next policydb_validate.c:ebitmap_next Line | Count | Source | 59 | 3.89k | { | 60 | 3.89k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 4 | *n = (*n)->next; | 62 | 4 | return (*n)->startbit; | 63 | 4 | } | 64 | | | 65 | 3.89k | return (bit + 1); | 66 | 3.89k | } |
Unexecuted instantiation: services.c:ebitmap_next Unexecuted instantiation: sidtab.c:ebitmap_next Unexecuted instantiation: symtab.c:ebitmap_next Unexecuted instantiation: util.c:ebitmap_next Line | Count | Source | 59 | 64 | { | 60 | 64 | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 61 | 0 | *n = (*n)->next; | 62 | 0 | return (*n)->startbit; | 63 | 0 | } | 64 | | | 65 | 64 | return (bit + 1); | 66 | 64 | } |
Unexecuted instantiation: module.c:ebitmap_next Unexecuted instantiation: policydb_convert.c:ebitmap_next Unexecuted instantiation: binpolicy-fuzzer.c:ebitmap_next Unexecuted instantiation: secilc-fuzzer.c:ebitmap_next Unexecuted instantiation: cil.c:ebitmap_next Unexecuted instantiation: cil_binary.c:ebitmap_next Unexecuted instantiation: cil_build_ast.c:ebitmap_next Unexecuted instantiation: cil_copy_ast.c:ebitmap_next Unexecuted instantiation: cil_find.c:ebitmap_next Unexecuted instantiation: cil_fqn.c:ebitmap_next Unexecuted instantiation: cil_list.c:ebitmap_next Unexecuted instantiation: cil_log.c:ebitmap_next Unexecuted instantiation: cil_mem.c:ebitmap_next Unexecuted instantiation: cil_parser.c:ebitmap_next Unexecuted instantiation: cil_policy.c:ebitmap_next Unexecuted instantiation: cil_post.c:ebitmap_next Unexecuted instantiation: cil_resolve_ast.c:ebitmap_next Unexecuted instantiation: cil_stack.c:ebitmap_next Unexecuted instantiation: cil_strpool.c:ebitmap_next Unexecuted instantiation: cil_symtab.c:ebitmap_next Unexecuted instantiation: cil_tree.c:ebitmap_next Unexecuted instantiation: cil_verify.c:ebitmap_next Unexecuted instantiation: cil_write_ast.c:ebitmap_next Unexecuted instantiation: cil_deny.c:ebitmap_next Unexecuted instantiation: cil_lexer.c:ebitmap_next Unexecuted instantiation: cil_reset_ast.c:ebitmap_next |
67 | | |
68 | | static inline int ebitmap_node_get_bit(const ebitmap_node_t *n, |
69 | | unsigned int bit) |
70 | 28.1M | { |
71 | 28.1M | if (n->map & (MAPBIT << (bit - n->startbit))) |
72 | 950k | return 1; |
73 | 27.1M | return 0; |
74 | 28.1M | } Unexecuted instantiation: checkpolicy-fuzzer.c:ebitmap_node_get_bit Unexecuted instantiation: module_compiler.c:ebitmap_node_get_bit Unexecuted instantiation: parse_util.c:ebitmap_node_get_bit policy_define.c:ebitmap_node_get_bit Line | Count | Source | 70 | 3.60M | { | 71 | 3.60M | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 56.9k | return 1; | 73 | 3.55M | return 0; | 74 | 3.60M | } |
Unexecuted instantiation: y.tab.c:ebitmap_node_get_bit Unexecuted instantiation: assertion.c:ebitmap_node_get_bit Unexecuted instantiation: avrule_block.c:ebitmap_node_get_bit Unexecuted instantiation: avtab.c:ebitmap_node_get_bit Unexecuted instantiation: conditional.c:ebitmap_node_get_bit Unexecuted instantiation: constraint.c:ebitmap_node_get_bit Unexecuted instantiation: context.c:ebitmap_node_get_bit Unexecuted instantiation: context_record.c:ebitmap_node_get_bit Unexecuted instantiation: ebitmap.c:ebitmap_node_get_bit expand.c:ebitmap_node_get_bit Line | Count | Source | 70 | 21.0M | { | 71 | 21.0M | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 807k | return 1; | 73 | 20.2M | return 0; | 74 | 21.0M | } |
Unexecuted instantiation: hashtab.c:ebitmap_node_get_bit hierarchy.c:ebitmap_node_get_bit Line | Count | Source | 70 | 93.2k | { | 71 | 93.2k | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 1.59k | return 1; | 73 | 91.6k | return 0; | 74 | 93.2k | } |
kernel_to_cil.c:ebitmap_node_get_bit Line | Count | Source | 70 | 448k | { | 71 | 448k | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 7.04k | return 1; | 73 | 440k | return 0; | 74 | 448k | } |
kernel_to_common.c:ebitmap_node_get_bit Line | Count | Source | 70 | 1.52M | { | 71 | 1.52M | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 24.1k | return 1; | 73 | 1.50M | return 0; | 74 | 1.52M | } |
kernel_to_conf.c:ebitmap_node_get_bit Line | Count | Source | 70 | 448k | { | 71 | 448k | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 7.04k | return 1; | 73 | 440k | return 0; | 74 | 448k | } |
link.c:ebitmap_node_get_bit Line | Count | Source | 70 | 762k | { | 71 | 762k | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 30.7k | return 1; | 73 | 732k | return 0; | 74 | 762k | } |
mls.c:ebitmap_node_get_bit Line | Count | Source | 70 | 13.0k | { | 71 | 13.0k | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 1.12k | return 1; | 73 | 11.9k | return 0; | 74 | 13.0k | } |
Unexecuted instantiation: module_to_cil.c:ebitmap_node_get_bit optimize.c:ebitmap_node_get_bit Line | Count | Source | 70 | 158k | { | 71 | 158k | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 2.54k | return 1; | 73 | 155k | return 0; | 74 | 158k | } |
policydb.c:ebitmap_node_get_bit Line | Count | Source | 70 | 38.6k | { | 71 | 38.6k | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 11.4k | return 1; | 73 | 27.1k | return 0; | 74 | 38.6k | } |
Unexecuted instantiation: policydb_public.c:ebitmap_node_get_bit policydb_validate.c:ebitmap_node_get_bit Line | Count | Source | 70 | 3.98k | { | 71 | 3.98k | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 300 | return 1; | 73 | 3.68k | return 0; | 74 | 3.98k | } |
Unexecuted instantiation: services.c:ebitmap_node_get_bit Unexecuted instantiation: sidtab.c:ebitmap_node_get_bit Unexecuted instantiation: symtab.c:ebitmap_node_get_bit Unexecuted instantiation: util.c:ebitmap_node_get_bit write.c:ebitmap_node_get_bit Line | Count | Source | 70 | 64 | { | 71 | 64 | if (n->map & (MAPBIT << (bit - n->startbit))) | 72 | 1 | return 1; | 73 | 63 | return 0; | 74 | 64 | } |
Unexecuted instantiation: module.c:ebitmap_node_get_bit Unexecuted instantiation: policydb_convert.c:ebitmap_node_get_bit Unexecuted instantiation: binpolicy-fuzzer.c:ebitmap_node_get_bit Unexecuted instantiation: secilc-fuzzer.c:ebitmap_node_get_bit Unexecuted instantiation: cil.c:ebitmap_node_get_bit Unexecuted instantiation: cil_binary.c:ebitmap_node_get_bit Unexecuted instantiation: cil_build_ast.c:ebitmap_node_get_bit Unexecuted instantiation: cil_copy_ast.c:ebitmap_node_get_bit Unexecuted instantiation: cil_find.c:ebitmap_node_get_bit Unexecuted instantiation: cil_fqn.c:ebitmap_node_get_bit Unexecuted instantiation: cil_list.c:ebitmap_node_get_bit Unexecuted instantiation: cil_log.c:ebitmap_node_get_bit Unexecuted instantiation: cil_mem.c:ebitmap_node_get_bit Unexecuted instantiation: cil_parser.c:ebitmap_node_get_bit Unexecuted instantiation: cil_policy.c:ebitmap_node_get_bit Unexecuted instantiation: cil_post.c:ebitmap_node_get_bit Unexecuted instantiation: cil_resolve_ast.c:ebitmap_node_get_bit Unexecuted instantiation: cil_stack.c:ebitmap_node_get_bit Unexecuted instantiation: cil_strpool.c:ebitmap_node_get_bit Unexecuted instantiation: cil_symtab.c:ebitmap_node_get_bit Unexecuted instantiation: cil_tree.c:ebitmap_node_get_bit Unexecuted instantiation: cil_verify.c:ebitmap_node_get_bit Unexecuted instantiation: cil_write_ast.c:ebitmap_node_get_bit Unexecuted instantiation: cil_deny.c:ebitmap_node_get_bit Unexecuted instantiation: cil_lexer.c:ebitmap_node_get_bit Unexecuted instantiation: cil_reset_ast.c:ebitmap_node_get_bit |
75 | | |
76 | | #define ebitmap_for_each_bit(e, n, bit) \ |
77 | 29.9M | for (bit = ebitmap_start(e, &n); bit < ebitmap_length(e); \ |
78 | 28.1M | bit = ebitmap_next(&n, bit)) |
79 | | |
80 | | #define ebitmap_for_each_positive_bit(e, n, bit) \ |
81 | 1.84M | ebitmap_for_each_bit(e, n, bit) \ |
82 | 28.0M | if (ebitmap_node_get_bit(n, bit)) |
83 | | |
84 | | extern int ebitmap_cmp(const ebitmap_t *e1, const ebitmap_t *e2); |
85 | | extern int ebitmap_or(ebitmap_t *dst, const ebitmap_t *e1, const ebitmap_t *e2); |
86 | | extern int ebitmap_union(ebitmap_t *dst, const ebitmap_t *e1); |
87 | | extern int ebitmap_and(ebitmap_t *dst, const ebitmap_t *e1, |
88 | | const ebitmap_t *e2); |
89 | | extern int ebitmap_xor(ebitmap_t *dst, const ebitmap_t *e1, |
90 | | const ebitmap_t *e2); |
91 | | extern int ebitmap_not(ebitmap_t *dst, const ebitmap_t *e1, |
92 | | unsigned int maxbit); |
93 | | extern int ebitmap_andnot(ebitmap_t *dst, const ebitmap_t *e1, |
94 | | const ebitmap_t *e2, unsigned int maxbit); |
95 | | extern unsigned int ebitmap_cardinality(const ebitmap_t *e1); |
96 | | extern int ebitmap_hamming_distance(const ebitmap_t *e1, const ebitmap_t *e2); |
97 | | extern int ebitmap_cpy(ebitmap_t *dst, const ebitmap_t *src); |
98 | | extern int ebitmap_contains(const ebitmap_t *e1, const ebitmap_t *e2); |
99 | | extern int ebitmap_match_any(const ebitmap_t *e1, const ebitmap_t *e2); |
100 | | extern int ebitmap_get_bit(const ebitmap_t *e, unsigned int bit); |
101 | | extern int ebitmap_set_bit(ebitmap_t *e, unsigned int bit, int value); |
102 | | extern int ebitmap_init_range(ebitmap_t *e, unsigned int minbit, |
103 | | unsigned int maxbit); |
104 | | extern unsigned int ebitmap_highest_set_bit(const ebitmap_t *e); |
105 | | extern void ebitmap_destroy(ebitmap_t *e); |
106 | | extern int ebitmap_read(ebitmap_t *e, void *fp); |
107 | | |
108 | | #ifdef __cplusplus |
109 | | } |
110 | | #endif |
111 | | |
112 | | #endif /* _EBITMAP_H_ */ |
113 | | |
114 | | /* FLASK */ |