/* We need to be extremely careful not to follow any invalid pointers, because this function can be called for  */
void* kmemcheck_shadow_lookup(unsigned long address)
/* We need to be extremely careful not to follow any invalid pointers, because this function can be called for  */
void* kmemcheck_shadow_lookup(unsigned long address)
{
	pte_t *pte;
	struct page *page;
	if (!virt_addr_valid(address))
		return NULL;
	pte = kmemcheck_pte_lookup(address);
	if (!pte)
		return NULL;
	page = virt_to_page(address);
	if (!page->shadow)
		return NULL;
	return page->shadow + (address & (PAGE_SIZE - 1));
}