map = ((struct proc_mm_op) { .op 	= MM_MMAP, .u 	= { .mmap	= { .addr 		= virt, .len		= len, .prot		= prot, .flags		= MAP_SHARED | MAP_FIXED, .fd		= phys_fd, .offset	= offset } } } ); n = os_write_file(fd, &map, sizeof(map)); if(n != sizeof(map)) printk("map : /proc/mm map failed, err = %d\n", -n); 
if(proc_mm){ struct proc_mm_op map; int fd = mm_idp->u.mm_fd; map = ((struct proc_mm_op) { .op	= MM_MMAP, .u		= { .mmap	= { .addr	= virt, .len	= len, .prot	= prot, .flags	= MAP_SHARED | MAP_FIXED, .fd	= phys_fd, .offset= offset } } } ); n = os_write_file(fd, &map, sizeof(map)); if(n != sizeof(map)) printk("map : /proc/mm map failed, err = %d\n", -n); } else { long res; unsigned long args[] = { virt, len, prot, MAP_SHARED | MAP_FIXED, phys_fd, MMAP_OFFSET(offset) };  res = run_syscall_stub(mm_idp, STUB_MMAP_NR, args); if((void *) res == MAP_FAILED) printk("mmap stub failed, errno = %d\n", res); }  return 0; 
void map(int fd, unsigned long virt, unsigned long len, int r, int w,	 int x, int phys_fd, unsigned long long offset){	struct proc_mm_op map;	int prot, n;	prot = (r ? PROT_READ : 0) | (w ? PROT_WRITE : 0) | 		(x ? PROT_EXEC : 0);	map = ((struct proc_mm_op) { .op 	= MM_MMAP,				     .u 	= 				     { .mmap	= 				       { .addr 		= virt,					 .len		= len,					 .prot		= prot,					 .flags		= MAP_SHARED | 					                  MAP_FIXED,					 .fd		= phys_fd,					 .offset	= offset				       } } } );	n = os_write_file(fd, &map, sizeof(map));	if(n != sizeof(map)) 		printk("map : /proc/mm map failed, err = %d\n", -n);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d67b569f5f620c0fb95d5212642746b7ba9d29e4/mem_user.c/buggy/arch/um/kernel/skas/mem_user.c