Displaying 1 result from an estimated 1 matches for "mem_to_pshadow".
2017 Feb 23
4
RFC: Generalize means the sanitizers work with memory
...ata that sanitizers currently read and write by virtual
addresses. In presence of the concept of physical memory, every time we
access
virtual memory we have to translate the given virtual address to a physical
one. For example, this check:
*(u8 *)MEM_TO_SHADOW(allocated) == 0
becomes:
*MEM_TO_PSHADOW(allocated) == 0
where the MEM_TO_PSHADOW(mem) macro is defined as:
#define MEM_TO_PSHADOW(mem) VSHADOW_TO_PSHADOW(MEM_TO_VSHADOW(mem))
#define MEM_TO_VSHADOW(mem) /* Whatever currently MEM_TO_SHADOW() is. */
The VSHADOW_TO_PSHADOW(vs) macro returns a pointer to a byte within a
physical p...