Commit Graph

92 Commits

Author SHA1 Message Date
0307f6a6cc impementation of sched_{setparam, getparam, setscheduler, getscheduler, get_priority_min, get_priority_max, rr_get_interval} system calls 2015-02-19 11:46:03 -08:00
c0edb6fe6f add new cpu state CPU_STATUS_RESERVED 2015-02-18 13:46:08 +09:00
16af976a71 support msync() system call. refs #382
Msync(2) of this version writes only the pages which the calling process
modified. Modifications of the other processes are not written.
2015-02-18 11:52:15 +09:00
fa15f6b106 support PTRACE_SYSCALL.
support PTRACE_O_TRACESYSGOOD.
ptrace_report_exec() calls ptrace_report_signal().

refs #265
2015-02-17 16:56:27 +09:00
c3ade864d9 fix PTRACE_PEEKUSER, PTRACE_POKEUSER, PTRACE_GETREGS.
support PTRACE_SETREGS.
  In struct process, add 'unsigned long *ptrace_debugreg', instead of 'struct user *userp'.
  debug registers are read/written from/to ptrace_debugreg, save/restore in schedule().
  most general registers are proc->uctx.
  fs_base is proc->thread.tlsblock_base.
  gs_base,ds,es,fs,gs and orig_rax are uncompleted.
  other members in 'struct user' are ignored, same as Linux implementation.

refs #257
refs #373
refs #263
2015-01-29 14:08:38 +09:00
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
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
912b8a886c do_kill distinguish PTRACE_CONT from kill. 2014-12-26 15:23:11 +09:00
815d907ca4 setpgid return -EACCES when the child process had already performed an execve (LTP setpgid03) 2014-12-09 14:01:20 +09:00
8f30e16976 when mcexec is killed by SIGKILL, terminate mckernel process (BUG#259) 2014-11-27 16:13:52 +09:00
89acf5c5d6 support for AT_RANDOM auxiliary entry on the process stack (needed for _dl_random in glibc) 2014-11-11 08:48:27 +09:00
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
ec179f072d ptrace: Add all known request value and report upon their request. 2014-10-15 15:42:45 +09:00
f0f31e19fb procfs: PTRACE_O_TRACESYSGOOD (fake) 2014-10-15 14:56:11 +09:00
4b46330624 support ptrace(PTRACE_PEEKUSER, ...) 2014-10-15 14:54:33 +09:00
2997274470 Make __WCLONE option for wait4(2) and flags for clone(2) work properly. 2014-10-15 14:45:58 +09:00
da17625be9 gdb: definitions for ptrace() and syscall part of TRACEME 2014-10-15 14:30:17 +09:00
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
a7b0880a8d Make findthread_and_lock take ihk_spinlock_t ** 2014-09-23 12:03:48 +09:00
f641090a7e support uncachable on-demand mapping 2014-09-17 19:47:58 +09:00
c78be27442 Support SIGSTOP and SIGCONT 2014-09-10 18:19:39 +09:00
7ca4ca4d37 Revert "Support SIGSTOP and SIGCONT"
This reverts commit 2325d47952.
2014-09-10 18:19:17 +09:00
2325d47952 Support SIGSTOP and SIGCONT 2014-09-10 17:01:21 +09:00
b50e205a61 Support pid of zero when calling waitpid
Make waitpid wait any process with the same pgid of the caller when
setting zero to the pid argument.
2014-09-10 17:01:05 +09:00
bc8b441358 process table traversing must be under interrupt inhibition
add finding process table function (findthread_and_lock/process_unlock)
2014-08-25 13:24:06 +09:00
78d10cce80 support process group 2014-08-18 17:08:28 +09:00
3fa6818962 Merge from master. 2014-07-31 18:30:39 +09:00
b58682dd73 Merge branch 'master' of postpeta.pccluster.org:mckernel into gdb 2014-07-31 10:31:45 +09:00
c83e80ad91 execve(): clear host user-space PTEs before context switching 2014-07-28 18:57:56 +09:00
530535c162 Merge remote branch 'origin/master' into gdb 2014-07-23 10:29:07 +09:00
5888dcd4c7 Aestethical change. 2014-07-23 10:26:36 +09:00
101a0f6e4a remote TLB invalidation code for multi-threaded applications (e.g., during munmap()) 2014-07-22 12:24:07 +09:00
9dd7d6283c Merge remote branch 'origin/master' into gdb
Conflicts:
	kernel/include/process.h
2014-07-18 16:03:35 +09:00
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
1889d10e3a add cpu_set and getter/setter of that (incomplete sched_***affinity) 2014-07-13 17:04:32 +09:00
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
11bb334bd4 support mremap(2)
fixes #22
2014-07-02 15:30:52 +09:00
90aaf9dc9c support remap_file_pages(2)
fixes #21
2014-06-30 17:33:51 +09:00
770eae0186 support sigaltstack 2014-06-25 13:45:33 +09:00
514d75b685 execve(): supporting syscall and mcexec modifications 2014-05-22 17:39:13 +09:00
3e830521c1 move rt_sigaction to device dependent
fix call kill(getpid(), ) after sigaction aborted
2014-05-16 09:50:06 +09:00
99dec9b805 add parameters to arch_vrflag_to_ptattr()
for other architectures and future use
refs #18
2014-05-07 21:24:45 +09:00
769cf79bf8 move vrflag_to_ptattr() to arch/x86/kernel/memory.c
refs #18
2014-05-07 21:24:45 +09:00
0e348e6295 SIGCHLD and wait4(), i.e. wait()/waitpid() implementation 2014-04-23 13:33:18 +09:00
7103fed1dc rename free_process() ro release_process() 2014-04-23 13:31:15 +09:00
cf442e6a14 fork(): preliminary version (no wait()/waitpid() support yet) 2014-04-02 14:07:38 +09:00
93c5385f65 implement mmap(MAP_LOCKED) 2014-01-27 18:59:36 +09:00
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
8411f353fe signal part 3 (EFAULT) 2014-01-13 10:52:29 +09:00
0465cc16b9 signal (part 2) sigpending 2014-01-07 19:52:06 +09:00