Commit Graph

1039 Commits

Author SHA1 Message Date
Balazs Gerofi
b9b4a4fe36 search_free_space(): manage region->map_end internally
Cherry-pick of 87f72548a232a1626f2ca103da7f1ce62d139359

Conflicts:
	kernel/syscall.c
2018-06-13 00:31:28 +09:00
Dominique Martinet
60ac94cbb9 process/vm/access_ok: fix edge checks.
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)
2018-06-13 00:31:28 +09:00
Dominique Martinet
42bbf5f2a4 process/vm: implement access_ok() 2018-06-13 00:31:27 +09:00
Balazs Gerofi
e29a40331d partitioned execution: pass process rank to LWK
Cherry-pick of d2d134d5e6a4b16a34d55d31b14614a2a91ecf47

Conflicts:
	kernel/include/process.h
2018-06-13 00:31:27 +09:00
Katsuya Horigome
205747594b Exclude areas not assigned to Mckernel from direct map of all phys. memory
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)
2018-06-13 00:31:27 +09:00
Balazs Gerofi
aed099fbcb kmalloc_header: use signed integer for target CPU id
Cherry-pick of bdb2d4d8fa94f9c0268cdfdb21af1a2a5c2bcae5
2018-06-13 00:31:27 +09:00
Balazs Gerofi
b888f31b30 Map LWK TEXT to the end of Linux modules section (0xFFFFFFFFFE800000)
Cherry-pick of b9827b25883a9622058cb78006e705f09eaf9a84
2018-06-13 00:31:27 +09:00
Balazs Gerofi
cfbab0ee82 move McKernel out of Linux kernel virtual
Cherry-pick of 88a8277f17da62d349b4340b66d37482344db649
2018-06-13 00:31:26 +09:00
Balazs Gerofi
c50e7c1029 prepare_process_ranges_args_envs(): fix saving cmdline 2018-06-07 07:17:21 +09:00
Tomoki Shirasawa
5f4dbb2c71 mprotect: Fix early exit condition on page table attribute 2018-06-06 01:39:44 +09:00
Ken Sato
511555c8cb fix: /proc/<PID>/maps outputs a unnecessary NULL character 2018-05-30 16:38:28 +09:00
Dominique MARTINET
81699345cc mprotect: do not set page table writable for cow pages
Change-Id: If8b0bb56e7dae59aa9dc3d745a4cc4e43bf4bf9a
2018-05-30 13:29:55 +09:00
Balazs Gerofi
130751ff66 fileobj: avoid memory leak in path recording 2018-05-14 17:46:52 +09:00
Balazs Gerofi
f3d18eb9de fileobj/devobj: record path name (originally by Takagi-san) 2018-05-14 17:46:52 +09:00
Balazs Gerofi
249bda4aef fileobj: use MCS locks for per-file page hash 2018-05-14 17:46:52 +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
Balazs Gerofi
73731d2a0d ihk_mc_map/unmap_virtual(): do proper TLB invalidation 2018-03-24 07:58:08 +09:00
Masamichi Takagi
8d5f95de04 schedule: Add comment on #1029
refs #1029
2018-03-12 17:11:20 +09:00
Masamichi Takagi
7bef1f5117 Remove debug-print from do_syscall() 2018-03-12 02:07:12 +09:00
Balazs Gerofi
fab0641813 prepare_process_ranges_args_envs(): fix generating saved_cmdline to avoid PF in strlen() 2018-03-19 13:56:04 +09:00
Ken Sato
c107d1fdf9 fix: Bug for measuring rss in fork()
refs: #1032
2018-03-15 14:29:16 +09:00
Ken Sato
bc89a51e00 fix: getrusage's u|stime race-condition caused by release_thread() and getrusage() 2018-03-15 14:26:39 +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
Masamichi Takagi
06b1b4f8ab Fix deadlock on thread->times_update in getrusage()
Set thread->in_kernel properly on exiting interrupt handler when entering
it from kernel mode.

Conflicts:
	arch/x86_64/kernel/cpu.c
	kernel/mem.c
2018-03-09 17:26:31 +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
a224bf648a fix: Bug for getrusage return incorrect ru_maxrss
refs #1032
2018-03-07 13:09:24 +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
Ken Sato
c260b5c6f3 xpmem: support for fork()
refs #925
2018-02-22 09:37:48 +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
Ken Sato
228f8f8533 Wait for LWK to run at shutdown.
refs #898
refs #928
2018-02-06 10:40:12 +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
54169bc3ea procfs: indicate heap in /proc/maps 2018-01-26 16:22:43 +09:00
Balazs Gerofi
142e923222 procfs: indicate VDSO, vsyscall and stack in /proc/maps 2018-01-26 16:02:32 +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
Balazs Gerofi
f56e087208 init_process_stack(): fix stack alignment (align to 64 bytes) 2018-01-26 13:43:23 +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
2f2b3cdc6f signal: interrupt_syscall is called by the core executing the thread that recieved the signal.
refs #999
2018-01-23 14:31:04 +09:00
Ken Sato
1b25379c02 small fix: reset switch_ctx flag in schedule() for redo 2018-01-14 14:50:31 +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