diff --git a/scripts/integrate-no-kprobe.py b/scripts/integrate-no-kprobe.py index 28e24897..935779c9 100644 --- a/scripts/integrate-no-kprobe.py +++ b/scripts/integrate-no-kprobe.py @@ -149,23 +149,26 @@ def process_kernel_source(file_paths, enable_ksu=True, disable_external_mods=Fal 'open.c': { 'functions': ['do_faccessat', 'SYSCALL_DEFINE3(faccessat,'], 'code': ''' #ifdef CONFIG_KSU - if (unlikely(ksu_faccessat_hook)) - ksu_handle_faccessat(&dfd, &filename, &mode, &flags); + ksu_handle_faccessat(&dfd, &filename, &mode, NULL); #endif''' }, 'read_write.c': { 'functions': ['vfs_read'], 'code': ''' #ifdef CONFIG_KSU if (unlikely(ksu_vfs_read_hook)) - ksu_handle_vfs_read(file, buf, count, pos); + ksu_handle_vfs_read(&file, &buf, &count, &pos); #endif''' }, 'stat.c': { 'functions': ['vfs_statx', 'vfs_fstatat'], 'code': ''' #ifdef CONFIG_KSU - if (unlikely(ksu_vfs_stat_hook)) - ksu_handle_vfs_stat(dfd, filename, &stat, flags); - #endif''' + if (unlikely(ksu_vfs_stat_hook)) { + if (strcmp(__func__, "vfs_statx") == 0) + ksu_handle_stat(&dfd, &filename, &flags); + else if (strcmp(__func__, "vfs_fstatat") == 0) + ksu_handle_stat(&dfd, &filename, &flag); + } + #endif''' }, # External modifications 'inode.c': { diff --git a/scripts/kernel_zipper.sh b/scripts/kernel_zipper.sh index f12e3ea2..34169201 100755 --- a/scripts/kernel_zipper.sh +++ b/scripts/kernel_zipper.sh @@ -88,7 +88,7 @@ fi # Create AnyKernel zip cd "$ANYKERNEL_DIR" -zip -r9 "$FINAL_KERNEL_ZIP" * -x .git README.md *placeholder +zip -r9 "$FINAL_KERNEL_ZIP" * -x .git README.md kernel_zipper.sh *placeholder mv $FINAL_KERNEL_ZIP $KERNEL_DIR/$FINAL_KERNEL_ZIP