2039139380
release: 1.7.8: fix ihklib/ihk_reserve_cpu when using krm
...
Change-Id: I57235d51f51ae7327cb08a9e3ae56be995157100
2021-03-12 12:54:56 +09:00
c80b112ce7
release: 1.7.7: fix fput and mckernel.spec
...
Change-Id: I74f7530b067d44790e3f014479f580867387584a
2021-03-11 08:09:07 +00:00
4a05024656
spec: cmake-config cmake paramters
...
Change-Id: Ic0e7f62d9172f31afe90297bdd22b8e50cc6fc9e
2021-03-11 07:19:04 +00:00
7a04c6eb5c
ihkmond: redirect kmsg to /dev/kmsg line by line
...
Change-Id: Iafc9d0eb47696073434dcc869a29336a51b8c50e
2021-03-11 16:11:17 +09:00
3e00189de0
kprintf: fix checking if interrupt is disabled
...
Change-Id: I2ee1a1e2438ae761c4136593953ede2738bc6f74
2021-03-11 07:03:04 +00:00
c94cf8e6f0
mcexec: fput executable just after its contents is transferred
...
Change-Id: I3fae841bd7341bca030fd6b7eceffa068c9e0f4e
2021-03-11 07:03:04 +00:00
ee974b200d
mcexec_open_exec: fix missing fput on error
...
Change-Id: I3ac94e336dc54ec313e69c0fa85c17086dc256fd
2021-03-11 07:03:04 +00:00
546cafe6bc
release: 1.7.6: fix ihk_reserve_mem_conf
...
Change-Id: I767f8eac655af9200f733c21353b1e141007df17
2021-03-11 15:22:36 +09:00
9dd4d99a1a
docs: spec: ihk_reserve_mem_conf*: apply change only to the next reservation
...
Change-Id: Iaafd2ca4d96f227d03e9910a36b27801fb1e3da4
2021-03-11 15:17:44 +09:00
3a6273777a
test: uti/tofu, issues/1507+1519: fix README
...
Change-Id: I3060e1273c8ef6a1b392a2c678da3bc02a25a4f8
2021-03-11 03:59:57 +00:00
daed585347
release: 1.7.5: fix ihk_*str() functions
...
Change-Id: Ic412029f856f34a10724f03e36f211f6026acd8e
2021-03-11 12:18:43 +09:00
11d7229525
docs: spec: ihk_reserve_mem_conf_str: use defaults for those not specified
...
Change-Id: I7cfddd3203b952cabb919ea6401e226e151e696a
2021-03-11 02:26:18 +00:00
e43d52df20
Revert "mcexec_open_exec: make fput and add to mckernel_exec_files atomic"
...
This reverts commit c80ea0ed23 .
Change-Id: I0541e8af5157c7128f8774f6581cc207d13b649a
2021-03-10 14:21:57 +09:00
1c0da3c5b9
Revert "mcexec_open_exec: guard fput and add to mckernel_exec_files with spin_lock_irqsave"
...
This reverts commit cba263ff12 .
Change-Id: Ifcd03a2048a3f9d6c155dd8ecd522081b5dde276
2021-03-10 14:21:49 +09:00
3084db8b26
release: 1.7.4: fix missing fput of executable
...
Change-Id: If3e2bb10bd21515876c5a37839cd9fcf12774329
2021-03-07 17:44:53 +09:00
cba263ff12
mcexec_open_exec: guard fput and add to mckernel_exec_files with spin_lock_irqsave
...
Change-Id: Id5dae8cb7f947d4e9939bf9c6762c2d1dcdd3776
2021-03-07 17:39:16 +09:00
43a6f0d41d
release: 1.7.3: fix missing fput executable
...
Change-Id: Ib369a7803d5ef944fec4c42c5e9b20f8655e47f3
2021-03-05 15:20:16 +09:00
c80ea0ed23
mcexec_open_exec: make fput and add to mckernel_exec_files atomic
...
Change-Id: Iff4ac8bb9b4ebfcb9c77e84ed3f0a40e6b9efb6a
2021-03-05 14:14:30 +09:00
73d028de77
docs: move uti installation / usage into install.rst / users.rst
...
Change-Id: Ie1fe1593bb957e5c5fb6085543ab647ec43fd8f6
2021-03-05 11:52:38 +09:00
d812e4dedb
cmake: fix POSTK_DEBUG definitions (third trial)
...
Change-Id: I60341362b1e17acdb7c7f9ac8c036604aec89885
2021-03-05 11:16:43 +09:00
b8cc962843
release: 1.7.2: xpmem is fixed, uti is integrated
...
Change-Id: I97ff528cbddaf06bb28fa064df54601308a06bca
2021-03-05 09:26:52 +09:00
c593faea89
MM: handle zero_at_free in page faults
...
Change-Id: Ib2b37c73936a365173d84a2a806a17374ccc05d4
2021-03-04 04:04:13 +00:00
7d69f15101
docs: describe fork starvation caused by a flood of system call offloads
...
Change-Id: I9826525ca582a61c6e94f44adab3068d80a699cd
Refs: #1398
Refs: #1408
2021-03-04 03:59:56 +00:00
687eae3a11
cmake: fix POSTK_DEBUG definitions (again)
...
Change-Id: I064b81115102bcbd2c3787c5743009be5032469e
2021-03-04 03:47:00 +00:00
eba2131f34
clv: Change no_preempt from int to ihk_atomic_t.
...
Fix the issue where the value of no_preempt gets unexpected value
(-1, 1, 2 etc.) after process ends when running the UTI tests.
Change-Id: I7d9c08b754a171ea3fdec20ab2e635df3b607cbd
2021-03-04 03:40:15 +00:00
1070387ed2
SCD_MSG_SCHEDULE_PROCESS: stay on current CPU if set in process' CPU mask
...
Change-Id: I347fe61f8123792648747ec9bf856a9340ea9d9b
2021-03-04 11:29:21 +09:00
eca107f52d
__mcctrl_os_read_write_cpu_register: spin timeout in mcctrl_ikc_send_wait()
...
Change-Id: I918be366c81be96cd76df659e3181a194d440dd8
2021-03-04 11:29:21 +09:00
71c333965c
mcexec: introduction of --flags argument
...
Change-Id: If5b70bf06460fc709444d8135511c3699304d31f
2021-03-04 11:29:21 +09:00
5664f54390
hugefileobj_get_page: suppress debug message
...
Change-Id: I2784f5bba12f961cccb17cf302f1b463721ac855
2021-03-03 05:07:49 +00:00
720b0c06d8
test: xpmem: fix test program for #1259
...
Change-Id: I8885e518a0202df6d20a88524564aeb648df89ab
2021-03-03 05:07:49 +00:00
e6ec52dfbd
test: Add test program for #1507 , #1519
...
Change-Id: I04927e6dd1bfe1d0b210ec0b7e9d86c449e6daca
Refs: #1507
Refs: #1519
2021-03-03 05:07:49 +00:00
b380f0790d
test: shmobj: fix test program for #1381
...
Limitations tested in #1381 have been removed in #1458
Change-Id: I35b7ee058a75abc98f2a2ad783fdba46087b0716
Refs: #1519
2021-03-03 05:07:49 +00:00
47aec70f5f
shmobj: support large page
...
Change-Id: I104c1b8551b87f5cbfedb13262e77c00c38e9643
2021-03-03 05:07:49 +00:00
d2db639853
xpmem: support large page
...
1. try to use as large page as possible on attach
2. pre-map resident remote pages on attach
Change-Id: I5580682a4199e94085a9bad9ce3958a0f14cdcea
2021-03-03 05:07:49 +00:00
3aaa5350f0
xpmem: replace mcs_rwlock with ihk_rwspinlock
...
Change-Id: I2d29f37f590f55db009f522395ede4c6494f8c89
2021-03-03 05:07:49 +00:00
865eb37b11
xpmem: Fix deadlock in xpmem_remove_process_memory_range()
...
This reverts commit 2fe5c8de2e .
Change-Id: I8ec84f654aeee7cf83603abb2aca5e90b735e977
2021-03-03 05:07:49 +00:00
5dd989450d
xpmem: Make sure vm_range is used under memory_range_lock
...
Change-Id: I856ee9d401e7dcfd74559bad5b22a69d53a61e2f
2021-03-03 05:07:49 +00:00
4ac9dcdccd
xpmem: Use correct process_vm in xpmem functions
...
This reverts commit 29d27b7c8d .
Change-Id: I1863cddcffa67c60e5f93d874447db9919e519dc
2021-03-03 05:07:49 +00:00
63443383e9
xpmem: truncates the size of xpmem_attach at the page boundary (workaround for fjmpi)
...
Fujitsu MPI tries to attach a segment with the size of the source range size plus one.
Change-Id: Iab3801727f938dfb6242b6b90c88e4986b84d08e
Refs: #1507
2021-03-03 05:07:49 +00:00
4d1d53b335
docs: integrate spec tex files
...
"make html" makes spec pdf files as well.
Change-Id: I0535ae97d924c15efed948dadb135210ad18f956
2021-03-03 04:20:46 +00:00
422a399f20
coredump: fix behavior when gencore fail
...
Change-Id: Ifdddf867b514f42a6f1ce374ec06b7550a9cdad5
Refs: #1511
2021-03-03 02:27:01 +00:00
7efb394905
remote_page_fault is handled by the offloaded thread.
...
Change-Id: I9cfad509260cceada74abdf39ca6a1822561e0d9
Refs: #1474
2021-03-03 02:25:56 +00:00
9c7d0cfaec
getrusage: Fix memory_stat_mapped_file when SIGBUS occurs in file map
...
Change-Id: Ia4686f32a3c888d5c886ab6cc6c2b510885447f5
Refs: #1422
2021-03-01 05:55:37 +00:00
baa7a6adcb
add ENABLE_GCOV option for cmake
...
Change-Id: Ic473dc52d748207e49800d0cd340918a4dce0971
2021-03-01 13:19:28 +09:00
86e12fa90c
do_execveat: kill instead of panic when init_process_stack fails
...
Change-Id: I0845440260f04ab8e524e118c21d5a137cddb4aa
2021-03-01 12:04:50 +09:00
ae9827f628
cmake: fix missing prefix in mcreboot.sh
...
Change-Id: I93ee7ba1acf1269472bea40ff4e9c5bc6b3b98f8
2021-03-01 11:22:58 +09:00
79b590d732
docs: remove "mcexec -n <ppn>" requirement for Fujitsu MPI
...
Change-Id: I2d24fa5e11c005a7c7c61f7b351c196e920e6cef
2021-03-01 01:20:13 +00:00
1bfa339ccf
man: mcexec: add "-n <ppn>" option mandatory when using MPI (except Fujitsu MPI)
...
Change-Id: I6d2d0337fdab13325642344529401f86bbadfdcd
2021-03-01 01:19:23 +00:00
c55a02ffba
cmake: trim POSTK_DEBUG definitions
...
Change-Id: Ic302cd936e975abb07b998f266f7c3feecfde85c
2021-02-28 20:05:04 -05:00
dd7b7dbd0e
uti: fix rpmbuild
...
Change-Id: I0cc60d2b38b184168a99a4778fbb5a437278da29
2021-02-27 23:06:32 -05:00
2585c8afaa
prerelease: 0.95: add ihk_*_str() functions
...
Change-Id: I0dc2ff3c8a2b21d167cfff04ccf6d1533555ee1c
2021-02-26 11:24:48 +09:00
82056961cd
uti: integrate libuti and redirect to mck/libuti.so
...
Change-Id: I74e0f677ea8e1cd06e8ab05d92f1d38f9be8fd7a
2021-02-26 11:03:16 +09:00
0848b64c1d
uti: integrate syscall_intercept
...
Change-Id: Ide14341acdca1450b0ad4f8a16cc078d0743afc8
2021-02-26 10:37:56 +09:00
8a9b43fee0
cmake: add -Wno-stringop-truncation
...
Change-Id: I43d9ba731d0feaf8934d2724ff98072df88a902d
2021-02-26 10:37:56 +09:00
19cb302d5f
uti: util_indicate_clone: check --enable-uti mcexec option
...
Change-Id: Ic7474d01c18acd1edbc07844d7a7b010b2175f71
2021-02-26 10:37:56 +09:00
90895cfb1f
test: uti: add tofu examples
...
Change-Id: I1c55c872d125201e60b4fe744af74106e1c5d3a4
2021-02-26 10:37:55 +09:00
32afa80718
uti: fix handling UTI_CPU_SET env
...
Change-Id: Icbf8dc7e82bd6983374aefdd0d5b89ad4152c9aa
2021-02-26 10:24:19 +09:00
e3927a0b95
uti: futex: McKernel waker sends IPI to Linux waiter CPU
...
Change-Id: I6f725b3a6b1b26b9f553d8c58132c0c0a4416683
2021-02-26 10:24:19 +09:00
adc5b7102f
uti: futex: cache remote va to remote pa result
...
Change-Id: Idbbb3f2981b76a0235615fceaa6281d2c7134ca2
2021-02-26 10:24:19 +09:00
5d16ce9dcc
uti: identify UTI thread by thread local variable
...
Change-Id: I64372a932378e4ead09ea27fbf5b52062a109756
2021-02-26 10:24:19 +09:00
a9973e913d
uti: futex call function in mcctrl
...
Previously, futex code of McKerenl was called by mccontrol,
but there ware some problems with this method.
(Mainly, location of McKernel image on memory)
Call futex code in mcctrl instead of the one in McKernel image,
giving the following benefits:
1. Not relying on shared kernel virtual address space with Linux any more
2. The cpu id store / retrieve is not needed and resulting in the code
Change-Id: Ic40929b64a655b270c435859fa287fedb713ee5c
refe: #1428
2021-02-26 10:24:19 +09:00
35296c8210
uti: fix syscall response is mis-consumed by __do_in_kernel_irq_syscall
...
Refs: #1617
Change-Id: Iddd8ccd81d7f692f1f45ec888d31c2a87ec521ce
2021-02-25 01:42:29 +00:00
afea6af667
Send a signal to mcexec after switching to that process.
...
Change-Id: Ia882ef5027931009ee65febd0cbe22022a755c4a
Refs: #1505
2021-02-19 02:28:29 +00:00
b0bd1feefb
remap_file_pages: check file mapping
...
Change-Id: Ibf145a20181938a9825214253337a423fcd53064
Refs: #1521
2021-02-19 02:23:39 +00:00
e6e66e0392
shmget: make small free numbers reusable.
...
Change-Id: Ic6670214fa31a309e96794361e3ec2dcc6375f4a
Refs: #1531
2021-02-19 02:22:50 +00:00
b3ddd60277
shmget: don't update refcount when shmid is found.
...
Change-Id: I3eac47cd67d27efd838190f5a4c21b5d682c5fe9
Refs: #1379
2021-02-19 02:22:33 +00:00
6dce9a2bf9
add_process_memory_range: Change order of update page and insert range.
...
Unintended update page was occurred, when inserting range failed.
Change-Id: I3d117b8613c5fbb64463c759b5fcc81db22bd624
refs: #1512
2021-02-18 16:02:30 +09:00
93dafc5f79
migrate: Don't migrate on in-kernel interrupt
...
Change-Id: I9c07e0d633687ce232ec3cd0c80439ca2e856293
Refs: #1555
2021-02-18 15:30:22 +09:00
583319125a
prerelease: 0.94: fix __mcctrl_os_read_write_cpu_register
...
Change-Id: Ibcfbe7796347cc9c2148cdea2519fe6c7ca9e97e
2021-02-18 15:23:01 +09:00
9f39d1cd88
move_pages: Fix and support some specs for LTP.
...
1. When nodes array is NULL, move_pages doesn't move any pages,
instead will return the node where each page
currently resides by status array.
2. Check whether all specified node is online or not.
Change-Id: Ie3534997833d797e2a9f595d1107b07d46e1c6cf
Refs: #1523
2021-02-18 06:16:17 +00:00
a0d446b27f
smp: make smp_call_func() arch independent
...
Change-Id: Ib60604ceb3274b173bd7f96cf57c8c35c1889e44
2021-02-18 06:16:17 +00:00
f3c875b8e6
mbind: Use range_policy's numamask as priority on MPOL_BIND
...
Change-Id: Iaaa7998945c6e2b42d91d34a2f7b05db1f4d696d
2021-02-18 06:16:17 +00:00
9f1e6d707c
get_mempolicy: Support (MPOL_F_NODE | MPOL_F_ADDR) specified
...
If flags specifies both MPOL_F_NODE and MPOL_F_ADDR,
get_mempolicy() will return the node ID of the node on
which the address addr is allocated into the location pointed to by mode.
Change-Id: Id485e3f4838e3679d877a95e53b21e3421cac88a
2021-02-18 06:16:17 +00:00
aef50d710c
mempolicy: Support MPOL_INTERLEAVE
...
Change-Id: I6357892d792b2de8ea859a0a6799250f05066713
Refs: #959
2021-02-18 06:16:17 +00:00
7f0594d784
TO RESET: mbind: do nothing
...
Fixes: 00007daf ("mbind: do nothing (workaround for Fugaku)")
Change-Id: Id41940bebd2cbcc3e8637eadd4847984627b1c72
2021-02-18 06:16:17 +00:00
866f5c51a0
docs: add limitation of system calls that call copy_to_user()
...
Change-Id: If449c73f8d5949ab5526ea598b0f713ed4431157
Refs: #1514
2021-02-18 13:04:53 +09:00
48b1d548f2
__mcctrl_os_read_write_cpu_register: fix timeout
...
Change-Id: Id5a7d316d793bd535f24fd353b214aa12af1dab4
2021-02-15 08:56:04 +00:00
822b64b03c
docs: add limitation related to Fujitsu TCS xos_hwb
...
Change-Id: I83a1ecd7a0b6d3bcde2b902cd526dfd4feb9e23a
2021-02-15 16:03:52 +09:00
aca83bcd3d
Tofu: fault stack area if VM range doesn't exist in STAG registration
...
Change-Id: I407a8954ccaf22019b3082fd6eee68e772d1cb26
2021-02-15 14:46:58 +09:00
c7145c4b38
xpmem: fault stack area of remote process if VM range doesn't yet exist
...
Change-Id: I2bbb745cc9b79ab4f9ea81b242f35f1b88ad531e
2021-02-15 14:46:58 +09:00
a82d161be8
prerelease: 0.93: investigate smp_ihk_os_panic_notifier
...
Change-Id: I997b41f80038603261de2e8232b6b8ca200cd8cd
2021-02-09 21:39:49 -05:00
7152269a59
spec: create one rpm including .ko and binaries
...
Don't use kernel_module_package not to create a separate
kmod-mckernel-*.rpm containing .ko files.
Change-Id: I25b7ff662476bfc735d319b57cdf2da82f2c6aa7
2021-02-09 20:55:38 -05:00
31c08bcb7d
spec, docs: update cmake options
...
Change-Id: Ib8277413a413b5ce956a48f7e3d9922311937ea8
2021-02-09 20:55:38 -05:00
dffb0918a2
docs: add capstone installation options
...
Change-Id: I96aa9a6405c17f8d9653f3d3894f0e71a57ab460
2021-02-09 06:10:32 +00:00
23cd14af7d
__mcctrl_os_read_write_cpu_register: timeout in 1 sec for when McKernel can't respond
...
Change-Id: Ia2d5f64e107697dda1f3bae499eb3afb8a7aedba
2021-02-09 06:09:11 +00:00
a5cf2019bc
cmake: fix detection of Fugaku native compilation
...
Change-Id: I4210e9b57223c3869464caea10c2d414e9484e14
2021-02-09 06:06:13 +00:00
11b9fe0377
page_fault_handler: fix missing increment of in_page_fault on SEGV
...
This integrates some of the changes of the following commit:
1cf0bd5a ("TO RESET: add debug instruments, map Linux areas for tofu")
Change-Id: Iffd8432d5a7b35f20bd45829a125583a0363dbf0
2021-02-09 00:56:15 -05:00
4905c8e638
mcexec: propagate error in __NR_gettid handler
...
Change-Id: I0e0f06199970fe839065567dcd5418d017b6ec00
2021-02-03 18:53:33 -05:00
3d71c6a8eb
mcexec_transfer_image(): map exact size of remote memory (instead of forcing PAGE_SIZE)
...
Change-Id: Ic66770af6cdb15b7a2e18a08cbcd1736e5558bdf
2021-02-03 18:53:33 -05:00
1cea75dd51
mcexec: fix strncat missing NULL and pclose of uninitialized
...
Change-Id: I9ce4004580845a983949caa5668b2f950880cd24
2021-02-02 01:51:57 +00:00
661ba0ce4a
docs: add editing spec file when building rpm
...
Change-Id: Ic8dc9d8c6aef6d2180844891d743a09f4a3bdd9d
2021-01-29 01:23:35 +00:00
7e82adc761
prerelease: 0.92: fix uninitialized usrdata->cpu_topology_list
...
Change-Id: Ia12970bda1225898823a67c2d0461144fc62ebb9
2021-01-29 09:50:53 +09:00
1f9fbe82db
mcctrl: fix access to uninitialized usrdata->cpu_topology_list
...
Change-Id: I25a9182b9b470bb069f4f755a67fb50b88817cd2
2021-01-29 09:34:24 +09:00
aa3d4ba7bd
spec: prerelease 0.91 for 4.18.0-240.8.1.el8_3.aarch64 support
...
Change-Id: I8b33714157b1c68c1fc1eadf0b9d072a3ee59608
2021-01-26 02:34:35 -05:00
c89ac042f9
spec: prerelease 0.9 for testing hidos and cgroup check
...
Change-Id: I3b04fbf3a1ffa10df9c76da7b2730b9a2521bf98
2021-01-20 13:03:16 +09:00
0f1fc88ce9
spec: prerelease 0.8 for testing hidos and cgroup check
...
Change-Id: I6261380ab8e99d39191cbd8aac851038cdeb5ce2
2021-01-19 17:34:45 +09:00
bbc6565e7e
docs: users: add how to specify boot parameters with Fujitsu TCS
...
Change-Id: I0216603388780d0e5497373598c3151812238932
2021-01-19 04:03:05 +00:00
1a29f8213f
spec: prerelease 0.7 for testing hidos and cgroup check
...
Change-Id: I17f1608051a8f8ca33d2ba7385b75b8b492d1886
2021-01-19 12:25:06 +09:00
fd21fe7411
copy_user_ranges: copy straight_start of struct vm_range
...
This fixes the panic in ihk_os_set_ikc_map01 of the ihklib test suite.
Change-Id: Ic03efc81c5ca2c4deaeb06673afef8cef7a1cf92
2021-01-19 00:59:46 +00:00
2460228052
mcctrl: abort on invalid addr in mcexec_transfer_image()
...
Change-Id: Ic064b6ffc30368ff1d3dfb14403e524cbb837ce5
2021-01-19 00:55:20 +00:00
bf926f234a
Tofu: manage stag ranges in VM range split and misc cleanup
...
Conflicts:
kernel/process.c
Change-Id: I480850fe93a7963a5bd4d1687fb1e5c43f58057f
2021-01-19 00:55:20 +00:00
507b937509
Tofu: mcctrl side MMU notifier and CQ/BCH cleanup
...
Conflicts:
executer/kernel/mcctrl/arch/arm64/archdeps.c
executer/kernel/mcctrl/syscall.c
Change-Id: Ided8172331a5469c6ced68fa98a42302812efe71
2021-01-19 00:55:20 +00:00
a99cf99396
cmake: add switch to turn on/off krm workaround
...
Change-Id: I2dfd3d7f3373cce714247f9fc36bf5040a2a8fad
2021-01-19 00:52:53 +00:00
6f373186bf
docs: add specifications of IHK and McKernel
...
Change-Id: I523ad68c5627ca1081c0c8684606a08101982ec9
2021-01-18 08:24:37 +00:00
6667321dc1
spec: prerelease 0.6 for testing capped best-effort memory reservation
...
Change-Id: Iaa91b311ee6879e84ce862aeabb4bd1fcd95d35f
2021-01-07 11:14:22 +09:00
f849745b60
spec: prerelease 0.5 for testing capped best-effort memory reservation
...
Change-Id: I139d6e24fbadb7313116029005e115053f31a899
2021-01-07 10:56:27 +09:00
78bc06d998
cmake: set default value of ENABLE_FUGAKU_DEBUG to OFF
...
Change-Id: I70703410922aa1d1440d61ead6e225d92cf60003
2021-01-07 10:42:36 +09:00
d726bd3d11
profile: fix definition of PROFILE_ENABLE and __NR_profile
...
Change-Id: I3f9f5870f8380d3668e1ccb06fd0f6d3307e3fa4
2021-01-06 01:03:17 +00:00
df37d6867f
docs: add scheduling limitations
...
Change-Id: Ida4a16efa4d47f448da7417a3b4bdb5fb5304fcd
2021-01-06 09:58:38 +09:00
a4b5410d0c
docs: add mlockall/munlockall limitations
...
Change-Id: I01d1c4eb6955baee89f6827748ac8ce4082884da
2021-01-04 12:57:32 +09:00
d73e6a161c
spec: prerelease 0.4 for testing capped best-effort memory reservation
...
Change-Id: Iec35ea1b7fa6b8930153461c395675f1576042ba
2020-12-29 17:12:14 +09:00
67334b65c3
rus_vm_fault: vmf_insert_pfn: treat VM_FAULT_NOPAGE as success
...
vmf_insert_pfn is added with the following commit.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1c8f422059ae5da07db7406ab916203f9417e396
Refer to the following page for the meaning of VM_FAULT_NOPAGE.
https://lwn.net/Articles/242237/
Change-Id: I2b0144a20a57c74e0e2e0d2fc24281852f49b717
2020-12-29 16:31:41 +09:00
fe3992a3a2
cmake: add switch to turn on/off Fugaku debug modifications
...
To prevent "TO RESET: send SIGSTOP instead of SIGV in PF" from making
some tests expecting SIGSEGV fail.
Change-Id: I8bb111cff59fe5b0b2bf6bc652dfd2fa308321ed
2020-12-29 16:31:41 +09:00
5d58100c20
cmake: add switch to turn on/off Fugaku hacks
...
Change-Id: I2a1ac906a19c4e45ee62acdbf0bc6f77f61974f8
2020-12-29 16:31:41 +09:00
1b106d825c
Tofu: fix phys addr calculation for contiguous pages in MBPT/BCH update
...
Change-Id: I70def9d02bdd7e1e969dedfc277a20df6ed2dff8
2020-12-29 16:31:41 +09:00
a680395093
Tofu: kmalloc cache for stag range
...
Change-Id: Ib5ea12c7c8cdafa7b699308c4eeb6e9ab39905c7
2020-12-29 16:31:41 +09:00
fd5a1c4b0a
TO RESET: send SIGSTOP instead of SIGV in PF
...
Change-Id: I5f7e07cb89f5f38b7c631d838f0eee0a2a98e246
2020-12-29 16:31:40 +09:00
b3b1883ad8
eclair: turn off gdb pagination by default
...
Change-Id: I7758d97b90705310bc57cb9b6da6f6af436ea7fb
2020-12-29 16:31:40 +09:00
7145c4d383
TO RESET: stack changes
...
Change-Id: I325420701dfa5e9eac294be086a9d1e7326d95bc
2020-12-29 16:31:40 +09:00
0b82c8942b
Tofu: keep track of stags per memory range
...
Change-Id: I033beaeee3b141dab4485dd3a2a3848eaa84e54e
2020-12-29 16:31:40 +09:00
75694152f0
Tofu: match page sizes to MBPT and fault PTEs if not present
...
Change-Id: Ia7aa92005a9941d6399063fec9a0776e73fc88fe
2020-12-29 16:31:40 +09:00
1cf0bd5a78
TO RESET: add debug instruments, map Linux areas for tofu
...
Change-Id: I09880cad3b87182cb663d414041254817c254759
2020-12-29 16:31:39 +09:00
25943634e9
TO RESET: do_mmap: show debug message when profile is turned on
...
Change-Id: I18f498f3a8660114b5e038e74179df95a645d232
2020-12-29 16:31:39 +09:00
72f95f92f8
TO RESET: hugefileobj: show debug messages
...
Change-Id: I904c811c13a59c0db74052bc92f6661a3e1b5d34
2020-12-29 16:31:39 +09:00
ab1014863d
TO RESET: page_fault_handler: send SIGSTOP instead of SIGSEGV for debug
...
Change-Id: Ie281dbf43280464c8f412c8444a6861e43f28beb
2020-12-29 16:31:39 +09:00
4cd7051c2d
TO RESET: setup_rt_frame: show debug message
...
Change-Id: I07d4f2dbba9bdb72f8a2892e6b5bd429b8e0aeec
2020-12-29 16:31:39 +09:00
d5716d3c3a
TO RESET: mcctrl_get_request_os_cpu and __mcctrl_os_read_write_cpu_register: show debug messages
...
Change-Id: Ic8430e3fd6a814b888192233b029c942500a2dc9
2020-12-29 16:31:39 +09:00
2a984a12fe
TO RESET: unhandled_page_fault: show instruction address
...
Change-Id: I29a8d30d9b3e5cfbe5e16b1faaa253e794b8fc5b
2020-12-29 16:31:38 +09:00
3949ab65a8
TO RESET: Add kernel argument to toggle on-demand paging for hugetlbfs map
...
Change-Id: Id748e0a2afc4ea59142fedb652a15b4007c5dee4
2020-12-29 16:31:33 +09:00
ed923ac82f
TO RESET: hugefileobj: pre-allocate on mmap
...
Set this change to "TO RESET" because one of the Fujitsu tests fails.
Change-Id: Iddc30e8452b3d39da4975079d0c6a035e4f3dbde
2020-12-25 11:34:14 +09:00
191e6f7499
TO RESET: preempt_enable: check if no_preempt isn't negative
...
Change-Id: I1cef2077c50f3b3020870505dd065d10617f440e
2020-12-25 11:34:14 +09:00
4f7fd90300
TO RESET: lock: check if runq lock is held with IRQs disabled
...
Change-Id: I9a79ceaf9e399ad3695ed8959ca10c587591751a
2020-12-25 11:34:09 +09:00
8f2c8791bf
TO RESET: arm64: enable interrupt on panic
...
Change-Id: I1ceb321de324f307fc82366b162c72f64184247b
2020-12-24 17:18:37 +09:00
bbfb296c26
TO RESET: mcreboot, mcstop+release.sh: add functions
...
Change-Id: Ic3992dc4e16b7ade00e93edbd107c64a32068c02
2020-12-24 16:53:27 +09:00
10b17e230c
TO RESET: physical memory: free memory consistency checker
...
Change-Id: I15aa59bb81be4d8f2acfe8d161c8255f70f9e7d3
2020-12-24 16:53:12 +09:00
b268c28e7e
TO RESET: mmap: ignore MAP_HUGETLB
...
Change-Id: Ifd50f24de0747b06d71ebba441ae2ef451f66c4d
2020-12-24 16:51:51 +09:00
2fa1c053d7
spec: prerelease 0.3 for testing ihk_reserve_mem and memory policy
...
Change-Id: I4fbcfa1f93522fd01af42d1ef13d0be075086773
2020-12-24 15:11:01 +09:00
530110e3a9
Tofu: fix ENABLE_TOFU switching
...
Change-Id: Ib33323d4b59ea8fb4f5f40dff7ea25a36773d5e2
2020-12-24 15:00:14 +09:00
f6ed44aeec
spec: prerelease 0.2 for testing ihk_reserve_mem and memory policy
...
Change-Id: I9ff171c5d65b5f465ce7a2767be1a710de0a0400
2020-12-24 11:23:17 +09:00
33dd2e60b1
mcexec: memory policy control by environmental variable
...
Refs: #1470
Change-Id: I3d556cae90d31d81572b1c4e5c680e826577d428
2020-12-24 11:18:01 +09:00
ed670c03af
spec: prerelease 0.1 for testing ihk_create_os_str
...
Change-Id: I3c9bbc6f3c9e8951c0ad700b9c02fcdec65018ff
2020-12-23 11:33:31 +09:00
e5f4a4e87d
Tofu: proper cleanup of device files when mcexec gets killed
...
Change-Id: I6cb0290f72d96682700f945b29585e132e525ac1
2020-12-09 13:05:54 +09:00
1918df7765
Tofu: support for barrier gate, kmalloc cache
...
Change-Id: I6f4cfec2ec404efd03b332fc3f449a775816230e
2020-12-09 13:05:54 +09:00
5d784f3ea4
kernel: increase stack size
...
Change-Id: I27698149e9206138402dcc65db0078d5dbf548cb
2020-12-09 13:05:53 +09:00
10c09aa10e
MM: generic lockless kmalloc and page cache
...
Change-Id: I71ad498fdd10136d9c72ffe2b16b9122d1bc9673
2020-12-09 13:05:53 +09:00
41f5c0bdde
MM: deferred zero cleaning on Linux CPUs
...
Change-Id: Icdb8ac807688533be7a95b7101edfd904250cd02
2020-12-09 13:05:53 +09:00
e7b8aeb4f7
Tofu: per-fd path memory leak fix
...
Change-Id: I451472365806333adfac6dae32746195e3c30694
2020-12-09 13:05:53 +09:00
1b3dd45dbc
MM: straight mapping memory leak fix
...
Change-Id: I7d841fbedb1db498b5994eb69b0350df7a5cefb0
2020-12-09 13:05:53 +09:00
623d6f8bc3
arm64: record register state at kernel mode page fault (for eclair)
...
Change-Id: I066bceecc0377110faaca0b21d45a476d000e684
2020-12-09 13:05:53 +09:00
92902d36fc
Tofu: initial version
...
Change-Id: I9c464d5af883c18715a97ca9e9981cf73b260f90
2020-12-09 13:03:01 +09:00
fe83deb3db
profile: make header user-space includable
...
Change-Id: I4a88d9be7c169f29ef6f6328e8576a3fe3b6e34f
2020-12-08 12:32:10 +09:00
e056cb799f
memclear: non-temporal memory clean (arm64)
...
Change-Id: I8f80ff20e98bc01088450282e1790c27c67c16eb
2020-12-08 12:32:10 +09:00
201f5ce500
MM: straight mapping
...
Change-Id: I70871f8c382fb00aa719ed501cc5de436d916d7f
2020-12-08 12:32:10 +09:00
100bbe6231
MM: zero memory at free and deferred zero
...
Change-Id: Ib0055d6f2bdd10d05d749dcd1f3d5c3d318f22f3
2020-12-08 12:32:10 +09:00
fbd121d28c
mmap: return -EINVAL for non-anonymous, MAP_HUGETLB map
...
Change-Id: I2bcbbf0ee9c0f47160eabac4a8d09991c71fe852
2020-12-07 15:23:38 +09:00
d1d93d90cc
mcexec: detect mismatch of mcexec -n and mpirun -ppn
...
Change-Id: I0ce1b2d48cda10713920cb88692e107b8c4d3bab
Refs: #929
2020-12-07 15:23:34 +09:00
45bc6a617a
__return_syscall: check input & fix unmap memory in error cases
...
Change-Id: I5de3ab3acd46770518b79bdc6f1c2e00c1cd5096
2020-11-25 01:58:47 +00:00
924ba7fd65
mcctrl_ikc_send_wait: free desc only if we allocated it internally
...
Change-Id: I4710ea6bb31f098451347c53ac0ff0be422aec06
2020-11-25 01:58:47 +00:00
2814f7cac4
mcctrl_get_request_os_cpu: check os instance & ret_cpu
...
Change-Id: I4d3f6fd93eaa183d560c874ba33add83c4308c5a
2020-11-25 01:58:47 +00:00
b510de7bd5
mcctrl_perf_get: check os instance & cpu info
...
Change-Id: Ic4f9d818b7d58f8ae651e43175fb1c478baec9c1
2020-11-25 01:58:47 +00:00
3e927f61dc
mcctrl_perf_disable: check os instance & cpu info
...
Change-Id: I7195272a65b31db72158f5e5bbfc490bac547b91
2020-11-25 01:58:47 +00:00
64579830dd
mcctrl_perf_enable: check os instance & cpu info
...
Change-Id: I31ab829d63833f924af17445fd9b8488d6eb454f
2020-11-25 01:58:47 +00:00
3cc98883f5
delete_procfs_entries: fix possible crash if top entry has no children
...
Change-Id: I209842699615f9bb58c12ccd262ae4b17f8f558c
2020-11-25 01:58:47 +00:00
442045a320
mcctrl_ikc_send: validate os and check input packet
...
Change-Id: I1f8c2228043841685617b665eeeaf2ce15a08703
2020-11-25 01:58:47 +00:00
fe5d8fc71f
mcctrl_getrusage: validate os input
...
Change-Id: I97908069f8bc4703b99f9ffca94f3dd33eb64cc4
2020-11-25 01:58:47 +00:00
550c6cc5fb
mcctrl_perf_set : validate os input & check cpu info
...
Change-Id: If308013746ff6dce03fa8e0eb1ebaca1cb2a4a64
2020-11-25 01:58:47 +00:00
8c0b2ab6ce
mcctrl_perf_num: check "os" argument
...
Change-Id: I13c8b0c337cac9bbb240667808e871defce34aab
2020-11-25 01:58:47 +00:00
239b1b265f
release 1.7.0
...
Change-Id: I8413aa2d051c6164235816bae2823187870efe49
2020-11-25 10:51:40 +09:00
f646fd141b
prerelase 0.96: ihk_reserve_mem: balanced, capped best effort
...
Change-Id: Ia98c87e651d8dd34dfd36bc0c45f1d23e245330d
2020-11-24 03:40:01 +00:00
734d1cc056
ihk submodule update: ihklib: ihk_create_os_str: add ihk_reserve_mem_conf equivalent
...
Change-Id: Iede1a043b0316d6541656e86091f2288fd299383
2020-11-24 03:40:01 +00:00
040a9c0c7f
cmake: set QEMU_LD_PREFIX when cross-compiling
...
Change-Id: Ie7b86ddba344e02d6f739225e44f3ad4927f5a2f
2020-11-20 07:59:55 +00:00
8784ee4710
spec: prerelase 0.95 for testing /dev/mcosN related fix
...
Change-Id: I02397984cd5c4c3a3e83968ff03cf9a68e84d200
2020-09-07 16:12:09 +09:00
3a761c138e
ihk submodule update: ihklib, ihkmond: fix /dev/mcosN related issues
...
Change-Id: I533b277f249dc4afc84929dd2bf22c19648e21d1
2020-09-07 16:11:36 +09:00
e21a3a5af3
spec: prerelase 0.94 for testing ihk_create_os_str
...
Change-Id: If30f6ccf269dbdbbd564498318b741a88d46a2a1
2020-09-04 12:04:01 +09:00
cd33c88025
ihk submodule update: ihklib: turn off debug messages
...
Change-Id: I9adc4843bd4e2d2606e0100f855c83b47a144863
2020-09-04 12:03:58 +09:00
d78a0fb74c
docs: NEWS.rst: add 1.7.0-0.93 updates
...
Change-Id: If4f41f6d26c2da60711568f02444cf033d82a3d5
2020-09-02 01:47:20 +00:00
9f815324a4
spec: prerelase 0.93 for testing ihk_create_os_str
...
Change-Id: Id31646c88da0640a3d58e7805fa61f0e0583ff1c
2020-09-01 15:53:10 +09:00
2748f06c1f
ihk submodule update: ihklib: add ihk_create_os_str
...
Change-Id: Ia219a4463562de3b9d94f8b57ba52ff19f07e721
2020-09-01 15:06:32 +09:00
a7f892113a
spec: prerelase 0.92 for testing RHEL-8.3 compat
...
Change-Id: Ie4dbfb253aa3ddd384ed1ad481e87e5f0e042e03
2020-08-31 02:11:09 -04:00
89c696afc5
ihk submodule update: gic_chip_data: compat: RHEL-8.3
...
Change-Id: Ibdf67f012d66c01ed3f6a486624e6a32a42ba0e7
2020-08-31 02:04:34 -04:00
e17e86840b
docs: switch to https://ihkmckernel.readthedocs.io and add contents
...
Change-Id: I9515034ac372dbe554e1010f646b382c5dc94458
2020-08-19 12:44:03 +09:00
0de6c6b8f9
spec: prerelase 0.91 for testing removal of mcexec -n option
...
Change-Id: I2b18b5fefec570bfb7a4aa0823fe97d9ea93e208
2020-08-12 13:12:06 +09:00
5ffad78b87
mcexec: use FLIB_NUM_PROCESS_ON_NODE when -n not specified (Fugaku specific)
...
Change-Id: I1668fecfac692d56076dd10e6e03fbf992e323ec
2020-08-12 07:30:11 +09:00
542418b1fc
spec: prerelase 0.9 for testing libdwarf related package requirements
...
Change-Id: Iaaa116018505c4f89813883f5a99c8194cb4f99e
2020-07-29 12:22:08 +09:00
b95a2fcfab
spec, README.md: fix libdwarf related package requirements
...
Change-Id: I460d440e33d0ff5e8ab3d4f7b328f7f2ea11bc16
2020-07-29 12:08:04 +09:00
1b11496f26
spec, README.md: add package dependency including libdwarf
...
Change-Id: Ie612c5dc642a9f5d6d2ba31747adb991cb568113
2020-07-22 06:59:37 +00:00
7c0e624b13
spec: prerelase 0.8 for testing mcexec -n issue
...
Change-Id: Ie54f7bc74097c8390f75ddbd0d6e58a8ea87ea7c
2020-07-21 13:31:45 +09:00
0b66bab992
Revert "mcexec: detect mismatch of mcexec -n and mpirun -ppn"
...
This reverts commit 1d135492c3 .
Conflicts:
executer/kernel/mcctrl/control.c
Change-Id: I224cced408aa4b77691a153c5e1d2fdf8043fa04
2020-07-21 13:08:21 +09:00
63ed4e7af0
spec: prerelase 0.7 for testing hugetlb map for stack
...
Change-Id: I4997340cd984ca8915e45749b91b1d72c1de85af
2020-07-20 08:11:40 +09:00
d7cf39883f
Revert "shmobj: Support large page"
...
This reverts commit 9a60997ea0 .
Change-Id: Id60959b4e03451987239faa0bbc2e780b72fafaa
2020-07-19 12:53:45 +00:00
40f8091fab
stack: grow on page fault
...
The steps of the technique to replace stack with hugetlbfs map are as
follows:
(1) Prepare a hugetlbfs map with the size of rlim_cur
(2) Copy the active region of the stack to the hugetlbfs map.
The range to copy is determined by reading /proc/[pid]/maps.
(3) Replace the stack map with the hugetlbfs map
The step (2) tries to copy a huge region if McKernel doesn't grow the
stack at run-time.
Change-Id: I5858c35b5c26dd0a42cccf9e3cc4c64b1a81f160
2020-07-19 12:53:31 +00:00
a20e1acf01
syscall: add prlimit64
...
Change-Id: Iad882813d54b439c236c0df74dc81508190e6707
2020-07-19 21:52:46 +09:00
b3d7bbda56
rus_vm_fault: compat: RHEL-8.2
...
This applies the following patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1c8f422059ae5da07db7406ab916203f9417e396
mm: change return type to vm_fault_t
Change-Id: I7189fc92824d21b4906f1033f1de5899bbad4680
2020-07-15 13:02:32 +09:00
9a60997ea0
shmobj: Support large page
...
Mixing page sizes is allowed by shmobj.
Change-Id: Ic48b71da2db6ce3f68fa3dbc8ad5ae96347d6018
Refs: #1381
Refs: #1458
2020-07-15 03:50:56 +00:00
4b66373813
mcexec: Don't forward SIGTSTP SIGTTIN SIGTTOUT to mckernel
...
Change-Id: I72bb74d6b98e1f0bf519c8f0fef742624a2a699a
Refs: #1425
2020-07-14 08:34:11 +00:00
b44b11ace7
set_robust_list: Add error check
...
set_robust_list is not supported by McKernel.
Change-Id: I1f679e2e4df24139cceb1f2294bc072cb7956002
Refs: 1399
2020-07-14 01:06:49 +00:00
ebc91cea0e
tgkill: Fix argument validatation
...
Formerly, if tgid is specified as -1, tgkill() was equivalent to tkill().
Now it is treated as an error EINVAL.
Change-Id: I47bc75d439662a36dc6167c4446a5277422de507
Refs: 1380
2020-07-14 01:03:47 +00:00
58106d791a
struct process: fix type of group_exit_status
...
Change-Id: Ib8492cbb077106cef1d0fa2d6d5e8e13bbb209c0
Refs: #1377
2020-07-13 08:33:07 +00:00
56b51d4f97
spec: prerelase 0.6 for testing cpuinfo and mmap overcommit
...
Change-Id: Iab5acc2c08ebe19251c37782cff87a4b5c914448
2020-07-13 10:14:23 +09:00
bafe540d86
mmap: allow unlimited overcommit
...
Change-Id: Iba07b5c504b4a202cd163ce682f3fc72a31284a0
2020-07-10 14:52:57 +09:00
d78a0fd05d
sysinfo: support basic entries
...
Change-Id: I27f3e55058cc29f895831a1dddfafbc8585746a5
refs: #1389
2020-07-10 14:51:25 +09:00
999bc91b4f
arch: Move some functions from arch-dependent to common part
...
Moved syscall rt_sigaction and functions related to signal.
Change-Id: I39f619e008d9c6018d91099a76dfb30e48757673
Refs: 1487
2020-07-10 03:54:28 +00:00
b3bd2ea9b3
procfs cpuinfo: use sequence number as processor
...
Change-Id: Id54ea74c5fda198a0bb9c9b6a19e6799fee0ed3f
2020-07-09 13:10:08 +09:00
d3d9e2400d
test: ihklib: syscall_list.h: add robust marker for patch
...
Change-Id: Ie5f72b4b296db4d44e9839f38fd9a68854be78c3
2020-07-06 16:25:11 +09:00
199407b2a1
spec: prerelease 0.5 for testing ppoll
...
Change-Id: I51deb1c1703a986ba0aa4e02da9f53009554dbb7
2020-07-01 08:49:08 +09:00
5973d66e2d
Revert "epoll_wait(): make sure to schedule in offload"
...
This reverts commit 5e44c9c9f9 .
Change-Id: I826336f1ece31a84072c3e62c6c6c68a641e8fb5
2020-06-30 17:11:26 +09:00
d7ef74659b
Revert "epoll, ppoll: deschedule on offload, don't do it when exiting system call"
...
This reverts commit d4056acfc3 .
Change-Id: I7df15b9d3957ca571f4b4e2d576799f8b97ae299
2020-06-30 17:11:23 +09:00
ac86affecc
mcexec: fix FLIB_AFFINITY_ON_PROCESS mask for McKernel CPU numbers (Fugaku)
...
Change-Id: If42b139fb53866bcff0809d898d4a2a712946f0c
2020-06-30 16:29:03 +09:00
2026cf8dad
mcexec: explicit CPU list in partitoned execution (for Fujitsu's FLIB_AFFINITY_ON_PROCESS)
...
Change-Id: I05c11f73553de8ccb5f79083ce2115ac57e62584
2020-06-30 16:29:00 +09:00
1d135492c3
mcexec: detect mismatch of mcexec -n and mpirun -ppn
...
Change-Id: I0c42e3119143da40ea2e69cd9ec99bde78a0ad2a
Refs: #929
2020-06-30 16:28:08 +09:00
1cfc5ca71f
spec: prerelease 0.4 for testing cross-compile
...
Change-Id: I26908b6b415483711f55338e45d7b2d862b5c028
2020-06-23 08:34:10 +00:00
7ee533d620
spec: remove unnecessary mcinspect*.debug file
...
Fixes: 612f364 "spec: include recently added debug tools"
Change-Id: I29779132567d18f9468e3cecf2c713ad1c51729b
2020-06-23 08:34:10 +00:00
28334c7a29
cmake: treat libdwarf as required library when cross-compiling
...
Change-Id: I23ffb46c867b05de0e732c96912d62c630ebb44c
2020-06-23 16:18:35 +09:00
697e9386b3
cmake: fix resovling dwarf.h
...
Fixes: 0e787b7 "cmake: fix resolving libdwarf"
Change-Id: Iccb491c8ad07db0f15f6b1798ee8a91edc808cf7
2020-06-22 13:33:50 +09:00
0e787b731e
cmake: fix resolving libdwarf
...
Change-Id: I14573f1ac7d779b4c90ed44cc310d4f584374559
2020-06-19 17:24:21 +09:00
612f364e6a
spec: include recently added debug tools
...
Change-Id: I0318fe3551a75c7da774d26bc834c099bb235b67
2020-06-19 13:37:52 +09:00
ceee4c379f
spec: prerelease 0.3 for testing fixes related to Fujitsu TSC and ihkmond
...
Change-Id: I4b9fcac086a3567e6e797f3e7515949c9e214c36
2020-06-18 16:23:43 +09:00
36c981bc34
sync with ihk
...
Change-Id: I052394121016a030d8873296b4a17b1f038d6b13
2020-06-18 16:23:43 +09:00
fd941dad44
Revert "procfs cpuinfo: use sequence number as processor"
...
This reverts commit bb7e140655 .
Change-Id: If0c1719986706511c1e57d06bc61923d1adfc0aa
2020-06-16 13:26:55 +09:00
5f5b9f94d1
Revert "get_one_cpu_topology: Renumber core_id (physical core id)"
...
This reverts commit 0a4e6b49b4 .
Change-Id: Icd9f2cda63d0daf661a40b146c72608b82cf2061
2020-06-16 13:26:55 +09:00
3f3c4acd71
madvise: do nothing (workaround for Fugaku)
...
Change-Id: Id2265e7eca4ae296dd22a8e99a2294a9a8b4c4dc
2020-06-16 13:26:54 +09:00
00007dafaa
mbind: do nothing (workaround for Fugaku)
...
Change-Id: Id9d018304e18ed52ea7b0a872e03675c903bce6e
2020-06-16 13:26:54 +09:00
cbe2b2149d
Revert "sysinfo, procfs: Support memory info partially"
...
This reverts commit 8f74888f87 .
Change-Id: I65530dd8a4e1af2ca47cb02c02f5c54a9b4595a5
2020-06-16 13:26:54 +09:00
4cecde3fba
Revert "mcexec: detect mismatch of mcexec -n and mpirun -ppn"
...
This reverts commit 72af689e69 .
Change-Id: I25bc56cd8ac9c877852fc1092c8349fe318fd25d
2020-06-16 13:26:54 +09:00
8022a2a8c0
treat libfj90 as helper thread spawner (Fugaku specific)
...
Change-Id: I1f6170c7ebbfae4f575f13ac1f3106d292cd5b6a
2020-06-16 13:26:53 +09:00
3328ce03d9
Record pthread routine address in clone(), keep helper threads on caller CPU core (workaround for Fugaku)
...
Change-Id: I29d1589e430dc1396558cdf3df4d068c27173612
2020-06-16 13:26:53 +09:00
97b107f61c
treat /var/opt/FJSVtcs/ple/daemonif/ as device file (Fugaku specific)
...
Change-Id: I047ec793a082f2fede3f2bd9c5fb358a30b8ea84
2020-06-16 13:26:53 +09:00
6f3be17c19
do_process_vm_read_writev: don't check vm_range (workaround for Fugaku)
...
Change-Id: I4ce9b5397ed876dff651c67658e43811d83658dd
2020-06-16 13:26:53 +09:00
dea7d00545
force allow_oversubscribe (workaround for Fugaku)
...
Change-Id: I5288f5ccbd967004fabbe71bca267feed3b9c2f8
2020-06-16 13:26:53 +09:00
4512778569
force time_sharing (workaround for Fugaku)
...
Change-Id: Ie3e3a0bbf00ef4e988bdee40d9d4dc93258dd4be
2020-06-16 13:26:52 +09:00
a7adb266ff
mcinspect: add read memory value by specifying physical address
...
Change-Id: I2f2d6cb981e883c5e2ae1e0c764e10e0fec76a46
2020-06-16 13:26:52 +09:00
2566f4f213
devobj_free: don't report error on release-offload failure
...
Change-Id: I4179dab8cc46557a72eb3447ff0803743a1ba1a2
2020-06-16 13:26:52 +09:00
ac0081eddd
handle_interrupt_gicv3: don't take runq_lock
...
To avoid dead-lock with the function taking the lock with
ihk_mc_spinlock_lock_noirq().
Change-Id: If689e8cc5fff81f627bcf98bfa7df7d4c13f4209
2020-06-16 13:26:52 +09:00
d4056acfc3
epoll, ppoll: deschedule on offload, don't do it when exiting system call
...
Change-Id: Ib1d0553ca5c50f4de055a1a5fe40b406c9c26dc7
2020-06-16 13:26:52 +09:00
1910543380
armv8pmu_write_counter: sign-extend properly
...
ihk_mc_event_set_period() calls armv8pmu_write_counter() by
cpu_pmu.write_counter(..., (uint64_t)(-left) & max_period)
Change-Id: I2ac8fbe5957db044ac54946f620163e3c486cb5f
2020-06-16 13:26:51 +09:00
6332903f0d
Revert "xpmem: Support large page attachment"
...
This reverts commit a8696d811d .
Conflicts:
kernel/include/process.h
kernel/syscall.c
kernel/xpmem.c
Change-Id: I726e74450f6228d3fc78fc62dda15b2067732a53
2020-06-16 13:25:57 +09:00
29d27b7c8d
Revert "xpmem: Use correct process_vm in xpmem functions"
...
This reverts commit 0c63a2a3cd .
Change-Id: I7a67def6c45a67396b15cc55e96ffb5fc5898f28
2020-06-16 13:25:51 +09:00
7136384384
Revert "xpmem: Make sure vm_range is used under memory_range_lock"
...
This reverts commit 91ea69cf8f .
Conflicts:
kernel/xpmem.c
Change-Id: Iff3eed010ad3610d63e165f53484ac56528ce384
2020-06-16 13:22:49 +09:00
2fe5c8de2e
Revert "xpmem: Fix deadlock in xpmem_remove_process_memory_range()"
...
This reverts commit d052acab1d .
Change-Id: I31e982465ef9e0936145f27c8d1587c01737ec81
2020-06-16 12:13:49 +09:00
e774e1b984
Revert "xpmem: fix mapping of attachment and segment"
...
This reverts commit a5fcc91656 .
Change-Id: If29415369d724391b291939ecce76482138e82f5
2020-06-16 11:28:02 +09:00
33b7414615
Revert "xpmem: map only resident segment pages at attach time (workaround for Fugaku)"
...
This reverts commit 3c646e2485 .
Change-Id: Ibae8100403586775a32d6eb36c74383131066ac9
2020-06-16 11:27:59 +09:00
3c646e2485
xpmem: map only resident segment pages at attach time (workaround for Fugaku)
...
Change-Id: I50ac8ba88b208608206b68b4c57e278041913503
2020-06-16 09:17:26 +09:00
a5fcc91656
xpmem: fix mapping of attachment and segment
...
* Mapping attached part of segment is done at attach time instead of
make time to work with runtimes (e.g. OpenMPI) xpmem_make-ing the
entire user-space
* Mapping attached part of segment at attach time can be turned off by
specifying xpmem_remote_on_demand in kernel argument
* Mapping attachment chooses appropriate page-sizes, i.e., largest
allowed by memory range and segment page boundary
Fixes: a8696d8 "xpmem: Support large page attachment"
Change-Id: I44663865204036520e5f62fe22b9134ee4629f9b
2020-06-15 10:11:29 +09:00
d370e9241f
Toggle preemption while faulting pages
...
Change-Id: I74201061bb3e7c7c4032e3884658ace87cb85948
2020-06-15 10:11:29 +09:00
3e254c06bf
SCD_MSG_WAKE_UP_SYSCALL_THREAD: hold target thread through wake-up
...
Change-Id: I35b2c56f78430135b2d197d2a2cfe364dbd03947
2020-06-15 10:11:29 +09:00
07537cd2e7
eclair-dump-backtrace: expect script to dump backtrace on all CPUs
...
Change-Id: I358c5d5ca81903b0eaab88d227c36373164c0950
2020-06-15 10:11:29 +09:00
a37f72da0e
futex_wake(): disable IRQs while iterating plist
...
Change-Id: I796794b2159816183c6487ef0048f42f97aac73b
2020-06-15 10:11:28 +09:00
ab11b168f0
ptrace_setoptions: debug msg
...
Change-Id: Iea5fdb26884c7af6e3d5aa26b5f71932f730cc9d
2020-06-15 10:11:28 +09:00
eac414d6d8
CPU read/write reg: use generic IHK messaging interface
...
Change-Id: Ia9637d1516d9329fdadf37822bfce7594d69105f
2020-06-15 10:11:28 +09:00
bb725f5f50
crash: print actual PTE in lookup mode
...
Change-Id: Ie2c1b97780347d6172ef8961ed62258117cbf115
2020-06-15 10:11:28 +09:00
5224551782
mcinspect: vtop (in progress)
...
Change-Id: I09f487e96edc7c4f59c97e6fb6dde28baf84c1e5
2020-06-15 10:11:28 +09:00
91146acfe5
Make struct ihk_os_rusage compatible with mckernel_rusage (workaround for Fugaku)
...
Change-Id: Iebae1e8b0aaf9c23cb1c9411aa1ad111b2e61028
2020-06-15 10:10:57 +09:00
f64731ab34
do_migrate: kick scheduler on target CPU
...
Change-Id: Ib5875ecf0c6a3118d32973329a6f1595a910562f
2020-06-15 09:58:55 +09:00
cd46cbd4b3
mcinspect and mcps: DWARF based LWK inspection
...
Change-Id: Ie9e209d8f77999b61afa39c38832bfc416a2c34f
2020-06-15 09:58:54 +09:00
39780917af
libdwarf: compile locally if not present
...
Change-Id: I70d1f653f4fc4ee4daeaa2c9c6bdbf1416e43c9b
2020-06-15 09:58:52 +09:00
0f8f6d298e
CMakeLists.txt: fail on missing libraries at config time
...
Change-Id: Ia7e4cf469d94f97fa1c565e59d2d4587f3a3d081
2020-06-13 17:18:10 +09:00
f8e8b21f04
/dev/shm: use Linux PFNs and populate mappings
...
Change-Id: I921c1f43c8411f896343be17e0ac6762a1bc26d1
2020-06-13 17:18:10 +09:00
5c2f9b8239
pager: prefetch all shared libraries
...
Change-Id: Ic62e1284d540362df817098b3926ac223245e3b6
2020-06-13 17:18:10 +09:00
1afc3d9b70
Keep track of number of context switches per CPU
...
Change-Id: I7a2194c8777a7efcd34e1ed7f4734da03fb4d433
2020-06-13 17:18:10 +09:00
17a8f68d60
set_timer(): treat spin wait as PS_RUNNING
...
Change-Id: Iea1ad5b0a49a12d5e1aef38ad68fccb8d789af5e
2020-06-13 17:18:10 +09:00
2b9a053504
syscall offload: avoid double IRQ enabling
...
Change-Id: I202c9f348b66672b1c9f8c146d4e28ec1d9c7658
2020-06-13 17:18:09 +09:00
6441aa1abb
__sched_wakeup_thread(): check if timesharing needs to be enabled
...
Change-Id: I081d700f345abbbdb14dcac3b6246b79475d059b
2020-06-13 17:18:09 +09:00
9b55b68934
Allow other threads to run while waiting for I/O in page faults
...
Change-Id: I51e847a02a698b0ecf1e356d51599aa1c9400b15
2020-06-13 17:18:09 +09:00
83ef96a739
fileobj: disable IRQs while holding page hash locks, schedule() in I/O loop
...
Change-Id: Iaf72d55980f1a5df6c93c4a57fa57b0ae5b1d229
2020-06-13 17:18:09 +09:00
b5337358cf
IKC: increase message queue sizes
...
Change-Id: Ib1eee4d26b8304cbee16fe50caabfc2c19e5c2e3
2020-06-13 17:18:09 +09:00
2db3717e57
handle_interrupt_gicv3(): check for CPU_FLAG_NEED_RESCHED as well
...
Change-Id: Id6ade08e4e572a6d837476de2872126442d3591c
2020-06-13 17:18:09 +09:00
5395891966
pager_req_map: fix printk
...
Change-Id: I98488169f02656c2df711b827d0002762de69f7a
2020-06-13 17:18:09 +09:00
c32a5e261b
PF handler: print VM range's file path if available
...
Change-Id: I5ba55b19a0b874bc9f4b58e94bfc4afc440e6a8a
2020-06-13 17:18:09 +09:00
c0c80b71ca
mmap and fileobj: handle MF_ZEROFILL properly
...
Change-Id: I6ee52b4cab212b1973339bc8d49065c1ec9263b0
2020-06-13 17:18:09 +09:00
d15a396d5a
pager: use host physical for PMIx shared memory
...
Change-Id: Idfebc768ba03b5536a0e5eb1c6076769806fa7aa
2020-06-13 17:18:08 +09:00
e35ec09da1
UCX: fix page size for shared memory
...
Change-Id: I75b0beef8345b391e7619887765ed1a89d74c29b
2020-06-13 17:18:08 +09:00
5e44c9c9f9
epoll_wait(): make sure to schedule in offload
...
Change-Id: I435416cb0ac005a03cd995bf1aae75c9ce7b2082
2020-06-13 17:18:08 +09:00
0f6c36870c
mcexec_syscall(): disable no per-process structure warning
...
Change-Id: I951575f0077054ebcfe4b3f7e29416799ab6ade8
2020-06-13 17:18:08 +09:00
2ec2112cc5
IKC: use atomic allocation during initialization
...
Change-Id: I5bb5d7040092d47e4cdbdad87f9d1dd5b2ceaee5
2020-06-13 17:18:08 +09:00
c86a38e18f
physical memory: guard rbtree allocator with IHK_RBTREE_ALLOCATOR macro
...
Change-Id: I468c6bf1f641875c02b091704ef63f59fd390be5
2020-06-13 17:18:08 +09:00
6aa7b50e26
profile: refactor display code and fix ARM support
...
Change-Id: Ic48102c42abe17eed014f2bfe7523d0d6f03c2e9
2020-06-13 17:18:08 +09:00
c3c57940ba
Memory ordering and usage of ASM cmpxchg() instead of compiler atomic intrinsics
...
Change-Id: I4dadebc32721744dad982f3fc5b3eea7ab7ca745
2020-06-13 17:18:08 +09:00
7aa2d64294
obtain_clone_cpuid(): avoid locking while partitioned execution
...
Change-Id: Iabb4784835be7dc9b2f555acc3a711fcc23ee7da
2020-06-13 17:18:08 +09:00
51fe77cdae
mmap()/shmget(): use Linux huge page size when not specified
...
Fixes: 089b443 "mmap()/shmget(): use Linux default huge page size when not specified"
Change-Id: If8043a0993d1131ea0344aa6d500b35c7a291884
2020-06-13 17:18:08 +09:00
d5aafca1ae
VM: use RW spinlock for vm_range_lock
...
Change-Id: Id4654084207d55bf77cc9f8b42795e0f9873cfa0
2020-06-12 03:07:33 +00:00
54b529c82d
An arch independent RW spinlock implementation
...
Change-Id: I426d3f7b643660e6685b5c39c0ae849a9f08b9bb
2020-06-12 03:07:33 +00:00
232bc9c44b
README.md: add how to checkout to specific branch or version
...
Change-Id: Ie727c266d576e601f4901e2f84b98c07ff49aa24
2020-06-11 18:45:52 -04:00
f34373d1c0
README.md: add how to install with rpm
...
Change-Id: Ic3c0ff6971686d6d64dfcdd5850ae4a70f05f40f
2020-06-11 04:38:08 -04:00
4698ae166c
spec: prerelease for testing hugefileobj premap fix
...
Test target: a2adb0a4 "hugefileobj: rewrite page allocation/handling"
Change-Id: Ibbae5222f54704248911da9f53ca8e4675627bc4
refs: #1475
2020-06-11 04:22:48 -04:00
db9ca358f9
sync with ihk
...
Change-Id: I769880c52c8cfd06523cea8d77cce5703e783532
2020-06-11 13:51:44 +09:00
16a6a1d08b
mcexec: Fix LD_PRELOAD string manipulation (again)
...
Fixes: 8cf70900 "mcexec: Fix LD_PRELOAD string manipulation"
Change-Id: I6e0188bd60f8e3977beb22c1f9212baf37f37093
2020-06-05 09:25:15 +00:00
2e2e973d78
hugefileobj: rewrite page allocation/handling
...
* manage pages by an array
* fix mmap of fd created by memfd_create() populates the map
* refactor pgsize and pgshift handling
Change-Id: Icaf015b10afc35f2b95f93059adf1a1b6b92e14e
refs: #1475
2020-05-19 23:36:25 -04:00
c3c0b7197f
test: perf: prevent overflow counter from stopping counter
...
Fixes: 1a204b6 "perf: overflow test"
Change-Id: I4d8e93b97f7a8d58ef7811f55b5c995b16c5af69
2020-05-14 01:10:14 +00:00
d086100b35
perf: REFRESH: Don't perform perf_start
...
Change-Id: I70194467d357770f982d90a6f9b132a61a817fc5
2020-05-14 01:09:52 +00:00
8f74888f87
sysinfo, procfs: Support memory info partially
...
Change-Id: I597dae4f82d64d3f23889cef960db18ae879ff06
refs: #1389
2020-05-14 00:53:25 +00:00
8e42c2a254
README.md: Add description of Utility Thread offloading Interface (UTI)
...
Change-Id: Ibeb6e6b91e5f280214e7f78049b6f35e648198c7
2020-05-12 14:14:08 +09:00
caf0f5ef63
cmake: do NOT install crash plugin sources
...
Fixes "Installed (but unpackaged) file(s) found" rpmbuild error.
Fixes: 04d17dd3 "Define MAP_KERNEL_START by resolving MODULES_END at cmake time"
Change-Id: I80df58ac3c581faf1c48080115b70724eac6aea5
2020-04-20 18:51:15 -04:00
3d030391e8
spec: Update version number to 1.7.0rc4
...
Change-Id: I1c999cfa632711195a9c8ec9de769075292c40b9
2020-04-17 11:57:53 +09:00
0aeab6b840
NEWS.md: Add 1.7.0rc4 updates
...
Change-Id: I66ccbe5e8454482155243b89d9b0398994186010
2020-04-17 02:43:56 +00:00
367bbda713
mcexec: Fix resolving library path for LD_PRELOAD
...
Fixes: 8ee1d61d "Revert "Detect hang of McKernel in mcexec""
Fixes: b87ac8b8 "reproductible builds: remove most install paths in c code"
Change-Id: I8ef9ab81cd0a41ccd0e227ebc3e45c0745c150e9
2020-04-16 20:46:46 +09:00
0082447043
mcctrl_get_request_os_cpu: Fix debug message
...
Change-Id: I0d2ae427b97b7284d61dd13825d4ba3d2130f26a
2020-04-16 07:44:36 +09:00
4f50c90f6e
__mcctrl_os_read_write_cpu_register: Range-check cpu number
...
Change-Id: I9ef991e1f0a7e301430586c261bf55bf73a4bae9
2020-04-16 07:44:36 +09:00
79950e045e
eclair: Improve error message
...
Change-Id: Ib8fe3df0a529a17a2e331b16cf396915ab6a3eb2
2020-04-16 07:44:36 +09:00
6cf7cebb2d
__mcctrl_control: Check user privilege
...
Change-Id: Ia87ab241f980ea25df805bd31d66f07bf3681311
2020-04-16 07:44:36 +09:00
c9f05f238d
Remove unused IHK_OS_STATUS_STOPPED
...
Change-Id: I4aad8dac06b79a85ca8951cc26c40981c64262bb
2020-04-16 07:28:20 +09:00
f1caaa9b74
freeze: arm64: use normal interrupt instead of NMI
...
Fixes: 55faba7 "dump: rewrite NMI handling (for resume) and fix PANIC register saving"
Fixes: ff982b8 "freeze: change freeze-thaw to normal interrupt"
Change-Id: I9445cac191f91d20357cae11b2839e4e9384ac6f
2020-04-15 01:04:20 +00:00
97cd379ee2
mcctrl_os_shutdown_notifier: Move wait for running state to ihk side
...
Change-Id: I363391c63d92d952fc9a60c1e88f964eb50687fd
2020-04-15 00:54:00 +00:00
8ee1d61d0f
Revert "Detect hang of McKernel in mcexec"
...
Change-Id: Ie8a0cf725f84a2f5d85da8b8fb15b30a826ddfcb
2020-04-15 00:50:55 +00:00
04d17dd3e9
Define MAP_KERNEL_START by resolving MODULES_END at cmake time
...
Change-Id: Ib88fc045b64c4ad2dad6a4b13cb0372a735a26ab
2020-04-09 00:30:05 -04:00
33eef71133
spec: Update version number to 1.7.0rc3
...
Change-Id: Id07122ececb562ecb4e4cf91e4983b8273c96b34
2020-04-09 00:06:17 -04:00
c10b4a1c16
spec: fix mckernel-devel package
...
Also fixes kernel-rpm-macro package resolution issue.
Fixes: 6d584fea "spec: Add mckernel-devel package"
Change-Id: Ide286753c89c3b931665f53dd8270427b19b39eb
2020-04-08 00:25:43 -04:00
8cf70900e7
mcexec: Fix LD_PRELOAD string manipulation
...
To suppress compiler warnings.
Change-Id: I4d6b5ce2d2a8fca3f2675a7fc309df40cfe3c04b
2020-04-01 01:18:10 -04:00
b2618a98f5
madvise: Support MADV_DONTDUMP and MADV_DODUMP on anonymous map
...
Change-Id: I231b62ed6803b797ec749ac70a66cdf8236204bd
refs: #1373
2020-03-23 13:06:26 +09:00
01d06cb218
madvise: Add locked-page check to MADV_REMOVE
...
Change-Id: I95465ef11aa4c772ad0ecf5d25f757192f31b93b
refs: #1372
2020-03-23 13:06:26 +09:00
c78803ac08
madvise: Support MADV_REMOVE on tmpfs
...
Change-Id: Ic99d374c4d2630944c7bc838937d7f45601783c6
refs: #1371
2020-03-23 13:06:26 +09:00
3300e65efc
madvise: Support MADV_WIPEONFORK, MADV_KEEPONFORK and MADV_NORMAL
...
Change-Id: I1d4cf5affa580d7304dfdc34fa4f1707c0df617c
refs: #1374
2020-03-23 09:13:01 +09:00
d82ac31bc6
faccessat: Specify AT_SYMLINK_NOFOLLOW only when necessary.
...
- Specify AT_SYMLINK_NOFOLLOW in faccessat only when
the symbolic-link is analyzed by overlay_path().
Change-Id: Ie3b1f7fedef7441fd4b39c5c8b2ef0f73cba770e
Refs: #1370
2020-03-20 00:22:50 +00:00
4946fbdd82
Fix "test: runq_lock and over-scheduling fix."
...
Change-Id: Iedd3b94d6ecd52b9ee67cc9b8a75735428c9fd84
Refs: #1400
2020-03-19 23:34:40 +00:00
33cba1ad48
test: ptrace: Record syscall return value before reporting
...
Change-Id: I8e9de3bb9bfa0b07eebe472131cc62b53ef5cc8b
Refs: #1287
2020-03-19 23:31:48 +00:00
7c69cfaf67
set_host_vma(): do NOT read protect Linux VMA
...
Change-Id: Id1e84464c9a06a3886b9cb16b35b1f2dda3c4c30
2020-03-19 02:15:29 +00:00
b3cbdeec84
Fix memory leak when a child exits without wait()-ed
...
Change-Id: I8ad9e20e3f3e6f406548a6c4de2bf4dc07c40b0e
Refs: #1349
2020-03-16 04:26:54 +00:00
1d1ec39a27
exec: Correct wrong "=" to "+=".
...
Change-Id: Iec8c1bb7a12ad7f2e1d4ac07c75482e4d86a0ea2
Refs: #1382
2020-03-16 04:16:03 +00:00
0a4e6b49b4
get_one_cpu_topology: Renumber core_id (physical core id)
...
Change-Id: I4e4857e9a063d16d19d73adfabfc18a4b461bbfb
Refs: #1439
2020-03-12 05:19:25 +00:00
bb7e140655
procfs cpuinfo: use sequence number as processor
...
Change-Id: Idbfa48e9b60c03495d7ba72e962c55f0ffb8bec9
2020-03-12 05:19:25 +00:00
32b32f0c4a
eclair: query phys memstart on arm64
...
Change-Id: I32db1153f5c1e4a217db69d8d55f0d0ccfa07c77
2020-03-12 10:53:41 +09:00
bf7fd81c1b
Fix includes to handle module ref counter properly
...
Change-Id: If3f067a14e40c346f0455f8bfb8bbc8ab2934e88
2020-03-12 10:24:01 +09:00
92d191de9e
xpmem: handle size 0xffffffffffffffff
...
Change-Id: I04fbe21966f8a831337576a14119afefe8a2ea4f
2020-03-09 16:26:09 +09:00
baf68f7e71
mcreboot: fix ETCDIR path (cmake 3.14.5 prepends etc)
...
Change-Id: Ib449ef294ddaf4a4d050d705fd05b8ede8b8150d
2020-03-09 07:21:10 +00:00
26bebb2749
sched_request_migrate(): fix race condition between migration req and IRQs
...
make sure the caller thread holds migration queue lock with IRQs disabled
until it notifies the target CPU so that an interrupt can not deschedule
it in the middle of the request.
Change-Id: I85995018ca1e8478ccc9723985b6e8efc9c3acfb
2020-03-09 07:05:15 +00:00
9e2196c9ce
fix: memory leak due to forced termination during startup
...
Change-Id: Ide519f01702bfd17ae4576e04806b6d155ae846a
refs: #1397
2020-03-09 01:10:38 +00:00
93581cb142
test: runq_lock and over-scheduling fix.
...
Change-Id: I236ab585403076d716be350c8b51e8d352122f2b
Refs: #1400
2020-03-05 15:57:57 +09:00
67f5a1d4e0
migrate-cpu: Prevent migration target from calling schedule() twice
...
Symptom:
A thread could call schedule() twice.
Cause:
(1) The migrator raises rescheduling flag
(2) The thread calls check_need_resched() for other
reason than the migrate IPI, e.g, response to system call
offload. And it finds that the flag is set and it's trying to
call schedule().
(3) The thread is interrupted by the migrate IPI and it finds that
the flag is set and calls schedule() in the interrupt context.
(4) The thread resumes the execution and call schedule()
Solution:
(1) Reset the rescheduling flag when checking it and it's set
(2) Set it again if it's decided not to call schedule()
Change-Id: I5376662d0b02ca4ebb29b42732e347f3b82d766d
Refs: #1400
2020-03-05 15:51:28 +09:00
edf7b36669
runq_lock: Fix deadlock due to cpu migration.
...
Symptom and analysis:
runq_lock of the migration source is acquired on
the migration destination CPU.
This happens in the following steps:
(1) The thread stores value of cpu_local_var(runq_lock)
to its register when trying to perform
ihk_mc_spinlock_lock() on the lock variable.
(2) The thread takes IPI and migrates to another CPU.
(3) The thread resumes execution and acquires the wrong lock.
Solution:
* Disable interrupts before getting the value of
cpu_local_var(runq_lock)
Change-Id: Ia0ea450b97f872dd6116252537e4a79f85adfc88
Refs: #1400
2020-03-05 01:51:40 +00:00
1a204b6674
perf: overflow test
...
Change-Id: Ic7aa0d99ae9a5b7d3ce4436129a360275e6937ca
refs: #1358
2020-03-03 15:55:13 +09:00
305511b48f
perf: accumulate counter in overflow handler
...
Change-Id: If5f5a913e0fde889d1835ffb16c19ea0ad5e685a
2020-03-03 13:23:30 +09:00
606db376fd
perf: fix perf_reset
...
Change-Id: I98122b0f9866bc1cc8713e7bd46fa879917ac6a0
2020-03-03 13:23:30 +09:00
5719b4c64a
perf: update event structure
...
Change-Id: I5bc0fdd42db509b5d2daca7d97e29ad1f7d11f1a
2020-03-03 13:23:30 +09:00
343121c3d0
perf: set event period
...
Change-Id: Ibf569de7af8697e766c10b8d70905b8cdc4df083
2020-03-03 13:23:30 +09:00
86c45484e3
perf: add struct hw_perf_event
...
Change-Id: I0938e2b18064ad805a9edb6e15d26cf438bf0a59
2020-03-03 13:23:29 +09:00
767792808a
perf: change count variable type to ihk_atomic64_t
...
Change-Id: I2bb6fab2c040683830b44fa6b963a86a233b883a
2020-03-03 13:23:29 +09:00
117f070fd6
perf: fix PERF_EVENT_IOC_REFRESH
...
Change-Id: Ia5d3fbe344346aabc3b5d40a801b3c21cfbaac97
2020-03-03 13:23:29 +09:00
a27909be88
ihk_atomic64_set argument to long
...
Change-Id: Ie9b5978028000236ae5846214a2ea14fcdffaf56
2020-03-03 13:23:29 +09:00
cec6f24559
PMU register support for cpufreq driver.
...
Change-Id: I11462d25ef83867ddf2e643798d1e3d0257f7f33
2020-03-02 07:14:27 +00:00
b3b8283f87
Add NEWS.md
...
Change-Id: Iecf193e3d5dac57f87ef8db2f43add5fb99f6a6e
2020-02-27 06:13:25 +00:00
d62f80a7c0
spec: Prevent rpmbuild from including build-id directories into package
...
Change-Id: Ie935d684eed3780f79f29a588233f5ab54a5f5d7
2020-02-25 10:44:08 +09:00
6d584feaef
spec: Add mckernel-devel package
...
Change-Id: I51e9b88ed18b5a0662d1d77e344b84cb14e2189e
2020-02-25 10:44:08 +09:00
e2e015e120
spec: Remind that kernel-rpm-macros is no longer included in kernel-devel in RHEL-8
...
Change-Id: I4fb6a2d5f9114d9947b0eb848a21f772a2bece5e
2020-02-25 10:44:06 +09:00
5fb3abe87b
spec: Relax Linux kernel version requirement for RHEL-8
...
Eliminate the need for rebuilding rpm for every RHEL-8 errata release.
Change-Id: I483c22d0b578809117a4f56881b11e51fcc608a7
2020-02-25 10:42:19 +09:00
37fd9e0cd2
test: rt_sigtimedwait: Add test cases for SIG_IGN and real-time signal
...
Change-Id: I4abafe73d81cfa77167289477ea8c5af701e7f2e
Refs: #1378
Refs: #1440
2020-02-20 04:31:08 +00:00
7e748b4ecb
rt_sigtimedwait: could not wait for realtime signal
...
Change-Id: I341d2f0c9657c3b14eae89dddba074b68c654a12
Refs: #1440
2020-02-13 06:23:22 +00:00
cafb46efc7
rt_sigtimedwait: could not wait for ignored signal
...
Change-Id: I0f5a8e2eaae2b7c08a01f4ebb2c405b8972269a2
Refs: #1378
2020-02-13 06:23:22 +00:00
41ea9d16c4
mremap: Fix to work correctly when old_page is large_page
...
Change-Id: I5a589383644a8098d910e49cd7ade6df325e0366
Refs: #1383
2020-02-13 06:15:25 +00:00
4bbdee395e
ptrace: fix execve and return value handling (fixes strace on aarch64)
...
Change-Id: Icb5cb7f7e99fdb74a8628bc6b550688df5fb056b
2020-02-10 07:45:06 +00:00
597baf8445
eclair: support for live debug
...
Change-Id: Ia9bc126e198ba4a80722529ce09de5eb0775d429
2020-02-10 07:45:06 +00:00
55faba77a5
dump: rewrite NMI handling (for resume) and fix PANIC register saving
...
Change-Id: I360e9aa8efa64b6ebd99b209a5dd4ee0dc7806cf
2020-02-10 07:45:01 +00:00
6bef773741
eclair and ldump2mcdump: obtain PHYS_OFFSET from dump_mem_chunks
...
Change-Id: I5dd5f9e7e6b5817e50b0a1855b67f163d3029f17
2020-02-10 07:42:23 +00:00
7882110e9f
eclair: obtain MAP_KERNEL_START from kernel image
...
Change-Id: I946c640ddb2e2b32362760254a86c611517becf3
2020-02-10 07:16:06 +00:00
d1df17ffb7
eclair: fix register GDB response for descheduled threads
...
Change-Id: I0001d094b624bc03f2b178ec28a4cab51e2acaf0
2020-02-10 07:16:06 +00:00
72af689e69
mcexec: detect mismatch of mcexec -n and mpirun -ppn
...
Change-Id: Iaf5cfb11c37bea6957b77a2114f783e9a46a48f2
Refs: #929
2020-02-05 06:39:57 +00:00
153d0609de
ihk_os_{read,write}_cpu_register: Add async support
...
Change-Id: Ia2a2098550e856eeffbb20d8d0e0bcd57b85b6d7
2020-01-31 12:40:43 +09:00
83bbb87a0f
mbind: fix processing when new range ovarlaps existing range(s)
...
Change-Id: I240a0205f0d836e4ff1a16b6739a3b366543bc06
Refs: #1384
2020-01-23 11:27:15 +09:00
f00d03445c
epoll_pwait, ppoll, pselect: add to process sigmask
...
Change-Id: I6aa1db3b4c6ad81a8b5926fa87fc645269b103b6
Refs: #1361
2020-01-09 06:54:23 +00:00
911b07f507
fix: fork's race-condition caused by child and grand-child
...
Refs: #1329
Change-Id: Ia2d7641d1203f40155fef5db718d1bb2c583c1c5
2020-01-09 06:33:13 +00:00
5b26fe2956
do_process_vm_read_writev(): access local vector buffer using kernel virtual, PF if necessary
...
Change-Id: Ic90dca79e32d4151f585a5cbd5b2c7710534db0e
2019-12-23 02:54:52 +00:00
1db00ebc04
release_process_vm: free vm_range_numa_policy
...
Change-Id: I8084cd60a12b557b635b8e350f70d4e4f95d4c52
Refs: #1101
2019-12-20 07:12:16 +00:00
d5de68e97b
eclair and crash: clean up architecture dependent codes and comply with Linux page_offset_base
...
Change-Id: Ie14ceb8bc9d816a9201dddd4020e2c21d6cfd686
Fujitsu: POSTK_DEBUG_ARCH_DEP_34
2019-12-18 01:53:29 +00:00
1526237bc6
x86 memory: use page_offset_base from linux
...
rhel 7.5 and later kernels have a page offset that is no longer
necessarily 0xffff880000000000, leading to kernel panics if we
use the wrong address
Change-Id: I3572fde1c31303a937855c23fbd3815ce0f96c64
2019-12-17 08:05:38 +00:00
b8d96a74ce
Fix "arm64: Opt-out NMI for ThunderX2"
...
Change-Id: I95fabd17bfbae32320ed9e7a520c12e6f9527351
2019-12-17 14:48:10 +09:00
3c256e1a6c
overlay: getdents: support lseek
...
Refs: #1421
Change-Id: Ife7ab1b50159a5897552ff695bb001ada27ec934
2019-12-13 03:49:20 +00:00
7fc4272b89
handle execveat systemcall on McKernel
...
Refs: #1366
Change-Id: I921e04a0df8d0d798fc94f675e5112dd2fec190a
2019-12-06 09:33:13 +09:00
d052acab1d
xpmem: Fix deadlock in xpmem_remove_process_memory_range()
...
Refs: #1330
Change-Id: Ib62e3a7fe2811577ba8cabf174f64827e65c422c
2019-12-06 09:32:51 +09:00
91ea69cf8f
xpmem: Make sure vm_range is used under memory_range_lock
...
Refs: #1330
Change-Id: I87a0d6042a2c388fbd260d8dff5d109106478872
2019-12-06 09:32:28 +09:00
0c63a2a3cd
xpmem: Use correct process_vm in xpmem functions
...
Change-Id: I94c06ec69d0fe1e07d0b14bb44b448bbc63b9b63
2019-12-06 09:31:16 +09:00
a8696d811d
xpmem: Support large page attachment
...
Change-Id: I4d672eee1c905160ece204d278f0afd9b6d7dc01
Refs: #1259
2019-12-06 09:30:51 +09:00
569dc33a9c
mmap: fail and set -ENODEV when map to unmappable special file
...
mappable special files are /dev/mem and /dev/zero
Change-Id: Id1d4317104f901644e565007913e320d287e376f
2019-12-05 07:22:17 +00:00
4b252a990f
SIGCONT: don't terminate process
...
Change-Id: Ib959a9e5341fda37bd055724ecb9319a469b7420
Refs: #1410
2019-12-05 07:13:56 +00:00
adb6cce3ce
The process sending SIGCONT resumes the stopped process.
...
Change-Id: I64ee10172b99aa58540ffe8e9dd80fa0a64f4d01
Refs: #1420
2019-12-05 07:13:56 +00:00
ed21b6849d
procfs: if memory_range_lock fails, process later
...
Change-Id: I3c5f24548455a63d8d5a4482f5081347f631885a
Refs: #452
2019-12-05 07:08:13 +00:00
37605740a4
support for backlog
...
Change-Id: Id8f503234e7afaa284e6b97dc264eb3a2af145c7
2019-12-05 07:08:13 +00:00
e069694c12
mem: Fix condition of whether in McKernel
...
Refs: #1324 , #1329
Change-Id: I72bd69dbe65928f083b24513d50d29cabf3d6dff
2019-12-02 03:12:29 +00:00
dca1cb2625
arm64: Opt-out NMI for ThunderX2
...
Change-Id: I064da55e7e09e6d248c92ece5c56f9a9770c84a0
2019-11-28 02:22:55 +00:00
caac060684
mcctrl_getrusage: Round up cpuacct_stat_{system,user}
...
Change-Id: Ic1a236865fb3224dc9716c40a1eeb279c1fa1d70
2019-11-28 02:21:47 +00:00
d330721421
Rename struct cpu_topology to mcctrl_cpu_topology
...
To use a different name than the name in Linux kernel.
Change-Id: I44d10279195dfc9cfdc4788914b7d65b78292921
Fujitsu: POSTK_DEBUG_ARCH_DEP_40
2019-11-28 02:21:13 +00:00
157eeca41a
README.md: Add contact
...
Change-Id: I3b038780ce91325151dfaef806e43eaaf71fe7e7
2019-11-28 02:09:41 +00:00
8ba725b225
mcstop+release.sh: Continue when releasing CPUs failed
...
Change-Id: Ib947843006ae9caa602e7b55309e68365edf4b2a
2019-11-28 02:09:01 +00:00
a563d780c1
munmap: fix deadlock with remote pagefault on vm range lock
...
Add similar protection to clear_host_pte than to set_host_vma (see #986 )
Also make the page fault handler only skip taking lock if the munmap
happened on the same cpu id
Change-Id: I6d9e68e8f8905b20bb2ccfa72848e04fe6404ab6
2019-11-28 02:07:45 +00:00
621533bbd3
Add ENABLE_PERF macros so that perf support can be toggled
...
Change-Id: Ic50c8b329af63e63579b6a60b9557344100eaac4
2019-11-26 09:15:05 +09:00
37ea770f8c
mmap: Round up map size by pagesize when specified MAP_HUGETLB
...
To match the behavior of Linux.
Change-Id: I7bcc2cb3c1e678ffc28f6b825c7a55032441dded
2019-11-14 07:24:25 +00:00
edd3ea0103
Revert "memory_range_lock: Enable interrupt when trylock fails"
...
This reverts commit 0d3ef65092 .
Reason for revert: This fix causes circular dependency with memory_range manipulation and TLB flush. See #1394 .
Change-Id: I4774e81ff300c199629e283e538c0a30ad0eeaae
2019-11-11 15:28:08 +09:00
41d37bcd30
mcstop+release: argument for rmmod path specification
...
Change-Id: I80e4e7136a90bc65050ab8f7d39615581c47f317
2019-10-03 13:58:20 +09:00
309145587f
perf_event_open: Add support for counting REF_CPU_CYCLES
...
Using thread's tsc count instead of performance counter
Refs: #1025
Change-Id: I1d7a18f1c52f1d52087002d31818638a6b206014
2019-09-26 07:38:04 +00:00
bc06d68d84
sigsuspend: Make sure receive correct sigevent from do_kill
...
Change-Id: Ife9cf36a81f353e0575f6802f1e56f7dd4cb0425
Fujitsu: POSTK_DEBUG_TEMP_FIX_33
Refs: #1350
2019-09-26 07:34:34 +00:00
18412616e1
munmap: Change permission of VMA back to RWX on unmap
...
Change-Id: Ic02098e7458dd8fa2961fb03dc32e37fb18c5dc5
Refs: #988
2019-09-26 03:49:50 +00:00
c371fbf13b
file map: cause SIGBUS when access to a page beyond EOF
...
Change-Id: Iaf7d792413e674267fd1c05c382212c8f67d8f5b
Refs: #1291
2019-09-26 03:41:23 +00:00
1492f16d67
make syscall_enter arch-dependent
...
Change-Id: I4317f3443902620ef5b3807ced05c80fa5eebbec
Fujitsu: POSTK_DEBUG_ARCH_DEP_90
Refs: #1357
2019-09-26 03:28:57 +00:00
fd38ab6fd0
Add test results for "syscall offload regardless of mcexec life and death"
...
Change-Id: Iee759ae8814aff4274ff81dc14f6d5d7a01494c5
Refs: #1321
2019-09-26 03:26:20 +00:00
f115bae8a7
include interrupt handling time into system time
...
Change-Id: If2ed2d488b4040d288d712f0a244505adbcec6f5
Refs: #1221
2019-09-26 03:21:28 +00:00
ba80dd8650
arm64: Fix for ptrace instruction rewrite on thunder-x2.
...
- Fixed the problem that instruction rewriting by PTRACE_POKETEXT is not reflected.
The cause is that the instruction cache was not flushed.
- Add instruction chache flush in ptrace_report_signal().
Change-Id: Ie9d34d3d33e1fd85aef5fe419345d82c6ca781fb
2019-09-26 02:57:07 +00:00
06960a41d9
test: signalonfork+wait: update error_injection.patch
...
Change-Id: Ia27e9b2fa6ec757bb05229ba3bf76e5e3bd43e5e
2019-09-26 02:34:46 +00:00
86a2aabb24
test: perf_event: add log of ThunderX2 machine (apollo)
...
Change-Id: I27aa1e30abdf4ed640a80b4016bcf108262ce9e3
2019-09-26 02:16:08 +00:00
b4101d9c36
brk: Fall back to demand-paging only when physically contiguous memory is unavailable
...
Change-Id: Id5d937b2cab7de1ad8925c9b95d85fcb620df9c6
Refs: #1353
Fujitsu: POSTK_DEBUG_ARCH_DEP_60
2019-09-26 02:16:08 +00:00
ec31d72483
freeze: add freeze_thaw test
...
Change-Id: I31db80b89adca9ac354a96ad21073b269d8a0e24
2019-09-26 02:13:23 +00:00
83ade5cdcd
freeze: ignore multiple freeze request.
...
Change-Id: Ib7a7c4677137446cf7f7b387d016bacc7f0e9620
2019-09-26 02:13:23 +00:00
dec133c1dd
freeze: restore state with thaw request
...
Change-Id: I7d6efd2c47020bedb716b6bd72d8a72b874c3cb2
2019-09-26 02:13:23 +00:00
04a528ab27
freeze: no process create in freeze state
...
Change-Id: Ia9cb7b8fb22d1c9d6c5a3fcdbd2873ef22f27c9f
2019-09-26 02:13:23 +00:00
8e4073c2ca
freeze: allow interrupts in frozen state
...
Change-Id: I1d502f828ab9f9c0e1223d021979ac3dcf4d0c25
2019-09-26 02:13:23 +00:00
ff982b8594
freeze: change freeze-thaw to normal interrupt
...
Change-Id: Ib4dbac28f0074595e92ef316945b37ef4bc18327
2019-09-26 02:13:23 +00:00
299d47abf5
fork: memory leak detection test.
...
Change-Id: I9c64f8fdaee15642b3d1d2d7d869927b0bcd6511
2019-09-26 01:56:16 +00:00
f2460695c4
fork: do_fork: free resources when an error is detected
...
Change-Id: I0a29bb2cf886228effb088afe97d1b614728f517
2019-09-26 01:56:16 +00:00
6ce5c754f3
fork: settid: return error code.
...
Change-Id: I0678c266d8608b6d557b2b1e29e59bd6861314b8
2019-09-26 01:56:16 +00:00
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
a4b83dc6d4
eclair: use snprintf instead of sprintf to prevent buffer-overrun
...
Change-Id: I2a27cffe303201e1738f115258f6e02058dbc63d
Refs: #1356
Fujitsu: POSTK_DEBUG_ARCH_DEP_38
2019-09-25 06:38:55 +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
0615a0b00b
procfs: mem: Change permission to 0600
...
It's 0400 in RHEL-5 and 6, but changed to 0600 in RHEL-7 and 8.
Change-Id: I9fb229e4c447eaa4570b1e2619c4fe039c07c86d
2019-08-19 01:17:03 +00:00
51cd7cbb6c
arm64: rusage: Fix counting contiguous PTEs
...
Change-Id: I7e89c25d49dc1f6efe1c27c76c66c6fedd22af1f
Refs: #1342
2019-08-16 03:55:29 +00: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
12aef0b578
arm64: mcctrl: Fixed to search vdso_offset_sigtramp dynamically.
...
Change-Id: Iab5459194ca5281a1680a7fc26ae8bfaf1945a13
Refs: #1341
2019-08-08 00:48:22 +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
258156b57e
support for read/write-lock and read/write-trylock
...
Change-Id: I609071c0f6234d0d413c8b312d8a8379abf6846e
Refs: #1323
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
c52370b959
test perf_event: minor fixes(add signal handling. etc.)
...
Change-Id: I837d962bcaf13d3a523f80ff77f75b7fd51a98b7
2019-08-05 16:00:22 +09:00
9c78d4d249
pmu: define event validation in architecture dependent code.
...
Change-Id: Ia053af146ba3c89810892271cae93def6d9fd7c8
2019-07-31 16:18:50 +09:00
b6285c9aa9
pmu: Use bitmap instead of index to specify counters / events
...
Let the software index (or number) same as the hardware index at the
same time.
Change-Id: I847180e94bf2c57644ae2f8f571cdb4a84eac991
2019-07-31 16:17:20 +09:00
b945367c90
pmu: add ihk_mc_perfctr_value function
...
Change-Id: I88d25586dd470737a3eac4c3a4f1955ae6e41d64
2019-07-23 16:20:17 +09:00
0f434288e1
pmu: change to atomic register access.
...
Change-Id: Iebbdb8ca97e7a73f9d74138650ae18ce3a0f2605
2019-07-23 16:20:16 +09:00
b5cd813229
pmu: remove comment
...
Change-Id: If5819ce6f665c668f1f29724a814770957df0de0
2019-07-23 16:20:16 +09:00
7268942c35
pmu: implement ihk_mc_perf_get_num_counters.
...
Change-Id: I752103aedd9201fc00bda11228ca0bcf5103f12d
2019-07-23 16:20:16 +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
e1c6e17400
uti: Use only general registers in libmck_syscall_intercept.so
...
Change-Id: I8e8e98bdc7e621aa111c0940d915ebe1775a10c3
2019-07-23 04:53:06 +00:00
207eba93ea
uti: syscall_backward: Use kmalloc area to pass syscall arguments
...
Change-Id: I478a9b40b75f3d1d68c4446810a6236fe2f3a96c
Fujitsu: POSTK_DEBUG_ARCH_DEP_106
Refs: #1320
2019-07-22 03:52:44 +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
e58e1c6e33
uti: cmake: Add include dir pointing to libsyscall_intercept_hook_point.h
...
Change-Id: Iaea58725a16722d867cb27ffb4d9347b8756f9f2
2019-07-16 04:25:51 +00:00
fb924ebb9d
README.md: update packages and git URL
...
Change-Id: I895dbece58a0ea69b39d1e07d8a16a22a2fed9a7
2019-07-08 04:24:37 +00:00
ac61577414
test: rusage: Add test private-mapping device file
...
Change-Id: I8b298ce598c2a5560138a1b694ccc7204d4ebbde
2019-07-05 01:18: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
b3b7801d51
overlay: fix /proc/PID/task/ corner cases
...
Change-Id: I17086c684af4c665d0c228b4a65cdb232eccf602
2019-06-07 01:48:10 +00:00
10f1fe76db
ARM: set_range_middle(): fix PT deallocation bug
...
Change-Id: Ic8c1e1193ae33d1ae81e0df362ae1a6944c6c3b2
2019-06-06 01:11:16 +00:00
089b443aaf
mmap()/shmget(): use Linux default huge page size when not specified
...
Change-Id: I8a9e3bed65ac1902adfaeaa254597dd30f540319
2019-06-06 01:09:38 +00:00
e9955a4bba
Make heap and stack private mapping
...
Change-Id: I4306566b3bbbe27d206c5518a2d36d117ba4ca9f
2019-06-05 15:21:20 +09:00
dc52c8a11a
crash: use fix kernel mapping instead of module space on ARM
...
Change-Id: I2d32dac78fc241a89bc98f8c098d4e63c8593e79
2019-06-05 14:31:48 +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
239c95449b
x86: add SMP barriers
...
Change-Id: I7fb36bd3d26fa272697db7c92495ce5fba34aeba
2019-06-03 01:22:03 +00:00
9dfc139eae
cmake: kmod: Fix cross compile decision
...
Consider "arm64" to be "aarch64".
It mistakenly considers cross-compilation when compiled through spack.
Change-Id: I914df482e21517adc1105512ea3d8919ef1577b1
2019-05-22 02:34:55 +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
90b6aec53d
get_one_cpu_topology: Fix error-handling
...
Fix the error handling of the following two functions:
ihk_device_get_cpu_topology: Returns NULL when not found,
valid non-NULL pointer when found
get_cache_topology: Returns NULL when not found,
valid non-NULL pointer when found,
minus error number on error
Change-Id: Ied13a61d4ab0c314477c45ea659ff2b798ad97ee
Fujitsu: POSTK_DEBUG_TEMP_FIX_21
2019-04-25 01:53:30 +00:00
0887e0de6d
x86_64: mcexec: Remove "#include <asm/prctl.h>" (again)
...
Change-Id: Iae78954d5b520907cd6a85058e3a9fc1b842999f
Fujitsu: POSTK_DEBUG_ARCH_DEP_77
2019-04-25 10:33:00 +09:00
2c5c47344d
x86_64: mcexec: Remove "#include <asm/prctl.h>"
...
Change-Id: I441f7a1c2e23b927fcd065fefba3ef3617356c18
Fujitsu: POSTK_DEBUG_ARCH_DEP_77
2019-04-25 10:14:19 +09:00
b9f223ceca
crash: mcvtop: print proper page sizes for ARM contiguous pages
...
Change-Id: I2f677e64c743776de491262613b1014fe2bb7a8e
2019-04-23 08:54:26 +00:00
6297181dcd
crash: mcps: print both PID and TID
...
Change-Id: Iafac099b1d953642509711a972962894b6111984
2019-04-23 08:54:14 +00:00
80f964e44f
rus_vm_fault(): cleanup and early exit on NULL access
...
Change-Id: I90b18988989d4e377ed9c35df6b2e6bcdddd13b6
2019-04-23 08:53:59 +00:00
cc07d6e017
mcctrl_get_per_thread_data: Un-inline
...
Change-Id: I881db244ca551b3ca232918cb0b4245776f17295
Fujitsu: POSTK_DEBUG_ARCH_DEP_56
2019-04-18 02:35:52 +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
bdccbf7356
MCS: fix ARM64 issue by using smp_XXX() functions (i.e., barrier()s)
...
Change-Id: I41470c082308c7c1ac91f88db2229958398d2e68
2019-04-10 20:26:13 +09:00
ad3ee26d36
Fix various issues in McKernel crash extension.
...
Determine V2PHYS_OFFSET dynamically.
Fix x86 hole handling in 64 bit address space.
Fix ARM64 virtual address handling and support separate user-space
and kernel-space translation tables (i.e., TTRB0 and TTRB1).
Fix page table walker's lookup functionality.
Change-Id: I6b281693cdc88bd1b8fe3f4b8f40a6af3ca95cc0
2019-04-09 01:52:49 +00:00
16f8ccb35b
mcreboot: do not embed sudo when run as root
...
Change-Id: I59ebb4c72c12af8600a6d6d0eb13f6459ccf5bc2
2019-04-09 01:52:49 +00:00
3fda54ece8
IHK: support for using Linux work IRQ as IKC interrupt (optional)
...
Change-Id: I2a0e59a47c229fd9271866199c3c4d30e1ddd7f9
2019-04-09 01:52:49 +00:00
4d252c2bb2
map_fixed_area(): disable debug msg
...
Change-Id: Id6b3d001d908432c1adb6bba875e158a1424850d
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
0d902872a1
x86: fix xchg() and cmpxchg() macros
...
Change-Id: I6faf0fff8a8595734fca6247634cdae6b86483b3
2019-04-09 01:52:49 +00:00
9b6a88eeeb
x86_64: Move arch-specific interrupt vector number to arch-dependent code
...
Change-Id: Ie3cc631ec351503a619b019432388a827d75334c
Fujitsu: POSTK_DEBUG_ARCH_DEP_75
2019-04-08 01:48:07 +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
3372bbfd23
crash extension: port for ARM64
...
Change-Id: I47a4f13e96718e94c08ee8bc3e9b0be38d7a8a55
2019-03-29 07:55:28 +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
9a0eb915fb
Test "QLMPI (qlmpi_testsuite)" on arm64
...
Change-Id: I079fda2231ffb19b41fe86436d51ce9f83436c9b
2019-03-29 07:48:05 +00:00
a5ded1fc06
Add KNOWN_BUGS file
...
Document known major (e.g. linux crash) bugs that have not been
fixed downstream and might require workarounds on specific
hardware configurations
Change-Id: I51e5d23243afd4489ce1ae25e736afc27b2c8202
2019-03-29 07:47:28 +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
2cee82673b
test: perf_event_open: Fix test program
...
Change-Id: Ie5af8fb3ab7452078f2c35ec14c6369d86eedec3
2019-03-29 07:42:05 +00:00
dfb3bef96d
irqbalance_mck: replace extra service with service drop-in
...
Using a drop-in instead of an extra service avoids having to juggle
between both services (especially since irqbalance_mck did not have a
Conflict=irqbalance.service statement)
That way, we only have a single service to check for (irqbalance.service),
and system administrators should find this less confusing if they normally
rely on irqbalance.
The drop-in is also installed in /run so will automatically disappear in
the event of a linux crash or a reboot without shutting down mckernel
Change-Id: I004f4f25d9ca037e411e0bc91f4555db138ecfef
2019-03-27 15:54:25 +09:00
2dc51530f3
mcreboot/mcstop+release: support for regular user execution
...
Change-Id: I9088f9c49bea13826bbab6348aa5560e6d91071b
2019-03-27 14:31:08 +09:00
13758417c5
Make boot scripts arch independent and move them to scripts
...
Change-Id: I3f4c3e366b325df17208a41d5f842c1a2a888494
2019-03-26 09:47:38 +00:00
c32edff2bb
uti: rename x86-specific 'fs' to 'tls' + arm implem
...
Note: the original fujitsu implementation didn't rename the various
save_fs function/desc to save_tls for some reason, might as well go all
the way though...
Change-Id: Ic362c15c8b320c4d258d2ead8c5fd4eafd9d0ae9
Fujitsu: POSTK_DEBUG_ARCH_DEP_91
2019-03-22 16:38:29 +09:00
8356ef6c96
arm64: uti: Add arch-dependent helper for context switch
...
arm64 performs context-switch in kernel space instead of user space as in
x86_64.
Change-Id: Ib119b9ff014effb970183ee86cfac67fab773cba
Futjitsu: POSTK_DEBUG_ARCH_DEP_99
2019-03-22 06:52:21 +00:00
63d500515a
mcexec: fix printf format warning
...
Some old commit before -Werror was enabled got merged,
blocking other builds. Quickly fix before anyone notices
Change-Id: I5a034cef6f79e3e99b381bb1a5d97088e33a6718
2019-03-22 05:25:34 +00:00
791e8c2114
Remove mcoverlayfs code
...
mcoverlayfs code is now unused (technically should work on top of the
soft emulation but not well tested, and untested unused code is bad).
Remove it.
Left the unshare/bind_mount_recursive code in mcexec in a new
MCEXEC_BIND_MOUNT ifdef (only in config.h.in directly to discourage use.
it disables the ioctl as well, but the main code is still compiled to
keep up to date with linux api changes... although it's using kallsyms
lookup so it does not validate much more than "the symbol still exists")
I honestly think this should go as well (people who would want to use it
are root and could do it manually), but will give up for now.
Change-Id: I832b6a8ab19e24ed67a1a5044b1c6c32381ae0aa
2019-03-22 05:18:43 +00:00
0bb612caea
Fix test of getrusage fixes
...
* fix: Bug for getrusage return incorrect ru_maxrss
* fix: Bug for getrusage(RUSAGE_CHILDREN) return parent info
(POSTK_DEBUG_TEIX_72)
* fix: Bug for getrusage often return incorrect ru_stime
Refs: #1032
Refs: #1033
Refs: #1034
Change-Id: Ifba95e4cb48ae551839819eb3abe26b37da4b196
2019-03-22 05:15:00 +00:00
5e992bc195
arm64: test: Add Makefile that was ignored commit.
...
Target commit:
Test "Direct access to McKernel memory from Linux." on arm64
Test "Scalable Vector Extension (SVE) support." on arm64
Change-Id: Ia9dc97c5cf0c4cf223423b4257745ea2101bee1d
2019-03-22 05:08:25 +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
b87ac8b8c0
reproductible builds: remove most install paths in c code
...
In order to speed up test bot work it would be helpful to check for
identical build outputs and skip tests if required.
This removes most use of the install path in c code:
- ql_mpi uses /proc/self/exe and looks for talker/server in same
directory as itself
- mcexec looks for libihk.so in /proc/self/maps and use that path for
LD_PRELOAD prefix path
- rootfsdir is not used right now but until a better fix happens just
hardcode it, someone who wants to change it can set it through cmake
There is one last occurence of the install directory, MCEXEC_PATH in
mcctrl's binfmt code, for which the build system will just overwrite it
to a constant string at build time instead of trying to remove it too
hard. It would be possible to pass it as a kernel parameter or look for
mcexec in PATH but this is too much work for now.
Change-Id: I5d1352bc5748a1ea10dcae4be630f30a07609296
2019-03-22 05:01:32 +00:00
a48a2cd3e8
add definition of util_register_desc system call number
...
Change-Id: I2047d33b5667761ce8399bad78eff6ab668b6ce4
2019-03-22 04:58:24 +00:00
7c238c27c9
uti: Check syscall number definition in hook()
...
Change-Id: I24d226199d03d23a12710ff1cad9fef29a6feedd
2019-03-22 04:58:04 +00:00
de77d2b061
add syscall_intercept.c to the mck_syscall_intercept
...
Change-Id: Iff8cfd2868118b6a9db7e24e4f00537251d1346c
2019-03-22 04:55:18 +00:00
52f89cf8fa
add system call execution for uti
...
Change-Id: Ide79726b79964e72596ed78c87ec61d1eaf7e1c7
2019-03-22 04:54:34 +00:00
c96dfb0c68
mcstop: add -k to kill processses using /dev/mcos* before shutdown
...
Use lsof to check for processes that still open /dev/mcosX at shutdown
time.
If lsof is not installed then the check is just not done (empty PROCS
result)
If -k is not passed, print a message listing pids of users and exit
(taking bets someone will use that and sed to kill out of mcstop+release
and rerun the stop script instead of passing -k at some point)
Change-Id: Idba7486fdede4990d9885d23f8077f33839daeed
2019-03-22 04:33:33 +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
312b6c171b
README.md: update package names
...
Change-Id: Ie4d37d724e60e8e473cb60db8a77b5b3a9681f4e
2019-03-19 02:20:38 +00:00
2ce695b47b
proc: resurrect /proc/PID/stat and fix a few fields
...
Change-Id: I8ffcfde4db78c66ea10845a0451ae2610261f832
2019-03-18 20:33:29 +09:00
e5c1fdf129
MCS lock: make implementation arch independent
...
Change-Id: Ie5b2182555bbe1a11a005988db069d4b38f85401
2019-03-18 09:53:30 +00:00
9e3dd53c58
arm64: sve: coredump bug fix in non-sve environment.
...
Change-Id: I4cba5580b6367c67bef457c0273e9b70ad4a0756
2019-03-18 08:12:37 +00:00
fe53c6e0a5
Test "Process swap (swapout)" on arm64
...
Change-Id: I1eecb046575480966febbcb55e5f4ade6313275b
2019-03-18 08:12:14 +00:00
e988bfaf50
test: uti: Elaborate descriptions of CT12-20
...
Change-Id: Idfaa5fc3bfc7b65e24873f0c5e15c31a9d129420
2019-03-18 16:59:07 +09:00
f6f48b1210
Test "Direct access to McKernel memory from Linux." on arm64
...
Change-Id: I6e862146c3b591e671c526302bb1aad787f6bb83
2019-03-18 06:26:43 +00:00
70b42fde5d
arm64: cmake: Add -mgeneral-regs-only option.
...
Change-Id: I0cbdc65c4b95195831344f4006bfc85b1ea58139
2019-03-12 17:26:18 +09:00
ccb36a5849
cmake: change how warning flags are added
...
Setting CMAKE_C_FLAGS_DEBUG does not work as first expected:
- set(... CACHE) didn't do anything because the variables were
initialized previously
- We could set with FORCE but then users could not change the value
- There is a way to only do that on initial cmake run but it has the
same problem
Thus, use a new regular cache variable directly instead
Change-Id: I20741fb385c171c6c1088bbd6c25666067e07288
2019-03-08 17:22:20 +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
ac18a24a27
arm64: fix phys_to_virt() calculation to be the same as Linux.
...
Change-Id: Ibbe17d33fd80eacff990b053fa17d8d320c227f1
2019-03-07 16:51:18 +09:00
8880710fad
README.md: few minor updates
...
Change-Id: I7207ab2cf6ca5b69b464e0c41d2dd0ce3e80b674
2019-03-07 13:12:39 +09: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
940eeca6f5
x86 spinlock trylock: make next initializer old-gcc friendly
...
old gcc versions are stupid with nested structs and need us
to initialize .tickets.head and .tickets.tail in one go
Change-Id: I0d4caf8236066e7edf4a12e3270114132ced9585
2019-03-06 06:30:30 +00:00
19b02cf4ed
arm64_cpu_capabilities: flatten struct
...
The midr_* part of the struct was never used, and confuses older gcc
with partially uninitialized assignments that were not correct.
Just flatten the struct
Change-Id: I7a9cfe064ab97cdcd5ac50ce4fb713c4d7983bd3
2019-03-06 06:30:30 +00: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
0cc3496747
warnings: fix missing field in initializer
...
use generic struct zero initializer instead.
Older gcc used on arm also seem to have trouble with '{}',
so use '{ 0 }' instead
Change-Id: I83d43b05f8d1d44e1dd86502b48e28fe242e1db2
2019-03-06 06:30:30 +00:00
10cca81401
arm64 vdso warning: fix non-void function not returning
...
arch_setup_vdso() needs to return something even on panic to please gcc.
In theory, flagging panic() with __attribute__((noreturn)) should work
just the same and is a much better solution but for some reason on older
gcc versions setting the flag leads to the weak memset() symbol not
being found !?
Change-Id: Ifed100df5440ca24bb495817db9afc79f0ba6751
2019-03-06 06:30:30 +00:00
0c79de67b4
warnings: disable override-init for arm perfctr arrays
...
The arrays first init every fields to invalid op then override a few
fields, since this is not something we want to allow everywhere use
a GCC pragma to only ignore the warning there.
Change-Id: I498546fe60d60d4b000d711e22e04c8c360b5b83
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
1b76aaa7e1
unused function warnings: add inline to static function in header files
...
Change-Id: I5d9bb539712a2b3e51c3ab3433a04fbb0cb0b961
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
20d5900c35
mcstat: fix ihklib.h location
...
ihklib.h moved since it is no longer a generated file
Change-Id: I1ad6ff4bb8ae8c536d9ad7ee3cbeaf670ebcd11c
2019-03-01 06:24:39 +00:00
414cffd95b
tests: remove calls to ihk_os_create/destroy_pseudofs
...
Change-Id: I04910c6a258c841437463e098fb8e02116c4f711
2019-03-01 06:24:04 +00: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
06e96005a6
mcexec: restore --enable-vdso/disable-vdso for x86
...
Fujitsu added this ifdef together with ifndef __arch64__ and thus disabled
the option for both archs in practice; it probably does not hurt to restore...
I'm not sure I see the point of disabling the option at mcexec level though,
but who am I to care.
Change-Id: I0d4bffb6ed325edac8ae577773e19c0fff6ca2ed
Fujitsu: POSTK_DEBUG_ARCH_DEP_53
2019-03-01 05:08:45 +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
a5d5baf8a8
rus_vm_fault: always use a packet on the stack
...
There are valid use cases where a remote page fault has no available
thread data/packet available to use, e.g. when device driver threads
need to access the data (BXI).
Do the per thread data lookup to use the right channel/tid if available,
and use mcctrl_ikc_send_wait with a new message number directly.
The fault is no longer handled in mckernel syscall forwarding code but
in the ikc handler directly in irq, this should be ok because page
faults are interrupts anyway so the code should be irq-safe.
Change-Id: Ie60f413cdaee6c1a824b4a2c93637899cb9bf9c9
2019-03-01 05:08:03 +00:00
8074445d59
README: fix background link in toc
...
Change-Id: Ief448fd99fddc310ea7f311798c94d0423ebf93a
2019-03-01 05:00:47 +00:00
6a456f11aa
cmake: remove unused build-time symbol lookup
...
Everything already uses kallsyms_lookup_name or similar, this
was leftover from when the build system was ported ages ago
Change-Id: I09dd0249845df90ab2e0adc28d0eb285c0ebb64b
Fujitsu: POSTK_DEBUG_ARCH_DEP_50
2019-03-01 13:49:01 +09:00
81e665cb48
init_process: add missing initializations to proc struct
...
Change-Id: I4ea386ba3a8745202745bd8e35cab00c38262f65
Fujitsu: POSTK_DEBUG_ARCH_DEP_63
2019-03-01 04:39:59 +00:00
e0b9c5deec
nanosleep: add cpu_pause() in spinwait loop
...
Probably some energy consumption saving?
Change-Id: I888f50568db8f08751abd0a002137c3b475362dc
Fujitsu: POSTK_DEBUG_ARCH_DEP_43
2019-03-01 04:38:51 +00:00
62772c8a24
gencore: Allocate ELF header to heap instead of stack
...
coredump() proceeds as follows:
1. coredump() calls gencore()
2. gencore() allocates ELF header to stack
3. gencore() prepares the core table and record the address of the ELF
header to the table and return to coredump()
4. coredump() offloads __NR_coredump with the address of the core
table
This fix prevents the ELF header from getting destroyed in the 3rd
step.
Change-Id: I770418c1658a6fdb640bb491fc076a31dfd41c22
Fujitsu: POSTK_TEMP_FIX_39
2019-03-01 04:38:28 +00:00
63d15f7dfc
CMake Kbuild: fail at cmake time if KERNEL_DIR is missing
...
Change-Id: I66660718841d05003b87995d68bec728aa0db9ba
2019-03-01 04:38:05 +00:00
fb3f1c58a8
rpm: ignore CMakeCache.txt in dist and relax BuildRequires on cross build
...
CPack takes the source dir as is, so if it was used to build something
it will incorrectly grab the temporary CMakeCache file and cmake will
complain during rpmbuild later on.
The BuildRequires should be a separate patch but logic behind the change
is that the dependencies need to be installed in the sysroot, and
rpmbuild cannot test this, so just move them all to only enforce
BuildRequires for native build.
And while we are here, also add a new kernel_dir specfile option.
Change-Id: Ie67932798f632e6d307f8ead93bdbe043e6e8898
2019-03-01 04:37:46 +00:00
69846345de
gencore: Zero-clear ELF header and memory range table
...
Change-Id: I0ff38c1b0e1e6ef204cb3605c0178848dbe40bfb
Fujitsu: POSTK_TEMP_FIX_63
2019-03-01 04:36:00 +00:00
b8155cc618
ihk submodule update: cpu/mem ioctl user access fix
...
Change-Id: If230c1012af5c1220e5927efba97a2ae38da42a0
2019-03-01 02:12:39 +00:00
f07e20a381
copy_user_pte: vmap area not owned by McKernel
...
Refs: #1166
Fujitsu: POSTK_DEBUG_TEMP_FIX_14
Change-Id: Iae0f1145d58ec2c14cecc14409b08a1db3b067b7
2019-02-28 07:50:16 +00:00
764948b51f
test: Fix test programs for #1195
...
Add chmod 666 /dev/mcos0 for fork after setuid()
Refs: #1195
Change-Id: I2bec6a9a8378d246f50a9fc08a345b3235096a06
2019-02-28 00:57:22 +00:00
7da5fede8b
Test "Scalable Vector Extension (SVE) support." on arm64
...
Change-Id: I3abaca932985a06b06887b962e769f2eac96c738
2019-02-27 06:26:00 +00:00
6810506c3d
rusage: Fix available page sizes
...
Change-Id: I418075ff4b5341e0f5c7ff317e96461879a60f87
2019-02-22 14:08:18 +09:00
c82c2c1231
uti: Redirect uti thread futex() to McKernel do_futex()
...
Change-Id: I8203d0b60236e3ec72e22615a52907e1fff2c73c
2019-02-22 04:14:14 +00:00
5bc54a3bbe
Fixed time processing.
...
- arm64: Get TSC corresponding to boot time from IHK.
- x86_64: Calculate the current time using vdso.
Refs: #1186
Fujitsu: POSTK_DEBUG_ARCH_DEP_52
Change-Id: I293ba4bbe5390d50dea44b8a5b7471f59237daff
2019-02-22 04:13:13 +00:00
07aa96ef95
arm64: Scalable Vector Extension (SVE) support.
...
Change-Id: I3568687913f583edfaa297d5cf5ac91d319d97e9
2019-02-22 04:07:29 +00:00
dac99f708c
test: Add test programs for #1195
...
Refs: #1195
Change-Id: I21339f2597caf1704cc7d104e4bc5835d5270af6
2019-02-19 16:29:00 +09:00
f3c9fbf4ea
rusage: Don't count PF_PATCH change
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_86
Change-Id: Ia23f2d95c67062be3390acafad3e87f087466cdc
2019-02-18 14:50:56 +09:00
54122360e8
CMake: move CONFIG_ARM64_64K_PAGES and VA_BITS up to main CMakeLists
...
user code also needs these defines; there was a hard-coded
definition left out from debugging that didn't get cleaned up
Change-Id: I951fcd6a3d6bc1d1f1c3e897058908167520f7bc
2019-02-18 10:09:21 +09:00
21cf953a03
x86: disable zero mapping and add a boot pt for ap trampoline
...
the application processor trampoline needs the trampoline physical
address to be mapped for the few instructions between loading the
page table and jumping to normal memory area; setup a new pt for them.
Also make it use its stack where it needs to be directly.
With that, x86 can finally remove the 0 page from its init mapping
Change-Id: Iab3f33a2ed22570eeb47b5ab6e068c9a17c25413
2019-02-14 07:59:03 +00:00
c59d8db1b3
CMake: define RHEL_RELEASE_VERSION in config.h for non-rhel kernels
...
Change-Id: Iaa48e763be71e9cbc8dff6335810d3191bb3c177
2019-02-14 16:44:09 +09:00
abc0a7bdac
mcs_rwlock: remove aligned(64) attribute if ENABLE_UBSAN
...
The attribute would impose 64-bytes alignment that we do not
respect later because the whole structures (e.g. process/thread)
are allocated at 32bytes boundaries with kmalloc
These are however justified for performance reason as we do not want
them on same page cache line, so just accept slower performance for
UBSAN only
Change-Id: Ia28968257675b7ae97b0391471986e6bf6485b7b
2019-02-14 16:44:09 +09:00
2f456b8752
cmake: Add ENABLE_UBSAN for -fsanitize=undefined
...
Change-Id: I73db5f904a7d86052aae62e67b01281763c83561
2019-02-14 16:44:09 +09:00
2a63c962fc
build system switch to cmake
...
Remove old build system at the same time
Change-Id: Ifdffe1fcd4cfece05f036d8de6e7cb74aca65f62
2019-02-14 16:44:09 +09:00
4bdd9cf512
ubsan: remove most sprintf calls
...
sprintf is implemented as snprintf(..., INT_MAX, ...) which will overflow
the argument pointer for the end, then fix the end to be -1.
This technically works but we know the actual buffer size in all these
call sites, might as well do this properly
Change-Id: I807d09f46a0221f539063fda515e1c504e658d40
2019-02-14 16:44:09 +09:00
bc2a444828
ubsan: fix undefined shifts
...
A signed integer cannot be shifted in a way that will flip the
sign bit; make such arguments unsigned to be safe
Change-Id: Iafc060f98f899ae3ffb876ba22fdd6183fbb6e57
2019-02-14 16:44:09 +09:00
d9b2924249
Update patch for "Add test programs for large page"
...
Change-Id: I6ee96b677c65c5bf4b2312059abd689225c0581d
2019-02-14 16:26:20 +09:00
501531f3b3
shmobj: Don't page_unmap() when count isn't one in shmobj_destroy()
...
Change-Id: If9d567d61e1dc4db808a2aeee290034acf7be4b5
2019-02-14 16:26:19 +09:00
366e95856c
Null-check ihk_os_t and mcctrl_usrdata pointers
...
Change-Id: I941c58d4ab6a0c1ce6bd53c24b552218a1716750
Refs: #1216
2019-02-14 16:26:19 +09:00
bdf5175d4c
invalidate_one_page: Support shmobj and contiguous PTE
...
Change-Id: I15b74ee4afd8e2dc52c933925aae4a1e0d8bcc72
2019-02-14 16:26:18 +09:00
b174fb8099
move_pages: Check flags argument
...
Change-Id: Ia74aa463a060ecd43aa56ee08d622421f227dbfe
Fujitsu: POSTK_TEMP_FIX_78
2019-02-14 16:26:16 +09:00
e828398c8b
do_mmap: don't pre-populate the whole file when asked for smaller segment
...
The linker maps parts of libs with different access flags,
so we cannot prepopulate the whole file.
[dominique.martinet@cea.fr: moved min and friends in compiler.h]
Change-Id: Ifbeddc0908699099cfae5ce9cc2adc578221db31
2019-02-14 16:26:15 +09:00
641d9f1b39
clear_range_l1, clear_range_middle: Fix handling contiguous PTE
...
Change-Id: I2609c94d7f9342fe25aa9a5cfc208375274d46fa
2019-02-14 16:26:14 +09:00
c1270cdf6d
fileobj, shmobj: free pages in object destructor (as opposed to page_unmap())
...
Change-Id: I3ea50fc13ae5c090ba32aad4461f9741a4c35665
2019-02-14 16:26:00 +09:00
022e04b62b
shmobj: Clean up code around memory_stat_rss_sub call
...
Change-Id: I6f678568c3c27799cd2a81f5574b96fd218e942f
2019-02-14 16:26:00 +09:00
9cfc373538
Refactor "do write back only MAP_SHARED pages"
...
* free_process_memory_range() always passes memobj to
ihk_mc_pt_free_range()
* clear_range_*() don't flush page in fileobj with MF_PRIVATE flag
Fujitsu: POSTK_DEBUG_TEMP_FIX_87
Change-Id: I8d46d029b3fc51ca6f0e59d748a2fe93e324a374
2019-02-14 16:25:58 +09:00
fb24dcea2e
unhandled_page_fault: Refactor architecture dependent parts
...
Fujitsu: REQ-12
Refs: #1012
Change-Id: I3c61f9cd3f514bdcd4a7f26e7c15043529269cf5
2019-02-14 16:25:57 +09:00
207d653b41
mcctrl: use vmf_insert_pfn for kernel >= 4.18
...
vmf_insert_pfn got added as a wrapper around vm_insert_pfn in 4.17
1c8f422059ae5da ("mm: change return type to vm_fault_t") and totally
replaced the later in 4.20 ae2b01f37044c ("mm: remove vm_insert_pfn()")
Compare with 4.18 here specifically to avoid troubles when rhel
backports this change later, and avoid adding a rhel version check down
the road.
Change-Id: Ibf108e2fb6f1199f89cde6a7973f4eb55447260b
2019-02-14 16:25:49 +09:00
0a49b6eca5
Add test programs for #1190
...
Change-Id: Icb63e898d5882e1fab18e6af7859af50448a1d60
2019-02-14 16:25:44 +09:00
950ea678dd
Reject "setfsuid: Specify mcexec tid when asking mcexec for fsuid"
...
This fix is rejected because it only makes the setfsuid test in ostest
pass and doesn't fix the other issues including the one in which file
I/O could be done with the old fsuid because an mcexec thread with an
arbitrary tid could handle the system-call offload request.
Explanation of the rejected fix:
setfsuid() proceeds as follows:
1. McKernel asks mcexec for __NR_setfsuid (set)
2. mcexec calls setfsuid, reports the id to McKernel
3. McKernel asks mcexec for __NR_setfsuid (get)
4. mcexec calls mcexec_getcred(), reports the id to Mckernel
5. McKernel sets proc->fsuid to the obtained value
tid of mcexec on the 2nd and 4th step could be different. So this
fix lets mcexec report its tid on the 2nd step and McKernel specify
it in the 3rd step.
Change-Id: Id5cfeed18c64430d576a56e961bbca1ecb2e39ad
Fujitsu: POSTK_DEBUG_TEMP_FIX_45
2019-02-14 04:42:32 +00:00
cd42d186b7
uti: Report error of offloading ioctl if any
...
Change-Id: If4218b9fb89f34728c4aaf81bccab2dfbb0d4a87
2019-02-14 04:15:44 +00:00
66bc44f88a
Readme.md: move figures to R-CCS server
...
Change-Id: I6a861c15402c8e925e3692b912a8df3f6f0ffce9
2019-02-13 18:26:18 +09:00
34a995d290
perfctr_stop: add flags to no 'disable_intens'
...
The original fujitsu code added a whole new ihk_mc_perfctr_stop_first
function, duplicating a lot of code - add a flag to existing function
instead.
Change-Id: Ic9ce0236d68f967ff72cf88e5d9f1bda5c98aa1b
Fujitsu: POSTK_DEBUG_ARCH_DEP_107
2019-02-12 05:18:22 +00:00
d0d99adfb3
Readme.md for github
...
Change-Id: Ib5aa5cde10acb5f5956212f8c451baedc940d123
2019-02-12 02:37:09 +00:00
d78883c692
fix to missing exclusive processing between terminate() and
...
finalize_process().
The process of making a child process zombie and the process of setting
the parent of the child process to process ID 1 are excluded.
Refs: #1257
Change-Id: Ic95d4d8ee92d6a4a63847e5eda20ec1ba92566ac
2019-02-08 10:25:20 +09:00
ff0395581c
Register PPD and release_handler at the same time.
...
Fix that process will remain even if signal is received between PPD
registration and release_handler registration.
Refs: #1201
Fujitsu: POSTK_DEBUG_TEMP_FIX_64
Change-Id: I571781963578df8cedb327f19298f595cfb137a3
2019-02-08 10:20:58 +09:00
f5023c9730
page fault handler: protect thread accesses
...
current cpu's thread can be NULL during init, we don't want null derefs
in the page fault handler
Change-Id: I0a2c22b39cae2c258d211317cffc2408e19f3bbf
2019-02-07 02:41:50 +00:00
fe08ac4a67
arm: turn off cpu on panic
...
Since interrupts are disabled on panic, linux cannot reset a
panic'd core when NMI are disabled (for e.g. mcreboot/mcstop)
Just always offline it, so linux can get it back
Change-Id: If8107172375f2924e02bd4c36e24645ec38a8999
2019-02-07 02:37:31 +00:00
60dcd0e798
move rusage into kernel ELF image (avoid dynamic alloc before NUMA init)
...
Change-Id: I7fe86244c8707694b379e567b31de65ee2c56887
2019-02-07 10:43:47 +09:00
4d215de641
Separate mmap area from program loading (relocation) area
...
We need to separate the two because the heap of a PIE is created in
the area to which it is mapped.
Related commits:
b1309a5d : PIE is mapped at map_end instead of at
user_start
c4219655 : Interpreter is mapped to map_start to make a
system call that dereferences a NULL pointer fail
[dominique.martinet@cea.fr: Also add ULONG_MAX and friend macroes,
used for data_min]
[ken.sato.ty@hitachi-solutions.com: fix execve]
Change-Id: I8ecaf22b7965090ab67bebece57c68283ba23664
2019-02-07 09:58:03 +09:00
97e0219f50
Make Linux handler run when mmap to procfs.
...
Change-Id: I98a3d098c5c676f33c83fa4354c623988ee591f2
Refs: #1222
2019-02-06 11:54:50 +00:00
f9d8d98af1
sysfs: add missing symlinks for cpu/node
...
Add the following patterns of symlinks:
- /sys/bus/cpu/drivers/processor/cpu*
- /sys/bus/node/devices/node*
And slightly change how /sys/devices/system/cpu/cpu*/node* are created
to avoid duplicate lookups
Change-Id: Id94a4d157da06d75f6bd450d5bd9a9e7709a1414
2019-02-06 09:55:54 +00:00
3738b70ad3
git hooks: fix submodule check sloppy match
...
Submodule check used to match any file containing submodule name (e.g.
lib/include/ihk/foo would match ihk and incorrectly be identified as
a submodule change) -- properly check for full name with anchors instead
Change-Id: Ib4330aec97e9da713cd3ab9e791962f2e0c8d396
2019-02-06 08:34:27 +00:00
9bf225d193
mckernel overlay: replace mcoverlayfs with a soft userspace overlay
...
mcoverlayfs has a high maintenance burden and does not work on rhel8's 4.18
kernel (while it works on vanilla 4.18...); instead of debugging this further
time is better spent making it independent from overlayfs.
Change-Id: I7454ae95b0fbb3373c256aa2fd83cdfec466c009
2019-02-06 08:27:25 +00:00
6fc9ec1c92
gencore: finish reintegration into arch-independent code
...
Change-Id: Ic2fc935aeec17c54931817bf43f67ef6da78adc8
Fujitsu: POSTK_DEBUG_ARCH_DEP_18
2019-02-06 17:23:54 +09:00
112ade484a
page_table: Fix return value of lookup_pte when ptl4 is blank
...
Change-Id: I5926fedda182941a4b7a2fe480bffb12d4069713
2019-02-06 07:30:44 +00:00
be708674d3
Reject "do_migrate: Send IPI"
...
Change-Id: If77a51c9bc6a3caef502dd35a276b0dba22b4d24
Fujitsu: POSTK_TEMP_FIX_57
2019-02-06 04:11:16 +00:00
557f33a705
eliminate futex_cmpxchg_enabled check (not used and dereffed a NULL pointer)
...
Change-Id: I97b0e79acfd51b57eeaa6556eba880d231330f01
2019-02-06 02:47:31 +00:00
7dd0cbd9a6
ARM: eliminate zero page mapping (i.e, init_low_area())
...
Change-Id: I89bcce7fb286a4c5983a768534a0d3cea093040c
2019-02-04 04:22:24 +00:00
6ed2e5ffc1
Fix ThunderX2 write-combined PTE flag insanity
...
Change-Id: I59999a680b556acf3e22ac516f4758e3aee7f355
2019-02-01 21:03:19 +09:00
649059f2d2
contiguous PTE: Fix requested page-shift check
...
Change-Id: Iafc505457f7e10c94142070113870cd8b8c6922d
2019-02-01 21:01:27 +09:00
312c1168f3
test: XPMEM: Fix Makefile
...
Change-Id: If7b5887e9dc4d7f94bf18dc5ae95a549baa5fb58
2019-02-01 15:15:47 +09:00
d29419d336
test: Add test programs for #1242
...
Change-Id: Ib3b5d5b661e0cd027711a815d9da2e308cedeffc
Refs: #1242
2019-02-01 15:15:46 +09:00
9f7425c152
Add test programs for lage page
...
Tests arm64 specific, contiguous bit based large pages as well.
Change-Id: I09edad8cfde6c23a259f1f32cfc97974d9cb63c3
2019-02-01 15:15:44 +09:00
100754f556
test: add uti tests
...
Change-Id: Ib59f1c4dab7cec7e67ba35ec1988f6f968a2deaa
2019-02-01 15:15:14 +09:00
6d38c34993
Merge branch 'postk_topic-contiguous_pte' into development
...
* Merge cd7ab307fae9bc8aa49d23b32becf37368a1603e
* Merge commit is changed to one commit for gerrit
Change-Id: I75f0f4cf6b8b3286284638ac2c7816c5257551e4
2019-02-01 15:15:12 +09:00
7f1c17fc4c
tests: add 'postk_master' branch tests
...
Change-Id: Ie0d4cfd0921aed89d2db6083c9eb068b1cfc1984
2019-02-01 15:15:00 +09:00
25ef4e9261
Merge branch 'postk_master' into development
...
* Merge 53e436ae7db1ed457692dbe16ccb15511aa6bc64
* Only arm64 stuff are left
Change-Id: I6b79de1f659fa61e75f44811b639d41f9a37d6cc
2019-02-01 15:14:58 +09:00
d4d78e9c61
Following arm64-support to development branch
...
This includes the following fixes:
* fix build of arch/arm64/kernel/vdso
Change-Id: I73b05034d29f7f8731ac17f9736edbba4fb2c639
2019-02-01 15:14:45 +09:00
e52d748744
new_mcos_handler_info: Propagate kmalloc failure
...
Change-Id: If484cf32cd0bf096ffd712561dd1f73046c60cd8
Fujitsu: POSTK_TEMP_FIX_64
2019-02-01 15:11:36 +09:00
39b21e7ba9
monitor_init: Use ihk_mc_cpu_info()
...
Its call site is moved before numa_init() as well because
monitor_init() defines ihk_os_monitor that was used in
rusage_total_memory_add() called from numa_init().
I didn't revert this modification because I don't want to touch the
working code.
Change-Id: I602467284581ce45989dd071cfe59d3fc4827e29
Fujitsu: POSTK_DEBUG_TEMP_FIX_73
2019-02-01 15:11:33 +09:00
8db2d3beec
sysfs: use nr_cpu_ids for cpumasks (fixes libnuma parsing error on ARM)
...
Change-Id: I466ffbaf38fe5fd2b1ca0439fa7ea4a813e226ca
2019-02-01 15:08:49 +09:00
f5320fc2b4
overlayfs: make mcoverlayfs compile for 4.14.0-115 (el7 arm64)
...
Use the 4.18 module as a base
Change-Id: I6c9ef66399800828e1932573da5a97573545c5da
2019-02-01 15:08:47 +09:00
0fbdcc44b9
mcoverlayfs 4.18: re-define ovl_readlink
...
Apparently /proc needs it; it's normally implemented using get_link if
readlink isn't implemented but proc's get_link crashes the kernel in
this case (because nameidata is only defined for open* paths)
Change-Id: I1864d6c948db879d33ea29b1b281bf84ff8eeec6
2019-02-01 15:08:45 +09:00
351fdead3b
kmalloc: Fix address order in free list
...
The order is expected by the merger.
Change-Id: I54338caaaa1a203ab5dd39a574a25aac324142a5
Fujitsu: POSTK_TEMP_FIX_46
2019-02-01 06:07:26 +00:00
859e976348
kernel/syscall.c: cleanup? pass virt_to_phys directly to do_futex
...
Change-Id: I196ebe5d5cdc577fce442bcd2247d07e85d2b9ff
2019-02-01 13:19:02 +09:00
49353e252b
Added check of nohost to terminate_host().
...
Change-Id: I796a0d98b68783dad6ce04b3a80ca01db8f8eee2
Fujitsu: POSTK_DEBUG_TEMP_FIX_103
2019-02-01 13:19:00 +09:00
452d93f14d
mcctrl_clear_pte_range: fix zap_page for kernel >= 4.18
...
zap_vma_ptes no longer returns an error code as of Linux's
27d036e33237e4 ("mm: Remove return value of zap_vma_ptes()"),
where they decided nobody is interested in it....
Just copy the check out of the function.
Change-Id: I2eda0f91ec55a34bba96f45cc3d887bc80132a82
Originally-by: Kagawa Kodai <fj1731iw@aa.jp.fujitsu.com >
2019-02-01 13:18:58 +09:00
9e5472bb94
Fix for PAGE_SIZE / PAGE_MASK magic number.
...
Change-Id: Icc00594d84a33495af774096ae13f830e29be39f
Fujitsu: POSTK_DEBUG_ARCH_DEP_116
2019-02-01 13:18:56 +09:00
516ab87ab9
Copyrights: fujitsu 2018 bump
...
Separate copyright bumps in a different commit.
A lot of files only had the copyright change at this point; these
were probably changes I added separatly in other patches but just
split these in a different commit instead to simplify git stats
Change-Id: I93cf3fc1c0fa04ee743a79c3fe9768933e6bd0d2
2019-02-01 13:18:52 +09:00
a9884453e2
vmcore2mckdump: make arm-compatible, 'fix' timeout
...
Change-Id: Icdb42ff47d9dff5c6a818cb8c9ae94d183b19569
Fujitsu: POSTK_DEBUG_ARCH_DEP_93
Fujitsu: POSTK_DEBUG_ARCH_DEP_102
2019-02-01 13:18:12 +09:00
0f01312040
configure.ac: remove duplicate executer/user/arch/x86_64/Makefile
...
Change-Id: I6b4b8e636f0194e390871600d6502d3cc94f042b
2019-02-01 13:18:10 +09:00
fb9832af6d
perf counters: add arch-specific perf counters
...
arch perf counters are placed at start, so offset all
other counters (because placing arch perf counters at the end
wouldn't have been intrusive enough?)
Change-Id: Ifab1047872384927d9cfa0a0212327ee73545c29
Fujitsu: POSTK_DEBUG_ARCH_DEP_86
2019-02-01 13:18:09 +09:00
0e895478a1
mcctrl rus_mmap: make vma->vm_flags arch-dependent
...
[Dominique: renamed arch_vm_flags to arch_rus_vm_flags]
Change-Id: I5ec89b3ff80af6bf0ede342eb5816df8c78de348
Fujitsu: POSTK_DEBUG_ARCH_DEP_100
2019-02-01 13:18:07 +09:00
19659aa908
mcctrl: move translate_rva_to_rpa to archdep
...
Change-Id: I0efa51468a7ff4d776d8340a612e6f44eac2ed53
Fujitsu: POSTK_DEBUG_ARCH_DEP_83
2019-02-01 13:18:06 +09:00
e5de0b81ca
ldump2mcdump: move PAGE_SHIFT to arch-dependent includes
...
Change-Id: I42e49db87e375f2dc094926e21dfc00e50484855
Fujitsu: POSTK_DEBUG_ARCH_DEP_94
2019-02-01 13:18:04 +09:00
f299fff266
stack: add hwcap auxval
...
Fix the AUXV_LEN to account for hwcap and remove the ifdefs
Change-Id: I303fc2c5fa4c8cea7ec9823f8580b8a66de2f58f
Fujitsu: POSTK_DEBUG_ARCH_DEP_65
2019-02-01 13:17:58 +09:00
206df33658
perfctr: remove ihk_mc_perfctr_fixed_init from api
...
ihk_mc_perfctr_fixed_init is only used on x86
Change-Id: I6f25d4237d45b4455ccdaae03b850dd9e8edcc57
Fujitsu: POSTK_DEBUG_TEMP_FIX_31
2019-02-01 13:17:52 +09:00
ad8a3ae962
vsnprintf: reject POSTK_DEBUG_TEMP_FIX_28 return value fix
...
Change-Id: I23beeca094e1b0ee84211f3ed4c33ef7e2aa62c2
2019-02-01 13:16:45 +09:00
3c1fd54a92
kernel/mem: remove unused page_table struct
...
Change-Id: I3593bc08206d07d7c07421240f08ac3539ddc81d
Fujitsu: POSTK_DEBUG_ARCH_DEP_89
2019-02-01 13:16:42 +09:00
ca34154a43
mcexec: lookup page_size with sysconf
...
page size is not defiend in sys/user.h on aarch64
Change-Id: Idbdaef2519792eeb1e1a2794be0a34d67e87907e
Fujitsu: POSTK_DEBUG_ARCH_DEP_35
2019-02-01 13:16:40 +09:00
a10f4b861c
do_pageout: fix direct kernel-user access
...
Change-Id: Ie02faca93fdb0d52d72e1f2aa1384a214c84ebff
Fujitsu: POSTK_DEBUG_ARCH_DEP_46
2019-02-01 13:16:32 +09:00
36d473c5b5
pager linux_open/unlink: always use openat/unlinkat
...
some archs do not have the simple open/unlink variants, while the *at
is always available -- this is simpler than making these arch-dependent
functions
Change-Id: Ic16ae5683e6e375210b1744538d291585e67a2fa
Fujitsu: POSTK_DEBUG_ARCH_DEP_78
2019-02-01 13:16:30 +09:00
342a2e1287
x86 syscalls: add a bunch of XXat() delegated syscalls
...
at least funlinkat is needed because these macros define __NR_x for mckernel
side and we will use funlinkat in a later commit
Change-Id: I6b6a2eee11e2fa1e42f97eab4b67e1128cd83ddf
2019-02-01 13:16:29 +09:00
238f563e88
perf: add arch-dependent counter_mask_check function
...
A later version would probably want to check some mask for arm64...
Change-Id: I67e13a852c3ed406fbf8ae1688539b9e069c0e81
Fujitsu: POSTK_DEBUG_ARCH_DEP_87
2019-02-01 13:16:28 +09:00
03cadbcba2
perf: add arch-dependent get_num_counters function
...
Change-Id: I2230af87e0c764d97115e833dccb1842946c1b94
Fujitsu: POSTK_DEBUG_ARCH_DEP_109
2019-02-01 13:16:28 +09:00
2b254f02f8
init_process_stack: change premapped stack size based on arch
...
Avoid consuming a large 512MB page on 64K base page arch
Change-Id: Ice491d43fd998b375ddc24f4eff7faf5d36d9f42
Fujitsu: POSTK_DEBUG_ARCH_DEP_104
2019-02-01 13:16:27 +09:00
960a6f5f90
prepare process: add magic header in program_load_desc
...
Check we mapped the correct region with a magic header in the struct
Original commit: d246b93a3bced92d0ac2a4a337118091b010658a
Fujitsu: POSTK_DEBUG_TEMP_FIX_76
Change-Id: If848be64af5d76844ba65b48493021637c8114f4
2019-02-01 13:16:25 +09:00
0cc3120a01
freeze(): add cpu_pause() to the frozen state loop
...
I guess cpu_halt is not enough on arm?... I don't get it.
Change-Id: Ic67113ae474e5b3af91734d763f1498a19f6a948
Fujitsu: POSTK_DEBUG_ARCH_DEP_82
2019-02-01 13:16:23 +09:00
9f31abf402
monitor_init: fix undetected hang on highest numbered core
...
Original commit: 7d38ead4f ("Fix for bug#99 Change setting value for
monitor->num_processors.")
Change-Id: I437c957fa319c014316a6064cc660e337668bb88
2019-01-29 09:32:25 +09:00
dfd23c3ebe
prctl: Add support for PR_SET_THP_DISABLE and PR_GET_THP_DISABLE
...
Change-Id: I04c5568a9eb78bcac632b734f34bba49cf602c4d
Refs: #1181
2019-01-22 05:40:56 +00:00
eb184419ea
shmget: Use transparent huge pages when page size isn't specified
...
Refs: #1241
Change-Id: Ia111bfeb67d224ad1ab77e5193eac7b7d14a6577
2019-01-22 05:40:56 +00:00
13e29c0da5
mcoverlayfs: fix disabled build
...
Change-Id: Ia40853432547084329fc034e3942e51954e1ddf5
2019-01-22 02:15:43 +00:00
8aaf0f8551
test: Add test programs for #1166
...
refs: #1166
Change-Id: I9b6dd8628e8a3dcb2281e31f4b8d116e9c7852d8
2019-01-08 15:15:34 +09:00
ef9fda23a9
mcexec: Set default heap extension amount to sysconf(_SC_PAGESIZE)
...
Change-Id: I3ac660d33918c1fa28093ab59f3a7ead65d337d7
2018-12-12 00:38:10 +00:00
cd5cb469eb
Fix "Test "Error handling improvement" on arm64"
...
Change-Id: Ie3c835dfe65a9754628ca221f3f563b67b0eb1a0
Refs: #727
Refs: #873
Refs: #1011
Refs: #1232
Refs: #1233
2018-12-10 19:58:15 +09:00
7a8f5043c5
mcstat: Fix test description
...
Change-Id: I942b351146cabd259eb164b73375a547d0fd0c30
2018-12-10 09:27:28 +00:00
cf6514def9
test: Add descriptions to "user_space" test
...
Change-Id: Ic14ddbfbf6bfc12d40d3284ec08e040597356963
2018-12-10 12:59:20 +09:00
96b6d773a9
ARMv8.2-LPA support
...
Change-Id: I12a6eac55af2e7f6a643e4e04ed59a85769f4063
2018-12-07 17:41:50 +09:00
4ba4bbd711
ContiguousPTE[12/12] modify sys_shmget/sys_mmap
...
Change-Id: Icfbe9fbfa6216735ec20c55da95e5b62a25fdfea
2018-12-07 08:27:51 +00:00
410bf13367
ContiguousPTE[11/12] modify ihk_mc_pt_virt_to_pagemap
...
Change-Id: Iff0c77cdd08a76b55c2635c6b0163ef2caade71d
2018-12-07 08:24:22 +00:00
7c231928ab
ContiguousPTE[10/12] modify split_largepage
...
Change-Id: I0a8385af9709b11d7917eb34e8612413fefe6931
2018-12-07 08:22:56 +00:00
50de3820ad
ContiguousPTE[9/12] modify ihk_mc_pt_clear|free_range
...
Change-Id: I75d821b81d351f4fdfd504c791543db174634261
2018-12-07 08:21:44 +00:00
c4e5bf6d6b
ContiguousPTE[8/12] modify page_fault_process_memory_range
...
Change-Id: I79ecd08cf83aeacd3e20a7720bad66ef19573402
2018-12-07 08:17:08 +00:00
c319fe08a4
ContiguousPTE[7/12] modify ihk_mc_pt_set_range
...
Change-Id: Ib38530ce64a01f21107e0a6a73de7c54f214eb5a
2018-12-07 08:12:44 +00:00
24d3da32ed
ContiguousPTE[6/12] modify arch_get_smaller_page_size
...
Change-Id: I4fe8c36cf9561b3ee895f29b112f0ac6f2418f5e
2018-12-07 08:00:32 +00:00
c4fbbb6027
ContiguousPTE[5/12] modify lookup_pte
...
Change-Id: Ie5aa625e5a13596ff8294699d10114aeba9d991d
2018-12-07 07:59:12 +00:00
0449437c15
ContiguousPTE[4/12] modify invalidate_process_memory_range
...
Change-Id: Ib59f4c5d78580a1c4344ac632d3d8f68355d7058
2018-12-07 07:56:28 +00:00
639d0e496b
ContiguousPTE[3/12] modify move_pte_range
...
Change-Id: I20878c97bea768d1f09ab0580d744a58c070be2c
2018-12-07 07:54:28 +00:00
b6de164e9a
ContiguousPTE[2/12] modify copy_user_pte
...
Change-Id: Ie696245a8c09e87c48426bc3e74a6f049a085471
2018-12-07 07:52:17 +00:00
d1b36aab62
ContiguousPTE[1/12] add page table access functions
...
Change-Id: I3291c170e66592c871f316d78d71248d26748501
2018-12-07 07:51:01 +00:00
8a2f4be443
Test "user_space" on arm64
...
Test: Architecture dependent separation of user space access code.
Add arm64 result files.
Change-Id: I651992c0c8bcd1da8313a35eda03612405b55b89
2018-12-07 07:46:09 +00:00
8a684587fa
Fix "Test "Error handling improvement" on arm64"
...
* Fix test to make mcexec fail to fork()
Change-Id: I9a696787b5d4ce44541a4651622e5be60f9ef355
2018-12-07 07:40:14 +00:00
05c315857c
Test "Add mcstat tool" on arm64
...
Change-Id: I4bf1260e999c16fe7b9c339af3833ea007277889
2018-12-07 06:24:18 +00:00
1422838dd1
sysfs-meminfo: Add page size consideration other than 4KiB.
...
Change-Id: I88e3aa6b9537dfff21c72b4a247fda24873216cb
2018-12-06 18:45:56 +09:00
c9fc110fc6
do_kill(): fix pids table when nr of threads is larger than num_processors
...
Change-Id: I0f0120c67a9b0df1cdf7d3fed34dd9c656fd317a
Refs: #1235
2018-12-05 08:17:05 +00:00
ed3c138e1f
test: Fix user_space, process_vm_writev01 expected value file.
...
Fix to check only TPASS. (Delete pagesize)
test: pvw_003, pvw_012
Change-Id: I4f9c3c42b855d419f3db457fbb5e7865da85eee8
2018-12-05 15:51:52 +09:00
60c97d0e60
Test "mbind support" on arm64
...
Add arm64 result files.
Change-Id: I32e8d4e1346076683e7d55e8e928d168e439eaca
2018-12-05 11:27:03 +09:00
95e90c727e
Test "Error handling improvement" on arm64
...
The following test set:
execve: fix memory leak
add: NULL check for master_channel at IKC interrupt_handler.
Fix the check routine for elf sections (Fujitsu: POSTK_TEMP_FIX_77)
Change-Id: I16c2a341c48f6df10a4839be08b93ea16bda8fbe
Refs: #727
Refs: #873
Refs: #1011
2018-12-05 02:01:29 +00:00
ec844bb6e3
Test "fix: Bug for getrusage" on arm64
...
The following test set:
fix: Bug for getrusage return incorrect ru_maxrss
fix: Bug for getrusage(RUSAGE_CHILDREN) return parent info (POSTK_DEBUG_TEMP_FIX_72)
fix: Bug for getrusage often return incorrect ru_stime
Change-Id: I6734b1e34565d5d2715f9901a04ba5b6f0278032
Refs: #1032
Refs: #1033
Refs: #1034
2018-12-05 01:58:44 +00:00
a11d4d7a9d
Test "mcexec_destroy_per_process_data: System calls delegation can not be terminated in error when the last process that closed /dev/mcos0 is a child process." on arm64
...
Change-Id: I6bc3023c1fa6089bc2ca6365b59bbab384b3e1d7
Refs: #882
2018-12-05 01:43:31 +00:00
0ee446923a
Test "make sure to context-switch to idle thread when therad's status is PS_EXITED" on arm64
...
Change-Id: I757d529e49655e9010022f10414e4d6c9eb4c059
Refs: #1029
2018-12-05 01:21:48 +00:00
01b2a1d213
Tests: dust off x86_64 mem_dest_prev
...
Change-Id: I445ea0e8ae2cd631c775718a86a64fd2ecb90f35
Refs: #1228
2018-12-04 10:05:39 +00:00
52cd57fed2
memory/x86_64: fix linux safe_kernel_map
...
init_linux_kernel_mapping is called in setup_x86_phase1 way
before arguments are setup, but we can access kernel boot args
directly and use that, so ugly fix for now.
Change-Id: I285ecc31c6646d6d18566d411b09ae3190e8101e
Refs: #1228
2018-12-04 10:05:03 +00:00
bbc39480d2
Fix test programs for "execve: fix memory leak"
...
* Fix README
Change-Id: I90fe1fbb26569bbab5a34638b5f357d7000eda5d
Refs: #727
2018-12-04 10:02:42 +00:00
8521b98730
execve: Call preempt_enable() before error-exit
...
Fix "execve: fix execve with oversubscribing".
Change-Id: I4de3f5d44b1703db392f3da75196faa1e12d5845
Refs: #727
Refs: #1072
Refs: #1232
2018-12-04 09:43:19 +00:00
da02f76a25
mcexec: Fix error handling of init_worker_threads
...
Refs: #1233
Change-Id: Icce49c996d69b3cf64a71e7bd470421f329c881f
2018-12-04 09:40:24 +00:00
dbe5e99cf9
Fix test of "make sure to context-switch to idle thread when therad's status is PS_EXITED"
...
Change-Id: I62ea813656805b6250b0465853e8fa2918b0c86b
Refs: #1029
Refs: #1227
2018-12-04 08:17:54 +00:00
6b293409e5
mbind: Fix test programs
...
Refs: #1226
Change-Id: I12bf807812d93b7eca8f452e70e70e7c4e32f6a3
2018-12-04 08:17:13 +00:00
b94247c478
Test "signal: When the process receives a termination signal, it first terminates mcexec." on arm64
...
Change-Id: I1be32b991a45f0892146d93a9e6d6be9199faf59
Refs: #870
2018-12-04 05:07:32 +00:00
556a64ac5e
Test "signal: When the process receives a termination signal, it first terminates mcexec." on arm64
...
Change-Id: I5c8ab90ffd5c5da30162d606f4d86dca9d387b5a
Refs: #863
2018-12-04 05:06:07 +00:00
3f11c1aee5
Test "Wait for LWK to run at shutdown." on arm64
...
Change-Id: I96785dda7a1a7eb36ceeb31401d71b4e40efb185
Refs: #898
Refs: #928
2018-12-03 20:06:37 +09:00
de70eac619
mcstat: Fix error propagation
...
Change-Id: Ib4a053d5b9ba5eb0d32c46be7c7fcd0be10cb97b
2018-11-30 14:29:14 +09:00
2ba3ec8a4c
mcstat: Fix memory related stats
...
Refs: #1237
Change-Id: I0574cd71fe3b07aeda3ef981bd82d04ce5862f4f
2018-11-30 05:18:48 +00:00
394a1ef3c5
mcstat: Fix array of status strings
...
More error checks are added at the same time.
Refs: #1223
Change-Id: I406066a6ba0853584d6e1820dde74721ce2682dd
2018-11-30 14:05:21 +09:00
1954aec0ea
perf_event_open: Propagate return value
...
Refs: #1236
Change-Id: I61a4683a533fb199a73a99bc7b2e6f2638212000
2018-11-30 04:10:54 +00:00
2b1b82b242
qlmpi: Refactor test programs
...
Change-Id: I3dd74eda1b77aea529f9cc044177b6c29185b6df
2018-11-29 10:33:11 +00:00
502463ed9e
test: Fix user_space, testing use of copy_from_user / copy_to_user
...
Change-Id: I2caef1ba6597f693dc4f773ef8fedbd837c45ce6
2018-11-29 19:32:04 +09:00
715f67f32f
mcreboot.sh: Fix error handling of BUILDID mismatch
...
Change-Id: I29d78c4739679e0b3229cc6fa28816f1ceee332c
2018-11-29 19:19:09 +09:00
82a57d5f55
test: Add MCK_DIR to mck_test_config.sample.in
...
Change-Id: I9ed1b0433fc6b8eeb1cb024be2d33263e3283ab7
2018-11-29 12:50:29 +09:00
56abe988f3
test: Fix user_space, testing use of copy_from_user / copy_to_user
...
Change-Id: I2caef1ba6597f693dc4f773ef8fedbd837c45ce6
2018-11-29 11:32:42 +09:00
68c581f721
test: Fix 898 and 928
...
1. Catch up with the interface change in
ihk_os_destroy_pseudofs() and ihk_os_create_pseudofs()
2. Expect ihk_os_shutdown() to return zero when the OS had been shut
down
Refs: #898
Refs: #928
Change-Id: Ic430550ebfd5cd21164eefaed155fe769adf8395
2018-11-28 02:19:37 +00:00
6ca5aaa1fc
configure: Fix BUILDID (again)
...
The previous commit made BUILDID use git for submodule, but for complex
git setup (e.g. worktree) and older git version or dead .git 'link' it
would blindly rely on the existence of the .git file even if git does not
actually find anything.
This would lead to possibly empty BUILDID which would fail building.
Just always run the git command, and echo the version string if it failed
Change-Id: Ied268d2150a30dc1146498e15fa8394afc8a8d0d
2018-11-27 17:15:27 +09:00
b2a58ce3e3
Test "Confirm build ID of mcexec, ihk, mckernel" on arm64
...
Change-Id: Ia5fa6d6d062e8d845c7fedca1b6cc50fbeab1860
2018-11-27 08:12:28 +00:00
cfcf0137eb
Test "Exclude areas not assigned to Mckernel from direct map of all phys." on arm64
...
Change-Id: Ida0d1f13f4a14c2ee219325aaa4b2cac1476c991
2018-11-27 05:29:15 +00:00
00395d68d4
Test "mcexec additional options (h, m, n, O, stack-premap)" on arm64
...
Change-Id: I85d5deb0433cc1208e4b6837dcc6d6dc2a7b7b52
2018-11-27 05:12:43 +00:00
dc1f96fee3
Add set_cputime() kernel to kernel case and mode enum.
...
Change-Id: Id4584389f39f255335d3bf7b5606f054f108ad51
Fujitsu: POSTK_DEBUG_TEMP_FIX_84
2018-11-27 05:03:39 +00:00
c585a37440
move mcoverlayfs kernel version check from mcexec.c to configure
...
While we are here:
- fix uname -r (single quote?!)
- add compat for rhel8 (el kernel and version is 4.18)
- also remove linux version check in mcreboot.sh, trust configure check
Change-Id: I14726d4374b0dfd941640096044ea1d5d88bfcb8
2018-11-26 12:09:00 +00:00
98aa633856
add attribute converted flag
...
Change-Id: I215e42fa87752d16b8c9744b02d063098cba0af7
2018-11-22 06:04:34 +00:00
ddde519263
Test "rus_vm_fault: If page fault occurs in a thread that has not processed system call offloading, incorrectly return to normal." on arm64
...
Change-Id: I3dc98d8994228ad27cfdf9ca96a0a76e544bc947
Refs: #923
2018-11-22 05:27:56 +00:00
f240671fc8
Test "ptrace: support for attaching child_process to parent" on arm64
...
Change-Id: I752542b6bfbf023d22e91f909518660afbff813c
Refs: #885
2018-11-22 04:54:29 +00:00
cf113d392a
Test "/proc/PID/maps support add" on arm64.
...
Change-Id: I0585ae6257b5c0269760dd7f23ba75b83dd7ac2c
2018-11-22 04:53:04 +00:00
9e57db5427
Test "sigaction: support for SA_RESETHAND on x86_64" on arm64
...
Change-Id: I6154134d53d1ee0344e4bc344f302ffaf810c618
Refs: #1031
2018-11-22 04:51:36 +00:00
739472bd86
Test "xpmem: support for fork()" on arm64
...
Change-Id: I12c628312157f35e239d3c5e67fa38adf156406b
Refs #925
2018-11-22 04:50:58 +00:00
136b749349
configure.ac: Fix BUILDID
...
Change-Id: Id9717422c3d5d2de51570d4672864dbd271ad0fc
2018-11-21 17:02:45 +09:00
ae9a1f39df
ihk_ikc_recv: Record channel to packet for release
...
ihk_ikc_release_packet takes the channel and puts the packet into its
free-list. This fix makes it easy and safe to identify the proper
channel.
Change-Id: I5584b1e8a3ed675c2f9d68f0b5ed331b909197f6
Fujitsu: POSTK_DEBUG_TEMP_FIX_89
2018-11-21 17:01:58 +09:00
10dc87dd3f
mcreboot: check on SELinux
...
Change-Id: I2c3706c04c7977ec22407358232d7c3a21abdc14
2018-11-21 07:52:10 +00:00
724e0eb7d0
mbind(): Fix memory_range_lock deadlock.
...
Fixed the problem of "return error/goto out" while
locking the memory_range_lock in mbind().
Change-Id: I980a7a440f652b60379acae3cb3575211a749774
Fujitsu: POSTK_DEBUG_TEMP_FIX_100
2018-11-21 16:49:48 +09:00
04e0456232
set_mempolicy(): Add mode check.
...
Fix a problem that does not result in an error even
if MPOL_F_STATIC_NODES and MPOL_F_RELATIVE_NODES are
simultaneously specified in set_mempolicy() mode.
Change-Id: I06e695baf869daee8bc64179748cac27b64e914b
Fujitsu: POSTK_DEBUG_TEMP_FIX_99
2018-11-21 16:49:40 +09:00
6626204c99
set_cputime(): interrupt enable/disable fix.
...
Check interrupt enabled state in set_cputime() instead of enabling
them unconditionally on exit.
Change-Id: I99212855f33f5535f67f045665bf5e025c55b690
Fujitsu: POSTK_DEBUG_TEMP_FIX_98
2018-11-21 16:49:30 +09:00
190039f5d9
arch_cpu_read_write_register: error return fix.
...
Fixed an issue where errors generated in arch_cpu_read_write_register()
are not transmitted to the caller.
Change-Id: I05d7d872eab834918220cf18f628aee37208a156
Fujitsu: POSTK_DEBUG_TEMP_FIX_94
2018-11-21 16:49:21 +09:00
583cb94667
mcctrl: remove in-kernel calls to syscalls
...
Since 4.17.0, kernel cannot call syscalls directly because the calling
convention can be different on x86_64, as explained in this email:
https://lore.kernel.org/lkml/20180325162527.GA17492@light.dominikbrodowski.net
Use the ksys_* alternatives instead when possible, or for readlink use
do_readlinkat (and use readlinkat all the time to simplify ifdefs)
It might be possible to change some of these without ifdefs, but for
example ksys_unshare only got introduced in 4.17 so we need to keep some
syscall calling...
Change-Id: Ic47e184b29ef8b21731b2eae6193b0af2548b872
2018-11-21 16:42:26 +09:00
db4d19e419
Add crash utility extension
...
Change-Id: Ia3dadecdd4605c3ee74d1b5242f67486c675faa7
2018-11-21 07:40:00 +00:00
04c11f35e9
xpmem: Add xpmem_openat
...
In arm64, glibc-open of /dev/xpmem is hooked in sys_openat. This
commit adds xpmem_openat which is called by sys_openat.
This commit silently applies copy_from_user fix to sys_open as well.
Change-Id: I3b4f7bf0e152c359250bb2b56910db9192390cb1
Fujitsu: POSTK_DEBUG_ARCH_DEP_46, POSTK_DEBUG_ARCH_DEP_62
2018-11-21 07:39:56 +00:00
e12d5ed341
Expose McKernel version in /proc/mckernel
...
Change-Id: Ica0fbb0ff70a4ff2559e92738926279a3ae78a21
2018-11-21 07:39:54 +00:00
1253f4d18c
mcexec shebang: delete spaces *before* path as well
...
Apparently, a shebang '#! /bin/sh' should work.
Will add some ostests for these...
Change-Id: Iab8ba8e3cc7e434c98742f71fe7db3c425f08278
2018-11-21 07:39:51 +00:00
527adedaa3
madvise: Add MADV_HUGEPAGE support
...
Since McKernel allocates hugepages by default, we could consider that
madvise call with MADV_HUGEPAGE is supported.
Change-Id: Ibdaa6f77416d029a1d17210773ef79539ba04b1c
2018-11-21 07:39:26 +00:00
525b90d028
flatten_string/process env: realign env and clear trailing bits
...
envs are stuck after args which are now possibly unaligned, and used
from a non-aligned pointer in prepare_process_ranges_args_envs (env)
The memory immediately after args/envs is copied anyway with memcpy_long,
so make sure the bits are initialized and realign env correctly
Fixes: 70e52faf36 ("flatten_strings: do not return unused trailing bits")
Change-Id: Ic747e947d151c0eea65dec36bc9c888cf6e0c394
2018-11-21 07:39:16 +00:00
38e68f358a
Add kernel argument to turn on/off time sharing
...
Add "-T 0" to mcreboot.sh if you want to turn off time sharing. When
it's turned off, McKernel doesn't activate interval timer when the
length of per-CPU run-queue is larger than one.
Change-Id: I2cedc1b30a9cd9a0f4608a32ecec0a0d58c6225e
2018-11-21 07:37:01 +00:00
7a3f4d7501
mcctrl rhel8 compat: remove unneeded RHEL_RELEASE_CODE check
...
it was meant for 3.10 kernels, so the regular < 4.0.0 check
will work for el7 and older kernels as well
Change-Id: I807f030f6303c9c3d17b0d80de55c256a3479486
2018-11-21 07:36:50 +00:00
1a5b10277f
mcexec: load_elf: disable execvp for within-mckernel execs
...
the libc takes care of trying execve as many times as needed for
execvp, it's not a kernel call.
Also, sneak a double-free fix (desc was not reset properly in case
load_elf_desc_shebang failed)
Fixes: b1681f4a3affff ("mcexec/execve: fix shebangs handling")
Change-Id: If8e3d7ae53acdeffc0331ae8621e0832fcfa406f
2018-11-21 16:17:58 +09:00
a59c55c188
mcexec load_elf_desc: print error after returning
...
Running "mcexec dfsafds" did not print any message in normal use.
Rather than looking for which message shows in debug and turn in into
eprintf, add a single coherent message (more shell-like) at the end and
turn other messages off.
There is a small loss of information but this is equivalent to what
shells give (a single errno value with no details), and it is now easy
to add --debug to mcexec to see more information if required
Change-Id: Id2c3a47880b7d1d7467883351e6e7af561f91bbf
2018-11-21 16:17:58 +09:00
1d6a078afa
mcexec: add --debug-mcexec
...
We already have debug statements compiled in, add a toggle for it
Also fix case indent for 's'
Change-Id: I1104ee57d571b82ec5e061f22cd44033a5c7fc39
2018-11-21 07:16:54 +00:00
fb98664f49
clone_thread: Add arch_clone_thread()
...
Fujitsu: POSTK_DEBUG_ARCH_DEP_23
Refs: #969
Change-Id: Ic15765b8c9e956c95fc50b333b01464d87450d3c
2018-11-21 07:10:01 +00:00
9db8d115d9
overlayfs: rhel8 compat for the 4.18 version
...
rhel8 is a 4.18 kernel but they've already backported some later fixes.
Instead of relying on the kernel version, the changes removed some defines so
we can check for the define presence to make the code more robust to kernel
version wilderness instead
Change-Id: I6cf5548a7b73a7394405daf850f715a1e20ab0b4
2018-11-21 16:06:31 +09:00
e26e693e58
mcoverlayfs: update and compile new overlayfs for 4.18 kernels
...
This newer version is much simpler than the old ones:
- the options are noop, this lets the code simplify all the allocating
of a new option struct and passing it around
- ovl_reset_ovl_entry was added and called all the time, but the
mechanism that made this required is gone in this kernel version
On the other hand, one new thing in this version:
- newer kernel check the stacking depth of filesystems now, and we are
reaching the default limit of two with our setup. Bump it to three here.
Also, while we are here, make make fail if requested directory does not
exist, instead of infinitely recurse into make modules in the mcoverlayfs
directory...
Change-Id: I45050d693a0aa6fd3027deaf417c29876ef6a1ea
2018-11-21 16:06:31 +09:00
fc2775c932
mcoverlayfs: add new base from 4.18.14
...
This just lays out new files so the next commit is easier to review;
nothing changes here
Change-Id: I66669877d2d10632f5436c0eeb32248cd4c8b996
2018-11-21 16:06:31 +09:00
6581f9b4b2
mcctrl syscall: compat for newer zap_vma_ptes
...
newer version of this function no longer return an error on the basis
that "no-one checks what it returns anyway"........
See linux 4.18's 27d036e33237e ("mm: Remove return value of zap_vma_ptes()")
Change-Id: I8fb9f060e3e145cc2db21738585c9ee7f1445f74
2018-11-21 16:06:31 +09:00
3a90521489
mcexec: fix strncat bounding
...
strncat must not look at the appendee's length, but at how much
is left where we're appending.
This API is stupid anyway, where is strlcat when we need it...
Change-Id: Icdf418083146420a06f8ba5ffdf882982610d39b
2018-11-21 16:06:31 +09:00
03802052ed
mcctrl: add handling for one more level of page tables
...
newer linux got a 5 level page table now, try to handle that.
Some of the macros will be no-op (e.g. loop only on one iteration) on
architecture/kernels with only 4 levels but the code needs to be there
to compile
Change-Id: Ifc6304cbb066dce7d4e30962687ae05d7e034730
2018-11-21 07:03:24 +00:00
c21485d427
mcctrl: include linux/cred.h
...
The headers defines __task_cred and other macroes we use, and always
existed; we must have gotten it indirectly on older kernels, it doesn't
hurt to always include
Change-Id: Iacfff0365e7a21e6247eea42606bbbf1dfccc077
2018-11-21 06:38:08 +00:00
18d50e48dc
mcctrl: lookup for alternate syscall names
...
on newer x64 kernels (config option?), syscalls can be renamed to allow
both x64 and ia32 versions to coexist. Lookup either names
Change-Id: I2f55cc804d3eee948ee1ed6d18c69c75bd2f652c
2018-11-21 06:38:08 +00:00
a2be475ae4
mcctrl control: replace cpu_isset by cpumask_test_cpu for new kernels
...
Change-Id: I60635118e5ce7281de97e024c626ac40d1a4aa36
Fujitsu: POSTK_DEBUG_ARCH_DEP_54
2018-11-21 06:38:08 +00:00
38f683d1d0
mcctrl control: task start_time changed to u64 nsec
...
Change-Id: I1128c20cf836d20b6e84d7ec58cf8dfb075297da
Fujitsu: POSTK_DEBUG_ARCH_DEP_74
2018-11-21 06:38:08 +00:00
59828db5c9
mcctrl archdeps: rename vdso_image_64 to _vdso_image_64
...
The symbol appears in some header in some linux version,
it's still not exported so we need our own lookup anyway; just rename it.
Change-Id: Ia4bce85988641c96fa3f5a0ae1d42c25c713b6c2
2018-11-21 06:38:08 +00:00
1a3c73468f
shmobj: Fix rusage counting for large page
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_88
Change-Id: I852fe804bddf6da5b93a2ac72b0461ee63c98d46
2018-11-21 04:51:57 +00:00
85c936a6cb
mcexec: fix terminating zero after readlink()
...
Change-Id: Icb5432f157ceb2182d93e2d327cfa63ad02a8c0e
2018-11-08 17:01:22 +09:00
6f9fef2b13
procfs: Make /proc/<PID>/mem unwritable
...
refs: #1177
Change-Id: Ibb319221155547febf9126e05a9e322bd9f140cc
2018-10-26 08:58:31 +00:00
cc1d39e55d
mcctrl_perf_enable: Fix type of integer constant
...
Change-Id: Ib98eca85a9962520dafdd08b8fc223a6a83bafd0
2018-10-24 14:56:26 +09:00
fd8bed670e
ihk_os_setperfevent: Return number of registered events
...
In addition to that, mcctrl_perf_set is modified so that it updates
usrdata->perf_event_num with number of registered events.
Change-Id: I3f343176f55b06d3baab0b0fe34e240f39706cf6
Fujitsu: POSTK_DEBUG_TEMP_FIX_80
2018-10-24 06:16:41 +00:00
24a3b236a0
Update .gitmodules to point IHK at github
...
Change-Id: I712f4cf2fb012d2b268f0881a156268024df57b9
2018-10-24 11:20:13 +09:00
27e55b8cf1
mcreboot.sh: Fix error reporting for missing argment
...
Change-Id: I3af99d7a117d4401c2e0a143fa74513094a53302
2018-10-18 12:06:58 +09:00
70e52faf36
flatten_strings: do not return unused trailing bits
...
Trailing bits were displayed in proc->saved_cmdline, displaying
uninitialized data to the user in /proc/<pid>/cmdline
Change-Id: I74831c8c68dd2f2197b35e9b49aaaae29c4c1dd5
2018-10-15 08:35:50 +00:00
8db36c3828
mcexec: do not resolve links in lookup_exec_path
...
This would incorrectly make "mcexec sh -c './script.sh'" run with
/bin/bash instead of /bin/sh (which is important, because bash behaviour
changes depending on how it is invoked)
Change-Id: I80610cf442c6c3ecacfa23e8ed15652bc8d4e3f7
2018-10-15 08:35:41 +00:00
06dd71a7e0
Revert "procfs: add '/proc/pid/stat' to mckernel side and fix its comm"
...
This reverts commit b70d470e20 .
That commit had been landed too fast after a mistake during migration
from old to new gerrit that didn't keep -1 vote ; it needs some fix
Change-Id: Ifc8a23e42449dfe471049270b4706e9b137e096e
2018-10-12 10:54:14 +09:00
01fe83dcb3
do_mmap: change addr to uintptr_t
...
Change-Id: I7df45e125387083aef7e62b046c20b7422f60f22
2018-10-11 09:24:23 +00:00
c86d168165
procfs: handle 'comm' on mckernel side
...
Change-Id: Ie68514ba3e5161b931b88eeee9e8a2267ee69354
2018-10-11 09:19:42 +00:00
a032dc3d1b
procfs: use length from snprintf instead of recomputing
...
Change-Id: I75ba4cf5c2e94798d183728c11bb34032cdddf5a
2018-10-11 09:17:58 +00:00
201fa7fb55
fork: copy saved_cmdline from parent process
...
This fixes empty children names for forked children.
Change-Id: I9512f0981d2a241c106ee3e8500f2084ef61a660
2018-10-11 09:14:14 +00:00
dd676f7149
saved_cmdline: only allocated necessary space
...
Change-Id: Ibb3fe66b46485a28c15e45dca9213f42f5afaa1c
2018-10-11 09:13:15 +00:00
a751e96b1a
Add mck_num_processors symbol pointing to num_processors
...
the 'num_processors' symbol is also used by linux, so trying to load all
symbols from linux and mckernel at the same time renders either symbol
inaccessible (the first to be seen is kept by default).
This provides an alternate name for the mckernel symbol, thus letting us
access both more easily if required.
Change-Id: I8074d4f9f9ac45717df9a8df16be710ff762e161
2018-10-11 09:12:04 +00:00
c3bfa3f6a9
move BUG_ON, panic and kprintf define to debug.h; add BUILD_BUG_ON
...
these functions are more logical to keep together there as they depend
on each other.
Also add a comment about the __printf attribute, if we have a quiet
period it would be useful to enable and clear the thousands of
warnings...
Change-Id: I47d3891c9cd87da28b2883c29384959f5abd1459
2018-10-11 09:03:53 +00:00
1e1fa4f70d
trivial warnings fixes (unused variable/function)
...
Change-Id: I71cedd2c09eeb5d2c2fd2e988dfdde0877627abc
2018-10-11 09:03:53 +00:00
39f9d7fdff
Handle hugetlbfs file mapping
...
Hugetlbfs file mappings are handled differently than regular files:
- pager_req_create will tell us the file is in a hugetlbfs
- allocate memory upfront, we need to fail if not enough memory
- the memory needs to be given again if another process maps the same
file
This implementation still has some hacks, in particular, the memory
needs to be freed when all mappings are done and the file has been
deleted/closed by all processes.
We cannot know when the file is closed/unlinked easily, so clean up
memory when all processes have exited.
To test, install libhugetlbfs and link a program with the additional
LDFLAGS += -B /usr/share/libhugetlbfs -Wl,--hugetlbfs-align
Then run with HUGETLB_ELFMAP=RW set, you can check this works with
HUGETLB_DEBUG=1 HUGETLB_VERBOSE=2
Change-Id: I327920ff06efd82e91b319b27319f41912169af1
2018-10-11 08:54:13 +00:00
3e3ccf377c
compiler.h: add READ_ONCE/WRITE_ONCE macro
...
These macros are needed to make sure the compiler does not optimize away
atomic constructs such as "while (!READ_ONCE(foo))" loops that do not
modify foo within the loop
Also move the barrier() define where it belongs while we are here, it is
needed for READ_ONCE/WRITE_ONCE and including ihk/cpu.h here causes
include loops
Change-Id: Ia533a849ed674719ccbc0495be47d22a3c47b8f8
2018-10-11 08:54:13 +00:00
13e71ac9dc
pager: minor cleanups
...
- remove unused MF_END (that only makes sense for enums without holes,
this one is a set of bits masks)
- remove useless goto in pager_req_create()
- init maxprot to 0 from the start, it's not used in the error cases
(except for debug print)
Change-Id: Ic56c0754824b99f8a7e45fa8e99b8fe3e7c7e592
2018-10-11 08:54:13 +00:00
b1681f4a3a
mcexec/execve: fix shebangs handling
...
There were mainly two problems with shebangs:
- Suffix arguments handling e.g. '#!/bin/sh -x'
- Recursive handling e.g. script1 fetchs '#!/path/to/script2'
and script2 itself has a shebang
- (did I say two?) running shebang would replace argv[optind] instead
of appending e.g. script with '#!/bin/sh' and running './script -c'
would run '/bin/sh -c' instead of '/bin/sh ./script -c'
There also are two places where this needs parsing:
- starting a fresh program from mcexec
- starting a new program from execve in mcexec
The first was easy to fix as we already had argv around, but the later
required a new way to transfer the 'new argv elements from the script'
to mckernel to append before its argv -- it used to be 'desc->shell_path'
but that was no longer used at some point and just one keyword is not
enough to handle this properly.
This commit does:
- Refactors the lookup_path + load_elf_desc that was only done at most
twice in its own function that loops indefinitely and use that in both
situations described above
- Transmits the argv addition in the transfer to mckernel after the
desc; mckernel allocates 4 pages (hardcoded) for the descs and we will
hopefully have room for the script arguments on top of that... (there is
no guard!!!)
- Change flatten_strings to allow prepending a flattened string instead
of a single string.
Note that the flatten_string change also brought in a difference in the
format, to have the full length embedded within the string, the latest
slot that used to be zeroes now contains the position of the end of the
buffer (where the last+1 string would be if there had been one)
This required a trivial change in mckernel prepare args function that
used this property for no real reason.
Hopefully things work™, this probably warrants adding a couple of new
ostests...
- create a couple of scripts with recursive invocation/arguments and
check their own argv.
- execute "mcexec script args" and "mcexec sh -c 'script args'"
Change-Id: I2cf9cde5c07c9293f730de89c9731bd93dbfa789
Refs: #1115
2018-10-04 14:31:02 +09:00
1226e692d9
mcstat: Install mcstat.1
...
Change-Id: Id5af2f56ef9cc9c444bfc0500190f52ffc779936
2018-10-04 02:52:18 +00:00
73ea4b1ce9
ihk_os_getperfevent,setperfevent: Return -ETIME when IKC timeouts
...
Change the return value from -EINVAL to -ETIME.
Refs: #1167
Change-Id: I87fa57bb45d0036b7e4b25366aa7b7ce6fb2c764
2018-10-04 02:44:22 +00:00
09f663c246
mcctrl procfs: check entry was returned before using it
...
Change-Id: If66e95d217d1045e2e65bc5978bba020e3fa7c0d
Refs: #1116
2018-10-04 02:41:16 +00:00
9b77630c8b
mcexec: readlink and use full path for reexec
...
This fixes comm on linux side, showing mcexec instead of 'exe'
Change-Id: I9345d7a23dccb36b3a1e17fd3e7491eaeca54e5b
2018-10-04 01:03:10 +00:00
b70d470e20
procfs: add '/proc/pid/stat' to mckernel side and fix its comm
...
This lets ps show the proper executable name instead of mcexec's comm
on linux side
Change-Id: I62732037451f129fc2e905357ebdc351bf7f6d2d
Refs: #1114
2018-10-04 01:01:19 +00:00
ecc850dfef
procfs/do_fork: wait until procfs entries are registered
...
Do not return from fork() until mcctrl side has created mckernel's
procfs entries for the child PID.
This fixes programs doing fork() immediately followed by opening
/proc/<child pid>/something, and would get some error
Refs: #1189
Change-Id: Ie10ea56b65c55f59e96a1ab6ef83a1070e36048d
2018-10-04 01:00:52 +00:00
b11377f2e9
Increase IKC master channel size
...
Change-Id: I183878bb22b848e1230f8028947cf46485293471
2018-10-03 06:23:17 +00:00
ed1edb152b
ptrace supports threads
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_53, POSTK_DEBUG_ARCH_DEP_44
Refs: #771 , #1179 , #1143
Change-Id: Ie17ece6864f0eeb0c0e550f4e369abb77980a0d0
2018-10-01 03:57:16 +00:00
28c434a230
test: Fix test for 898 and 928
...
Change-Id: If939dda7ccdcf568abfa42ccab7ff6be2b983cc2
2018-09-28 02:55:55 +00:00
daa234d8b9
mcexec_create_per_process_data: use copy_from_user
...
Refs: #1205
Change-Id: Idced73a7f88aada5fc2462b490d56603f8fe2472
2018-09-27 15:42:01 +00:00
e803698618
test: Refactor test programs
...
Change-Id: I77fec2f5f30f6fda3bda6f85ce00f1c2e7f7a9b3
2018-09-25 12:45:20 +09:00
c862b29d65
sched_setaffinity: Check migration after decrementing in_interrupt
...
refs: #1180
Change-Id: I2b3fb03066812ecc802406297084977e757092fe
2018-09-25 01:52:54 +00:00
dd58d366c3
procfs: Fix pread/pwrite to procfs fail when specified size is bigger than 4MB
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_43
Refs: #1018
Change-Id: I736ac69885695ef8eeababc3fcfe69a6258b4e16
2018-09-20 02:06:17 +00:00
ab284b0531
test: Add test programs for #1158
...
refs: #1158
Change-Id: I853dd84f5433a01da510813e9fb1276e5477f73f
2018-09-20 02:05:55 +00:00
42b9b31606
mcctrl: Propagate writecore()'s return value to caller
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_62
Change-Id: I847dd520187cbf66fbad8140f79f62c6d5d9d5fc
2018-09-20 11:01:22 +09:00
29c5c68761
coredump: Change type of coretable.len to loff_t from int
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_61
Change-Id: I6a27a8d477c3b3dcc12be772a15dfcff370bd2a8
2018-09-20 11:01:22 +09:00
38c08a6663
coredump: Add O_TRUNC to flags opening corefile
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_59
Change-Id: I36c89fa894dfc0cdd170781e8ca4aab6149d4928
2018-09-20 11:01:20 +09:00
57258e7f59
coredump: Don't dump when MCK_RLIMIT_CORE is zero
...
Fujitsu: POSTK_DEBUG_ARCH_DEP_67
Change-Id: Ic85c793b052cde9d7fa4fe510c5daee303d370c4
2018-09-20 01:51:18 +00:00
8c33c92720
mcctrl: Switch Linux functions/structures according to the version
...
For get_user_pages_remote in binfmt_mcexec.c:
In 4.10 with 5b56d49fc31d ("mm: add locked parameter to
get_user_pages_remote()")
In 4.9 with 9beae1ea8930 ("mm: replace get_user_pages_remote()
write/force parameters with gup_flags")
For vmf in syscall.c, these two patches in 4.10:
82b0f8c39a38 ("mm: join struct fault_env and vm_fault")
1a29d85eb0f1 ("mm: use vmf->address instead of
vmf->virtual_address")
Fujitsu: POSTK_DEBUG_ARCH_DEP_41
Change-Id: I89a02d03169a2162ea186da1804bf48910446d11
2018-09-20 01:50:04 +00:00
a269d96978
coredump: Exclude special areas
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_38
Refs: #1005
Change-Id: I8934d2aecf06a09469afe131347e42b48b6f67f6
2018-09-20 01:48:17 +00:00
2910818f06
execve: Fix calling ptrace_report_signal after preemption is disabled
...
Change-Id: I451d28d985ab330d855501597713e982b8febf4e
Refs: 1194
2018-09-20 01:31:31 +00:00
3df82d61ce
test: Fix tests of "user_space"
...
user_space/swapout/swapout_copy_to_01.sh:
* Use ~/.mck_test_config
* Fix checking if McKernel version is written in swap-file
user_space/futex/futex_test.sh:
* Use ~/.mck_test_config
user_space/perf_event_open/perf_event_open_test.sh
* Use ~/.mck_test_config
Change-Id: Id93b207ed0e3e9ebf307073db81b40335bc5b140
2018-09-19 08:54:08 +00:00
159092c58e
rusage: Refactor test programs
...
Change-Id: I846a6416acf903f7fa19db98d4d937c51c10b4af
2018-09-18 18:42:19 +09:00
60011718d2
add common test framework
...
Add new file with common functions for tests to use.
- loads config file
- checks for mcexec etc
- checks for LTP and OSTEST if required
- handle mcstop / mcreboot if required, and provide function for it
At the same time, make a few changes to mck_test_config:
- move to ~/.mck_test_config
- add boot params to the config, tests the require specific params can
overwite it
- make the config "set-if-variable-is-empty", so someone can overwrite
any param by setting the environment value e.g. LTP=.... ./test.sh
will use the value given
Change-Id: Ib04112043e3eb89615dc7afaa8842a98571fab93
2018-09-14 03:30:06 +00:00
7e342751a2
do_syscall: Delegate system calls to the mcexec with the same pid
...
This includes the following fix:
send_syscall, do_syscall: remove argument pid
Fujitsu: POSTK_TEMP_FIX_26
Refs: #1165
Change-Id: I702362c07a28f507a5e43dd751949aefa24bc8c0
2018-09-13 16:59:47 +09:00
c23bc8d401
syscall_time: Handle by McKernel
...
refs: #1036
Change-Id: Ifa81b613c7ee8d95ae7cdf3dd54643f60526fa73
2018-09-13 07:44:02 +00:00
5e760db417
syscall: the signal received during system call processing is not processed.
...
Refs: #1176
Fujitsu: POSTK_DEBUG_TEMP_FIX_56
Change-Id: I410160ccbcef3ef49a0e37611a608bc87c97e63b
2018-09-13 07:04:11 +00:00
e4da71010c
check_signal: system call restart is done only once
...
Fujitsu: POSTK_TEMP_FIX_66
Refs: #1009
Change-Id: Ic0f04ac6b7f6c6bb01b55fb389bf9befd56b1dd9
2018-09-13 07:00:49 +00:00
c25fb2aa39
memobj: transform memobj lock to refcounting
...
We had a deadlock between:
- free_process_memory_range (take lock) -> ihk_mc_pt_free_range ->
... -> remote_flush_tlb_array_cpumask -> "/* Wait for all cores */"
and
- obj_list_lookup() under fileobj_list_lock that disabled irqs
and thus never ack'd the remote flush
The rework is quite big but removes the need for the big lock,
although devobj and shmobj needed a new smaller lock to be
introduced - the new locks are used much more locally and
should not cause problems.
On the bright side, refcounting being moved to memobj level means
we could remove refcounting implemented separately in all object
types and simplifies code a bit.
Change-Id: I6bc8438a98b1d8edddc91c4ac33c11b88e097ebb
2018-09-12 18:03:25 +09:00
b51886421e
uti: Don't compile syscall_intercept related stuff when not specified with configure option
...
Change-Id: I9be8cb9b3fcae78d33a33b057c43caee23a81fc1
2018-09-05 16:29:20 +09:00
22c6c5c736
do_syscall: Call schedule() when runq_len > 1
...
This optimization make the offloading thread quickly yield to
another thread. Without this, it yileded only after the interval timer
set the rescheduling flag.
Change-Id: Ida3b17ed94782d5d1af0185a96b1f50d9db8d244
2018-09-04 19:53:03 +09:00
cd00fc3a78
set_timer: Start timer when runnable thread count is bigger than one
...
Change-Id: Ie32799fff2936ffc057f166db5681edccdbf5920
2018-09-04 19:53:03 +09:00
00a34a8ba3
uti: util_thread: Hoist uti_desc check
...
Change-Id: I8c4b75140df2fe149dfe20e0a8f0bf323b5f1763
2018-09-04 19:53:03 +09:00
8900c2cec5
uti: mcexec_uti_attr: Fix CPU binding decision
...
Change-Id: I4047858895503ae912e5575bb232dbbb2f915722
2018-09-04 19:53:03 +09:00
fca02ee248
uti: Add error checks to kmalloc of struct uti_attr
2018-09-04 19:53:03 +09:00
781a69617b
uti: Replace data types represented as arrays with C structures
...
Defining C structures for the following objects:
(1) Remote and local context
(2) Stack of system call arguments / return values
Change-Id: Iafbb6c795bd765e3c78c54a255d8a1e4d4536288
2018-09-04 19:53:03 +09:00
04d4145b3e
uti: Replace dead uti thread with new mcexec thread in proc->tids
...
Change-Id: Ic6e906dd1bfac1b07f1317732cbe0a5191831cd8
2018-09-04 19:53:03 +09:00
96aab7e215
uti: Cosmetic change in util_thread
...
Change-Id: I8aa75efa4dbfb798e40e75f76bacbd184dae23b8
2018-09-04 19:53:02 +09:00
98ee584ab6
uti: Change field name of release_user_space_desc
...
Change-Id: I18ada86ec3835198c1a947d8ceb36075d6ff2e94
2018-09-04 19:53:02 +09:00
6b031c5472
uti: Fix condition for pthread_join of mcexec threads
...
Change-Id: Iaeee91c197b84436f84ce4380768aa79e7f9419e
2018-09-04 19:53:02 +09:00
e42c414454
uti: Hook system calls by binary-patching glibc
...
(1) Add --enable-uti option. The binary-patch library is
preloaded with this option.
(2) Binary-patching is done by syscall_intercept developed by Intel
This commit includes the following fixes:
(1) Fix do_exit() and terminate() handling
(2) Fix timing of killing mcexec threads when McKernel thread calls terminate()
Change-Id: Iad885e1e5540ed79f0808debd372463e3b8fecea
2018-09-04 19:53:02 +09:00
e613483bee
uti: Add system call profile
2018-09-04 19:53:02 +09:00
c0271f4727
Add debug messages for per-process data
2018-09-04 19:53:02 +09:00
4969762f15
uti: Add usage of uti specific options to mcexec
2018-09-04 19:53:02 +09:00
09d3648e43
uti: Set PROT_EXEC to host VMA when PROT_READ is set
...
Set PROT_EXEC to host VMA because uti needs PROT_EXEC for text VMAs.
Meanings of prot bits of Host VMA has been changed as follows.
RWX: No mapping or RW mapping
RX: Read only mapping
2018-09-04 19:53:02 +09:00
4e905cd412
uti: do_syscall: Don't warn when proxy is gone
...
This is because this is a normal case since terminate() is changed so
that it first kills all mcexec threads and then kill McKernel threads.
Change-Id: I88380bf28b60645d361baded525d71105235c16f
2018-09-04 19:53:01 +09:00
8c11daf726
uti: Fix signal relay from mcexec to McKernel
...
Change-Id: I2ffd8049a0fb1637cfc6bab7fe24c6a85e5e53fc
2018-09-04 19:53:01 +09:00
5cb8a1f10f
uti: Workaround not to share CPU with OpenMP threads
...
* Assign uti thread to the last idle CPU so that it's not shared with
an OpenMP thread
Change-Id: Ia42cae056ce81fde9b6dab6286b39a52f3c9e172
2018-09-04 19:53:01 +09:00
dbba7dea18
uti: Allow only the first do_fork() call to create a uti thread
2018-09-04 19:53:01 +09:00
b6ab5911b7
uti: Identify uti thread by clone count
...
--uti-thread-count <count> is added to mcexec.
Change-Id: Id9ec464412a5bb71e4d9e87d05f79de22d35b067
2018-09-04 19:53:01 +09:00
b0d7f890d0
uti: Reverse-offload msync()
2018-09-04 19:53:01 +09:00
b9c0cdddab
uti: Cosmetic change
2018-09-04 19:52:14 +09:00
7ee7dd5e2c
uti: Allow tracer to call release_handler() for the main process
...
Change-Id: I934a6eefbcb87473e87c109d6b4d32c7ab486894
2018-09-04 19:52:14 +09:00
07db4a80a7
__do_in_kernel_syscall: Move ihk_ikc_release_packet from mcexec_wait_syscall
...
Change-Id: Ieeb5fda42dbddc9da27242f4b547c2143659f97a
2018-09-04 19:52:14 +09:00
f04e5c24ab
uti: Don't call mcexec_terminate_thread() when McKernel asks mcexec to interrupt system call
2018-09-04 19:52:14 +09:00
b8bacdd2de
Reference counting per-thread data
...
It is accompanied by the following fixes:
(1) Fix put ppd locations in mcexec_wait_syscall()
(2) Move put ptd to end of mcexec_terminate_thread_unsafe() and mcexec_ret_syscall()
(3) Add debug messages for ptd add/get/put
(4) Fix ptd-add/get/put matching in mcexec_wait_syscall()
* Skip put when woken-up from wait_event_interruptible() by signal
Change-Id: Ib9be3f5e62a7a370197cb36c9fa7c4d79f44c314
2018-09-04 19:52:14 +09:00
a121ffc785
uti: Release packet of reply from McKernel in backward_offload()
2018-09-04 19:52:14 +09:00
88f9693390
uti: Return -ENOSYS without offloading for set_robust_list()
...
Change-Id: I43466e3850fd2ad68e5754d1d460438fa47f3ed4
2018-09-04 19:52:13 +09:00
124ec580a0
uti: Call do_exit when tracer isn't working and do_syscall returned -ERESTARTSYS
2018-09-04 19:52:13 +09:00
af7f61db49
uti: mcexec: Fix error check of pthread_detach
...
Change-Id: Idda8e060641bbd7b01c50163140a2c5f7466d193
2018-09-04 19:52:13 +09:00
ee299b5780
uti: Check size of syscall arguments for syscall_intercept
...
Change-Id: I747b90e1f521b08266cfc021ef4b23e2e3c7ba4c
2018-09-04 19:52:13 +09:00
c60a778c8d
uti: Zero-clear struct mckernel_exec_file before initialization
...
Change-Id: I315008b7f5c9e66a93b80da87d1a6332d717c2aa
2018-09-04 19:52:13 +09:00
25a129ea6a
uti: Disable jumping to McKernel futex code
2018-09-04 19:52:13 +09:00
8e9924c523
uti: Lock per_thread_data_hash_lock in mcctrl_put_per_proc_data()
2018-09-04 19:52:13 +09:00
c71291a429
mcctrl: Add mcexec_terminate_thread_unsafe()
...
Change-Id: I6ca54cdac2ab9449d40b22f7329f1a215e5aa33b
2018-09-04 19:52:13 +09:00
ba93b83d68
uti: Add __user to mcexec_terminate_thread argument
...
Change-Id: Ic96a91e6a892a1bd2f1d333580e28bced6a40dc0
2018-09-04 19:52:13 +09:00
c2f41ca9ad
uti: Replace hand-made list of host_threads with Linux macro
...
Change-Id: Ib46cc9fcdd2854b7bbe21c2cc885beeb22d16dd2
2018-09-04 19:52:13 +09:00
062d7ecae3
uti: Use copy_from_user() in mcexec_terminate_thread()
2018-09-04 19:52:12 +09:00
58d038fcac
uti: Fix wrong argument passed to ihk_ikc_release_packet() in mcexec_terminate_thread()
2018-09-04 19:52:12 +09:00
510310342c
uti: Use fresh struct syscall_request instance when replying to syscall_backward()
2018-09-04 19:52:12 +09:00
a6198f267b
uti: Offload set_robust_list to McKernel
2018-09-04 19:52:12 +09:00
5e78bd85ab
uti: Fix tracer exit code for the case when create_tracer() isn't called
2018-09-04 19:52:12 +09:00
85c0c8a01f
uti: Add debug messages for syscall
...
Change-Id: I2f96e71d5384f883f7dc568122c57d92bc1cd818
2018-09-04 19:52:12 +09:00
e29f579061
uti: Prevent user space vma from getting copied when forking
2018-09-04 19:52:12 +09:00
63703589e5
uti: Clear user space PTEs after first fork in create_tracer()
...
Change-Id: I60755f0cb5e84c3a5a5cd91515411a30f0995822
2018-09-04 19:52:12 +09:00
5c8c1986b5
uti: Add comment on ppd life cycle
...
Change-Id: Id16cf036b2d919444e8634b536fd701d996bcef2
2018-09-04 19:52:12 +09:00
e4370d235c
uti: Make tracer not call mcexec_terminate_thread() when tracee is killed by signal
...
Change-Id: I5878c7d623ce182a7cb9578c9d5c430c1bee8e1e
2018-09-04 19:52:12 +09:00
31ac007cb5
uti: Increase CPU_HZ to 1000
...
Change-Id: I8619263845fd8ebabe6fc7de619a5b51ac04470a
2018-09-04 19:52:11 +09:00
56da7e2de9
uti: Allocate memory area directly to uti_desc->wp
...
Change-Id: Ia5a1dbf56b937d9d05cd7fa1c5eec4a5b4b7b196
2018-09-04 19:52:11 +09:00
35300e7b4f
uti: Create tracer when forking
...
Change-Id: Ic66cf6289ac6f32a884ba1266e641ce61620a239
2018-09-04 19:52:11 +09:00
439dc0928b
uti: Streamline syscall_backward()
2018-09-04 19:52:11 +09:00
4b3e58fd3d
uti: Call terminate only when exit_group is called
...
Tracer tells McKernel side to call do_exit() in WIFSIGNALED case.
Change-Id: If85c6cbb4856036b406b11335f1384e57f26292d
2018-09-04 19:52:11 +09:00
b7cdbd6c42
uti: Enforce mcexec is destroyed and then McKernel process is destroyed
2018-09-04 19:52:11 +09:00
77f5cac2bf
uti: Make tracer exit when not used
...
Change-Id: I3d3b2f92fa2b160ffce633c46d1b60e9079e7f1b
2018-09-04 19:52:11 +09:00
9102b176c4
uti: Make per_proc_data of tracee survive over the signal-kill of the tracee
...
Change-Id: I8ff1dddb526ef2fd948cfe1b8f3aa8403c2006d6
2018-09-04 19:52:11 +09:00
bb4317beaf
uti: futex: Propagate -ERESTARTSYS returned by wait_event_interruptible()
...
Change-Id: Id36c4df0e0a8e1f64b12c635c0502f63552ba50b
2018-09-04 19:52:11 +09:00
d24b7585b7
uti: Make tracee pthread-detached
...
Change-Id: I672ee18739b956980901b63e55ee3ebc192b4e56
2018-09-04 19:52:11 +09:00
4438f994dc
uti: Add/Modify test programs
...
Change-Id: I27a39d6b11af5243f93d07c31c2ef80f6727dd53
2018-09-04 19:52:11 +09:00
52afbbbc98
uti: Call into McKernel futex()
...
(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
2018-09-04 19:52:10 +09:00
460917c4a0
remote_page_fault,syscall_backward: Zero-clear waitq entry
...
Change-Id: I151a35004183e911aaba766a8749830e1768bfe6
2018-09-04 19:52:10 +09:00
7803468afe
remote_page_fault,syscall_backward: Retry when interrupted by signal
...
Change-Id: Ic7d72ad9ca32bb3c8e3522e00fef1d98caf3c049
2018-09-04 19:52:10 +09:00
8f2c7d2265
Fix thread-safety issue in rus_vm_fault
...
Change-Id: I8640a8e0de8a0dfaee700b25e5f9e2941ac98fc8
2018-09-04 19:52:10 +09:00
c6c3a84a46
syscall: Add missing definition of thread to access thread->sigpending
2018-09-04 19:52:10 +09:00
5a7ca14fcc
rus_vm_fault: Return VM_FAULT_SIGBUS when per-process data is not found
2018-09-04 19:52:10 +09:00
d7b882855a
Correct comments in declaration of struct ikc_scd_packet
2018-09-04 19:52:10 +09:00
2337832e4c
pager_req_release(): Correct debug messages
2018-09-04 19:52:10 +09:00
be635ceb19
terminate: Fix coutning of non-leader threads
...
Change-Id: I8399ad553bb8e09bef508ac976e8cd56cdae8013
2018-09-04 19:51:11 +09:00
0b0b7b03d7
Prevent one CPU from getting chosen by concurrent forks
...
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
2018-09-04 19:51:11 +09:00
82914c6a2e
remote_page_fault: Retry when interrupted
...
Change-Id: Ib71a87ad03420e1918dc97da43351cb93e7d0754
2018-09-04 19:51:11 +09:00
f127dfdf1e
mcexec_create_per_process_data: Zero ppd on allocation
...
Change-Id: I06306f30ce30ad6ddc6e8b8cab46ee39be0e4940
2018-09-04 19:51:11 +09:00
567dcd3846
Fix deadlock involving mmap_sem and memory_range_lock
...
Change-Id: I187246271163e708af6542c057d0a8dfde5b211e
Fujitsu: TEMP_FIX_1
Refs: #986
2018-09-04 19:51:10 +09:00
b080e0f301
spinlock: Add trylock
...
Change-Id: If349d7c0065609615f5df229f70c59f92bf97adf
2018-09-04 19:51:10 +09:00
ff383d96ba
spinlock: rewrite spinlock to use Linux ticket head/tail format
...
This is a cherry-pick of 2964302d094f035242d6257d8af5450f72f9b5a7.
Change-Id: Ie8b7e825b28415dd41cc232fbeceb4653251f9e3
2018-09-04 19:51:10 +09:00
0bcd3d5de3
unimap: update ihk to unimap
...
Change-Id: I5b23270f9253d26031ad90bb38721a6234bd98e1
2018-09-04 19:51:10 +09:00
9d6e0319f7
atobytes(): restore postfix before return
2018-09-04 19:51:10 +09:00
0e50eb44a9
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-09-04 19:51:10 +09:00
2db69d0f24
process/vm: implement access_ok()
2018-09-04 19:51:10 +09:00
a697f5e98d
partitioned execution: pass process rank to LWK
...
Cherry-pick of d2d134d5e6a4b16a34d55d31b14614a2a91ecf47
Conflicts:
kernel/include/process.h
2018-09-04 19:51:10 +09:00
4439b04d9f
ihk_mc_get_linux_kernel_pgt(): add declaration
...
Cherry-pick of caff967a442907dd75f8cd878b9f2ea7608c77b2
2018-09-04 19:51:10 +09:00
38c3b2358a
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-09-04 19:51:10 +09:00
221ce34da2
eclair: fix MAP_KERNEL_START and apply Fujitsu's proposals
...
(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
2018-09-04 19:51:09 +09:00
4246d41007
kmalloc_header: use signed integer for target CPU id
...
Cherry-pick of bdb2d4d8fa94f9c0268cdfdb21af1a2a5c2bcae5
2018-09-04 19:51:09 +09:00
65df9c8084
ihk_mc_get_processor_id(): return -1 for non-McKernel CPUs
...
Cherry-pick of c45641e97add9fde467844d9272f2626cf4317de
2018-09-04 19:51:09 +09:00
7836aa0136
Map LWK TEXT to the end of Linux modules section (0xFFFFFFFFFE800000)
2018-09-04 19:51:09 +09:00
1cf7fad15a
virt_to_phys(): fix debug messages
...
Cherry-pick of 46eb3b73dac75b28ead62476f017ad0f29ec4b0a
2018-09-04 19:51:09 +09:00
0076e1f5e0
mem: make McKernel kernel heap virtual addresses Linux compatible
...
Cherry-pick of e5334c646d2dc6fb11d419918d8139a0de583fde
2018-09-04 19:51:09 +09:00
cae6b9f154
move McKernel out of Linux kernel virtual
2018-09-04 19:51:09 +09:00
5fcbfa2eb5
page_fault_process_memory_range: Remove ihk_mc_map_virtual for CoW of device map
...
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
2018-08-30 02:21:42 +00:00
9a20cfaefb
mem: Check if phys-mem is within the range of McKernel memory
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_52
Refs: #1164
Change-Id: Idb9a6eac1d2e1df4c663c3171925c774421177fd
2018-08-30 02:18:37 +00:00
f57b0c5d4f
wait: Delay wake-up parent within switch context
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_41
Refs: #1006
Change-Id: Ia98e896505ad0f6549766604ade84550eee8bd2d
2018-08-30 02:13:51 +00:00
0fdeb254b3
switch context: Move to arch-dependent (arch_switch_context())
...
Fujitsu: POSTK_DEBUG_ARCH_DEP_22
Change-Id: I6faf8d9daa1e639350c2cd83db9bb27b9d37ba01
2018-08-30 02:13:34 +00:00
895a8c4099
procfs: Support multiple reads of e.g. /proc/*/maps
...
Refs: #1021
Change-Id: If36e1a0f3f41f0215868daf578e96775d96a59a3
2018-08-30 01:48:06 +00:00
e531ee626e
mcctrl pager: handle pagers more properly
...
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
2018-08-24 09:18:20 +09:00
94d093f058
fileobj_create: Suppress message on getting -ESRCH
...
-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
2018-08-23 04:01:20 +00:00
9b8424523a
mcctrl: remove rus page cache
...
Change-Id: Ieed7a2a0077ffde3fec8a64d2051e56a53924a42
2018-08-23 02:10:44 +00:00
ebc702624b
devobj: fix object size (POSTK_DEBUG_TEMP_FIX_36)
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_36
Change-Id: I5f020708f97b7468f19496b44c98e164d856598d
2018-08-22 07:26:50 +00:00
ea125cb58c
checkpatch: remove warning on LINUX_KERNEL_VERSION and split strings
...
Change-Id: Ia22f3106208c6ddf46a767e142b8842373e9d6b5
2018-08-22 07:14:48 +00:00
689a799bb9
mcctrl prepare_image: return reserve_user_space error
...
Change-Id: I00556cb58b12acca888f9512c144a3ce3f5332b1
2018-08-22 07:14:40 +00:00
802b1ac14b
ihk_os_getperfevent,setperfevent: Timeout IKC sent by mcctrl
...
Report timeout when McKernel doesn't respond to prevent the caller
from waiting forever.
Refs: #1167
Change-Id: I8bd87e43aafffdd0952198224e44195af4368883
2018-08-22 06:43:27 +00:00
affe3e9010
do_fork: Increase tid table size when allowing oversubscription
...
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
2018-08-22 06:42:13 +00:00
0b2169964a
futex_wait_queue_me: Spin-sleep when timeout and idle_halt is specified
...
schedule_timeout() with idle_halt should use spin sleep because sleep
with timeout is not implemented.
Change-Id: Ia0bebcc10ddfb872bffeece7f13fb35a4791db18
2018-08-22 06:36:43 +00:00
f18d1f5383
__sched_wakeup_thread: Notify interrupt_exit() of re-schedule
...
Change-Id: I438eb168f818eb5649857e22bdc7e68a145872f7
2018-08-22 06:33:23 +00:00
ea35954613
linux side: replace vfs_read by kernel_read
...
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
2018-08-22 06:27:12 +00:00
61a942acdc
arm64 vdso/gettimeofday: add new includes for cpu_set_t and pte_t
...
Change-Id: I4035b179a173a6b29c34c73670d68a38d4dc5dc4
2018-08-22 06:17:56 +00:00
c4b4b7222e
arm64: ihk_mc_perfctr_start/stop: fix prototype that was changed in x86
...
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
2018-08-22 06:14:15 +00:00
21af0351d1
arm64 syscall.c needs uio.h for struct iovec
...
Change-Id: I9d070d0e148636be1d9ecec8ec4dfb72f93c4ed6
2018-08-22 06:08:27 +00:00
1e1c91962e
mcctrl: add missing sched_param include for newer linux
...
struct sched_param is defined differently since headers changed in
linux ae7e81c07 ("sched/headers...")
Change-Id: I22af79bf3d9df69d09903b2830d99426309cf911
2018-08-22 06:04:35 +00:00
b1aa94d417
arm64 arch-perfctr.h: remove duplicate enums
...
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
2018-08-22 06:04:08 +00:00
a6a9bac5b7
Protect more code by #ifdef PERF_ENABLE
...
Change-Id: I20a67c56c4d7817fdb87cc6a2aa47d68fe3eae8d
2018-08-22 06:03:12 +00:00
240a23a21b
arch-lock: tentative implementation of irqflags_can_interrupt for arm64
...
Change-Id: I814e02e757039cab8c142c0b774ad470154454c1
2018-08-22 06:02:06 +00:00
d5108dba80
arm64 eclair build: add missing explicit libs
...
Change-Id: I5b6f8825430c2d495da50d868a3f54fc0b354d84
2018-08-22 05:56:20 +00:00
20368dd317
syscall: move sync_child_event up a bit
...
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
2018-08-22 05:55:26 +00:00
b93e14f695
arm64 signal.h: add valid_signal() function
...
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
2018-08-22 05:54:31 +00:00
3e3f3c5590
mcoverlayfs: vfs_readdir -> iterate_dir compat for el7.5
...
Also enable mcoverlay for new kernel version / actually build it
Change-Id: I80bc043c65cf99c3b41a54a5666ea7652e6c2bbd
2018-08-09 04:30:24 +00:00
e8f8660b73
mcctrl: lookup unexported symbols at runtime
...
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
2018-08-08 06:00:20 +00:00
794684985f
mcctrl syscall: remove unused walk page debug function
...
This saves looking up one symbol for a debug function that is not
used anywhere
Change-Id: I6a3a480ce8067b4f6f0faf9aa837119ea46888ad
2018-08-08 05:57:46 +00:00
625607e6db
mcctrl sysfs_files: cleanup vfs_readdir -> iterate_dir compat
...
Cleanup the fix suggested by Fujitsu a bit
Change-Id: I95165b834e32a01f43eb3b4fcaca039e4d04fe86
2018-08-08 05:41:04 +00:00
05afa8b6dd
mcctrl sysfs_files: vfs_readdir -> iterate_dir compat
...
vfs_readdir got removed in recent kernels
Change-Id: Iac9a9954afefa0f6dbcdc2c94786cf747e21e1fe
Fujitsu: POSTK_DEBUG_TEMP_FIX_22
2018-08-08 05:39:07 +00:00
6cf89076dc
mcctrl handle_mm_fault compat: add el7.5 support
...
Change-Id: I8c7738b70ca914e857be119b7720cdc22e61ae0e
2018-08-08 05:36:35 +00:00
29a658716b
configure: Create config file for test programs
...
Change-Id: I3ec90fed348ff535b24c8116416c6b89636c532c
2018-08-02 02:29:19 +00:00
a7c9988aeb
schedule: Don't reschedule immediately when wake up on migrate
...
Refs: #1027
Change-Id: Ibe563c45c42611170273f1e437566c20fbef68d3
2018-08-02 02:28:25 +00:00
d4fa953975
test: Add testcase for #1001
...
Refs: #1001
Change-Id: I3edd750108bd3f887af1f0afe3f2651f1243062b
2018-08-02 02:24:41 +00:00
786649d2a3
perf_event: Move changing monitoring-status into perf_stop
...
Change-Id: I84a13c2a825de24bfdada533c7049e8770a07061
2018-08-02 02:23:38 +00:00
d7416c6f79
perf_event: Specify counter by bit_mask on start/stop
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_30
Refs: #1002
Change-Id: Iea51e9aef78927a5033e3a226d5efc6298da056a
2018-08-02 11:22:28 +09:00
cb1522ca92
perf_event: Handle fixed-pmc in arch-dep part
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_31
Refs: #1003
Change-Id: I66c7d18b9137894cf5764464482e2ebd5ecb9d52
2018-08-02 02:14:04 +00:00
14660a10c3
Fix to procfs read returns EIO
...
Refs: #1152
Change-Id: I48b330953fd7674ba1a3ac35744f9f50a5712730
2018-08-02 01:48:51 +00:00
1387c9687b
Add test cases for #765
...
Refs: #765
Change-Id: I50d70a15d5d5ce31227cacbed4eccd49b218713b
2018-08-02 01:42:46 +00:00
ec99adde4a
Add test cases for #998 and #999
...
Refs: #998 #999
Change-Id: I86f8857594b2446c833c1e59d53b484ef022a9ee
2018-08-02 01:42:11 +00:00
c716e87c53
execve: Clear sigaltstack and fp_regs
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_19
Refs: #976
Change-Id: I16895eab13eecbb47b7e6da961fae82ee5e570ee
2018-08-01 15:11:05 +09:00
d898f18293
mcexec: Do not close fd returned to mckernel side
...
Fixes: 9a79920ef9 ("Static analysis fixes")
Change-Id: I2b51d6e288e7bb2b0f4bff579fa237d575dcb026
Reported-by: Tomoki Shirasawa <tomoki.shirasawa.kk@hitachi-solutions.com >
2018-07-30 23:27:17 +00:00
bc0759e2dc
arm64 arch-lock: add missing include for cpu_set
...
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
2018-07-27 02:33:03 +00:00
1aa429d4f5
init_normal_area: fix warnings
...
- unused variable pt_phys
- undeclared function set_pt_large_page (move definition lower)
Change-Id: I4625b70efe8e914160b17064078c42b86a461d3e
2018-07-27 02:32:23 +00:00
1543119139
mcctrl rus_vm_fault: tpe changed with kernel >= 4.11
...
vma is part of vmf and isn't needed, so type changed (see linux 11bac80
("mm, fs: reduce fault, [...] to take only vmf"))
Change-Id: I4c023e23c7e7416ad2df2dcc0698a0032e574e4c
2018-07-27 02:31:39 +00:00
0a0a78ac2e
mcctrl: replace GFP_TEMPORARY by GFP_KERNEL
...
See linux's commit 0ee931c4 ("mm: treewide: remove GFP_TEMPORARY
allocation flag") for a long explanation, but basically that flag
"is just cargo cult" and should be removed
Change-Id: I2147cd65b6b9ec509a72e11cc3abf1fe1561c10b
2018-07-27 02:31:00 +00:00
6999d0a3f9
bind_mount_recursive: Use lstat instead of d_type of readdir
...
Change-Id: I0eb8d6c7e1fa5df6dbc5962a639901546a159d04
2018-07-26 18:38:48 +09:00
f01a883971
devobj: fix out of bounds shift
...
Similarily, pgoff << PAGE_SHIFT would need pgoff to be unsigned to fit,
but off_t is signed.
The reason for this shift was to truncate the offset argument to be
aligned to page boundaries, do that instead
Change-Id: I36c3de34b1834fdb0503942a6f3212e94986effd
2018-07-26 05:20:19 +00:00
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
6f7c428a34
terminate: fix oversubscribe hang when waiting for other threads on same CPU to die
...
Change-Id: I8c4fbdd3aab9d0567ce5457a4a6405490608925d
2018-07-26 05:02:13 +00:00
68c702d024
process_procfs_request: Add Pid to /proc/<PID>/status
...
The standard UNIX tool to get processes information, need to have the
process id inside /proc/<PID>/status.
Using ps without PID in /proc/<PID>/status gives :
PID TTY TIME CMD
2551 pts/0 00:00:00 bash
0 pts/0 00:00:00 exe
0 pts/0 00:00:00 exe
With this patch:
PID TTY TIME CMD
2551 pts/0 00:00:00 bash
11966 pts/0 00:00:00 exe
12619 pts/0 00:00:00 exe
Change-Id: Ic9d255cbef4d49e49bdaedcfc8e3545d9c144325
2018-07-26 05:00:21 +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
0994c3300e
search_free_space: remove POSTK_DEBUG_ARCH_DEP_27 side
...
search_free_space changed since this was implemented and the code is
no longer compatible
Looking at it again, the function is not used anywhere other than syscall.c
and the second function does not seem to fix anything specific so this
just removes the untested side.
Change-Id: If28d35ec4da083a40dc6936fcb21f05fb64e378a
Fujitsu: POSTK_DEBUG_ARCH_DEP_27
2018-07-26 04:43:05 +00:00
a5c3e48843
search_free_space(): manage region->map_end internally
...
Change-Id: If9176773868c44fa1eb801c0815c35cea9f4b54b
2018-07-26 04:43:05 +00:00
df2c993721
fileobj_create: only allocate new object if one wasn't found
...
Change-Id: I5e12439333bf0c9cc7dad6e3cf410bfee616f77e
2018-07-26 04:41:03 +00:00
dc8d6b740c
pager_req_read: handle short read
...
Change-Id: Iff89046041e012a65c80a29b485ddbb636435dd0
2018-07-26 04:37:54 +00:00
c2e1b8d694
mcctrl_ikc_send_wait: fix interrupt with do_frees == NULL
...
do_frees is allowed to be NULL only if free_addrs_count is 0, but that
is increased to account for the wakeup_desc itself before this failure
Change-Id: Iab33712c76ae452df7044558a12745a89adb47ac
2018-07-26 04:34:03 +00:00
f6d8138e05
mcexec_wait_syscall: requeue potential request on interrupted wait
...
Change-Id: Id7a324f18ebb8c81f05bd8362e19d9314a445308
2018-07-26 04:31:34 +00:00
9d587dcbe8
fileobj_release: do not notify linux of surplus refs
...
Surplus refs on the linux side will not change anything, so spare
ourselves a message.
The final message will free all refs at once when the object is
destroyed.
Change-Id: Ie086b9dda663729962037c67e8233370509234a5
2018-07-26 04:08:43 +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
fd429ecc5b
rusage_private: fix null pointer dereference
...
Change-Id: Id1f066699a41c249203073c5937e34012f5fe6c3
2018-07-26 03:50:44 +00:00
ed7f5abc28
schedule: fix null pointer dereferences
...
Change-Id: I1d4b0a2fabb5810a89cca4c6a0a837db3a9813ee
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
a1b50051ed
mcexec: always compile debug statements
...
This helps catching errors like accessing a field that no longer exists
in a debug print that wasn't compiled...
Change-Id: If6c862ea2b866f819195aae93c7fd68e610fe48e
2018-07-26 03:38:00 +00:00
9a79920ef9
Static analysis fixes
...
Change-Id: I7bc42545a1c497f704d7bfa6ea1b7e3893acc697
2018-07-26 03:36:50 +00:00
141fa5120e
git hooks: use correct directory for submodule
...
Change-Id: I7a39021dc02212065612b21cafcb6c653e2280f0
2018-07-26 03:29:43 +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
bc3e6ded65
disable sse for everyone
...
GCC optimizes big switches with sse so we could clobber users floating
point registers when they would do a syscall
Reproducer:
```
#include <stdio.h>
#include <stdlib.h>
union num {
float f;
unsigned long long i;
};
#define WORKSIZE (1024 * 1024 * 32)
int main(int argc, char **argv) {
char *work = malloc(WORKSIZE);
char *fromaddr;
char sink;
union num r;
unsigned long long int offset;
r.f = drand48();
printf("r: %llx\n", (long long)r.i);
offset = (long long int)(r.f * (double)WORKSIZE);
fromaddr = work + offset;
printf("%e %llx %llx\n", r.f, offset, fromaddr);
sink = *fromaddr;
return 0;
}
```
Change-Id: I7bb0883ec8ef2f245ab98064e308025422afc115
2018-07-26 03:26:25 +00:00
eae5c40f60
init_process_stack: Support "ulimit -s unlimited"
...
Refs: #1109
Change-Id: I395f012fd747cb6a2f93be71e34c7f6f3666ed67
2018-07-26 02:40:27 +00:00
0c7384f980
Add test cases for #840
...
Refs: #840
Change-Id: Ie29867d29ba6a25cfac77b95b8effc2f057aae14
2018-07-26 02:39:24 +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
3d365b0d7a
add ihk as submodule
...
Change-Id: I512255a96d0d95795bd0d803289fffe4394eb7ec
2018-07-26 01:50:48 +00:00
94e96927a6
mremap: Do nothing when no size change and !MREMAP_FIXED
...
Behave in the same way as Linux which returns old_address when
old_size == new_size && !MREMAP_FIXED.
Refs: #1112
Change-Id: Ice1421a8a77f962d087de8475aa2cd40c59be5f7
2018-07-26 01:49:01 +00:00
3636c8e7e4
setrlimit: Check arguments in the same order as in Linux
...
(1) Check if rlim's address is valid
(2) Check if soft-limit does not exceed hard-limit
Fujitsu: POSTK_DEBUG_TEMP_FIX_3
Refs: #1050
Change-Id: I5bf1008ce172f9dff64ec89b1f97614926abaf13
2018-07-26 01:48:05 +00:00
b920da5103
execve: Use interp in shebang as is
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_9
Refs: #995
Change-Id: I09751d13c4fecd68087d47815029c0b65e51f18a
2018-07-26 01:46:22 +00:00
f1a40a409f
perf_event: Include list.h by itself
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_32
Refs: #1004
Change-Id: I8670477cf498ac98df971f2c0288f335a989f675
2018-07-26 00:45:57 +00:00
4ce4c9f264
init_process: Inherit parent cpu_set
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_69
Refs: #1028
Change-Id: I1628bb5bf35fa670bb0019e1f3ae295277b1566e
2018-07-26 00:44:41 +00:00
e770a22fa5
scripts: add checkpatch.pl & git hooks
...
Change-Id: I29e5f7a99e8dd92511c0b1d099f3e1a2f37d7a72
2018-07-12 00:55:58 +00:00
9bb8076dc0
shmget: Make shmobj underwent IPC_RMID invisible to shmget
...
Refs: #926
Change-Id: I16120623b581da5d5d484fd05d5111788c8ad5e2
2018-07-10 02:13:00 +00:00
229b041320
test: Add testcase for #1122
...
Refs: #1122
Change-Id: Ieafee7469d1397461abf05552ffad0bfea1dd6cd
2018-07-10 02:12:23 +00:00
e1f204de4a
test: Add testcase for #1112
...
Refs: #1112
Change-Id: I0041366d8dcf035a09fbb59a5dbd5c94cae0d65e
2018-07-10 02:12:04 +00:00
c6cc0bf07a
test: Add testcase for #1111
...
Refs: #1111
Change-Id: Ifdf25a9ce98ef495200daf1c24d7ac2c81b3ef17
2018-07-10 02:11:45 +00:00
04e54ead5d
test: Add testcase for #1031
...
Refs: #1031
Change-Id: I6a51596b84a97329ba7d5b765c8471246dcf85df
2018-07-10 02:11:13 +00:00
992705d465
pager_get_path: Append \0 to path
...
Change-Id: Iaabd89a649bb20b37b35cd345da0f468fd5dd0b5
2018-07-10 02:10:19 +00:00
ae09d979b6
Add testcases for #1141
...
Refs: #1141
Change-Id: I50d1ac6248e9dfc33c372b825c10cf0bd8b61d3e
2018-07-10 02:09:38 +00:00
1cbe389879
do_fork: Propagate error code returned by mcexec
...
Refs: #731
Change-Id: I7eb52c1c76103d65d108b18b7beaf8041b51cd03
2018-07-03 09:19:54 +00:00
0758f6254e
headers: declare void arguments for functions
...
Not giving any argument means that any argument is OK,
this is not what is meant here.
Change-Id: Ide651c1dec973d4b8709cf00646988f4c4f3acdd
2018-07-03 09:18:25 +00:00
db732a245c
execve: Reinitialize vm_regions's map area on execve
...
Reinitialize vm->region.map_end in sys_execve()
in the same way as when creating a new process.
Change-Id: I7fc048a187e619ba4b5a578976e2a6774d13a6a7
2018-07-03 08:58:50 +00:00
08f2840f7d
procfs: Show file names in /proc/<PID>/maps
...
Refs: #1065
Change-Id: I2f1603b02d12e60972c8f2e5f059d0025f4ceaea
2018-07-03 08:56:44 +00:00
521bdc6181
mremap: Fix type of size arguments (from ssize_t to size_t)
...
Refs: #1112
Change-Id: I3987d3a20a1e7c4b60f3880e91a670bc0bdc240f
2018-07-03 08:54:14 +00:00
e7b6a3472b
sched_getaffinity: Check arguments in the same order as in Linux
...
(1) Check if size is large enough
(2) Check if size is positive
Fujitsu: POSTK_DEBUG_TEMP_FIX_5
Refs: #1121
Change-Id: I3e41720c89ef89294820f7f4fa8df1a69a7011b0
2018-07-03 08:53:30 +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
854bc85602
mcctrl: convert send_signal to mcctrl_ihk_send_wait
...
Change-Id: Ibd2fc834444d83341a96579f0c9c22080a53e8fa
2018-07-02 16:11:01 +09:00
ab8fe0bbbf
mcctrl: convert perf ctrl ioctls to mcctrl_ihk_send_wait
...
While we are here, also optimize code a bit: perf_desc does not need
to be allocated for every cpu; and fix coding style.
Change-Id: Iad19fed08205d38594fd3f1b7ddf2b19a9cf0d9d
2018-07-02 16:11:01 +09:00
b87c06cbcb
mcctrl_ikc_send_wait: give possibility to use pre-allocated desc
...
Change-Id: I1afbabe792648bbf2c5a9a38ebbfba8ea9060d06
2018-07-02 16:11:01 +09:00
b939ca9370
mcctrl: refactor prepare_image into new generic ikc send&wait
...
Many ikc messages expecting a reply use wait_event_interruptible
incorrectly, freeing memory that could still be used on the other side.
This commit implements a generic ikc send and wait helper that helps
with memory management and ownership properly:
- if the message succeeds and a reply comes back normally, the memory
is freed by the caller as usual
- if the wait fails (signal before the reply comes or timeout) then the
memory is set as owner by ikc and will be free when the reply comes back
later
- if the reply never comes, the memory is freed at shutdown when
destroying ikc channels
Refs: #1076
Change-Id: I7f348d9029a6ad56ba9a50c836105ec39fa14943
2018-07-02 04:34:44 +00:00
ec202a1ca9
execve: fix execve with oversubscribing
...
Issue: #1072
Change-Id: I88446e075b60de3c94cad2a19a4731e58037ea63
2018-07-02 13:31:23 +09:00
d4471df94e
execve: use thread variable instead of cpu_local_var(current)
...
This fixes crashes _without_ oversubscribing with a process doing
fork() execve() / wait() in a loop
Issue: #1132
Change-Id: I98531f4643ad6b6a8f750a1a3f05b9ff3ebfd50f
2018-07-02 04:28:23 +00:00
a6ac4acf40
rusage: Fix initialization of rusage->num_processors
...
Refs: #1064
Change-Id: I4c04127a766b9c71f726113b8b7d6416ff971bff
2018-06-28 11:24:47 +09:00
8ff754c466
test: delete garbage files
2018-06-21 13:50:40 +09:00
90dba00742
fix return value of sched_getaffinity (POSTK_DEBUG_TEMP_FIX_58) refs#1122
...
Change-Id: I3d7b9b74eec268dd49b703600ca56df1d2933bd9
2018-06-21 09:15:22 +09:00
86ae1380e4
configure.ac: Move man directory to share/man
...
Change-Id: Idaa5c0f61fbbe3bda4697bc59487f562e09ff2d6
2018-06-11 13:13:13 +09:00
9bb48186e6
add testcases for #732 #1065 #1102
2018-06-07 10:11:23 +09:00
139123dc12
move test programs
2018-06-07 10:08:48 +09:00
6602cf442c
add test cases
2018-06-07 10:04:33 +09:00
f148863586
pager_req_map(): do not take mmap_sem if not needed
2018-06-07 07:17:41 +09:00
ec375da27a
pager_req_create(): prefetch libiomp, libpthread and libc
2018-06-07 07:17:31 +09:00
c50e7c1029
prepare_process_ranges_args_envs(): fix saving cmdline
2018-06-07 07:17:21 +09:00
5f4dbb2c71
mprotect: Fix early exit condition on page table attribute
2018-06-06 01:39:44 +09:00
328609269b
Clean up "Detect hang of McKernel in mcexec"
...
* Clean up error checks
2018-06-01 14:51:07 +09:00
056fdb2633
Fix "Detect hang of McKernel in mcexec"
...
1. Call exit() when detecting hang
2. Clean up error checks
2018-06-01 14:21:19 +09:00
09d0a59e22
Detect hang of McKernel in mcexec
...
mcexec spawns a thread which detects hang of McKernel by using
ihk_os_get_eventfd().
Change-Id: I6cf0ee0c1f0c2c31a8422224b2105f64a9b9ab93
2018-06-01 10:44:34 +09:00
511555c8cb
fix: /proc/<PID>/maps outputs a unnecessary NULL character
2018-05-30 16:38:28 +09:00
81699345cc
mprotect: do not set page table writable for cow pages
...
Change-Id: If8b0bb56e7dae59aa9dc3d745a4cc4e43bf4bf9a
2018-05-30 13:29:55 +09:00
130751ff66
fileobj: avoid memory leak in path recording
2018-05-14 17:46:52 +09:00
f3d18eb9de
fileobj/devobj: record path name (originally by Takagi-san)
2018-05-14 17:46:52 +09:00
249bda4aef
fileobj: use MCS locks for per-file page hash
2018-05-14 17:46:52 +09:00
aaa246f86f
mcexec: change debug printf macros to be more tolerant to trivial format
...
Enabling DEBUG fails to compile. It'd be easy to fix the dprintf to dprint
but this is just as generic and we can now use dprintf everywhere
2018-05-11 09:23:46 +09:00
c52f7a5b49
syscall wait4: add _WALL (POSTK_DEBUG_ARCH_DEP_44)
...
Needed by strace -f
2018-05-11 09:22:54 +09:00
90a34f54c9
mcreboot.sh,mcstop+release.sh: Disable irqbalance_mck forcefully
2018-04-26 15:06:53 +09:00
bfb5080b71
pager_req_unmap: Put per-process data at exit
2018-04-10 11:35:03 +09:00
641dfed37e
configure.ac: Update version number
2018-04-06 09:14:27 +09:00
4572e6be3f
fix mcctrl SMAP - everyone needs copy_to_user
2018-04-03 10:38:44 +09:00
12e44050c9
mcexec: drop READ_IMPLIES_EXEC from personality to avoid device file mapping failure
2018-04-02 20:12:54 +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
9dc86869d8
test: Modify mng_mod/{863,870}/README
2018-03-27 19:36:07 +09:00
02bb127007
test: Modify mng_mod/*/README
2018-03-27 14:53:29 +09:00
c26c4aba4f
test: Modify mng_mod/{863,870}
2018-03-13 10:24:52 +09:00
e8d8ad60c2
Modify README files of test/mng_mod/{863,870,882}
2018-03-13 05:04:06 +09:00
a7f645f7df
terminate(): fix update_lock and threads_lock order to avoid deadlock
2018-03-25 08:29:53 +09:00
73731d2a0d
ihk_mc_map/unmap_virtual(): do proper TLB invalidation
2018-03-24 07:58:08 +09:00
0f049c5ed7
Modify README of #863 and #870
2018-03-12 17:13:16 +09:00
8d5f95de04
schedule: Add comment on #1029
...
refs #1029
2018-03-12 17:11:20 +09:00
88fca2c0df
issue/{863, 870}/README: update test items
2018-03-23 16:08:17 +09:00
81d18e35dd
rename files
2018-03-23 15:35:24 +09:00
309da8fc53
issue/863: add 8 testcases
2018-03-23 14:48:18 +09:00
535e3f3af6
issue/863/CT300x: add timestamp and check
2018-03-23 13:28:19 +09:00
4c80dca479
issue/863/README: add how to execute stress_test
2018-03-23 12:26:13 +09:00
7bef1f5117
Remove debug-print from do_syscall()
2018-03-12 02:07:12 +09:00
bb8c8355c2
small fix: testcases for #1032 , #1033 , #1034
2018-03-19 16:28:18 +09:00
fab0641813
prepare_process_ranges_args_envs(): fix generating saved_cmdline to avoid PF in strlen()
2018-03-19 13:56:04 +09:00
ce3af4734a
fix: dual hold_thread() in do_kill()
2018-03-19 11:12:50 +09:00
e2dea4e9f8
mcexec_start_image(): handle IKC send timeout
2018-03-17 21:33:17 +09:00
0d9c1df75a
update: testcases and result for #1032 , #1033 , #1034
2018-03-16 11:14:29 +09:00
6a979cf4b8
add: testcases for #1032 , #1033 , #1034
2018-03-15 14:31:29 +09:00
c107d1fdf9
fix: Bug for measuring rss in fork()
...
refs: #1032
2018-03-15 14:29:16 +09:00
bc89a51e00
fix: getrusage's u|stime race-condition caused by release_thread() and getrusage()
2018-03-15 14:26:39 +09:00
9da9e755fa
Issue#923: add test cases
2018-03-15 10:13:16 +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
b1ea6eb82a
procfs: Show Linux /proc/self/cgroup
...
Support the case where McKernel process retrieves its job-id when running under
the Fujitsu TCS suite.
2018-03-10 11:58:45 +09:00
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
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
51bc5fd61f
uti: Fix wrong argument passed to ihk_ikc_release_packet() in mcexec_terminate_thread()
...
Conflicts:
executer/kernel/mcctrl/control.c
2018-03-09 17:44:30 +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
3e4c9bdd90
Fix lock of struct wait_queue_head_list_node
2018-03-09 17:31:10 +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
7b4de6e6c2
mcstat: Clean-up Makefile.in
2018-03-09 14:36:01 +09:00
1c266f4849
mcstat: Fix build error
2018-03-09 14:31:07 +09:00
b7a7281195
fix: Bug for getrusage often return incorrect ru_stime
...
refs #1034
2018-03-07 13:11:37 +09:00
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
a224bf648a
fix: Bug for getrusage return incorrect ru_maxrss
...
refs #1032
2018-03-07 13:09:24 +09:00
642520f80c
rus_vm_fault: If page fault occurs in a thread that has not processed system call offloading, incorrectly return to normal.
...
refs #923
2018-03-07 10:22:47 +09:00
5cb75b00c7
mcexec_destroy_per_process_data: System calls delegation can not be terminated in error when the last process that closed /dev/mcos0 is a child process.
...
refs #882
2018-03-07 09:11:37 +09:00
7dd0d1137f
revert for fix git message
...
This reverts commit 840acd6021 .
2018-03-07 09:09:28 +09:00
cb2fe29f06
fix build error
2018-03-05 10:57:10 +09:00
3432f46d8b
fix & add: testcases for refs #885 , refs #1031
2018-03-01 15:41:58 +09:00
afcf1a24aa
add: testcases for refs #885 , refs #1031
2018-03-01 10:24:21 +09:00
140f813d77
fix: differences in behavior of sigaction between Linux and Mckernel
2018-03-01 09:44:44 +09:00
7ad6f9595c
fix: bug for ptrace_attach self pid
2018-03-01 09:37:12 +09:00
1796c20b88
A bug for not installing mcstat is fixed.
2018-02-25 11:46:16 +09:00
0da5b76916
Merge branch 'development' of postpeta.pccluster.org:mckernel into development
2018-02-25 11:03:13 +09:00
4ac1efae6c
- mcstat is a tool to report McKernel statistics from Linux side.
...
This is a response to a CEA's request.
- The tools directory is created under the mckernel directory.
- Some include files are now installed in the install directory,
but we should rethink of it.
2018-02-25 10:57:28 +09:00
523a066245
sigaction: support for SA_RESETHAND on x86_64
...
refs #1031
2018-02-22 11:55:32 +09:00
98df469d29
Issue#882: add test cases
2018-02-22 11:42:43 +09:00
f46287a711
ptrace: support for attaching child_process to parent
...
refs #885
2018-02-22 09:47:59 +09:00
c260b5c6f3
xpmem: support for fork()
...
refs #925
2018-02-22 09:37:48 +09:00
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
840acd6021
mcexec_destroy_per_process_data: System calls delegation can not be terminated in error when the last process that closed /dev/mcos0 is a child process.
...
refs #822
2018-02-14 16:34:08 +09:00
c949a894c6
Remove unnecessary files commited by mistake.
2018-02-06 10:43:21 +09:00
228f8f8533
Wait for LWK to run at shutdown.
...
refs #898
refs #928
2018-02-06 10:40:12 +09:00
8ee9eca74e
issue 863: add test cases and test evidences
2018-02-05 16:07:00 +09:00
748429fc92
do_generic_syscall: Even if the system call is normal, if errno is not zero, it returns an error. (TEMP_FIX_75)
2018-02-03 21:37:12 +09:00
a9dfcd9a89
translate_rva_to_rpa(): use 2MB blocks in 1GB pages on x86
2018-01-31 11:16:44 +09:00
559fc9746c
signal: check_signal must be called after check_need_resched.
2018-01-28 13:38:51 +09:00
54169bc3ea
procfs: indicate heap in /proc/maps
2018-01-26 16:22:43 +09:00
142e923222
procfs: indicate VDSO, vsyscall and stack in /proc/maps
2018-01-26 16:02:32 +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
ebaafa95d8
settid(): clear syscal offload request before populating
2018-01-26 13:54:34 +09:00
b8ee144e67
do_fork(): return -ENOMEM when no more TIDs available
2018-01-26 13:53:05 +09:00
722ae0e7d5
ARM64 arch_clone_thread(): eliminate extra save_fp_regs()
2018-01-26 13:51:38 +09:00
f56e087208
init_process_stack(): fix stack alignment (align to 64 bytes)
2018-01-26 13:43:23 +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
8123cc413e
Use version string in configure.ac when git repo is not found
2018-01-24 00:52: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
1e9f9d9809
update Test for Issue#1029
2018-01-14 14:58:19 +09:00
1b25379c02
small fix: reset switch_ctx flag in schedule() for redo
2018-01-14 14:50:31 +09:00
38bbb4e390
add Test programs for Issue#1029
2018-01-10 11:22:05 +09:00
0fa88f513f
fix broken files
2017-12-27 15:28:13 +09:00
cd54c5983a
fix openat
2017-12-27 14:59:13 +09:00
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
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
cc7be46b7d
make sure to context-switch to idle thread when therad's status is PS_EXITED
...
refs #1029
2017-12-25 13:32:42 +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
2d2d0af6fb
add test for Issue#873, 1011
2017-11-29 12:23:20 +09:00
7f47dc78a1
add Issue#727 test cases
2017-11-29 11:32:40 +09:00
c3c9187ed5
add test for portability (kahansei_kojo in dev_V)
2017-11-28 17:55:23 +09:00
aebacb243e
User Space:swapout (this is a rebase commit to merge into development)
2017-11-28 09:16:00 +09:00
5a8d1f09e8
add test/dump/README
2017-11-27 19:39:16 +09:00
0e10b6d1ee
test/strace: Fix permission
2017-11-22 06:31:32 +09:00
d649d6fc2d
Include mbind support (this is a rebase commit to merge into development)
2017-11-27 11:16:53 +09:00
bad487cc07
add regression test result for strace
2017-11-25 18:30:51 +09:00
3b6056fb1a
add strace test cases and test result
2017-11-25 17:37:10 +09:00
5cc738d6bd
add test programs for strace
2017-11-25 14:35:17 +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
4e7069d499
add: proc|sys fs format_checker (tool)
2017-11-22 09:39:48 +09:00
66f44e77af
mcstop+release.sh: Allow ihkmond to flush kmsg buffer
2017-11-20 18:28:48 +09:00
35f908b75c
mcexec: protect against incorrect partitioned execution argument (-n) using timeouts
2017-11-20 17:06:01 +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
ac25c5e1e7
fix: depending arch in Makefile (POSTK_DEBUG_ARCH_DEP_1)
2017-11-20 14:45:18 +09:00
90c0355d90
add setting process of pgshift to remap_process_memory_range
...
refs #955
2017-11-20 14:17:03 +09:00
43230eb623
fix: checking the return code of fork() in Linux.
...
refs #906
2017-11-15 15:46:47 +09:00
f18dc8428d
fix: error code of perf_event_open, when unsupported event is specified.
...
refs #1030
2017-11-15 12:49:56 +09:00
ab53c8e0a4
execve: fix memory leak
...
refs #727
2017-11-09 16:44:31 +09:00
6c33e236d7
mcreboot: Fix umask for /proc and /sys files
2017-10-27 04:57:44 +09:00
85d36f1469
mcexec: check kernel version <= 3.10 for RHEL mcoverlayfs
2017-10-31 13:39:31 +09:00