(1) Masquerade clv
(2) Fix timeout
(3) Let mcexec thread with the same tid as McKernel thread migrating
to Linux handles the migration request
(4) Call create_tracer() before creating proxy related objects
Change-Id: I6b2689b70db49827f10aa7d5a4c581aa81319b55
One CPU could be chosen by concurrent forks because CPU selection and
runq addition are not done atomicly. So this fix makes the two steps
atomic.
Change-Id: Ib6b75ad655789385d13207e0a47fa4717dec854a
Add check for start/end being larger than the range we're checking.
Fix corner case where the access_check() was done on last vm range, and
we would be looking beyond last element (null deref)
It's enabled by adding -s to mcreboot.sh.
Cherry-pick of the following commit:
commit b5c13ce51a5a4926c2cf11c817cd0d369ac4402d
Author: Katsuya Horigome <katsuya.horigome.rj@ps.hitachi-solutions.com>
Date: Mon Nov 20 09:40:41 2017 +0900
Include measures to prevent memory destruction on Linux side (This is rebase commit for merging to development+hfi)
(1) Cherry-pick of 644afd8b45fc253ad7b90849e99aae354bac5b17
(2) Pass length to functions with arguments of variable length
* POSTK_DEBUG_ARCH_DEP_38
(3) Separate architecture dependent functions/structures
* POSTK_DEBUG_ARCH_DEP_34
(4) Fix include path
* POSTK_DEBUG_ARCH_DEP_76
(5) Include config.h
* POSTK_DEBUG_ARCH_DEP_33
Device map with MAP_PRIVATE is copied when forking using copy_user_pte.
So the map isn't copied by those statements.
Futjitsu: POSTK_TEMP_FIX_14
Refs: #1039
Change-Id: I1a697ed2e003055d66a8eebd3e8d5e9e49d094ad
the pagers are all destroyed when linux thinks there is no process left,
but there is no synchronisation with mcexec on that and some new process
might have spawned and started using these pagers in the meantime,
leading to weird crashes because an invalid pager was used.
The reason we're cleaning up pagers when no process is left is that
mcctrl does not handle pager_req_release is the linux-side process got
killed or died before the mckernel one for some reason, so:
- move pager_req_release to a new __do_in_kernel_irq_syscall() helper
- have free_all_process_memory_range not set MF_HOST_RELEASED on the
memobj
- just in case, clean up everything like before on mcctrl shutdown
instead of when no process is left.
Change-Id: I53b8b9b81b1e5b807593850af17b5ea5e8471174
Refs: #1154
-ESRCH from mcctrl doesn't mean an error but the file is not a regular
file and mcctrl wants McKernel to treat it as a device file.
Change-Id: Ie121f0e6a8b1f0a29c2f2cf193a51f4f52337809
Report timeout when McKernel doesn't respond to prevent the caller
from waiting forever.
Refs: #1167
Change-Id: I8bd87e43aafffdd0952198224e44195af4368883
The size of tid table needs to be more than #CPUs when CPU oversubscription
is needed.
Note that the max number of simultaneous threads are the min of the
following two:
(1) Number of mcexec worker threads
(2) NR_TID defined in kernel/syscall.c
Change-Id: I425189da415e1d3a763ad62567950d001850cf0d
schedule_timeout() with idle_halt should use spin sleep because sleep
with timeout is not implemented.
Change-Id: Ia0bebcc10ddfb872bffeece7f13fb35a4791db18