| 103 | } |
| 104 | |
| 105 | static inline enum cb_err region_create_untrusted( |
| 106 | struct region *r, unsigned long long offset, unsigned long long size) |
| 107 | { |
| 108 | if (offset > SIZE_MAX || size > SIZE_MAX || (size_t)(offset + size - 1) < offset) |
| 109 | return CB_ERR_ARG; |
| 110 | *r = (struct region){ .offset = offset, .size = size }; |
| 111 | return CB_SUCCESS; |
| 112 | } |
| 113 | |
| 114 | /* Return 1 if child is subregion of parent, else 0. */ |
| 115 | int region_is_subregion(const struct region *p, const struct region *c); |
no outgoing calls
no test coverage detected