From 8e41aa5eb85ae15905b28ec7c6e8111d1a9feba7 Mon Sep 17 00:00:00 2001 From: wangx Date: Sat, 9 May 2020 18:01:46 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 8 ++++++++ .idea/OnlineJudgeCore.iml | 8 ++++++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ core.cpp | 31 +++++++++++++++++++------------ core.h | 3 +-- 7 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/OnlineJudgeCore.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/OnlineJudgeCore.iml b/.idea/OnlineJudgeCore.iml new file mode 100644 index 0000000..bc2cd87 --- /dev/null +++ b/.idea/OnlineJudgeCore.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..76113c4 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/core.cpp b/core.cpp index 7d33f5f..e2f2535 100644 --- a/core.cpp +++ b/core.cpp @@ -65,18 +65,18 @@ void parse_arguments(int argc, char* argv[]) { while ((opt = getopt(argc, argv, "c:t:m:d:S:s")) != -1) { switch (opt) { - case 'c': PROBLEM::code_path = optarg; break; - case 't': PROBLEM::time_limit = atoi(optarg); break; - case 'm': PROBLEM::memory_limit = atoi(optarg); break; - case 's': PROBLEM::spj = true; break; - case 'S': PROBLEM::spj_lang = atoi(optarg); break; - case 'd': PROBLEM::run_dir = optarg; break; + case 'c': PROBLEM::code_path = optarg; break; // 待评测的代码路径 + case 't': PROBLEM::time_limit = atoi(optarg); break; // 时间限制 单位MS + case 'm': PROBLEM::memory_limit = atoi(optarg); break; // 内存限制 单位KB + case 's': PROBLEM::spj = true; break; // 是否使用SpecialJudge + case 'S': PROBLEM::spj_lang = atoi(optarg); break; // SPJ的语言类型 + case 'd': PROBLEM::run_dir = optarg; break; // 运行在什么文件夹,沙箱 default: FM_LOG_WARNING("Unknown option provided: -%c %s", opt, optarg); exit(JUDGE_CONF::EXIT_BAD_PARAM); } } - + // 判断语言类型 if (has_suffix(PROBLEM::code_path, ".cpp")) { PROBLEM::lang = JUDGE_CONF::LANG_CPP; } else if (has_suffix(PROBLEM::code_path, ".c")) { @@ -135,7 +135,12 @@ void timeout(int signo) { exit(JUDGE_CONF::EXIT_TIMEOUT); } } - +/** + * 设置编译时间限制 + * @param which + * @param milliseconds + * @return + */ static int malarm(int which, int milliseconds) { struct itimerval t; @@ -147,7 +152,7 @@ int malarm(int which, int milliseconds) { return setitimer(which, &t, NULL); } -/* +/** * 输入输出重定向 */ static @@ -164,25 +169,27 @@ void io_redirect() { FM_LOG_TRACE("redirect io is OK."); } -/* +/** * 安全性控制 * chroot限制程序只能在某目录下操作,无法影响到外界 * setuid使其只拥有nobody的最低系统权限 */ static void security_control() { + // 获得用户的登录信息 struct passwd *nobody = getpwnam("nobody"); + // nobody 不存在报错 if (nobody == NULL){ FM_LOG_WARNING("Well, where is nobody? I cannot live without him. %d: %s", errno, strerror(errno)); exit(JUDGE_CONF::EXIT_SET_SECURITY); } - //chdir + //chdir 沙箱目录不存在报错 if (EXIT_SUCCESS != chdir(PROBLEM::run_dir.c_str())) { FM_LOG_WARNING("chdir(%s) failed, %d: %s", PROBLEM::run_dir.c_str(), errno, strerror(errno)); exit(JUDGE_CONF::EXIT_SET_SECURITY); } - + // 获取当前目录的绝对路径 char cwd[1024], *tmp = getcwd(cwd, 1024); if (tmp == NULL) { FM_LOG_WARNING("Oh, where i am now? I cannot getcwd. %d: %s", errno, strerror(errno)); diff --git a/core.h b/core.h index 715ef73..5178f5e 100644 --- a/core.h +++ b/core.h @@ -64,7 +64,6 @@ const int LANG_UNKNOWN = 0; const int LANG_C = 1; const int LANG_CPP = 2; const int LANG_JAVA = 3; - } namespace PROBLEM @@ -72,7 +71,7 @@ namespace PROBLEM int id = 0; //貌似没用上 int lang = 0; //待评测的程序语言 int spj_lang = 0; //SpecialJudge程序的语言 -int time_limit = 1000; //MS +int time_limit = 1000; //MS 毫秒 int memory_limit = 65535; //KB int output_limit = 1024000; //KB,输出文件的大小限制 int result = JUDGE_CONF::SE; //结果代号 From 04b41ef79b537194457fbada7a704e2d12245d6d Mon Sep 17 00:00:00 2001 From: wangx Date: Sat, 9 May 2020 23:11:39 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9Blog?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.cpp b/core.cpp index e2f2535..a0cdd60 100644 --- a/core.cpp +++ b/core.cpp @@ -438,7 +438,7 @@ void compiler_source_code() { } else if (WIFSTOPPED(status)){ FM_LOG_WARNING("The compile process stopped by signal"); } else { - FM_LOG_WARNING("I don't kwon why the compile process stopped"); + FM_LOG_WARNING("I don't know why the compile process stopped"); } exit(JUDGE_CONF::EXIT_COMPILE); } From 7c3f0a502b05a2bae36354e705781afd4c4e35c7 Mon Sep 17 00:00:00 2001 From: wangx Date: Sat, 9 May 2020 23:37:45 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9Blog?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.cpp | 15 ++++++++------- core.h | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/core.cpp b/core.cpp index a0cdd60..1565389 100644 --- a/core.cpp +++ b/core.cpp @@ -63,7 +63,7 @@ void parse_arguments(int argc, char* argv[]) { int opt; extern char *optarg; - while ((opt = getopt(argc, argv, "c:t:m:d:S:s")) != -1) { + while ((opt = getopt(argc, argv, "c:t:m:d:S:s:l")) != -1) { switch (opt) { case 'c': PROBLEM::code_path = optarg; break; // 待评测的代码路径 case 't': PROBLEM::time_limit = atoi(optarg); break; // 时间限制 单位MS @@ -71,6 +71,7 @@ void parse_arguments(int argc, char* argv[]) { case 's': PROBLEM::spj = true; break; // 是否使用SpecialJudge case 'S': PROBLEM::spj_lang = atoi(optarg); break; // SPJ的语言类型 case 'd': PROBLEM::run_dir = optarg; break; // 运行在什么文件夹,沙箱 + case 'l': default: FM_LOG_WARNING("Unknown option provided: -%c %s", opt, optarg); exit(JUDGE_CONF::EXIT_BAD_PARAM); @@ -108,7 +109,7 @@ void parse_arguments(int argc, char* argv[]) { case 2: PROBLEM::spj_exec_file = PROBLEM::run_dir + "/SpecialJudge";break; case 3: PROBLEM::spj_exec_file = PROBLEM::run_dir + "/SpecialJudge";break; default: - FM_LOG_WARNING("OMG, I really do not kwon the special judge problem language."); + FM_LOG_WARNING("OMG, I really do not know the special judge problem language."); exit(JUDGE_CONF::EXIT_BAD_PARAM); } @@ -351,7 +352,7 @@ bool is_valid_syscall(int lang, int syscall_id, pid_t child, user_regs_struct re } else if (RF_table[syscall_id] > 0) { //如果RF_table中对应的syscall_id可被调用的次数>0 //且是在退出syscall的时候, 那么次数减一 - if (in_syscall == false) + if (!in_syscall) RF_table[syscall_id]--; } else { //RF_table中syscall_id对应的指<0, 表示是不限制调用的 @@ -590,7 +591,7 @@ void judge() { FM_LOG_WARNING("The glibc failed."); } else { //FM_LOG_WARNING("%d\n", SYS_write); - FM_LOG_WARNING("restricted fuction table"); + FM_LOG_WARNING("restricted function table"); } PROBLEM::result = JUDGE_CONF::RE; ptrace(PTRACE_KILL, executive, NULL, NULL); @@ -784,13 +785,15 @@ void run_spj() { } else if (WIFSIGNALED(status) && WTERMSIG(status) == SIGALRM) { FM_LOG_WARNING("Well, the special judge program consume too much time."); } else { - FM_LOG_WARNING("Actually, I do not kwon why the special judge program dead."); + FM_LOG_WARNING("Actually, I do not know why the special judge program dead."); } } } int main(int argc, char *argv[]) { + parse_arguments(argc, argv); + log_open("./core_log.txt"); //或许写成参数更好,懒得写了 atexit(output_result); //退出程序时的回调函数,用于输出判题结果 @@ -801,8 +804,6 @@ int main(int argc, char *argv[]) { exit(JUDGE_CONF::EXIT_UNPRIVILEGED); } - parse_arguments(argc, argv); - JUDGE_CONF::JUDGE_TIME_LIMIT += PROBLEM::time_limit; if (EXIT_SUCCESS != malarm(ITIMER_REAL, JUDGE_CONF::JUDGE_TIME_LIMIT)) { diff --git a/core.h b/core.h index 5178f5e..5589989 100644 --- a/core.h +++ b/core.h @@ -64,6 +64,8 @@ const int LANG_UNKNOWN = 0; const int LANG_C = 1; const int LANG_CPP = 2; const int LANG_JAVA = 3; +//LOG日志保存的位置 +std::string LOG_DIR = "./core_log.txt"; } namespace PROBLEM From e77a356adf808d66fe37abac2dbb2834d11cfb8c Mon Sep 17 00:00:00 2001 From: wangx Date: Sat, 9 May 2020 23:38:34 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9C=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=88=B0=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/core.h b/core.h index 5589989..5178f5e 100644 --- a/core.h +++ b/core.h @@ -64,8 +64,6 @@ const int LANG_UNKNOWN = 0; const int LANG_C = 1; const int LANG_CPP = 2; const int LANG_JAVA = 3; -//LOG日志保存的位置 -std::string LOG_DIR = "./core_log.txt"; } namespace PROBLEM From 3b136421b9b4de83ab370e1d4289355d8e3e2666 Mon Sep 17 00:00:00 2001 From: wangx Date: Thu, 11 Jun 2020 10:21:56 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + core.cpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 16e87c8..1c66ee4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ Core test/ run_dir/ +.idea/ diff --git a/core.cpp b/core.cpp index 1565389..893822b 100644 --- a/core.cpp +++ b/core.cpp @@ -63,7 +63,7 @@ void parse_arguments(int argc, char* argv[]) { int opt; extern char *optarg; - while ((opt = getopt(argc, argv, "c:t:m:d:S:s:l")) != -1) { + while ((opt = getopt(argc, argv, "c:t:m:d:S:s")) != -1) { switch (opt) { case 'c': PROBLEM::code_path = optarg; break; // 待评测的代码路径 case 't': PROBLEM::time_limit = atoi(optarg); break; // 时间限制 单位MS @@ -71,7 +71,6 @@ void parse_arguments(int argc, char* argv[]) { case 's': PROBLEM::spj = true; break; // 是否使用SpecialJudge case 'S': PROBLEM::spj_lang = atoi(optarg); break; // SPJ的语言类型 case 'd': PROBLEM::run_dir = optarg; break; // 运行在什么文件夹,沙箱 - case 'l': default: FM_LOG_WARNING("Unknown option provided: -%c %s", opt, optarg); exit(JUDGE_CONF::EXIT_BAD_PARAM); From 497345ce722825e8899ea9c80a70f9599857b4c6 Mon Sep 17 00:00:00 2001 From: wangx Date: Thu, 11 Jun 2020 10:24:55 +0800 Subject: [PATCH 06/12] =?UTF-8?q?'=E5=88=A0=E9=99=A4=E4=BA=86.idea?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 8 -------- .idea/OnlineJudgeCore.iml | 8 -------- .idea/misc.xml | 6 ------ .idea/modules.xml | 8 -------- .idea/vcs.xml | 6 ------ 5 files changed, 36 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/OnlineJudgeCore.iml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e0..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/OnlineJudgeCore.iml b/.idea/OnlineJudgeCore.iml deleted file mode 100644 index bc2cd87..0000000 --- a/.idea/OnlineJudgeCore.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 28a804d..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 76113c4..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 75df6403e7b4cc38dda5bf96fb6b657f9ec97274 Mon Sep 17 00:00:00 2001 From: wangx Date: Mon, 8 Feb 2021 16:17:37 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=86rt=5Ftable,?= =?UTF-8?q?=E6=9D=A5=E4=BD=BF=E5=BE=97Java=E5=8F=AF=E4=BB=A5=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.cpp | 16 ++++++++-------- rf_table.h | 6 ++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/core.cpp b/core.cpp index 893822b..33f3ad4 100644 --- a/core.cpp +++ b/core.cpp @@ -304,7 +304,7 @@ static bool in_syscall = true; static bool is_valid_syscall(int lang, int syscall_id, pid_t child, user_regs_struct regs) { in_syscall = !in_syscall; - //FM_LOG_DEBUG("syscall: %d, %s, count: %d", syscall_id, in_syscall?"in":"out", RF_table[syscall_id]); + FM_LOG_DEBUG("syscall: %d, %s, count: %d", syscall_id, in_syscall?"in":"out", RF_table[syscall_id]); if (RF_table[syscall_id] == 0) { //如果RF_table中对应的syscall_id可以被调用的次数为0, 则为RF @@ -502,7 +502,7 @@ void judge() { //PROBLEM::result = JUDGE_CONF::PROCEED; } else { - FM_LOG_WARNING("oh, some error occured.Abnormal quit."); + FM_LOG_WARNING("oh, some error occurred.Abnormal quit."); PROBLEM::result = JUDGE_CONF::RE; } break; @@ -526,7 +526,7 @@ void judge() { case SIGXCPU: case SIGVTALRM: case SIGKILL: - FM_LOG_TRACE("Well, Time Limit Exeeded"); + FM_LOG_TRACE("Well, Time Limit Exceeded"); PROBLEM::time_usage = 0; PROBLEM::memory_usage = 0; PROBLEM::result = JUDGE_CONF::TLE; @@ -541,13 +541,13 @@ void judge() { case SIGFPE: case SIGBUS: case SIGABRT: - //FM_LOG_TRACE("RE了"); + FM_LOG_TRACE("RE了"); PROBLEM::time_usage = 0; PROBLEM::memory_usage = 0; PROBLEM::result = JUDGE_CONF::RE; break; default: - //FM_LOG_TRACE("不知道哪儿跪了"); + FM_LOG_TRACE("不知道哪儿跪了"); PROBLEM::time_usage = 0; PROBLEM::memory_usage = 0; PROBLEM::result = JUDGE_CONF::RE; @@ -573,7 +573,7 @@ void judge() { //获得子进程的寄存器,目的是为了获知其系统调用 if (ptrace(PTRACE_GETREGS, executive, NULL, ®s) < 0) { - FM_LOG_WARNING("ptrace PTRACE_GETREGS failed"); + FM_LOG_WARNING("ptrace PTRACE_GETARGS failed"); exit(JUDGE_CONF::EXIT_JUDGE); } @@ -585,11 +585,11 @@ void judge() { //检查系统调用是否合法 if (syscall_id > 0 && !is_valid_syscall(PROBLEM::lang, syscall_id, executive, regs)) { - FM_LOG_WARNING("restricted fuction %d\n", syscall_id); + FM_LOG_WARNING("restricted function %d\n", syscall_id); if (syscall_id == SYS_rt_sigprocmask){ FM_LOG_WARNING("The glibc failed."); } else { - //FM_LOG_WARNING("%d\n", SYS_write); + FM_LOG_WARNING("%d\n", is_valid_syscall(PROBLEM::lang, syscall_id, executive, regs)); FM_LOG_WARNING("restricted function table"); } PROBLEM::result = JUDGE_CONF::RE; diff --git a/rf_table.h b/rf_table.h index db03848..04fe982 100644 --- a/rf_table.h +++ b/rf_table.h @@ -137,6 +137,9 @@ int RF_JAVA[512] = SYS_stat64, -1, SYS_ugetrlimit, -1, SYS_uname, -1, + 257, -1, + 302, -1, + 39, -1, -1 }; @@ -252,6 +255,9 @@ int RF_JAVA[512] = SYS_writev, -1, SYS_time, -1, SYS_readlink, -1, + 257, -1, + 302, -1, + 39, -1, -1 }; #endif From f3bfb29086a8db6aa8ea749cab115c5c15a850fc Mon Sep 17 00:00:00 2001 From: wangx <35062162+wangxso@users.noreply.github.com> Date: Wed, 14 Apr 2021 13:11:13 +0800 Subject: [PATCH 08/12] Update rf_table.h --- rf_table.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rf_table.h b/rf_table.h index 04fe982..3632b8d 100644 --- a/rf_table.h +++ b/rf_table.h @@ -137,9 +137,7 @@ int RF_JAVA[512] = SYS_stat64, -1, SYS_ugetrlimit, -1, SYS_uname, -1, - 257, -1, - 302, -1, - 39, -1, + SYS_prctl, -1, -1 }; @@ -255,7 +253,7 @@ int RF_JAVA[512] = SYS_writev, -1, SYS_time, -1, SYS_readlink, -1, - 257, -1, + SYS_prctl, -1, 302, -1, 39, -1, -1 From da64dc0e7dc7f03503aabe022852fe608e14d36d Mon Sep 17 00:00:00 2001 From: wangx <35062162+wangxso@users.noreply.github.com> Date: Wed, 14 Apr 2021 13:41:08 +0800 Subject: [PATCH 09/12] Update rf_table.h --- rf_table.h | 1 - 1 file changed, 1 deletion(-) diff --git a/rf_table.h b/rf_table.h index 3632b8d..2a095c2 100644 --- a/rf_table.h +++ b/rf_table.h @@ -253,7 +253,6 @@ int RF_JAVA[512] = SYS_writev, -1, SYS_time, -1, SYS_readlink, -1, - SYS_prctl, -1, 302, -1, 39, -1, -1 From ee913cddf698ec8478b979c17b7901f55251ad59 Mon Sep 17 00:00:00 2001 From: wangx <35062162+wangxso@users.noreply.github.com> Date: Wed, 14 Apr 2021 13:47:28 +0800 Subject: [PATCH 10/12] Update rf_table.h --- rf_table.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rf_table.h b/rf_table.h index 2a095c2..fcdce12 100644 --- a/rf_table.h +++ b/rf_table.h @@ -48,7 +48,7 @@ int RF_C[512] = SYS_uname, -1, SYS_write, -1, SYS_writev, -1, - 201, -1, + 201, -1, -1 }; @@ -72,7 +72,7 @@ int RF_CPP[512] = SYS_uname, -1, SYS_write, -1, SYS_writev, -1, - 201, -1, + 201, -1, -1 }; @@ -137,7 +137,8 @@ int RF_JAVA[512] = SYS_stat64, -1, SYS_ugetrlimit, -1, SYS_uname, -1, - SYS_prctl, -1, + SYS_prctl, -1, + 157 , -1, -1 }; @@ -253,6 +254,7 @@ int RF_JAVA[512] = SYS_writev, -1, SYS_time, -1, SYS_readlink, -1, + SYS_prctl, -1, 302, -1, 39, -1, -1 From 9606b8b8a18b378fab4aad4650163f9349fd0239 Mon Sep 17 00:00:00 2001 From: wangx <35062162+wangxso@users.noreply.github.com> Date: Wed, 14 Apr 2021 13:50:11 +0800 Subject: [PATCH 11/12] Update rf_table.h --- rf_table.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rf_table.h b/rf_table.h index fcdce12..d500e76 100644 --- a/rf_table.h +++ b/rf_table.h @@ -137,8 +137,7 @@ int RF_JAVA[512] = SYS_stat64, -1, SYS_ugetrlimit, -1, SYS_uname, -1, - SYS_prctl, -1, - 157 , -1, + SYS_prctl, -1, -1 }; From 1a696ebe4af68d1dddfa17459cf3c3e9421354d6 Mon Sep 17 00:00:00 2001 From: wangx <35062162+wangxso@users.noreply.github.com> Date: Wed, 14 Apr 2021 13:57:39 +0800 Subject: [PATCH 12/12] Update rf_table.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kernal 5.4 centos 7 中的Java需要 SYS_prctl --- rf_table.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/rf_table.h b/rf_table.h index d500e76..abc939b 100644 --- a/rf_table.h +++ b/rf_table.h @@ -254,8 +254,6 @@ int RF_JAVA[512] = SYS_time, -1, SYS_readlink, -1, SYS_prctl, -1, - 302, -1, - 39, -1, -1 }; #endif