Commit Graph

102 Commits

Author SHA1 Message Date
NAKAMURA Gou
41bb2ab5e6 support vdso which borrows clocksource from linux 2016-03-28 22:57:44 +09:00
NAKAMURA Gou
a587c8f5e5 x86: encode cpu# in IA32_TSC_AUX and size of GDTe#15 2016-03-28 22:57:44 +09:00
NAKAMURA Gou
a2548f5421 Revert "fix REQ-42"
This reverts commit 4a0682bbc1.

The reverted commit appears to be wrong, for example:
- arch_range_check()'s arguments and parameters are mismatch.
- arch_range_check() implementation is not checking range.

Conflicts:
	kernel/syscall.c
2016-03-28 13:51:57 +09:00
Tomoki Shirasawa
31595b7409 fix REQ-43 2016-03-25 12:57:31 +09:00
Tomoki Shirasawa
4a0682bbc1 fix REQ-42 2016-03-24 19:14:50 +09:00
Tomoki Shirasawa
670741ae40 fix REQ-39 2016-03-24 13:45:15 +09:00
NAKAMURA Gou
48167d3223 shmget: add "shmflg" checks for SHM_HUGE* 2016-03-23 19:14:27 +09:00
NAKAMURA Gou
d65135c040 move sys_shmget() into arch-dependent code 2016-03-23 19:14:27 +09:00
NAKAMURA Gou
d4d93df032 mmap: add "flags" checks for MAP_HUGE* 2016-03-23 19:04:32 +09:00
NAKAMURA Gou
15f572ef9c mmap: return -ENOMEM if speicified range is out of range 2016-03-23 19:04:32 +09:00
NAKAMURA Gou
81690c5b5a mmap: cosmetic changes 2016-03-23 19:04:32 +09:00
NAKAMURA Gou
e74eb1dd51 add some prototypes to <memory.h> 2016-03-23 19:04:32 +09:00
Tomoki Shirasawa
8dd9f5ef3f support profil 2016-03-12 16:47:19 +09:00
Tomoki Shirasawa
3f16a9443e ptrace_report_signal: save debug regs before to send SIGCHLD to tracer 2016-03-09 22:29:51 +09:00
Tomoki Shirasawa
1dc8513cd3 fix REQ-20 2016-02-26 16:18:30 +09:00
Tomoki Shirasawa
e2b28da32f signal handler support gdb stepi command 2016-02-21 14:55:34 +09:00
Tomoki Shirasawa
eba2be8a35 support times 2016-02-18 13:14:18 +09:00
Tomoki Shirasawa
368f155328 sigaction: support SA_NODEFER
refs #698
2016-01-21 18:48:10 +09:00
Yoichi Umezawa
f9bd83c726 ptrace: fix PTRACE_GETREGSET, PTRACE_SETREGSET bug
refs #608
2015-12-28 19:45:50 +09:00
Tomoki Shirasawa
cad72a8562 when SIGXCPU or SIGXFSZ, set coredump bit to exit status 2015-10-22 20:57:37 +09:00
Tomoki Shirasawa
343bfbd30a rename back status field 2015-10-22 20:26:50 +09:00
Tomoki Shirasawa
a325a78866 refactoring to send signal 2015-10-15 17:10:02 +09:00
Tomoki Shirasawa
04e193de13 refactoring process structures 2015-10-13 23:04:08 +09:00
Balazs Gerofi
b77755d0f7 obtain_clone_cpuid(): always start from CPU 0 and fill in cores linearily 2015-07-28 20:20:47 +09:00
Balazs Gerofi
d7bae14707 TEMPORARY: schedule(): move threads when core is explicitly oversubscribed 2015-07-28 20:12:58 +09:00
Balazs Gerofi
9b1e691588 fix thread migration code (i.e., sched_setaffinity())
- moved migration code into idle() process and updated schedule() to detect
  when a thread has moved to another CPU in order to avoid doing housekeeping
  on behalf of the original one
- start CPU head from core 0
- keeps track of nested interrupts
2015-07-24 20:09:17 +09:00
Tomoki Shirasawa
1ff4cf68c2 support SA_RESTART flag and restart syscall 2015-07-16 16:33:14 +09:00
Tomoki Shirasawa
f4162dff52 some signals set siginfo.si_code 2015-04-14 15:11:36 +09:00
NAKAMURA Gou
a0d909af75 add supports for dump analyzer 2015-03-31 12:59:53 +09:00
Susumu Komae
7bba05cfa4 Revise use of iov_base in ptrace_read_regset() and ptrace_write_regset(). 2015-03-20 20:33:40 +09:00
Tomoki Shirasawa
d53865ac5f change to check sequence of kill syscall, check sig num zero after uid checking 2015-03-18 12:59:05 +09:00
Tomoki Shirasawa
8934eb91a4 kill syscall check uid 2015-03-17 15:04:36 +09:00
Susumu Komae
b553de7435 supports PTRACE_GETREGSET, PTRACE_SETREGSET.
supports PTRACE_GETFPREGS, PTRACE_SETFPREGS.

refs #421
2015-03-06 19:18:32 +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
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
Tomoki Shirasawa
8caeba7cba support PTRACE_GETSIGINFO and PTRACE_SETSIGINFO
refs #422
2015-03-03 09:54:57 +09:00
NAKAMURA Gou
4751055ee4 make ptrace(2) use lookup_user_context() 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
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
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
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
912b8a886c do_kill distinguish PTRACE_CONT from kill. 2014-12-26 15:23:11 +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