Ken Sato
90dba00742
fix return value of sched_getaffinity (POSTK_DEBUG_TEMP_FIX_58) refs#1122
...
Change-Id: I3d7b9b74eec268dd49b703600ca56df1d2933bd9
2018-06-21 09:15:22 +09:00
Dominique Martinet
c52f7a5b49
syscall wait4: add _WALL (POSTK_DEBUG_ARCH_DEP_44)
...
Needed by strace -f
2018-05-11 09:22:54 +09:00
Balazs Gerofi
a7f645f7df
terminate(): fix update_lock and threads_lock order to avoid deadlock
2018-03-25 08:29:53 +09:00
Masamichi Takagi
7bef1f5117
Remove debug-print from do_syscall()
2018-03-12 02:07:12 +09:00
Masamichi Takagi
fe42481d6f
Add allow_oversubscribe kernel argument
...
It's not allowed in the default setting.
Execute mcreboot.sh with -O option to allow it.
refs #1072
2018-03-10 13:08:38 +09:00
Masamichi Takagi
8c2e20c3aa
uti: Fix uti thread on the McKernel side blocks others in do_syscall()
...
It could block other threads on the same CPU in do_syscall() since it busy-waits after woken up
because it's not allowed to sleep again.
2018-03-09 18:02:45 +09:00
Masamichi Takagi
65667709a8
Fix thread status race-condition caused by hold_thread() in do_kill() and terminate()
...
Conflicts:
arch/x86_64/kernel/syscall.c
kernel/syscall.c
2018-03-09 17:53:17 +09:00
Ken Sato
b7a7281195
fix: Bug for getrusage often return incorrect ru_stime
...
refs #1034
2018-03-07 13:11:37 +09:00
Ken Sato
b77732fb4f
fix: Bug for getrusage(RUSAGE_CHILDREN) return parent info (POSTK_DEBUG_TEMP_FIX_72)
...
refs #1033
2018-03-07 13:10:45 +09:00
Ken Sato
140f813d77
fix: differences in behavior of sigaction between Linux and Mckernel
2018-03-01 09:44:44 +09:00
Ken Sato
7ad6f9595c
fix: bug for ptrace_attach self pid
2018-03-01 09:37:12 +09:00
Ken Sato
f46287a711
ptrace: support for attaching child_process to parent
...
refs #885
2018-02-22 09:47:59 +09:00
Tomoki Shirasawa
c9157f273f
do_fork: If mcexec succeeds for fork and McKernel fails fork, the child process of mcexec will remain.
2018-02-14 16:37:38 +09:00
Tomoki Shirasawa
559fc9746c
signal: check_signal must be called after check_need_resched.
2018-01-28 13:38:51 +09:00
Balazs Gerofi
86efc86945
save_syscall_return_value(): separate from check_signal() and call from syscall() (for ARM64)
2018-01-26 14:43:18 +09:00
Balazs Gerofi
ebaafa95d8
settid(): clear syscal offload request before populating
2018-01-26 13:54:34 +09:00
Balazs Gerofi
b8ee144e67
do_fork(): return -ENOMEM when no more TIDs available
2018-01-26 13:53:05 +09:00
Tomoki Shirasawa
4bb65494e9
signal: When the process receives a termination signal, it first terminates mcexec.
...
refs #863
refs #870
2018-01-23 14:40:38 +09:00
Tomoki Shirasawa
0fa88f513f
fix broken files
2017-12-27 15:28:13 +09:00
Tomoki Shirasawa
cd54c5983a
fix openat
2017-12-27 14:59:13 +09:00
Ken Sato
6084faeecd
make McKernel's execve behave same as Linux when argv or envp is set to NULL (fix for TEMP_FIX_21)
2017-12-26 17:43:17 +09:00
Tomoki Shirasawa
d209c00a30
part of Issue#994
...
mcexec: open syscall moves to arch_dep
do_fork: don't use __NR_fork. use __NR_clone
vfork: moves to arch_dep
2017-12-26 10:30:33 +09:00
Masamichi Takagi
9a5d5feb9c
time(): Split into architecture dependent functions
...
This fixes the bug reported as POSTK_ARCH_DEP_13 and POSTK_DEBUG_ARCH_DEP_13.
2017-12-23 11:36:52 +09:00
Katsuya Horigome
d649d6fc2d
Include mbind support (this is a rebase commit to merge into development)
2017-11-27 11:16:53 +09:00
Tomoki Shirasawa
d273a2f58b
add strace bundled test cases
2017-11-22 10:52:30 +09:00
Ken Sato
43230eb623
fix: checking the return code of fork() in Linux.
...
refs #906
2017-11-15 15:46:47 +09:00
Ken Sato
f18dc8428d
fix: error code of perf_event_open, when unsupported event is specified.
...
refs #1030
2017-11-15 12:49:56 +09:00
Tomoki Shirasawa
ab53c8e0a4
execve: fix memory leak
...
refs #727
2017-11-09 16:44:31 +09:00
Hitoshi Iizuka
08a625cc0d
modify:User space memory access
...
perf_event_open,futex,process_vm_readv,process_vm_writev,move_pages
2017-10-23 20:27:56 +09:00
Ken Sato
12840601e1
support PERF_TYPE_{HARDWARE|HW_CACHE} in perf_event_open
...
refs #829
2017-10-20 23:10:20 +09:00
Masamichi Takagi
2ddc52e1a4
setitimer(): Fix error handling of copy_from_user()
...
This fixes POSTK_TEMP_FIX_40 (POSTK_DEBUG_TEMP_FIX_40)
2017-10-13 04:59:50 +09:00
Tomoki Shirasawa
9763c40f64
set_robust_list: returns 0
...
refs #977
2017-10-16 09:54:23 +09:00
Dominique Martinet
196379854b
Fix a few more harmless compiler warnings:
...
- myfree in pager.c was called with an argument, so add one to the
dummy definition
- pgoff is offset_t (unsigned) and doesn't need to be compared to 0
- clang says '*(int *)0 = 0' will be optimized away instead of keeping
the segfault without a volatile hint (?! that is wrong!), but it causes
no harm to add anyway.
2017-10-13 10:02:11 +09:00
Dominique Martinet
4d4279121b
process/vm; replace vm_range list by a rbtree
...
This replaces the chained list used to keep track of all memory ranges
of a process by a standard rbtree (no need of interval tree here
because there is no overlap)
Accesses that were done directly through vm_range_list before were
replaced by lookup_process_memory_range, even full list scan (e.g.
coredump).
The full scans will thus be less efficient because calls to rb_next()
will not be inlined, but these are rarer calls that can probably afford
this compared to code simplicity.
The only reference to the actual backing structure left outside of
process.c is a call to rb_erase in xpmem_free_process_memory_range.
v2: fix lookup_process_memory_range with small start address
v3: make vm_range_insert error out properly
Panic does not lead to easy debug, all error paths
are handled to just return someting on error
v4: fix lookup_process_memory_range (again)
That optimistically going left was a more serious bug than just
last iteration, we could just pass by a match and continue down
the tree if the match was not a leaf.
v5: some users actually needed leftmost match, so restore behavior
without the breakage (hopefully)
2017-10-13 10:00:27 +09:00
Tomoki Shirasawa
99da5b6484
ptrace: unify flags PT_TRACE_SYSCALL_ENTER and PT_TRACE_SYSCALL_EXIT to PT_TRACE_SYSCALL
...
refs #961
2017-10-11 15:43:57 +09:00
Tomoki Shirasawa
665eead78b
do_wait: delegate process status for ppid_parent if child process is teacee
...
refs #946
2017-09-29 14:59:34 +09:00
Tomoki Shirasawa
da9bb421cc
ptrace: call ptrace_syscall_exit before check_signal
...
refs #960
2017-09-29 10:03:44 +09:00
Tomoki Shirasawa
c43c1b640a
execve: call ptrace_syscall_exit if execve successed
...
refs #945
2017-09-26 14:31:07 +09:00
Tomoki Shirasawa
e294db7e53
syscall: set syscall_return before calling ptrace_syscall_exit
...
refs #944
2017-09-26 14:29:02 +09:00
Tomoki Shirasawa
df3f388e09
syscall: set -ENOSYS to syscall_return before calling ptrace_syscall_enter
...
refs #943
2017-09-26 14:25:49 +09:00
Tomoki Shirasawa
a2fbe99b60
madvise: support MADV_DONTDUMP/DODUMP
...
refs #661
2017-09-26 14:21:40 +09:00
Masamichi Takagi
daa7526127
rusage and ihklib: Fix out-of-memory reporting and cleanup
...
1. Fix OOM: Count memory usage only when allocation succeeded
2. Fix OOM: Make user allocation fail when memory is running out
3. Fix OOM: Move rusage_init() before numa_init()
4. Cleanup: Rename ihkconfig/ihkosctl functions
5. Cleanup: Pass event type to eventfd()
6. Cleanup: arch/.../rusage.h --> arch/.../arch_rusage.h
2017-09-20 15:11:57 +09:00
Masamichi Takagi
aa7cb970c4
ihk_os_getrusage(): Compile LWK-specific results in mcctrl
...
1. User asks mcctrl for the result via ihk_os_getrusage() with passing void *
2. mcctrl compiles the results and passes them to the user
3. User interprets it by using the type defined in the LWK-specific header
2017-09-20 15:03:45 +09:00
Dominique Martinet
a491e49bbc
syscall.c: fix misleading indent
...
This is a non-fonctional change, brought to attention by newer gcc warnings
2017-09-12 18:27:28 +09:00
Takayuki Okamoto
9989f41fd3
add arm64 support
...
- add arm64 dependent codes with GICv3 and SVE support
- fix bugs based on architecture separation requests
2017-09-05 15:06:27 +09:00
Yutaka Ishikawa
236a072311
Add qlmpi and swap to mckernel (This is rebase commit for merging to development)
2017-08-29 15:04:58 +09:00
Masamichi Takagi
74f15783d2
ihk_os_getrusage(): Add per-page-size memory usage accounting
2017-08-17 12:49:34 +09:00
Balazs Gerofi
6d4d6440aa
terminate(): clean-up and formatting
2017-08-08 11:12:55 +09:00
Balazs Gerofi
9194742de8
do_mmap(): fix calculation of search_free_space() hint
2017-08-01 16:24:07 +09:00
Tomoki Shirasawa
effde241b9
support uti_attr for utility thread offloading
2017-07-25 13:03:48 +09:00