Lines Matching refs:mm_idp

25 void syscall_stub_dump_error(struct mm_id *mm_idp)  in syscall_stub_dump_error()  argument
27 struct stub_data *proc_data = (void *)mm_idp->stack; in syscall_stub_dump_error()
34 mm_idp->syscall_data_len); in syscall_stub_dump_error()
39 __func__, mm_idp->syscall_data_len, in syscall_stub_dump_error()
48 static inline unsigned long *check_init_stack(struct mm_id * mm_idp, in check_init_stack() argument
52 stack = (unsigned long *) mm_idp->stack + 2; in check_init_stack()
77 static inline long do_syscall_stub(struct mm_id *mm_idp) in do_syscall_stub() argument
79 struct stub_data *proc_data = (void *)mm_idp->stack; in do_syscall_stub()
81 int err, pid = mm_idp->pid; in do_syscall_stub()
93 proc_data->syscall_data_len = mm_idp->syscall_data_len; in do_syscall_stub()
108 syscall_stub_dump_error(mm_idp); in do_syscall_stub()
111 mm_idp->syscall_data_len = proc_data->err; in do_syscall_stub()
113 mm_idp->syscall_data_len = 0; in do_syscall_stub()
116 return mm_idp->syscall_data_len; in do_syscall_stub()
119 int syscall_stub_flush(struct mm_id *mm_idp) in syscall_stub_flush() argument
123 if (mm_idp->syscall_data_len == 0) in syscall_stub_flush()
127 if (mm_idp->syscall_data_len < 0) { in syscall_stub_flush()
128 res = mm_idp->syscall_data_len; in syscall_stub_flush()
129 mm_idp->syscall_data_len = 0; in syscall_stub_flush()
133 res = do_syscall_stub(mm_idp); in syscall_stub_flush()
134 mm_idp->syscall_data_len = 0; in syscall_stub_flush()
139 struct stub_syscall *syscall_stub_alloc(struct mm_id *mm_idp) in syscall_stub_alloc() argument
142 struct stub_data *proc_data = (struct stub_data *) mm_idp->stack; in syscall_stub_alloc()
144 if (mm_idp->syscall_data_len > 0 && in syscall_stub_alloc()
145 mm_idp->syscall_data_len == ARRAY_SIZE(proc_data->syscall_data)) in syscall_stub_alloc()
146 do_syscall_stub(mm_idp); in syscall_stub_alloc()
148 if (mm_idp->syscall_data_len < 0) { in syscall_stub_alloc()
152 sc = &proc_data->syscall_data[mm_idp->syscall_data_len]; in syscall_stub_alloc()
153 mm_idp->syscall_data_len += 1; in syscall_stub_alloc()
160 static struct stub_syscall *syscall_stub_get_previous(struct mm_id *mm_idp, in syscall_stub_get_previous() argument
164 if (mm_idp->syscall_data_len > 0) { in syscall_stub_get_previous()
165 struct stub_data *proc_data = (void *) mm_idp->stack; in syscall_stub_get_previous()
168 sc = &proc_data->syscall_data[mm_idp->syscall_data_len - 1]; in syscall_stub_get_previous()
178 int map(struct mm_id *mm_idp, unsigned long virt, unsigned long len, int prot, in map() argument
184 sc = syscall_stub_get_previous(mm_idp, STUB_SYSCALL_MMAP, virt); in map()
191 sc = syscall_stub_alloc(mm_idp); in map()
202 int unmap(struct mm_id *mm_idp, unsigned long addr, unsigned long len) in unmap() argument
207 sc = syscall_stub_get_previous(mm_idp, STUB_SYSCALL_MUNMAP, addr); in unmap()
213 sc = syscall_stub_alloc(mm_idp); in unmap()
221 int protect(struct mm_id *mm_idp, unsigned long addr, unsigned long len, in protect() argument
227 sc = syscall_stub_get_previous(mm_idp, STUB_SYSCALL_MPROTECT, addr); in protect()
233 sc = syscall_stub_alloc(mm_idp); in protect()