MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / read_kernel_u64_var

Function read_kernel_u64_var

src/os/linux/pagecache.cpp:280–285  ·  view source on GitHub ↗

Read a kernel u64 variable (e.g. vmemmap_base) addressed by its symbol.

Source from the content-addressed store, hash-verified

278
279// Read a kernel u64 variable (e.g. vmemmap_base) addressed by its symbol.
280u64 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
287const char* mode_to_type(u16 m) {
288 switch (m & 0170000) {

Callers 1

recover_file_internalFunction · 0.85

Calls 2

kva_read_podFunction · 0.85
find_symbolMethod · 0.80

Tested by

no test coverage detected