add Issue#727 test cases
This commit is contained in:
27
test/error_handling/Issue727/727.patch
Normal file
27
test/error_handling/Issue727/727.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff --git a/executer/user/mcexec.c b/executer/user/mcexec.c
|
||||
index 2d0d50e..70856e7 100644
|
||||
--- a/executer/user/mcexec.c
|
||||
+++ b/executer/user/mcexec.c
|
||||
@@ -71,9 +71,9 @@
|
||||
#else /* POSTK_DEBUG_ARCH_DEP_35 */
|
||||
#include <sys/user.h>
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_35 */
|
||||
-#include <sys/prctl.h>
|
||||
+//#include <sys/prctl.h>
|
||||
#ifndef POSTK_DEBUG_ARCH_DEP_77 /* arch depend hide */
|
||||
-#include <asm/prctl.h>
|
||||
+//#include <asm/prctl.h>
|
||||
#endif /* !POSTK_DEBUG_ARCH_DEP_77 */
|
||||
#include "../include/uprotocol.h"
|
||||
#include <getopt.h>
|
||||
@@ -3732,7 +3732,9 @@ return_execve1:
|
||||
|
||||
/* Copy program image phase */
|
||||
case 2:
|
||||
-
|
||||
+ fprintf(stderr, "execve killed\n");
|
||||
+ fflush(stderr);
|
||||
+ kill(getpid(), SIGKILL);
|
||||
ret = -1;
|
||||
/* Alloc descriptor */
|
||||
desc = malloc(w.sr.args[2]);
|
||||
17
test/error_handling/Issue727/README
Normal file
17
test/error_handling/Issue727/README
Normal file
@ -0,0 +1,17 @@
|
||||
■ Issue#727 動作確認
|
||||
1. ファイルの説明
|
||||
727.patch 再現確認用パッチ mcexec において、execve phase 2 を SIGKILL
|
||||
終了させる
|
||||
exec.c 確認用テストプログラム exec ls する
|
||||
patch-off.log パッチ非適用時の動作確認結果 ls の結果が表示されれば OK
|
||||
patch-on.log パッチ適用時の動作確認結果 強制終了し、McKernel が PANIC して
|
||||
いなければ OK
|
||||
|
||||
2. 確認用テストプログラムのコンパイル方法
|
||||
gcc -o exec exec.c を行い、実行ファイル exec を得る
|
||||
|
||||
3. 確認結果
|
||||
patch-on.log において、mcexec が強制終了し、McKernelのログに PANIC の表示が
|
||||
無いため、確認結果は OK。
|
||||
また、パッチ非適用時 (patch-off.log)、正常に ls の結果が表示されているので OK。
|
||||
以上より、確認結果は問題無い。
|
||||
10
test/error_handling/Issue727/exec.c
Normal file
10
test/error_handling/Issue727/exec.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
execlp("ls", "ls", NULL);
|
||||
}
|
||||
33
test/error_handling/Issue727/patch-off.log
Normal file
33
test/error_handling/Issue727/patch-off.log
Normal file
@ -0,0 +1,33 @@
|
||||
スクリプトは Wed Nov 29 11:22:32 2017
|
||||
に開始しました[?1034hbash-4.2$ ../../../../mic/mcexec ./exec
|
||||
727.patch exec exec.c patch-off.log
|
||||
bash-4.2$ ../../../../mic/ihkosctl 0kmsg kmsg
|
||||
IHK/McKernel started.
|
||||
[ -1]: no_execute_available: 1
|
||||
[ -1]: X86_IA32_NUM_PERF_COUNTERS: 4, X86_IA32_NUM_FIXED_PERF_COUNTERS: 3
|
||||
[ -1]: Invariant TSC supported.
|
||||
[ -1]: setup_x86 done.
|
||||
[ -1]: ns_per_tsc: 384
|
||||
[ -1]: KCommand Line: hidos dump_level=24
|
||||
[ -1]: Physical memory: 0x1002c7000 - 0x140000000, 1070829568 bytes, 261433 pages available @ NUMA: 0
|
||||
[ -1]: Physical memory: 0x880000000 - 0x8c0000000, 1073741824 bytes, 262144 pages available @ NUMA: 1
|
||||
[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 1070829568, pages: 261433
|
||||
[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 1073741824, pages: 262144
|
||||
[ -1]: NUMA 0 distances: 0 (10), 1 (21),
|
||||
[ -1]: NUMA 1 distances: 1 (10), 0 (21),
|
||||
[ -1]: map_fixed: phys: 0x90000 => 0xffffffff70015000 (2 pages)
|
||||
[ -1]: Trampoline area: 0x90000
|
||||
[ -1]: map_fixed: phys: 0x0 => 0xffffffff70017000 (1 pages)
|
||||
[ -1]: # of cpus : 7
|
||||
[ -1]: locals = ffff8001002eb000
|
||||
[ 0]: BSP: 0 (HW ID: 2 @ NUMA 0)
|
||||
[ 0]: BSP: booted 6 AP CPUs
|
||||
[ 0]: Master channel init acked.
|
||||
[ 0]: vdso is enabled
|
||||
IHK/McKernel booted.
|
||||
|
||||
bash-4.2$ シェルから脱出するには "exit" を使用してください。
|
||||
bash-4.2$ exit
|
||||
|
||||
スクリプトは Wed Nov 29 11:22:57 2017
|
||||
に終了しました
|
||||
35
test/error_handling/Issue727/patch-on.log
Normal file
35
test/error_handling/Issue727/patch-on.log
Normal file
@ -0,0 +1,35 @@
|
||||
スクリプトは Wed Nov 29 11:25:01 2017
|
||||
に開始しました[?1034hbash-4.2$ ../../../../mic/mcexec ./exec
|
||||
execve killed
|
||||
強制終了
|
||||
bash-4.2$ ../../../../mic/ihkosctl 0 kmsg
|
||||
IHK/McKernel started.
|
||||
[ -1]: no_execute_available: 1
|
||||
[ -1]: X86_IA32_NUM_PERF_COUNTERS: 4, X86_IA32_NUM_FIXED_PERF_COUNTERS: 3
|
||||
[ -1]: Invariant TSC supported.
|
||||
[ -1]: setup_x86 done.
|
||||
[ -1]: ns_per_tsc: 384
|
||||
[ -1]: KCommand Line: hidos dump_level=24
|
||||
[ -1]: Physical memory: 0x1002c7000 - 0x140000000, 1070829568 bytes, 261433 pages available @ NUMA: 0
|
||||
[ -1]: Physical memory: 0x880000000 - 0x8c0000000, 1073741824 bytes, 262144 pages available @ NUMA: 1
|
||||
[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 1070829568, pages: 261433
|
||||
[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 1073741824, pages: 262144
|
||||
[ -1]: NUMA 0 distances: 0 (10), 1 (21),
|
||||
[ -1]: NUMA 1 distances: 1 (10), 0 (21),
|
||||
[ -1]: map_fixed: phys: 0x90000 => 0xffffffff70015000 (2 pages)
|
||||
[ -1]: Trampoline area: 0x90000
|
||||
[ -1]: map_fixed: phys: 0x0 => 0xffffffff70017000 (1 pages)
|
||||
[ -1]: # of cpus : 7
|
||||
[ -1]: locals = ffff8001002eb000
|
||||
[ 0]: BSP: 0 (HW ID: 2 @ NUMA 0)
|
||||
[ 0]: BSP: booted 6 AP CPUs
|
||||
[ 0]: Master channel init acked.
|
||||
[ 0]: vdso is enabled
|
||||
IHK/McKernel booted.
|
||||
[ 0]: do_syscall: proxy PID 14276 is dead, terminate()
|
||||
|
||||
bash-4.2$ シェルから脱出するには "exit" を使用してください。
|
||||
bash-4.2$ exit
|
||||
|
||||
スクリプトは Wed Nov 29 11:25:33 2017
|
||||
に終了しました
|
||||
Reference in New Issue
Block a user