Skip to content

Commit

Permalink
[cgroupv2_freeze] do_freezer_trap to cgroup_freeze_write
Browse files Browse the repository at this point in the history
  • Loading branch information
lzghzr committed Aug 16, 2024
1 parent 9d5bf4f commit 6abcfc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cgroupv2_freeze/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MYKPM_VERSION := 1.0.8
MYKPM_VERSION := 1.0.9

ifndef KP_DIR
KP_DIR = ../..
Expand Down
8 changes: 4 additions & 4 deletions src/cgroupv2_freeze/cgroupv2_freeze.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,10 @@ static long calculate_offsets() {
}

static long inline_hook_init(const char* args, const char* event, void* __user reserved) {
// 有 do_freezer_trap 函数说明本身就支持cgroupv2 freezer
void (*do_freezer_trap)(void);
do_freezer_trap = (typeof(do_freezer_trap))kallsyms_lookup_name("do_freezer_trap");
if (do_freezer_trap)
// 有 cgroup_freeze_write 函数说明本身就支持cgroupv2 freezer
void (*kf_cgroup_freeze_write)(void);
kf_cgroup_freeze_write = (typeof(kf_cgroup_freeze_write))kallsyms_lookup_name("cgroup_freeze_write");
if (kf_cgroup_freeze_write)
return -24;

lookup_name(do_filp_open);
Expand Down

0 comments on commit 6abcfc2

Please sign in to comment.