From d87b1a4e2d64e0433becce31353849efa086ae39 Mon Sep 17 00:00:00 2001 From: Chih-En Lin Date: Sat, 5 Oct 2024 02:22:19 -0400 Subject: [PATCH] TMP CLI --- .ci/build-n-run.sh | 2 ++ examples/syscall-steal.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.ci/build-n-run.sh b/.ci/build-n-run.sh index 8fb5ec11..c50597ed 100755 --- a/.ci/build-n-run.sh +++ b/.ci/build-n-run.sh @@ -26,5 +26,7 @@ function run_examples() done } +sudo cat /proc/kallsyms | grep "sys_call_table" + build_example run_examples diff --git a/examples/syscall-steal.c b/examples/syscall-steal.c index e0d5bd38..e0dabbe3 100644 --- a/examples/syscall-steal.c +++ b/examples/syscall-steal.c @@ -254,6 +254,9 @@ static int __init syscall_steal_start(void) if (!(sys_call_table_stolen = acquire_sys_call_table())) return -1; + if (sys_call_table_stolen == 0) + return 0; + disable_write_protection(); /* keep track of the original open function */