Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

What are the Linux kernel APIs available for querying physical pages of a kernel virtual address that belongs to RO data section?

$
0
0

What are the Linux kernel APIs available for querying physical pages of a kernel virtual address that belongs to RO data section?

For x86_64 I tried virt_to_page(addr) and it seems to work but that doesn't work for AARCH64.

On AARCH64, kernel and all its sections are allocated from vmalloc area, so virt_to_page() is not expected to workOn AArch64 I tried using phys_to_page(__pa_symbol(addr)) and it works.

Are these two APIs good or there is a generic API that works for all the architectures.


Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>