Read a kernel u64 variable (e.g. vmemmap_base) addressed by its symbol.
| 278 | |
| 279 | // Read a kernel u64 variable (e.g. vmemmap_base) addressed by its symbol. |
| 280 | u64 read_kernel_u64_var(const Engine& eng, const char* sym_name) { |
| 281 | auto* s = eng.isf().find_symbol(sym_name); |
| 282 | if (!s) return 0; |
| 283 | u64 v = 0; |
| 284 | return kva_read_pod(eng, s->address, v) ? v : 0; |
| 285 | } |
| 286 | |
| 287 | const char* mode_to_type(u16 m) { |
| 288 | switch (m & 0170000) { |
no test coverage detected