/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 | 327k | #define MAPTYPE uint64_t /* portion of bitmap in each node */ |
28 | 4.29G | #define MAPSIZE (sizeof(MAPTYPE) * 8) /* number of bits in node bitmap */ |
29 | 1.23G | #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 | 5.22M | #define ebitmap_is_empty(e) (((e)->node) == NULL) |
43 | 1.19G | #define ebitmap_length(e) ((e)->node ? (e)->highbit : 0) |
44 | 20.8M | #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, |
48 | | ebitmap_node_t ** n) |
49 | 20.8M | { |
50 | | |
51 | 20.8M | *n = e->node; |
52 | 20.8M | return ebitmap_startbit(e); |
53 | 20.8M | } Unexecuted instantiation: secilc-fuzzer.c:ebitmap_start Unexecuted instantiation: policydb_public.c:ebitmap_start Line | Count | Source | 49 | 1 | { | 50 | | | 51 | 1 | *n = e->node; | 52 | 1 | return ebitmap_startbit(e); | 53 | 1 | } |
Unexecuted instantiation: cil.c:ebitmap_start cil_binary.c:ebitmap_start Line | Count | Source | 49 | 13.4M | { | 50 | | | 51 | 13.4M | *n = e->node; | 52 | 13.4M | return ebitmap_startbit(e); | 53 | 13.4M | } |
Unexecuted instantiation: cil_build_ast.c:ebitmap_start Unexecuted instantiation: cil_copy_ast.c:ebitmap_start Line | Count | Source | 49 | 3.95M | { | 50 | | | 51 | 3.95M | *n = e->node; | 52 | 3.95M | return ebitmap_startbit(e); | 53 | 3.95M | } |
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 Line | Count | Source | 49 | 4.37k | { | 50 | | | 51 | 4.37k | *n = e->node; | 52 | 4.37k | return ebitmap_startbit(e); | 53 | 4.37k | } |
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: assertion.c:ebitmap_start Unexecuted instantiation: avtab.c:ebitmap_start Unexecuted instantiation: conditional.c:ebitmap_start Unexecuted instantiation: constraint.c:ebitmap_start Unexecuted instantiation: ebitmap.c:ebitmap_start Line | Count | Source | 49 | 57.6k | { | 50 | | | 51 | 57.6k | *n = e->node; | 52 | 57.6k | return ebitmap_startbit(e); | 53 | 57.6k | } |
Unexecuted instantiation: hashtab.c:ebitmap_start hierarchy.c:ebitmap_start Line | Count | Source | 49 | 3.08M | { | 50 | | | 51 | 3.08M | *n = e->node; | 52 | 3.08M | return ebitmap_startbit(e); | 53 | 3.08M | } |
Line | Count | Source | 49 | 247k | { | 50 | | | 51 | 247k | *n = e->node; | 52 | 247k | return ebitmap_startbit(e); | 53 | 247k | } |
Line | Count | Source | 49 | 4.21k | { | 50 | | | 51 | 4.21k | *n = e->node; | 52 | 4.21k | return ebitmap_startbit(e); | 53 | 4.21k | } |
Unexecuted instantiation: policydb_convert.c:ebitmap_start policydb_validate.c:ebitmap_start Line | Count | Source | 49 | 5.81k | { | 50 | | | 51 | 5.81k | *n = e->node; | 52 | 5.81k | return ebitmap_startbit(e); | 53 | 5.81k | } |
Unexecuted instantiation: services.c:ebitmap_start Unexecuted instantiation: sidtab.c:ebitmap_start Unexecuted instantiation: symtab.c:ebitmap_start Unexecuted instantiation: util.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 Unexecuted instantiation: avrule_block.c:ebitmap_start Unexecuted instantiation: context.c:ebitmap_start Unexecuted instantiation: context_record.c:ebitmap_start kernel_to_common.c:ebitmap_start Line | Count | Source | 49 | 389 | { | 50 | | | 51 | 389 | *n = e->node; | 52 | 389 | return ebitmap_startbit(e); | 53 | 389 | } |
Line | Count | Source | 49 | 2.43k | { | 50 | | | 51 | 2.43k | *n = e->node; | 52 | 2.43k | return ebitmap_startbit(e); | 53 | 2.43k | } |
Unexecuted instantiation: checkpolicy-fuzzer.c:ebitmap_start Unexecuted instantiation: module_compiler.c:ebitmap_start Unexecuted instantiation: parse_util.c:ebitmap_start Unexecuted instantiation: policy_define.c:ebitmap_start Unexecuted instantiation: y.tab.c:ebitmap_start kernel_to_cil.c:ebitmap_start Line | Count | Source | 49 | 1.57k | { | 50 | | | 51 | 1.57k | *n = e->node; | 52 | 1.57k | return ebitmap_startbit(e); | 53 | 1.57k | } |
kernel_to_conf.c:ebitmap_start Line | Count | Source | 49 | 1.57k | { | 50 | | | 51 | 1.57k | *n = e->node; | 52 | 1.57k | return ebitmap_startbit(e); | 53 | 1.57k | } |
Line | Count | Source | 49 | 644 | { | 50 | | | 51 | 644 | *n = e->node; | 52 | 644 | return ebitmap_startbit(e); | 53 | 644 | } |
Unexecuted instantiation: module_to_cil.c:ebitmap_start Unexecuted instantiation: module.c:ebitmap_start Unexecuted instantiation: binpolicy-fuzzer.c:ebitmap_start |
54 | | |
55 | | static inline void ebitmap_init(ebitmap_t * e) |
56 | 52.4M | { |
57 | 52.4M | memset(e, 0, sizeof(*e)); |
58 | 52.4M | } Unexecuted instantiation: secilc-fuzzer.c:ebitmap_init Unexecuted instantiation: policydb_public.c:ebitmap_init Line | Count | Source | 56 | 2.60k | { | 57 | 2.60k | memset(e, 0, sizeof(*e)); | 58 | 2.60k | } |
Unexecuted instantiation: cil.c:ebitmap_init cil_binary.c:ebitmap_init Line | Count | Source | 56 | 10.6M | { | 57 | 10.6M | memset(e, 0, sizeof(*e)); | 58 | 10.6M | } |
Unexecuted instantiation: cil_build_ast.c:ebitmap_init Unexecuted instantiation: cil_copy_ast.c:ebitmap_init Line | Count | Source | 56 | 2.39M | { | 57 | 2.39M | memset(e, 0, sizeof(*e)); | 58 | 2.39M | } |
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 Line | Count | Source | 56 | 901k | { | 57 | 901k | memset(e, 0, sizeof(*e)); | 58 | 901k | } |
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 Line | Count | Source | 56 | 45.8k | { | 57 | 45.8k | memset(e, 0, sizeof(*e)); | 58 | 45.8k | } |
Unexecuted instantiation: avtab.c:ebitmap_init Unexecuted instantiation: conditional.c:ebitmap_init constraint.c:ebitmap_init Line | Count | Source | 56 | 10.9M | { | 57 | 10.9M | memset(e, 0, sizeof(*e)); | 58 | 10.9M | } |
Line | Count | Source | 56 | 4.21M | { | 57 | 4.21M | memset(e, 0, sizeof(*e)); | 58 | 4.21M | } |
Line | Count | Source | 56 | 64.4k | { | 57 | 64.4k | memset(e, 0, sizeof(*e)); | 58 | 64.4k | } |
Unexecuted instantiation: hashtab.c:ebitmap_init Unexecuted instantiation: hierarchy.c:ebitmap_init Unexecuted instantiation: optimize.c:ebitmap_init Line | Count | Source | 56 | 22.5M | { | 57 | 22.5M | memset(e, 0, sizeof(*e)); | 58 | 22.5M | } |
Unexecuted instantiation: policydb_convert.c:ebitmap_init policydb_validate.c:ebitmap_init Line | Count | Source | 56 | 33.2k | { | 57 | 33.2k | memset(e, 0, sizeof(*e)); | 58 | 33.2k | } |
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 | 56 | 137k | { | 57 | 137k | memset(e, 0, sizeof(*e)); | 58 | 137k | } |
Unexecuted instantiation: cil_lexer.c:ebitmap_init Unexecuted instantiation: cil_reset_ast.c:ebitmap_init avrule_block.c:ebitmap_init Line | Count | Source | 56 | 382k | { | 57 | 382k | memset(e, 0, sizeof(*e)); | 58 | 382k | } |
Line | Count | Source | 56 | 18.0k | { | 57 | 18.0k | memset(e, 0, sizeof(*e)); | 58 | 18.0k | } |
Unexecuted instantiation: context_record.c:ebitmap_init Unexecuted instantiation: kernel_to_common.c:ebitmap_init Unexecuted instantiation: mls.c:ebitmap_init Unexecuted instantiation: checkpolicy-fuzzer.c:ebitmap_init Unexecuted instantiation: module_compiler.c:ebitmap_init Unexecuted instantiation: parse_util.c:ebitmap_init Unexecuted instantiation: policy_define.c:ebitmap_init Unexecuted instantiation: y.tab.c:ebitmap_init Unexecuted instantiation: kernel_to_cil.c:ebitmap_init Unexecuted instantiation: kernel_to_conf.c:ebitmap_init Unexecuted instantiation: link.c:ebitmap_init Unexecuted instantiation: module_to_cil.c:ebitmap_init Unexecuted instantiation: module.c:ebitmap_init Unexecuted instantiation: binpolicy-fuzzer.c:ebitmap_init |
59 | | |
60 | | static inline unsigned int ebitmap_next(ebitmap_node_t ** n, unsigned int bit) |
61 | 1.17G | { |
62 | 1.17G | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { |
63 | 1.03M | *n = (*n)->next; |
64 | 1.03M | return (*n)->startbit; |
65 | 1.03M | } |
66 | | |
67 | 1.17G | return (bit + 1); |
68 | 1.17G | } Unexecuted instantiation: secilc-fuzzer.c:ebitmap_next Unexecuted instantiation: policydb_public.c:ebitmap_next Line | Count | Source | 61 | 64 | { | 62 | 64 | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 0 | *n = (*n)->next; | 64 | 0 | return (*n)->startbit; | 65 | 0 | } | 66 | | | 67 | 64 | return (bit + 1); | 68 | 64 | } |
Unexecuted instantiation: cil.c:ebitmap_next cil_binary.c:ebitmap_next Line | Count | Source | 61 | 918M | { | 62 | 918M | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 961k | *n = (*n)->next; | 64 | 961k | return (*n)->startbit; | 65 | 961k | } | 66 | | | 67 | 917M | return (bit + 1); | 68 | 918M | } |
Unexecuted instantiation: cil_build_ast.c:ebitmap_next Unexecuted instantiation: cil_copy_ast.c:ebitmap_next Line | Count | Source | 61 | 33.7M | { | 62 | 33.7M | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 5.48k | *n = (*n)->next; | 64 | 5.48k | return (*n)->startbit; | 65 | 5.48k | } | 66 | | | 67 | 33.7M | return (bit + 1); | 68 | 33.7M | } |
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 Line | Count | Source | 61 | 259k | { | 62 | 259k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 104 | *n = (*n)->next; | 64 | 104 | return (*n)->startbit; | 65 | 104 | } | 66 | | | 67 | 258k | return (bit + 1); | 68 | 259k | } |
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: assertion.c:ebitmap_next Unexecuted instantiation: avtab.c:ebitmap_next Unexecuted instantiation: conditional.c:ebitmap_next Unexecuted instantiation: constraint.c:ebitmap_next Unexecuted instantiation: ebitmap.c:ebitmap_next Line | Count | Source | 61 | 968k | { | 62 | 968k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 885 | *n = (*n)->next; | 64 | 885 | return (*n)->startbit; | 65 | 885 | } | 66 | | | 67 | 967k | return (bit + 1); | 68 | 968k | } |
Unexecuted instantiation: hashtab.c:ebitmap_next Line | Count | Source | 61 | 198M | { | 62 | 198M | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 22.5k | *n = (*n)->next; | 64 | 22.5k | return (*n)->startbit; | 65 | 22.5k | } | 66 | | | 67 | 198M | return (bit + 1); | 68 | 198M | } |
Line | Count | Source | 61 | 18.7M | { | 62 | 18.7M | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 45.0k | *n = (*n)->next; | 64 | 45.0k | return (*n)->startbit; | 65 | 45.0k | } | 66 | | | 67 | 18.7M | return (bit + 1); | 68 | 18.7M | } |
Line | Count | Source | 61 | 84.7k | { | 62 | 84.7k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 424 | *n = (*n)->next; | 64 | 424 | return (*n)->startbit; | 65 | 424 | } | 66 | | | 67 | 84.2k | return (bit + 1); | 68 | 84.7k | } |
Unexecuted instantiation: policydb_convert.c:ebitmap_next policydb_validate.c:ebitmap_next Line | Count | Source | 61 | 2.52k | { | 62 | 2.52k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 0 | *n = (*n)->next; | 64 | 0 | return (*n)->startbit; | 65 | 0 | } | 66 | | | 67 | 2.52k | return (bit + 1); | 68 | 2.52k | } |
Unexecuted instantiation: services.c:ebitmap_next Unexecuted instantiation: sidtab.c:ebitmap_next Unexecuted instantiation: symtab.c:ebitmap_next Unexecuted instantiation: util.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 Unexecuted instantiation: avrule_block.c:ebitmap_next Unexecuted instantiation: context.c:ebitmap_next Unexecuted instantiation: context_record.c:ebitmap_next kernel_to_common.c:ebitmap_next Line | Count | Source | 61 | 24.8k | { | 62 | 24.8k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 0 | *n = (*n)->next; | 64 | 0 | return (*n)->startbit; | 65 | 0 | } | 66 | | | 67 | 24.8k | return (bit + 1); | 68 | 24.8k | } |
Line | Count | Source | 61 | 3.54k | { | 62 | 3.54k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 1 | *n = (*n)->next; | 64 | 1 | return (*n)->startbit; | 65 | 1 | } | 66 | | | 67 | 3.54k | return (bit + 1); | 68 | 3.54k | } |
Unexecuted instantiation: checkpolicy-fuzzer.c:ebitmap_next Unexecuted instantiation: module_compiler.c:ebitmap_next Unexecuted instantiation: parse_util.c:ebitmap_next Unexecuted instantiation: policy_define.c:ebitmap_next Unexecuted instantiation: y.tab.c:ebitmap_next kernel_to_cil.c:ebitmap_next Line | Count | Source | 61 | 5.88k | { | 62 | 5.88k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 0 | *n = (*n)->next; | 64 | 0 | return (*n)->startbit; | 65 | 0 | } | 66 | | | 67 | 5.88k | return (bit + 1); | 68 | 5.88k | } |
kernel_to_conf.c:ebitmap_next Line | Count | Source | 61 | 5.88k | { | 62 | 5.88k | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && (*n)->next) { | 63 | 0 | *n = (*n)->next; | 64 | 0 | return (*n)->startbit; | 65 | 0 | } | 66 | | | 67 | 5.88k | return (bit + 1); | 68 | 5.88k | } |
Unexecuted instantiation: link.c:ebitmap_next Unexecuted instantiation: module_to_cil.c:ebitmap_next Unexecuted instantiation: module.c:ebitmap_next Unexecuted instantiation: binpolicy-fuzzer.c:ebitmap_next |
69 | | |
70 | | static inline int ebitmap_node_get_bit(const ebitmap_node_t * n, unsigned int bit) |
71 | 1.17G | { |
72 | 1.17G | if (n->map & (MAPBIT << (bit - n->startbit))) |
73 | 67.1M | return 1; |
74 | 1.10G | return 0; |
75 | 1.17G | } Unexecuted instantiation: secilc-fuzzer.c:ebitmap_node_get_bit Unexecuted instantiation: policydb_public.c:ebitmap_node_get_bit write.c:ebitmap_node_get_bit Line | Count | Source | 71 | 64 | { | 72 | 64 | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 1 | return 1; | 74 | 63 | return 0; | 75 | 64 | } |
Unexecuted instantiation: cil.c:ebitmap_node_get_bit cil_binary.c:ebitmap_node_get_bit Line | Count | Source | 71 | 918M | { | 72 | 918M | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 58.9M | return 1; | 74 | 859M | return 0; | 75 | 918M | } |
Unexecuted instantiation: cil_build_ast.c:ebitmap_node_get_bit Unexecuted instantiation: cil_copy_ast.c:ebitmap_node_get_bit cil_find.c:ebitmap_node_get_bit Line | Count | Source | 71 | 37.5M | { | 72 | 37.5M | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 4.07M | return 1; | 74 | 33.4M | return 0; | 75 | 37.5M | } |
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 cil_post.c:ebitmap_node_get_bit Line | Count | Source | 71 | 259k | { | 72 | 259k | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 13.2k | return 1; | 74 | 245k | return 0; | 75 | 259k | } |
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: assertion.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: ebitmap.c:ebitmap_node_get_bit expand.c:ebitmap_node_get_bit Line | Count | Source | 71 | 968k | { | 72 | 968k | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 35.2k | return 1; | 74 | 933k | return 0; | 75 | 968k | } |
Unexecuted instantiation: hashtab.c:ebitmap_node_get_bit hierarchy.c:ebitmap_node_get_bit Line | Count | Source | 71 | 198M | { | 72 | 198M | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 3.30M | return 1; | 74 | 195M | return 0; | 75 | 198M | } |
optimize.c:ebitmap_node_get_bit Line | Count | Source | 71 | 18.7M | { | 72 | 18.7M | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 652k | return 1; | 74 | 18.0M | return 0; | 75 | 18.7M | } |
policydb.c:ebitmap_node_get_bit Line | Count | Source | 71 | 84.7k | { | 72 | 84.7k | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 27.4k | return 1; | 74 | 57.3k | return 0; | 75 | 84.7k | } |
Unexecuted instantiation: policydb_convert.c:ebitmap_node_get_bit policydb_validate.c:ebitmap_node_get_bit Line | Count | Source | 71 | 2.56k | { | 72 | 2.56k | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 162 | return 1; | 74 | 2.40k | return 0; | 75 | 2.56k | } |
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 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 Unexecuted instantiation: avrule_block.c:ebitmap_node_get_bit Unexecuted instantiation: context.c:ebitmap_node_get_bit Unexecuted instantiation: context_record.c:ebitmap_node_get_bit kernel_to_common.c:ebitmap_node_get_bit Line | Count | Source | 71 | 24.8k | { | 72 | 24.8k | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 538 | return 1; | 74 | 24.3k | return 0; | 75 | 24.8k | } |
mls.c:ebitmap_node_get_bit Line | Count | Source | 71 | 3.60k | { | 72 | 3.60k | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 355 | return 1; | 74 | 3.24k | return 0; | 75 | 3.60k | } |
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 Unexecuted instantiation: policy_define.c:ebitmap_node_get_bit Unexecuted instantiation: y.tab.c:ebitmap_node_get_bit kernel_to_cil.c:ebitmap_node_get_bit Line | Count | Source | 71 | 5.88k | { | 72 | 5.88k | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 129 | return 1; | 74 | 5.75k | return 0; | 75 | 5.88k | } |
kernel_to_conf.c:ebitmap_node_get_bit Line | Count | Source | 71 | 5.88k | { | 72 | 5.88k | if (n->map & (MAPBIT << (bit - n->startbit))) | 73 | 129 | return 1; | 74 | 5.75k | return 0; | 75 | 5.88k | } |
Unexecuted instantiation: link.c:ebitmap_node_get_bit Unexecuted instantiation: module_to_cil.c:ebitmap_node_get_bit Unexecuted instantiation: module.c:ebitmap_node_get_bit Unexecuted instantiation: binpolicy-fuzzer.c:ebitmap_node_get_bit |
76 | | |
77 | | #define ebitmap_for_each_bit(e, n, bit) \ |
78 | 1.19G | for (bit = ebitmap_start(e, &n); bit < ebitmap_length(e); bit = ebitmap_next(&n, bit)) \ |
79 | | |
80 | | #define ebitmap_for_each_positive_bit(e, n, bit) \ |
81 | 1.17G | ebitmap_for_each_bit(e, n, bit) if (ebitmap_node_get_bit(n, bit)) \ |
82 | | |
83 | | extern int ebitmap_cmp(const ebitmap_t * e1, const ebitmap_t * e2); |
84 | | extern int ebitmap_or(ebitmap_t * dst, const ebitmap_t * e1, const ebitmap_t * e2); |
85 | | extern int ebitmap_union(ebitmap_t * dst, const ebitmap_t * e1); |
86 | | extern int ebitmap_and(ebitmap_t *dst, const ebitmap_t *e1, const ebitmap_t *e2); |
87 | | extern int ebitmap_xor(ebitmap_t *dst, const ebitmap_t *e1, const ebitmap_t *e2); |
88 | | extern int ebitmap_not(ebitmap_t *dst, const ebitmap_t *e1, unsigned int maxbit); |
89 | | extern int ebitmap_andnot(ebitmap_t *dst, const ebitmap_t *e1, const ebitmap_t *e2, unsigned int maxbit); |
90 | | extern unsigned int ebitmap_cardinality(const ebitmap_t *e1); |
91 | | extern int ebitmap_hamming_distance(const ebitmap_t * e1, const ebitmap_t * e2); |
92 | | extern int ebitmap_cpy(ebitmap_t * dst, const ebitmap_t * src); |
93 | | extern int ebitmap_contains(const ebitmap_t * e1, const ebitmap_t * e2); |
94 | | extern int ebitmap_match_any(const ebitmap_t *e1, const ebitmap_t *e2); |
95 | | extern int ebitmap_get_bit(const ebitmap_t * e, unsigned int bit); |
96 | | extern int ebitmap_set_bit(ebitmap_t * e, unsigned int bit, int value); |
97 | | extern int ebitmap_init_range(ebitmap_t * e, unsigned int minbit, unsigned int maxbit); |
98 | | extern unsigned int ebitmap_highest_set_bit(const ebitmap_t * e); |
99 | | extern void ebitmap_destroy(ebitmap_t * e); |
100 | | extern int ebitmap_read(ebitmap_t * e, void *fp); |
101 | | |
102 | | #ifdef __cplusplus |
103 | | } |
104 | | #endif |
105 | | |
106 | | #endif /* _EBITMAP_H_ */ |
107 | | |
108 | | /* FLASK */ |