/* check that an address falls within the bounds of the target process's memory mappings  */
static int is_user_addr_valid(struct task_struct *child, unsigned long start, unsigned long len)
/* check that an address falls within the bounds of the target process's memory mappings  */
static int is_user_addr_valid(struct task_struct *child, unsigned long start, unsigned long len)
{
	struct vm_area_struct *vma;
	struct sram_list_struct *sraml;
	if (start + len < start)
		return -EIO;
	vma = find_vma(child->mm, start);
	if (vma && start >= vma->vm_start && start + len <= vma->vm_end)
			return 0;
	for (sraml = child->mm->context.sram_list; sraml; sraml = sraml->next)
		if (start >= (unsigned long)sraml->addr
		    && start + len < (unsigned long)sraml->addr + sraml->length)
			return 0;
	if (start >= FIXED_CODE_START && start + len < FIXED_CODE_END)
		return 0;
	return -EIO;
}