int new_mm(unsigned long stack) { int fd; fd = os_open_file("/proc/mm", of_cloexec(of_write(OPENFLAGS())), 0); if(fd < 0) return(fd); if(skas_needs_stub) map_stub_pages(fd, CONFIG_STUB_CODE, CONFIG_STUB_DATA, stack); return(fd); }
int new_mm(unsigned long stack) { int fd, err; fd = os_open_file("/proc/mm", of_cloexec(of_write(OPENFLAGS())), 0); if (fd < 0) return fd; if (skas_needs_stub) { err = map_stub_pages(fd, STUB_CODE, STUB_DATA, stack); if (err) { os_close_file(fd); return err; } } return fd; }