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
vfs_read has been unexported in bd8df82be66 ("fs: unexport vfs_read and vfs_write")
in kernel 4.14.
kernel_read has always™ existed and is actually more appropriate: we can
remove the set_fs calls that are done in kernel_read.
The downside is that the function prototype also changed in 4.14 with
bdd1d2d3d251 ("fs: fix kernel_read prototype")...
(same with kernel_write e13ec939e96b ("fs: fix kernel_write prototype"))
Change-Id: I6f76a6387ae02b4d33bd62952d995a90b1952fc9
The functions now take a bitmask in argument since commit d7416c6f79
("perf_event: Specify counter by bit_mask on start/stop")...
Thanksfully the change also induced a type modification so it was easy
to notice.
(On the other hand I'm building with --disable-perf so why the hell is
that file compiled?!)
Change-Id: Ie16367cc94e81068b70e1b80142a6394de896c4f
struct sched_param is defined differently since headers changed in
linux ae7e81c07 ("sched/headers...")
Change-Id: I22af79bf3d9df69d09903b2830d99426309cf911
Some enums were redefined in lib/include/mc_perf_event.h in commit
1284060 ("support PERF_TYPE_{HARDWARE|HWCACHE} in perf_event_open")
Change-Id: I1a98699955ca7fd6135b2a7dde72ed4df77b1974
The function was between two perf functions when perf functions don't
use it...
It seemed simpler to move the function than to add an extra ifdef
Use that occasion to fix style warnings, no actual code changes were
made.
Change-Id: Ie8b5fa7968a3d5e54a690d079874db54f5e6c8c9
This function was added for x86 by commit 140f813d77 ("fix:
differences in behavior of sigaction between Linux and Mckernel")
The x86 and arm files are actually pretty close and could use
factoring...
Change-Id: Ia8820fd2f824d898610b384a3e137c96aadbc911
Instead of parsing System.map, use kallsyms_lookup_name() to
get unexported symbols addresses at module loading time.
This lets mckernel work with kaslr enabled (it gets enabled by
default from el7.5 onwards)
Change-Id: Ie4349fc1145ebce44f37f1f40c16f9d75584074d
Probably only needed for recent system, see ihk's 3271b5e6 ("fix
compilation with recent glibc (cpu_set define change)")
The root of the problem really is that we rely on system headers for
mckernel that ought to be independent...
Change-Id: Ieb9a017e5a7697ad767087370ced7b615efc917e