e932f2e70c
fork: release_thread: fix release of cloned thread
...
Change-Id: I390093bdb47a348cfec287cceaff22712df36bd9
2019-09-26 01:56:16 +00:00
bb08742467
fork: clone_thread: free resources when an error is detected
...
Change-Id: I922f3fddc35942ef2c67db6673980770731dced9
2019-09-26 01:56:16 +00:00
3e9fdfc0f1
fork: copy_user_ranges: rollback on error
...
Change-Id: Icdb8399cbce31835abcaeb783dde3ff14d30af6a
2019-09-26 01:56:16 +00:00
58f4593478
fork: fpregs: return error code.
...
Change-Id: I6ff150a39cd8952adad9b21d0c9f8514126ef957
2019-09-26 01:56:16 +00:00
de0e07f29e
schedule: Skip save_fp_regs when the process ends
...
Change-Id: I32ff71a0dfcd7196d2c9e6cc1d68210933470bbb
Fujitsu: POSTK_DEBUG_ARCH_DEP_106
Refs: #1354
2019-09-25 06:43:08 +00:00
beac6c3e80
make checking write-combine arch-dependent
...
Change-Id: I4c0fca7d34e69b4774141e115b8ebc03c5c1e8b3
Fujitsu: POSTK_DEBUG_ARCH_DEP_12
Refs: #1355
2019-09-23 16:42:26 +09:00
5d6715078f
fix: madvise changes only the first one of vm_ranges
...
Change-Id: I83248c1162e28c3c24ca5f6b0933e1a8ca434d6b
Fujitsu: POSTK_DEBUG_TEMP_FIX_37
Refs: #1351
2019-09-08 14:22:00 +09:00
0c1cae45fe
coredump: Support signal number
...
Change-Id: If220bcd0865569a566e08aa53cae748fdc6317d0
Refs: #1340
2019-08-08 13:44:15 +09:00
11ef2f8092
coredump: Support threads
...
Change-Id: Id75ade6c87b15abcff5d772d90f77950376a32c1
Refs: #1219
2019-08-09 04:00:15 +00:00
9b3450ee7e
syscall offload regardless of mcexec life and death
...
Change-Id: I7db089993d3ee5ae6032f5085db2b67cef99fdfb
Refs: #1321
2019-08-08 00:39:26 +00:00
0d3ef65092
memory_range_lock: Enable interrupt when trylock fails
...
Also use read-write-lock
Change-Id: I03150b7208325ec1fe422dcd5f931e4e41c8e40e
Refs: #452
2019-08-08 00:38:55 +00:00
8efced7bf7
mmap: Check if size exceeds available memory when MAP_HUGETLB
...
If size exceeds, mmap fails and set -ENOMEM
Change-Id: I4f0d6e18ee3a7c8e32e251b7ed07ee9f76305603
Refs: #1183
2019-08-08 00:31:36 +00:00
2dd8687974
flush instruction cache at context switch time if necessary
...
Change-Id: Ic09415ea772a9de6dca43a98168a8346ca86d3e7
2019-08-08 00:29:47 +00:00
f0bc1a6b07
cmake: Add option for "mem: per-CPU allocator cache (ThunderX2 workaround)"
...
Change-Id: I7156cf433b2081246d1d9b8e4fde489609676ef1
2019-08-08 00:29:34 +00:00
9c78d4d249
pmu: define event validation in architecture dependent code.
...
Change-Id: Ia053af146ba3c89810892271cae93def6d9fd7c8
2019-07-31 16:18:50 +09:00
b945367c90
pmu: add ihk_mc_perfctr_value function
...
Change-Id: I88d25586dd470737a3eac4c3a4f1955ae6e41d64
2019-07-23 16:20:17 +09:00
f8cad24a9a
pmu: move cpu cycle event type comparison to arch dependent code.
...
Change-Id: If069f8893fe59e3517569b74b3a27b5267ebac03
2019-07-23 16:20:16 +09:00
2b6b3f31e5
pmu: remove pmc_{init|start|stop|reset} system call
...
Change-Id: I6eb65ed8c18558418c7aabfee75cd1974f4c03ff
2019-07-23 16:20:16 +09:00
ca19ee434a
fix: Bug for perf_event_open error code.(LTP:perf_event_open01)
...
Change-Id: Ia7c942cb3c94ad5e6a0d8640f321f427cd1cd5f9
2019-07-23 16:20:16 +09:00
bb2589bac4
uti: futex_wait: Use kmalloc area for wait queue
...
Change-Id: Ida994c87334f9613bbf5cbda45b6b5474fd4c6be
2019-07-23 04:53:51 +00:00
06af2d62c6
pmu: implement event mapping function.
...
Change-Id: Iac1ec99152b17a19dba0bf1a35f07724b8abc5a1
2019-07-18 16:39:18 +09:00
3e267e24cb
exec: Allocate necessary number of pages to argenv area
...
Change-Id: I298a0de2f4e34ed774e2db7d90167dbe0d35586e
Refs: #1174
2019-07-17 06:38:35 +00:00
4cee9b1a27
rusage: Add comment on counting COW-source pointed-to by only fileobj
...
Change-Id: I082f6738dd29257c05e8a0e4b0af23dd8ffab449
2019-07-05 01:15:47 +00:00
b55e164669
page_fault_process_memory_range: Disable COW for VM region with zeroobj
...
This fixes ostest-mem_limits.001 which tries to anonymous-mmap 95% of
total memory. It reports a failure because:
(1) McKernel tries to allocate physically contiguous area and
fails
(2) It turns on demand-paging
(3) It tries to obtain a page from zeroobj and fails
(4) It allocates a new page
(5) It performs COW on the page, which is unnecessary
Change-Id: Iddf0548bb9216f9bf91fb03fa21f890e599bfdad
2019-07-04 13:58:22 +09:00
aa66fe2cb1
extend_process_region: Fall back to demand paging when not contiguous enough
...
This fixes ostest-mem_limits.005 which tries to move brk by 95% of
total memory. It reports a failure because McKernel tries to allocate
physically contiguous area and fails.
Change-Id: I50a61cb7103fdbdbe051f0ae276a79e8e2dcdda3
2019-07-03 07:49:45 +00:00
3b74b0a093
rusage: Move pgsize_to_pgshift to arch-memory.h
...
Change-Id: Ia10b6e5c7d078d345347a79a3e98c06c16d28d6a
2019-07-02 09:10:04 +00:00
0267a0c8ea
procfs: Fix type of number of threads
...
Change-Id: I7d5d17ae1e619d789cdb843f183be640efdbe9e2
Refs: #1277
2019-06-11 16:51:31 +00:00
e9955a4bba
Make heap and stack private mapping
...
Change-Id: I4306566b3bbbe27d206c5518a2d36d117ba4ca9f
2019-06-05 15:21:20 +09:00
bc4629dfb0
ARM: fix performance counters allocation
...
Change-Id: Ie6c8beacf268462064f59b063d9c7b635c906dc4
2019-06-05 14:31:43 +09:00
99fba2df1c
mem: per-CPU allocator cache (ThunderX2 workaround)
...
Change-Id: I7694524c5e9674a6f7bfcd911f8b0dbbead7df5a
2019-06-03 01:22:03 +00:00
bc81d362b4
madvise: MADV_HUGEPAGE, MADV_NOHUGEPAGE: Fix error check
...
* Returns -EINVAL except for hugeobj and shmobj
* Fixes ostest-madvise.012 and ostest-madvise.013
Change-Id: Id1f1d6cc0c81edd204228ce5f75b641985e70cee
2019-05-13 05:54:45 +00:00
07c517828d
procfs: add number of threads to stat and status
...
Change-Id: I98dd0868b20e9a1725c7d6e4f8379a4d86769780
2019-04-18 02:20:27 +00:00
75e42badf4
procfs: pagemap: Return EINVAL for unaligned offset
...
Change-Id: I2297818b0b31790b5452cb6f80dcba4192a7d120
2019-04-12 20:19:14 +09:00
3fda54ece8
IHK: support for using Linux work IRQ as IKC interrupt (optional)
...
Change-Id: I2a0e59a47c229fd9271866199c3c4d30e1ddd7f9
2019-04-09 01:52:49 +00:00
0cf89c5682
Linux lockless linked list implementation
...
Change-Id: I8bd6ee989cecac269b55b3a0ff10cf8543629001
2019-04-09 01:52:49 +00:00
96b4729cd5
ihk_mc_map_virtual: Release virtual address range on error
...
It was telling the vmap allocator to release a wrong address range
(physical address range).
Change-Id: I82236ac0086b5da24ac49219166abf363672d838
Refs: #985
Fujitsu: #11
2019-04-08 00:43:55 +00:00
f17c30da07
do_mmap: give addr argument a chance even if not MAP_FIXED
...
hugectl relies on that to check if a range is free
Change-Id: I97963eef15c866f642e884b063b5caf5d827c776
2019-03-29 07:52:57 +00:00
de042b2cb2
IPI: use logical CPU ids in ihk_mc_interrupt_cpu()
...
Also make remote TLB invalidation arch independent,
removes POSTK_DEBUG_ARCH_DEP_8.
Change-Id: I2b0fbcfa2bfe5da07607863e3e772d8e892e8525
2019-03-29 07:45:06 +00:00
08f817a654
page fault: clear writable bit for non-dirtying access to shared ranges
...
Change-Id: I3f3212b2aac79587f04450dfbdee9cb8a56bee04
Fujitsu: POSTK_DEBUG_ARCH_DEP_21
2019-03-22 05:03:03 +00:00
21c9e57646
page fault: use cow for private device mappings
...
Private device mappings still need copy-on-write to work, even if
there is no page.
Change-Id: I96e3e1eea81104f6b09bb7fda1105d9eeb489155
Refs: #1254
2019-03-22 04:30:55 +00:00
2ce695b47b
proc: resurrect /proc/PID/stat and fix a few fields
...
Change-Id: I8ffcfde4db78c66ea10845a0451ae2610261f832
2019-03-18 20:33:29 +09:00
70b42fde5d
arm64: cmake: Add -mgeneral-regs-only option.
...
Change-Id: I0cbdc65c4b95195831344f4006bfc85b1ea58139
2019-03-12 17:26:18 +09:00
ea7f517e3d
arm64: ptrace: Fix overwriting 1st argument with return value
...
Since arm64 shares the return value with the area of
the first argument, rewriting the return value before
the system call execution completes destroys the first argument.
Change-Id: I959944879254d8dd3a29489a65d8f274d45338e6
Fujitsu: POSTK_DEBUG_ARCH_DEP_110
2019-03-08 08:06:19 +00:00
03a85825ed
copy_user_pte: base memobj copy on range & VR_PRIVATE
...
Some memobjs (e.g. devobj) will not be considered 'in memobj' by
page_is_in_memobj.
Instead of trying to play whack-a-mole with the non-fileobj memobjs,
base the copy check on range's memobj and VR_PRIVATE (do not copy
MAP_SHARED mappings, so the fault handler will do the right thing™
when required)
Change-Id: Ic32cdc7766754f6559753b34845eb8c5cff6ed13
Refs: #1255
2019-03-06 17:44:11 +09:00
76a0cc71fc
warnings: fix broken -Wmaybe-uninitialized
...
These variables cannot be used uninitialized, and newer gcc versions
correctly do not bring the warning up, but this will shut up older ones
Change-Id: I2b2ea9b557196a3e7eea1e04dd1f160bd12d6e54
2019-03-06 06:30:30 +00:00
ab39798181
send_syscall: remove unused variables
...
Change-Id: I0a350b8c7dbf27960544dd3651941d3905f93fc6
2019-03-06 06:30:30 +00:00
3fbad79afb
warnings: init pte in process.c functions
...
pte_make_fileoff() on arm does not always init the pte, so just
init it to PTE_NULL firsthand
Change-Id: If195c1aef5b1344f13f6c0c76bb431a5fa339265
2019-03-06 06:30:30 +00:00
aa3c5e91db
arm64: Direct access to Mckernel memory from Linux.
...
Change-Id: I1a096aa5232c56382ae19d8c4e4f41d4e3e9f660
2019-03-06 14:53:16 +09:00
9ec0aeeab5
debug.h: merge both instances into ihk/debug.h
...
We do not need two debug.h files.
Take Fujitsu's STATIC_ASSERT over BUILD_BUG_ON because it is more used
Change-Id: If04c17fbb7406ab15fe86267fed8d6da460cec62
Fujitsu: POSTK_DEBUG_ARCH_DEP_9
2019-03-01 05:10:35 +00:00
4606714c07
process stack: use PAGE_SIZE in aux vector
...
Don't ask me why this shares POSTK_DEBUG_ARCH_DEP_50 with the ksym lookups...
Change-Id: Ic3db2cd77ca88be361cefec85d8ed9deb21ffcd8
Fujitsu: POSTK_DEBUG_ARCH_DEP_50
2019-03-01 05:08:16 +00:00