Commit Graph

61 Commits

Author SHA1 Message Date
NAKAMURA Gou
bb137bc9bb make brk region just follow data region
This effectively reverts commit d70dd2338c.
2015-02-18 11:52:15 +09:00
Tomoki Shirasawa
d2d0fc6721 The mcexec command became executable from a command-line at the same time 2015-02-17 18:33:38 +09:00
Tomoki Shirasawa
08cc31f9bf support setrlimits/getrlimits, however this fix is these syscalls only.
checking resource process must implement it separately.

refs #330
2015-01-27 10:35:58 +09:00
Susumu Komae
765de119dc support PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK, PTRACE_O_TRACEVFORKDONE.
to start with a SIGSTOP, do not set proc->ftn->status to PS_RUNNING in __runq_add_proc().
  change vfork() set CLONE_VFORK.

refs #266
refs #267
refs #372

support PTRACE_GETEVENTMSG.
  to store ptrace event, add 'unsigned long ptrace_eventmsg;' member in struct fork_tree_node.

refs #273
2015-01-14 10:43:18 +09:00
Tomoki Shirasawa
912b8a886c do_kill distinguish PTRACE_CONT from kill. 2014-12-26 15:23:11 +09:00
NAKAMURA Gou
b1b6fab7b8 fix a warning
| mckernel/kernel/host.c: In function 'syscall_packet_handler':
| mckernel/kernel/host.c:504:
|     warning: implicit declaration of function 'find_command_line'
2014-12-22 16:58:08 +09:00
NAKAMURA Gou
0942bf0ce0 make dkprintf() evaluate its parameters always
Parameters of dkprintf() should be evaluated even if dkprintf() is
disabled.  Because this enables to find expression of parameter obsolete
and to avoid unnecessary compiler warnings such as "unused variable".
2014-12-22 16:58:03 +09:00
NAKAMURA Gou
a6ac906105 use ftn->pid instead of proc->pid 2014-12-22 16:58:01 +09:00
Tomoki Shirasawa
8f30e16976 when mcexec is killed by SIGKILL, terminate mckernel process (BUG#259) 2014-11-27 16:13:52 +09:00
Tomoki Shirasawa
3fe7e39607 some variables definition are gathered to fork_tree_node from process.
- remove both-defined: pid, pgid, status
- move to fork_tree_node: tid
- make dummy fork_tree_node for idle_process.
2014-10-29 16:54:09 +09:00
Masamichi Takagi
658b88fd7b Modify spacing 2014-10-15 14:40:47 +09:00
Masamichi Takagi
dbecaa2fc8 Add ptrace functions of job-control and signal
Note that a forked process automatically becomes ptraced state in this
commit.
2014-10-15 14:28:55 +09:00
NAKAMURA Gou
aa05f00e7e don't map syscall pages into process space
Request pages, response pages, and a doorbell page are mapped into
process space to enable user processes to delegate system calls
directly to mcctrl/mcexec.

This commit removes these mappings for the following reasons.
- These mappings cause a memory leak in current fork() implementation.
- These mappings are not used.
- These mappings do not function properly.
  And the fix which corrects function of these mappings is not easy.
2014-10-10 16:20:38 +09:00
Tomoki Shirasawa
658aa18ade add memory debug (kmalloc/kfree)
* support "memdebug" mckernel option
* check buffer overrun when memory free and next mcexec run
* check double free
* check memory leak when next mcexec run
2014-10-07 15:45:16 +09:00
Tomoki Shirasawa
39f36120c1 support sigqueue 2014-09-23 23:17:53 +09:00
Naoki Hamada
cb4b00ba97 Added debug messages. 2014-08-28 09:16:50 +09:00
Naoki Hamada
c783ec8e11 Implemented procfs. 2014-08-28 09:16:50 +09:00
Tomoki Shirasawa
f535670100 fix pipe02 2014-08-27 16:50:01 +09:00
Tomoki Shirasawa
78d10cce80 support process group 2014-08-18 17:08:28 +09:00
Tomoki Shirasawa
2f4f3628f9 support tgkill 2014-06-10 10:42:29 +09:00
Balazs Gerofi bgerofi@riken.jp
badb450153 more detailed report in memory management error path 2014-05-22 17:27:39 +09:00
Balazs Gerofi bgerofi@riken.jp
a4e6269c5d adjust prepare_process_ranges_args_envs() so that it can initialize arguments and environmnt variables from kernel space strings 2014-05-22 13:45:23 +09:00
Balazs Gerofi bgerofi@riken.jp
760c9ebdb0 refactor process_msg_prepare_process() in preparation for execve() 2014-05-22 13:27:25 +09:00
Balazs Gerofi bgerofi@riken.jp
0e348e6295 SIGCHLD and wait4(), i.e. wait()/waitpid() implementation 2014-04-23 13:33:18 +09:00
NAKAMURA Gou
b31a1b6db2 add PTATTR_NO_EXECUTE 2014-04-11 14:59:47 +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
Tomoki Shirasawa
a8c249ddaf signal (part 1) 2014-01-07 11:57:57 +09:00
NAKAMURA Gou
03521e9c2c add copyrights 2013-11-14 16:49:40 +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
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
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
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
NAKAMURA Gou
2aa5194958 rewrite sys_mmap() as sys_new_mmap() 2013-07-10 13:11:19 +09:00
Tomoki Shirasawa
d8034eeb13 propagate error code for prepare image 2013-06-05 17:38:23 +09:00
Tomoki Shirasawa
40ad744947 remove unused function add_process_large_range from source file 2013-06-02 19:38:29 +09:00
Balazs Gerofi bgerofi@riken.jp
4a27a65cb0 resolved merge conflicts with futex code 2013-06-02 16:42:08 +09:00
Tomoki Shirasawa
2627d4df55 add PTATTR_FOR_USER flag to enum ihk_mc_ap_flag 2013-06-02 13:57:44 +09:00
Masamichi Takagi m-takagi@ab.jp.nec.com
d70dd2338c Make mckernel/kernel/host.c set proc->vm->region.brk_start to
(USER_END / 4) & LARGE_PAGE_MASK
so that brk won't destroy .bss section when
using debug-mode of ld.so to link shared objects.
2013-05-29 17:08:36 +09:00
Tomoki Shirasawa
da3965be11 Merge branch 'master' of postpeta.pccluster.org:mckernel
Conflicts:
	kernel/host.c
	kernel/process.c
	lib/include/ihk/mm.h
2013-05-28 12:49:13 +09:00
Tomoki Shirasawa
bb4caccf98 add memory allocation check 2013-05-28 12:06:41 +09:00
NAKAMURA Gou
f8f91488b3 fix release leakage of args_envs 2013-05-28 11:52:00 +09:00
NAKAMURA Gou
db17c4a7b0 use the PID of the mcexec as PID of the McKernel process. 2013-05-28 11:40:20 +09:00
Balazs Gerofi bgerofi@riken.jp
c865f63818 disable debug msgs by default for host.c 2013-05-10 13:04:28 +09:00
Tomoki Shirasawa
e8f7fbc682 FIX Bug 1 - mckernel aborts due to out of memory access after several mcexec 2013-05-09 10:12:30 +09:00
Tomoki Shirasawa
b56c090678 FIX Bug 1 - mckernel aborts due to out of memory access after several mcexec invocations 2013-05-02 11:00:30 +09:00
NAKAMURA Gou
e09160cce7 add generic system call forwarding 2013-04-17 20:32:33 +09:00
Tomoki Shirasawa
4693789608 change function names 2012-12-17 16:15:05 +09:00