Skip to content

Commit

Permalink
Update integrate-no-kprobe.py to warn for kprobes
Browse files Browse the repository at this point in the history
  • Loading branch information
mlm-games authored Jan 30, 2025
1 parent 2966713 commit 7ad4bf2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/integrate-no-kprobe.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import re
import warnings

def apply_patch(kernel_path, patch_file):
os.chdir(kernel_path)
Expand Down Expand Up @@ -51,7 +52,7 @@ def modify_ksu_config(defconfig, enable=True):
# Check if CONFIG_KPROBES is enabled
kprobes_enabled = re.search(r'^CONFIG_KPROBES=y$', content, re.MULTILINE)
if kprobes_enabled:
sys.exit(f"Error: CONFIG_KPROBES is enabled in {defconfig_path}. Follow the official docs for kprobe integration.")
warnings.warn(f"CONFIG_KPROBES is enabled in {defconfig_path}. Follow the official docs for kprobe integration.")

# Check if CONFIG_KSU is already present
ksu_regex = re.compile(r'^CONFIG_KSU=.*$', re.MULTILINE)
Expand Down

0 comments on commit 7ad4bf2

Please sign in to comment.