Commit Graph

248 Commits

Author SHA1 Message Date
NAKAMURA Gou
fcbaa9726c correct the syscall return type
Long size syscall return values such as shmat()'s and lseek()'s are
broken, because lower 32 bits are only returned.
2014-02-05 11:30:57 +09:00
NAKAMURA Gou
93c5385f65 implement mmap(MAP_LOCKED) 2014-01-27 18:59:36 +09:00
NAKAMURA Gou
f0a52d4519 implement mmap(MAP_POPULATE)
populate_process_memory() function is not efficient,
because whether every small page is present is checked.
2014-01-27 18:50:38 +09:00
NAKAMURA Gou
f5b4057074 add vsyscall
- getcpu() is not implemented. It will cause SIGILL.
- gettimeofday() and time() are implemented with syscall.
2014-01-24 20:18:36 +09:00
Tomoki Shirasawa
26d68d391d signal part 4 (sigsuspend etc) 2014-01-24 10:14:49 +09:00
NAKAMURA Gou
c421965542 relocate a program interpreter to the map_start
This commit makes a system call that dereferences a NULL pointer fail.
2014-01-14 18:55:16 +09:00
NAKAMURA Gou
6992b829a0 delegate the open(2) with the generic forwarding.
This commit solves a problem that causes getpwnam()/getpwuid() to return
NULL.
2014-01-14 18:50:20 +09:00
NAKAMURA Gou
e86ffb0b57 do write back only MAP_SHARED pages
Fix a problem that cause write reference to a MAP_PRIVATE mapping to
change the underlying file.
2014-01-14 18:48:43 +09:00
Tomoki Shirasawa
8411f353fe signal part 3 (EFAULT) 2014-01-13 10:52:29 +09:00
Tomoki Shirasawa
0465cc16b9 signal (part 2) sigpending 2014-01-07 19:52:06 +09:00
Tomoki Shirasawa
a8c249ddaf signal (part 1) 2014-01-07 11:57:57 +09:00
Tomoki Shirasawa
9e00275120 fork & execve return EOPNOTSUPP (temporary hack) 2013-12-18 16:10:13 +09:00
Tomoki Shirasawa
96576aaee7 fix general protection fault caused by SIGALARM 2013-12-16 13:45:45 +09:00
Yuji Saeki
0551fb26dd affinity.h, waitq.h copyright 2013-11-14 17:40:59 +09:00
Yuji Saeki
506caa7e7f page.h, process.h, rlimit.h, syscall.h, time.h, timer.h copyright 2013-11-14 17:34:30 +09:00
Yuji Saeki
821396be7b amemcpy.c, cls.h, init.h, kmalloc.h, kmsg.hcopoyright 2013-11-14 17:30:43 +09:00
Balazs Gerofi bgerofi@riken.jp
6bcec77d51 Merge branch 'master' of postpeta.pccluster.org:mckernel 2013-11-14 17:21:54 +09:00
Balazs Gerofi bgerofi@riken.jp
2f63b7ed95 futex.h copyright 2013-11-14 17:21:47 +09:00
Yuji Saeki
cd04de3131 cls.c, copy.c, debug.c, listeners.c, mikc.c copyright 2013-11-14 17:00:37 +09:00
NAKAMURA Gou
03521e9c2c add copyrights 2013-11-14 16:49:40 +09:00
Tomoki Shirasawa
d126a35d48 Merge branch 'master' of postpeta.pccluster.org:mckernel 2013-11-14 16:27:39 +09:00
Tomoki Shirasawa
e5890aa949 typo fix 2013-11-14 16:27:11 +09:00
Balazs Gerofi bgerofi@riken.jp
dcea4fefb3 ap.c, futex.c, jhash.h, timer.c, waitq.c copyrights 2013-11-14 16:20:08 +09:00
Tomoki Shirasawa
3f60324d4e add copyright 2013-11-14 15:55:00 +09:00
Tomoki Shirasawa
334fe81cdb remove rbtree 2013-11-14 13:07:00 +09:00
Tomoki Shirasawa
98fb5bf091 check cpu_local_var initialized 2013-11-13 23:06:11 +09:00
NAKAMURA Gou
bbbc6e1570 add shared mapped file (in progress)
implemented:
- Pages can be shared between maps.
- A change made to a map is written to the file, at munmap().

not yet implemented:
- VM operation during page IO execution.
  Because page IO is executed with VM's lock.
- Page IO, which does not change a file size with any case.
  When munmap() races with truncate(), the file size may be changed
  illegally.
2013-11-11 18:18:33 +09:00
NAKAMURA Gou
bdc02bb687 refuse the write to a read-only memory
It was able to change a read-only memory using a system call that
forwarded to host.

To fix this, when read-only mmap(), it places read-only vm_area in the
mcexec's space.
2013-11-06 16:06:58 +09:00
NAKAMURA Gou
89be2af09a sys_mprotect: remove blocking of free_pages()
Because mprotect() does not release physical page, this is unnecessary.
2013-11-06 16:06:01 +09:00
NAKAMURA Gou
d557ba84d6 exclude interpreter's segment from data region
When an interpreter is located on the lower address (e.g. 0x0),
the text region is included in data region.
A fix to avoid this.
2013-10-30 14:28:32 +09:00
NAKAMURA Gou
6e736f6248 change the stack size according to stack size limit 2013-10-30 12:33:03 +09:00
NAKAMURA Gou
db45e11921 apply demand paging to stack area 2013-10-30 12:33:03 +09:00
Toyohisa Kameyama
78214f3ce4 /opt/knc -> /usr 2013-10-21 09:44:44 +09:00
NAKAMURA Gou
27172ad413 support private mapped file 2013-10-15 12:30:41 +09:00
NAKAMURA Gou
4fb6620f3a sys_getrlimit: modified to return mcexec's RLIMIT_STACK 2013-10-11 22:36:16 +09:00
NAKAMURA Gou
413fe7b54a mcexec: add a interpreter invocation
When start a program which have a PT_INTERP segment
(dynamic linkaged program have a PT_INTERP segment),
start the interpreter indicated by the PT_INTERP segment.
2013-10-11 22:23:22 +09:00
NAKAMURA Gou
a171da1015 add a AT_ENTRY entry to the auxiliary vector 2013-10-11 22:23:22 +09:00
NAKAMURA Gou
47722baf2e add mcexec's PTE cleaning to munmap()/mmap(MAP_FIXED)
The correction of the problem that MKL application does not start
2013-09-05 13:19:54 +09:00
NAKAMURA Gou
0e0684cd1c support shared anonymous mapping
mmap(..., MAP_SHARED|MAP_ANONYMOUS, ...) is possible now.
shared mapped file is still not implemented.
2013-09-04 19:03:31 +09:00
NAKAMURA Gou
877f1be797 fix error message
- ekprintf("sys_mmap(%lx,%lx,%x,%x,%x,%lx):unknown flags %lx\n",
+ ekprintf("sys_mmap(%lx,%lx,%x,%x,%x,%lx):unknown flags %x\n",
                                                         ^^
2013-09-04 19:03:31 +09:00
NAKAMURA Gou
fe05e1107c fix alignment of struct syscall_request variable
since used with DMA, it must be IHK_DMA_ALIGN
2013-09-03 19:37:37 +09:00
Tomoki Shirasawa
040fb64b22 add terminate thread 2013-09-02 00:39:22 +09:00
Tomoki Shirasawa
1d69225532 mcexec forward signal to MIC process. 2013-08-19 12:17:23 +09:00
NAKAMURA Gou
591f398768 add page fault forwarding 2013-08-08 12:43:15 +09:00
NAKAMURA Gou
480f6d4c2f rewrite page_fault_handler() 2013-08-08 12:43:00 +09:00
NAKAMURA Gou
b0de24f13e sys_mprotect: delete unnecessary error check 2013-08-08 12:39:12 +09:00
NAKAMURA Gou
6109eabc23 sys_munmap: add error check 2013-08-08 12:39:11 +09:00
NAKAMURA Gou
88ce001671 munmap/mprotect: add TLB flush for single thread program 2013-08-08 12:39:09 +09:00
NAKAMURA Gou
78d9d3fcd2 Revert "trial implementation of private file mapping"
This reverts commit abe57218c4.
2013-07-26 16:44:39 +09:00
NAKAMURA Gou
abe57218c4 trial implementation of private file mapping
for review only.  will soon be reverted.
2013-07-26 14:40:12 +09:00