Commit Graph

821 Commits

Author SHA1 Message Date
9926d469d8 remove debug print 2013-12-18 15:33:37 +09:00
96576aaee7 fix general protection fault caused by SIGALARM 2013-12-16 13:45:45 +09:00
8e4cbfeea1 print exit code or signal, if stderr is a tty 2013-12-10 14:45:37 +09:00
daec3b2f32 propagate exit code and signal 2013-12-10 14:40:22 +09:00
e5890aa949 typo fix 2013-11-14 16:27:11 +09:00
3f60324d4e add copyright 2013-11-14 15:55:00 +09:00
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
3c490dcfab Added <sys/resource.h> which is required by getrlimit(2).
modified:   executer/user/mcexec.c
2013-11-07 00:29:17 -08:00
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
a80d11cde5 prevents MCKERNEL_RLIMIT_STACK from overwriting
When mcexec reduces a stack, mcexec stores the original RLIMIT_STACK
in environment variable MCKERNEL_RLIMIT_STACK.
A fix to prohibit overwrite of this time.

Therefore, the value of RLIMIT_STACK of the McKernel's process is
decided in the following order.
(1) If environment variable MCKERNEL_RLIMIT_STACK exists; the value.
(2) A value of RLIMIT_STACK in the mcexec starting.
2013-10-30 14:28:32 +09:00
011ef60c4b support decimal numbers at MCKERNEL_RLIMIT_STACK 2013-10-30 14:28:32 +09:00
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
27172ad413 support private mapped file 2013-10-15 12:30:41 +09:00
603ef85454 mcexec: add a upper limit of the stack size
- When the stack size is greater than 1 GiB, reduced to 10 MiB.
- To achieve a reduction of the stack, restart itself using the exec().
- By using the environment variable MCKERNEL_RLIMIT_STACK,
  tell to McKernel the stack size of the original.
2013-10-11 22:36:16 +09:00
3d32350be0 mcexec: add use of MCKERNEL_RLIMIT_STACK
MCKERNEL_RLIMIT_STACK is a environment variable which
specify RLIMIT_STACK value on McKernel.

syntax: MCKERNEL_RLIMIT_STACK=<cur>,<max>

example: MCKERNEL_RLIMIT_STACK=0x800000,-1
cur=8MiB, max=unlimited
2013-10-11 22:36:16 +09:00
4fb6620f3a sys_getrlimit: modified to return mcexec's RLIMIT_STACK 2013-10-11 22:36:16 +09:00
bc173baf13 mcexec: add a path prefix for interpreter search
- When the interpreter is not found,
  add a prefix to the path and retry search.
- the prefix is specified by a environment variable MCEXEC_ALT_ROOT.
- If the MCEXEC_ALT_ROOT does not exist,
  /usr/linux-k1om-4.7/linux-k1om is used as a prefix.
2013-10-11 22:23:22 +09:00
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
a171da1015 add a AT_ENTRY entry to the auxiliary vector 2013-10-11 22:23:22 +09:00
bb1390b085 ignore the double registration error
allow the substitute of maps from mcexec thread to the syscall channel

the temporary correction of the problem that gethostbyname() after
accept() interruption finishes an error.
2013-09-05 20:31:47 +09:00
6f76c392ee fix error message typo
- printk("register_peer_channel(%p,%p,%p):"
+ printk("deregister_peer_channel(%p,%p,%p):"
          ^^
2013-09-05 20:31:46 +09:00
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
15beb40f17 mcexec: upgrade CAP_SYS_RAWIO while do_mmap_pgoff()
for mmap_min_addr check avoidance
2013-09-03 19:42:58 +09:00
040fb64b22 add terminate thread 2013-09-02 00:39:22 +09:00
1d69225532 mcexec forward signal to MIC process. 2013-08-19 12:17:23 +09:00
591f398768 add page fault forwarding 2013-08-08 12:43:15 +09:00
78d9d3fcd2 Revert "trial implementation of private file mapping"
This reverts commit abe57218c4.
2013-07-26 16:44:39 +09:00
abe57218c4 trial implementation of private file mapping
for review only.  will soon be reverted.
2013-07-26 14:40:12 +09:00
70e46dcd4b mcexec print signum or exit status 2013-07-26 13:14:39 +09:00
b6d25861e5 create more mcexec thread so that all cpu to be serviced. 2013-07-18 09:25:58 +09:00
390eb6bca5 rus_vm_fault(): add handling of page absence 2013-07-18 09:24:16 +09:00
2aa5194958 rewrite sys_mmap() as sys_new_mmap() 2013-07-10 13:11:19 +09:00
5369864551 fix warnings 2013-06-19 16:47:02 +09:00
32b8cc4651 delete unused codes 2013-06-17 18:07:26 +09:00
8a7429d872 delete SYSCALL_DECLARE(gettimeofday) 2013-06-17 18:07:26 +09:00
329dd42c32 add gettimeofday by physical buffer. used by futex() 2013-06-17 18:07:26 +09:00
3d11115491 delete SYSCALL_DECLARE(readlink) 2013-06-17 18:07:26 +09:00
1167ea7fb6 delete SYSCALL_DECLARE(getdents64) 2013-06-17 18:07:26 +09:00
b463f39344 delete SYSCALL_DECLARE(access) 2013-06-17 18:07:26 +09:00
628793225f delete SYSCALL_DECLARE(getcwd) 2013-06-17 18:07:26 +09:00
d6f6e4d6d7 delete SYSCALL_DECLARE(uname) 2013-06-17 18:07:26 +09:00
4494e54d38 delete SYSCALL_DECLARE(lseek) 2013-06-17 18:07:26 +09:00
58c5a45aad delete SYSCALL_DECLARE(close) 2013-06-17 18:07:26 +09:00
43792fbce9 delete SYSCALL_DECLARE(pwrite) 2013-06-17 18:07:25 +09:00
f7d9ad966c delete SYSCALL_DECLARE(write) 2013-06-17 18:07:25 +09:00
887295a189 delete SYSCALL_DECLARE(pread) 2013-06-17 18:07:25 +09:00
2ba7170ce1 delete SYSCALL_DECLARE(read) 2013-06-17 18:07:25 +09:00
5d0062c204 delete SYSCALL_DECLARE(time) 2013-06-17 18:07:25 +09:00
e6bea799aa delete SYSCALL_DECLARE(stat) 2013-06-17 18:07:25 +09:00
9810c9c0de delete SYSCALL_DECLARE(fstat) 2013-06-17 18:07:25 +09:00