Where can I find information on memremap behavior?

Anton Gusev aagusev at ispras.ru
Fri Feb 3 05:58:18 EST 2023


I am trying to investigate a potential NULL dereference
in drivers/firmware/efi/efi.c in the function efi_mem_reserve_persistent.

In it, a result of memremap call is dereferenced without null checks.
I'd like to understand if it's an error or if there is some sort of invariant that guarantees
it will never return NULL.

For this I need to know when memremap (or the underlying ioremap, I guess)
might return NULL. Just looking into its source code didn't give me much insight.

Do you know any articles/documentation on how memremap and/or ioremap work?

What topics should I study to understand more about it?




More information about the Kernelnewbies mailing list