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
bc887aab44
x86 futex: fix out of bounds shift
...
8 << 28 needs unsigned to fit, other shifts were done to truncate
the input, use a mask instead
Change-Id: I81ba41595f4629f1df554e34392116440ff3b641
2018-07-26 05:10:36 +00:00
97273adcc5
x86_64 move_pages_smp_handler: rework initialisation
...
- add missing break statement
- remove duplicate memset for mpsr->status
Change-Id: I1fd1a8b2bb7bbabb32db9e7d3fc84102d9b0ff82
2018-07-26 04:59:23 +00:00
ad2cb6375a
kprintf: only call eventfd() if it is safe to interrupt
...
Missing ARM64 implementation, cannot test right now
Change-Id: Ia05e8b7952b19bcd8fdac1f920d9bfe341be8b97
2018-07-26 04:57:30 +00:00
6df4bd8f8c
Fix a few more warnings
...
Some are important, e.g. the seemingly harmless braces around if with dprintf,
since that dprintf is defined as empty, will screw things up and grab the next
line
Change-Id: Ie5e1cf813178ad708ff42ae5e477fbc96034471c
2018-07-26 04:52:17 +00:00
eb675818c7
x86 mmap: fix out of bounds shift
...
0x3F << MAP_HUGE_SHIFT is too big to fit in signed int,
make it unsigned
Change-Id: I0e476b80ff51a8e141c90da6f985ba18a3438752
2018-07-26 03:50:44 +00:00
3ce7763715
x86 mem init: do not map identity mapping
...
init_normal_area was mapping identity lookups (phys = virt) from 0,
leading to many undetected null pointer dereferences in init_pt (but
not in new process page tables leading to odd behaviour)
This also makes the code use the set_pt_large_page() function, cleaning
it up a bit
Change-Id: I22889031de26a7e48501b0eb4d453ca62e671835
2018-07-26 03:50:44 +00:00
79e5026f01
x86 mem init: fix clearing of init_pt
...
memset(init_pt...) had the wrong size.
Change-Id: Idb5d0d53b3c70ee4a16a101dd265d0854cfd3b72
2018-07-26 03:50:31 +00:00
9a79920ef9
Static analysis fixes
...
Change-Id: I7bc42545a1c497f704d7bfa6ea1b7e3893acc697
2018-07-26 03:36:50 +00:00
699cb4f88c
arm64/arch-lock: typedef mcs_lock_t
...
Was done in x86_64 for fileobj in commit 249bda4aef ("fileobj: use
MCS locks for per-file page hash")
Change-Id: I61957de336b6657687803e6288afed9360a42032
2018-07-26 03:28:40 +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
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
f185be06eb
mcoverlay-create.sh, mcoverlay-destroy.sh: Return -EINVAL on failure
...
Change-Id: I0561df33e8068327bf2d921c8facac7b18ac8866
2018-07-03 05:19:55 +00:00
249bda4aef
fileobj: use MCS locks for per-file page hash
2018-05-14 17:46:52 +09:00
90a34f54c9
mcreboot.sh,mcstop+release.sh: Disable irqbalance_mck forcefully
2018-04-26 15:06:53 +09:00
d5190990f5
mcreboot.sh,mcstop+release.sh: rm -rf /tmp/mcreboot when it's done
2018-03-27 23:25:44 +09:00
82822b1f16
mcreboot.sh: Fix error cases
...
(1) Restart irqbalance when error occurs after it's stopped
(2) Restore /proc/irq/*/smp_affinity when error occurs after
they're modified
2018-03-27 22:20:25 +09:00
7f02889f76
mcreboot.sh,mcstop+release.sh: Save /proc/irq/*/smp_affinity to /tmp/mcreboot
2018-03-27 22:01:55 +09:00
ce3af4734a
fix: dual hold_thread() in do_kill()
2018-03-19 11:12:50 +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
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
3b277b2354
uti: Fix dead-lock of calling terminate() from terminate()
...
Conflicts:
arch/x86_64/kernel/syscall.c
kernel/syscall.c
2018-03-09 17:38:55 +09:00
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
a224bf648a
fix: Bug for getrusage return incorrect ru_maxrss
...
refs #1032
2018-03-07 13:09:24 +09:00
140f813d77
fix: differences in behavior of sigaction between Linux and Mckernel
2018-03-01 09:44:44 +09:00
523a066245
sigaction: support for SA_RESETHAND on x86_64
...
refs #1031
2018-02-22 11:55:32 +09:00
228f8f8533
Wait for LWK to run at shutdown.
...
refs #898
refs #928
2018-02-06 10:40:12 +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
722ae0e7d5
ARM64 arch_clone_thread(): eliminate extra save_fp_regs()
2018-01-26 13:51:38 +09:00
f55f01cc11
signal: If the thread receiving the signal is not current, the signal is not processed.
2018-01-25 22:27:34 +09:00
1fa398cfab
do_kill: fix to initialization leakage
2018-01-24 23:11:18 +09:00
d4459cf9f3
Add check to confirm IHK and McKernel with the same version are used
2018-01-24 00:20:57 +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
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
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
0cda763f95
fix /proc/*/pagemap
...
refs #387
2017-12-25 16:08:51 +09:00
589504dc33
mcreboot: -h to indicate halting CPU in idle threads (e.g., in futex_wait())
2017-12-18 11:22:15 +09:00
bf2f38051b
mcreboot-smp: offline/online MCDRAM in one go
2017-12-06 14:41:25 +09:00
c9fa445f54
Merge branch 'development' of pccluster.org:mckernel into development
2017-11-22 10:53:33 +09:00
d273a2f58b
add strace bundled test cases
2017-11-22 10:52:30 +09:00
66f44e77af
mcstop+release.sh: Allow ihkmond to flush kmsg buffer
2017-11-20 18:28:48 +09:00
2f0089dfb9
mcstop+release: use ihkconfig release mem all
2017-11-20 17:06:01 +09:00
2af6d5115a
fix: depending arch futex_atomic_op_inuser() (a part of ARCH_DEP_8)
2017-11-20 16:42:47 +09:00
6c33e236d7
mcreboot: Fix umask for /proc and /sys files
2017-10-27 04:57:44 +09:00
0ecf31d896
modify:User space memory access(arm64)
2017-10-24 10:29:11 +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
2ae6883a8b
mcreboot.sh, mcstop+release.sh: Fix retry loop of shutdown
2017-10-19 01:54:46 +09:00