Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
make -C apps/basic clean
make
make -C apps/basic
LIBSVCHOOK=./apps/basic/libsvchook_basic.so LD_PRELOAD=./libsvchook.so ls | grep "output from hook_function"
/lib/ld-linux-aarch64.so.1 --list-tunables
GLIBC_TUNABLES=glibc.rtld.seal=0 LIBSVCHOOK=./apps/basic/libsvchook_basic.so LD_PRELOAD=./libsvchook.so ls | grep "output from hook_function"
- name: Format
run: |
make fmt
Expand Down
24 changes: 24 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,27 @@ title: "svc-hook"
version: 0.1.0
date-released: 2025-10-17
url: "https://github.com/retrage/svc-hook"
preferred-citation:
type: "conference-paper"
title: "svc-hook: hooking system calls on ARM64 by binary rewriting"
authors:
- family-names: "Moroo"
given-names: "Akira"
orcid: "https://orcid.org/0009-0007-9762-3210"
- family-names: "Tazaki"
given-names: "Hajime"
orcid: "https://orcid.org/0000-0002-6524-2954"
- family-names: "Yasukata"
given-names: "Kenichi"
orcid: "https://orcid.org/0000-0002-7866-2245"
doi: "10.1145/3721462.3770771"
collection-title: "Proceedings of the 26th International Middleware Conference"
year: 2025
month: 12
start: 195
end: 201
keywords:
- "system call hook"
- "binary rewriting"
- "ARM64"
url: "https://doi.org/10.1145/3721462.3770771"
4 changes: 4 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,10 @@ static void scan_code(void) {
if (strstr(buf, "[stack]") != NULL) {
continue;
}
/* we do not touch vdso memory */
if (strstr(buf, "[vdso]") != NULL) {
continue;
}
int mem_prot = 0;
int i = 0;
char addr[65] = {0};
Expand Down