sandbox: Enhance map_to_sysmem() to handle foreign pointers