Commit Graph

214 Commits

Author SHA1 Message Date
NAKAMURA Gou
2eac58aab3 add patch_process_vm(). (in progress)
This function patches specified range of specified user space even if
the range is not writable.

refs #401
2015-03-04 12:00:51 +09:00
NAKAMURA Gou
22d8d169b6 change copy-out routines
- restrict copy_to_user() to only current process.
- add write_process_vm() to write specified process space.
2015-03-04 11:29:16 +09:00
NAKAMURA Gou
8db54c2637 make GPE on CPL0 cause panic 2015-03-04 11:29:16 +09:00
NAKAMURA Gou
063fa963c3 change copy-in routines
- restrict copy_from_user() to only current process.
- add read_process_vm() to read specified process space.
2015-03-04 11:29:15 +09:00
NAKAMURA Gou
a6488adcc1 change parameter type of ihk_mc_pt_virt_to_phys()
- add type qualifier 'const' to virtual address parameter.
  that is, change parameter 'virt' from       'void *'
                                     to 'const void *'
2015-03-04 11:29:15 +09:00
Susumu Komae
377341ce5f change debug output in debug/int3 handler, for struct x86_user_context. 2015-03-03 14:06:30 +09:00
Tomoki Shirasawa
8caeba7cba support PTRACE_GETSIGINFO and PTRACE_SETSIGINFO
refs #422
2015-03-03 09:54:57 +09:00
NAKAMURA Gou
1d2f5d9893 set is_gpr_valid to initial user context 2015-02-27 14:47:43 +09:00
Balazs Gerofi
e4f47df3c3 initialize pstate, turbo mode and power/performace bias MSR registers
MSR_IA32_MISC_ENABLE, MSR_IA32_PERF_CTL and MSR_IA32_ENERGY_PERF_BIAS
are responsible for performance settings, this change enables McKernel
to perform on par with Linux when running the fwq benchmark.
2015-02-27 11:29:11 +09:00
NAKAMURA Gou
4751055ee4 make ptrace(2) use lookup_user_context() 2015-02-26 17:43:10 +09:00
NAKAMURA Gou
305ebfed0e add lookup_user_context(). refs #420 2015-02-26 17:43:10 +09:00
NAKAMURA Gou
b66b950129 add x86_sregs into x86_user_context
x86_sregs contains the registers which are included in user_regs_struct
but not included in x86_basic_regs.
2015-02-26 17:43:10 +09:00
NAKAMURA Gou
4aa8ba2eef sort x86_basic_regs into user_regs_struct's order 2015-02-26 17:43:10 +09:00
NAKAMURA Gou
fab2c2aa97 wrap x86_regs with x86_user_context
and, rename x86_regs to x86_basic_regs.
2015-02-26 17:43:10 +09:00
Tomoki Shirasawa
e91d1e5b7b stack of signal handler is not 16 byte align
refs #429
2015-02-24 17:20:52 +09:00
Tomoki Shirasawa
d9cf1d49b1 support waitid
send SIGCHLD to parent when SIGSTOP or SIGCONT received

refs #425
refs #283
2015-02-22 20:05:30 +09:00
Balazs Gerofi
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
NAKAMURA Gou
0e98e87b95 change type of kprintf_lock() to "unsigned long"
to match type of ihk_mc_spinlock_lock().
2015-02-18 20:49:46 +09:00
NAKAMURA Gou
d35e60c1a3 add init_boot_processor_local() for arch_start() 2015-02-18 20:49:46 +09:00
Tomoki Shirasawa
3b04043f2a change to throw signal SIGILL to SIGSEGV when GPE 2015-02-18 14:54:49 +09:00
Tomoki Shirasawa
c0edb6fe6f add new cpu state CPU_STATUS_RESERVED 2015-02-18 13:46:08 +09:00
NAKAMURA Gou
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
Susumu Komae
99debc548f detach traced process, when tracer process terminate.
some fixes on PTRACE_DETACH.

refs #374
refs #280
2015-02-17 16:58:29 +09:00
Susumu Komae
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
Susumu Komae
8568a73f33 traced process should stop by any signal except for SIGKILL,
even if SIG_IGN.  (LTP ptrace01)
2015-02-17 16:51:29 +09:00
Dave van Dresser
8cdf70c500 Enable AVX extensions for processors that support it. 2015-02-12 17:51:50 -08:00
NAKAMURA Gou
d21ae28843 add dummy NUMA system calls. refs #405
ENOSYS system call handlers for the following.
- get_mempolicy()
- mbind()
- migrate_pages()
- move_pages()
- set_mempolicy()
2015-02-10 21:16:19 +09:00
NAKAMURA Gou
a4a806bef7 support vsyscall_getcpu() vsyscall. refs #385
This version simply calls getcpu() system call, so that it's not fast.
2015-02-10 18:35:48 +09:00
NAKAMURA Gou
d30d8fe71c support getcpu() system call. refs #385
It appeared on Linux(x86) in kernel 3.1.
2015-02-10 18:35:41 +09:00
Tomoki Shirasawa
b26fa4e87c wrong send signal to sender process when kill other process group (LTP kill10)
refs #404
2015-01-29 16:14:31 +09:00
Susumu Komae
bd5f43b119 support PTRACE_SINGLESTEP.
support debug/int3 exception.
2015-01-29 15:48:05 +09:00
Susumu Komae
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
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
Tomoki Shirasawa
cf2166f830 function enter_user_mode calls check_signal.
refs #392
2015-01-16 14:28:28 +09:00
Susumu Komae
d46110b4d9 support PTRACE_DETACH.
change getppid() to use proc->ftn->ppid_parent->pid, for ptraced process.

refs #280
2015-01-08 12:39:52 +09:00
Tomoki Shirasawa
e3eb7e68bc Fix need to modify ihk/cokernel/Makefile when a file has been added under mckernel/arch (Bug#365) 2014-12-26 16:05:23 +09:00
Tomoki Shirasawa
912b8a886c do_kill distinguish PTRACE_CONT from kill. 2014-12-26 15:23:11 +09:00
Balazs Gerofi bgerofi@riken.jp
e25d35a191 ihk_mc_init_ap(): cosmetics for reporting IKC, trampoline info 2014-12-25 11:05:52 +09:00
bgerofi@riken.jp
b388f59ebd ihk_ikc_irq and ihk_ikc_irq_apicid 2014-12-25 11:03:01 +09:00
bgerofi@riken.jp
ff47261337 receive trampoline addr via parameter of arch_start() 2014-12-25 11:03:00 +09:00
NAKAMURA Gou
55f7ee1526 fix a warning
| mckernel/kernel/../arch/x86/kernel/memory.c: In function '__set_pt_page':
| mckernel/kernel/../arch/x86/kernel/memory.c:367:
|     warning: 'init_pt_lock_flags' may be used uninitialized in this function
2014-12-22 17:03:32 +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
bgerofi@riken.jp
d4ba4dc8b3 introduction of mckernel_procfs_file_operations; fix /proc/self path resolution;
implementation of /proc/self/pagemap (LTP mmap12)
2014-12-15 12:46:05 +09:00
Balazs Gerofi bgerofi@riken.jp
cc9d30efbf do_signal(): support for SIGSYS
as of POSIX.1-2001:
Signal  Value       Action  Comment
---------------------------------------------------
SIGSYS  12,31,12    Core    Bad argument to routine
2014-12-04 18:10:10 +09:00
bgerofi@riken.jp
86f2a9067b getppid() implementation 2014-12-04 16:55:17 +09:00
Tomoki Shirasawa
a5889fb5df sigaction check signal number (LTP sigaction02) 2014-12-04 11:31:50 +09:00
Tomoki Shirasawa
8f30e16976 when mcexec is killed by SIGKILL, terminate mckernel process (BUG#259) 2014-11-27 16:13:52 +09:00
Masamichi Takagi
58e2e0a246 Use pidof in mcreboot script 2014-11-23 17:54:14 +09:00
Masamichi Takagi
ea02628f2b Add reboot and shutdown script for builtin-x86
It decides the number of cores for McKernel by looking into the
"SHIMOS: CPU Status:" line of dmesg. It sets the amount of memory for
McKernel to one urth of the total memory obtained by "free -g".
2014-11-13 20:06:29 +09:00
Tomoki Shirasawa
ab7aa3354f repair signal implementation.
- Don't intrrupt syscall with the ignored signal.
2014-11-07 07:55:30 +09:00