c716e87c53
execve: Clear sigaltstack and fp_regs
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_19
Refs: #976
Change-Id: I16895eab13eecbb47b7e6da961fae82ee5e570ee
2018-08-01 15:11:05 +09:00
3185334c1c
debug messages: implement dynamic debug
...
Heavily inspired off linux kernel's dynamic debug:
* add a /sys/kernel/debug/dynamic_debug/control file
(accessible from linux side in /sys/class/mcos/mcos0/sys/kernel/debug/dynamic_debug/control)
* read from file to list debug statements (currently limited to 4k in size)
* write to file with '[file foo ][func bar ][line [x][-[y]]] [+-]p' to change values
Side effects:
* reindented all linker scripts, there is a new __verbose section
* added string function strpbrk
Change-Id: I36d7707274dcc3ecaf200075a31a2f0f76021059
2018-07-26 14:16:31 +09:00
6f7c428a34
terminate: fix oversubscribe hang when waiting for other threads on same CPU to die
...
Change-Id: I8c4fbdd3aab9d0567ce5457a4a6405490608925d
2018-07-26 05:02:13 +00:00
0994c3300e
search_free_space: remove POSTK_DEBUG_ARCH_DEP_27 side
...
search_free_space changed since this was implemented and the code is
no longer compatible
Looking at it again, the function is not used anywhere other than syscall.c
and the second function does not seem to fix anything specific so this
just removes the untested side.
Change-Id: If28d35ec4da083a40dc6936fcb21f05fb64e378a
Fujitsu: POSTK_DEBUG_ARCH_DEP_27
2018-07-26 04:43:05 +00:00
a5c3e48843
search_free_space(): manage region->map_end internally
...
Change-Id: If9176773868c44fa1eb801c0815c35cea9f4b54b
2018-07-26 04:43:05 +00:00
9a79920ef9
Static analysis fixes
...
Change-Id: I7bc42545a1c497f704d7bfa6ea1b7e3893acc697
2018-07-26 03:36:50 +00:00
67ebcca74d
Fix to VMAP virtual address leak
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_51
Refs: #1024
Change-Id: I1692ee4f004cb4d1f725baf47a8ed31fce1bf42a
2018-07-26 02:17:55 +00:00
94e96927a6
mremap: Do nothing when no size change and !MREMAP_FIXED
...
Behave in the same way as Linux which returns old_address when
old_size == new_size && !MREMAP_FIXED.
Refs: #1112
Change-Id: Ice1421a8a77f962d087de8475aa2cd40c59be5f7
2018-07-26 01:49:01 +00:00
3636c8e7e4
setrlimit: Check arguments in the same order as in Linux
...
(1) Check if rlim's address is valid
(2) Check if soft-limit does not exceed hard-limit
Fujitsu: POSTK_DEBUG_TEMP_FIX_3
Refs: #1050
Change-Id: I5bf1008ce172f9dff64ec89b1f97614926abaf13
2018-07-26 01:48:05 +00:00
9bb8076dc0
shmget: Make shmobj underwent IPC_RMID invisible to shmget
...
Refs: #926
Change-Id: I16120623b581da5d5d484fd05d5111788c8ad5e2
2018-07-10 02:13:00 +00:00
1cbe389879
do_fork: Propagate error code returned by mcexec
...
Refs: #731
Change-Id: I7eb52c1c76103d65d108b18b7beaf8041b51cd03
2018-07-03 09:19:54 +00:00
db732a245c
execve: Reinitialize vm_regions's map area on execve
...
Reinitialize vm->region.map_end in sys_execve()
in the same way as when creating a new process.
Change-Id: I7fc048a187e619ba4b5a578976e2a6774d13a6a7
2018-07-03 08:58:50 +00:00
521bdc6181
mremap: Fix type of size arguments (from ssize_t to size_t)
...
Refs: #1112
Change-Id: I3987d3a20a1e7c4b60f3880e91a670bc0bdc240f
2018-07-03 08:54:14 +00:00
e7b6a3472b
sched_getaffinity: Check arguments in the same order as in Linux
...
(1) Check if size is large enough
(2) Check if size is positive
Fujitsu: POSTK_DEBUG_TEMP_FIX_5
Refs: #1121
Change-Id: I3e41720c89ef89294820f7f4fa8df1a69a7011b0
2018-07-03 08:53:30 +00:00
11756d96ef
mmap, mremap: Check arguments in the same order as in Linux
...
Refs: #1137
Change-Id: I4fd2ac83b013a2741a3facce4dd7e0c37b14fd25
2018-07-03 08:41:30 +00:00
ec202a1ca9
execve: fix execve with oversubscribing
...
Issue: #1072
Change-Id: I88446e075b60de3c94cad2a19a4731e58037ea63
2018-07-02 13:31:23 +09:00
d4471df94e
execve: use thread variable instead of cpu_local_var(current)
...
This fixes crashes _without_ oversubscribing with a process doing
fork() execve() / wait() in a loop
Issue: #1132
Change-Id: I98531f4643ad6b6a8f750a1a3f05b9ff3ebfd50f
2018-07-02 04:28:23 +00:00
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
c52f7a5b49
syscall wait4: add _WALL (POSTK_DEBUG_ARCH_DEP_44)
...
Needed by strace -f
2018-05-11 09:22:54 +09:00
a7f645f7df
terminate(): fix update_lock and threads_lock order to avoid deadlock
2018-03-25 08:29:53 +09:00
7bef1f5117
Remove debug-print from do_syscall()
2018-03-12 02:07:12 +09:00
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
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
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
b7a7281195
fix: Bug for getrusage often return incorrect ru_stime
...
refs #1034
2018-03-07 13:11:37 +09:00
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
140f813d77
fix: differences in behavior of sigaction between Linux and Mckernel
2018-03-01 09:44:44 +09:00
7ad6f9595c
fix: bug for ptrace_attach self pid
2018-03-01 09:37:12 +09:00
f46287a711
ptrace: support for attaching child_process to parent
...
refs #885
2018-02-22 09:47:59 +09:00
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
559fc9746c
signal: check_signal must be called after check_need_resched.
2018-01-28 13:38:51 +09:00
86efc86945
save_syscall_return_value(): separate from check_signal() and call from syscall() (for ARM64)
2018-01-26 14:43:18 +09:00
ebaafa95d8
settid(): clear syscal offload request before populating
2018-01-26 13:54:34 +09:00
b8ee144e67
do_fork(): return -ENOMEM when no more TIDs available
2018-01-26 13:53:05 +09:00
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
0fa88f513f
fix broken files
2017-12-27 15:28:13 +09:00
cd54c5983a
fix openat
2017-12-27 14:59:13 +09:00
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
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
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
d649d6fc2d
Include mbind support (this is a rebase commit to merge into development)
2017-11-27 11:16:53 +09:00
d273a2f58b
add strace bundled test cases
2017-11-22 10:52:30 +09:00
43230eb623
fix: checking the return code of fork() in Linux.
...
refs #906
2017-11-15 15:46:47 +09:00
f18dc8428d
fix: error code of perf_event_open, when unsupported event is specified.
...
refs #1030
2017-11-15 12:49:56 +09:00
ab53c8e0a4
execve: fix memory leak
...
refs #727
2017-11-09 16:44:31 +09:00
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
12840601e1
support PERF_TYPE_{HARDWARE|HW_CACHE} in perf_event_open
...
refs #829
2017-10-20 23:10:20 +09:00
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
9763c40f64
set_robust_list: returns 0
...
refs #977
2017-10-16 09:54:23 +09:00
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