From 6abcfc23f33d9b3eccd8dbb5eb654b350eb1281a Mon Sep 17 00:00:00 2001 From: lzghzr Date: Fri, 16 Aug 2024 19:31:26 +0800 Subject: [PATCH] [cgroupv2_freeze] do_freezer_trap to cgroup_freeze_write --- src/cgroupv2_freeze/Makefile | 2 +- src/cgroupv2_freeze/cgroupv2_freeze.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cgroupv2_freeze/Makefile b/src/cgroupv2_freeze/Makefile index ce535b9..f63155c 100644 --- a/src/cgroupv2_freeze/Makefile +++ b/src/cgroupv2_freeze/Makefile @@ -1,4 +1,4 @@ -MYKPM_VERSION := 1.0.8 +MYKPM_VERSION := 1.0.9 ifndef KP_DIR KP_DIR = ../.. diff --git a/src/cgroupv2_freeze/cgroupv2_freeze.c b/src/cgroupv2_freeze/cgroupv2_freeze.c index 33f5aa5..5dc6702 100644 --- a/src/cgroupv2_freeze/cgroupv2_freeze.c +++ b/src/cgroupv2_freeze/cgroupv2_freeze.c @@ -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);