Commit Graph
71 Commits
Author SHA1 Message Date
Masamichi TakagiandTomoki Shirasawa 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
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
NAKAMURA Gou 7e12f0db72 Revert "テスト支援コード"
This reverts commit 054cb2ada2.
2014-09-17 19:59:32 +09:00
NAKAMURA Gou 054cb2ada2 テスト支援コード
- vm_range_list のテスト支援コード
- vm_range 一致確認用関数追加
  できれば、指定範囲内の変更を無視させたいのだが、
  指定範囲内の変更のために split されたエントリを無害と判断できない
- page table のテスト支援コード
2014-09-17 19:46:48 +09:00
Masamichi Takagi 19fa391d4f Implement vfork system call
It's implemented by making it issue clone system call internally with
the arguments of (SIGCHLD, 0, 0, 0, 0). The feature in which the caller
of vfork blocks until the child issues exit/execve is not implemented.
Refer to #233.
2014-09-08 17:06:05 +09:00
Tomoki Shirasawa 78d10cce80 support process group 2014-08-18 17:08:28 +09:00
Naoki Hamada 530535c162 Merge remote branch 'origin/master' into gdb 2014-07-23 10:29:07 +09:00
Balazs Gerofi bgerofi@riken.jp 101a0f6e4a remote TLB invalidation code for multi-threaded applications (e.g., during munmap()) 2014-07-22 12:24:07 +09:00
Naoki Hamada 9dd7d6283c Merge remote branch 'origin/master' into gdb
Conflicts:
	kernel/include/process.h
2014-07-18 16:03:35 +09:00
Naoki Hamada 6c3d901069 Include switch for a plain Xeon. 2014-07-17 17:26:54 +09:00
Naoki Hamada 97a74f4692 Fix for core NOTE alignment & al. 2014-07-17 16:56:28 +09:00
bgerofi@riken.jpandBalazs Gerofi bgerofi@riken.jp 35b8716966 push/pop r12,r13 and r14 as well when entering/leaving kernel space 2014-07-15 18:03:44 +09:00
YOSHIDA MasanoriandMasamichi Takagi 99931179e1 add get_cpu_id syscall with No.700 for testing 2014-07-13 17:05:27 +09:00
YOSHIDA MasanoriandMasamichi Takagi 3751fa1766 add some functions related to migration into kernel/process.h
... and also add include guard to arch/x86/kernel/include/signal.h
2014-07-13 17:05:09 +09:00
Naoki Hamada 1d45444d54 Added code for generating core image.
modified:   arch/x86/kernel/gencore.c
	modified:   arch/x86/kernel/include/elfcore.h
	modified:   kernel/include/process.h
	modified:   kernel/process.c
2014-07-10 15:55:35 +09:00
Balazs Gerofi bgerofi@riken.jp 31a605f94b push/pop r15 when entering/leaving kernel space (fix for bug #53: r15 wasn't propagated during fork()) 2014-07-10 13:53:12 +09:00
Naoki Hamada 79a72809af Prepare inside of core. Not tested.
modified:   arch/x86/kernel/gencore.c
	modified:   arch/x86/kernel/include/elfcore.h
	modified:   kernel/mem.c
2014-07-07 15:46:10 +09:00
Naoki Hamada 14cc85c207 Added needed files.
new file:   arch/x86/kernel/gencore.c
	new file:   arch/x86/kernel/include/elfcore.h
	new file:   arch/x86/kernel/include/elfcoregpl.h
2014-07-04 15:44:48 +09:00
NAKAMURA Gou 11bb334bd4 support mremap(2)
fixes #22
2014-07-02 15:30:52 +09:00
NAKAMURA Gou 90aaf9dc9c support remap_file_pages(2)
fixes #21
2014-06-30 17:33:51 +09:00
NAKAMURA Gou bb3756dc74 add fileoff-type PTE
fileoff-type PTE holds a file offset which the page data should be
loaded from.

refs #21
2014-06-30 17:33:50 +09:00
NAKAMURA Gou 04f1b3f401 add pte_xchg() 2014-06-30 17:33:46 +09:00
NAKAMURA Gou c395dc2410 add pte_is_dirty() 2014-06-30 17:33:45 +09:00
Tomoki Shirasawa 770eae0186 support sigaltstack 2014-06-25 13:45:33 +09:00
NAKAMURA Gou 3f13862a98 ptrace: add error stub to prevent mcexec from waiting
In LTP's ptrace03 test,
there is a exit() preceded by ptrace(PTRACE_TRACEME).
In this case, processes will be usually finished immediately.
But mcexec will fall into waiting for parent's ptrace(PTRACE_CONT),
because mcexec sends itself a signal in processing of exit().
2014-06-09 19:03:59 +09:00
NAKAMURA Gou 7e788f06f7 add PTATTR_DIRTY
refs #18
2014-05-07 21:24:45 +09:00
NAKAMURA Gou 604d1da50f change macro name: PF_DONTCOW --> PF_POPULATE
refs #18
2014-04-25 11:19:21 +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 f60b37ea1b use 'enum ihk_mc_pt_attribute' instead of 'int' 2014-04-11 14:59:46 +09:00
NAKAMURA Gou c0c9192e1b add prototypes to cpulocal.h
+struct x86_cpu_local_variables *get_x86_this_cpu_local(void);
+void *get_x86_this_cpu_kstack(void);
2014-04-03 15:33:34 +09:00
Balazs Gerofi bgerofi@riken.jp ab13f9a57c declare fork() so that __NR_fork is available 2014-04-02 18:00:09 +09:00
Balazs Gerofi bgerofi@riken.jp 3ce94072b4 save/restore rbp when entering/leaving kernel (required for fork() in glibc) 2014-04-02 14:02:20 +09:00
NAKAMURA Gou b2b9b566c8 implement munlock() 2014-02-05 11:31:01 +09:00
NAKAMURA Gou f2a6515448 implement mlock() 2014-02-05 11:30:59 +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
Tomoki Shirasawa 26d68d391d signal part 4 (sigsuspend etc) 2014-01-24 10:14:49 +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
Tomoki Shirasawa 8411f353fe signal part 3 (EFAULT) 2014-01-13 10:52:29 +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
Masamichi Takagi 2f89e26ac0 add modification history entry to the following files,
mckernel/lib/include/*.h
  mckernel/arch/x86/elfboot/*
  mckernel/arch/x86/kboot/main.c
  mckernel/arch/x86/kernel/*
  mckernel/lib/page_alloc.c
  mckernel/lib/string.c
  mckernel/lib/include/ihk/*
except
  mckernel/arch/x86/kernel/include/signal.h
  mckernel/arch/x86/tools/mcreboot-attached-mic.sh.in
  mckernel/arch/x86/kernel/include/syscall_list.h
  mckernel/arch/x86/kernel/syscall.c
.
2013-11-14 18:30:06 +09:00
Masamichi Takagi 384328c6bc add copyright notice to the following files,
mckernel/lib/include/*.h
  mckernel/arch/x86/elfboot/*
  mckernel/arch/x86/kboot/main.c
  mckernel/arch/x86/kernel/*
  mckernel/lib/page_alloc.c
  mckernel/lib/string.c
  mckernel/lib/include/ihk/*
except
  mckernel/arch/x86/kernel/include/signal.h
  mckernel/arch/x86/tools/mcreboot-attached-mic.sh.in
  mckernel/arch/x86/kernel/include/syscall_list.h
  mckernel/arch/x86/kernel/syscall.c
.
2013-11-14 17:09:58 +09:00
NAKAMURA Gou 03521e9c2c add copyrights 2013-11-14 16:49:40 +09:00
Tomoki Shirasawa e5890aa949 typo fix 2013-11-14 16:27:11 +09:00
Tomoki Shirasawa 3f60324d4e add copyright 2013-11-14 15:55:00 +09:00
NAKAMURA Gou 27172ad413 support private mapped file 2013-10-15 12:30:41 +09:00
Tomoki Shirasawa 1d69225532 mcexec forward signal to MIC process. 2013-08-19 12:17:23 +09:00
NAKAMURA Gou 480f6d4c2f rewrite page_fault_handler() 2013-08-08 12:43:00 +09:00