/
usr
/
src
/
file_protector-1.1-1507
/
File Upload :
llllll
Current File: //usr/src/file_protector-1.1-1507/Kbuild
KERNEL_MODULE_NAME := file_protector # '$(KERNEL_MODULE_NAME).ko' module: obj-m += $(KERNEL_MODULE_NAME).o # '$(KERNEL_MODULE_NAME).o' sources: $(KERNEL_MODULE_NAME)-y += compat.o $(KERNEL_MODULE_NAME)-y += module.o $(KERNEL_MODULE_NAME)-y += module_rundown_protection.o $(KERNEL_MODULE_NAME)-y += rundown_protection.o $(KERNEL_MODULE_NAME)-y += syscall_hooks/fs_syscall_hooks.o $(KERNEL_MODULE_NAME)-y += syscall_hooks/syscall_common.o $(KERNEL_MODULE_NAME)-y += task_info_map.o $(KERNEL_MODULE_NAME)-y += tracepoints.o $(KERNEL_MODULE_NAME)-y += transport/device.o $(KERNEL_MODULE_NAME)-y += transport/exit_event.o $(KERNEL_MODULE_NAME)-y += transport/fork_event.o $(KERNEL_MODULE_NAME)-y += transport/fs_event.o $(KERNEL_MODULE_NAME)-y += transport/message.o $(KERNEL_MODULE_NAME)-y += transport/transport.o # Note: '$(src)' is defined by kernel build system as absolute path # pointing to directory with this Kbuild file ccflags-y += -I$(src) ccflags-y += -I$(src)/common ccflags-y += -I$(src)/syscall_hooks ccflags-y += -I$(src)/transport # Tag to filter debug print ccflags-y += -DPRINTK_TAG=\"APL\" ccflags-y += -DDRIVER_VERSION_STRING=\"0.1.0\" # uncomment/comment to enable/disable debug #ccflags-y += -D__DEBUG__ # Include headers parsing magic # Check if specific header exists ifeq ($(notdir $(wildcard $(srctree)/include/linux/sched.h)),sched.h) ccflags-y += -DHAVE_SCHED_H endif ifeq ($(notdir $(wildcard $(srctree)/include/linux/sched/task.h)),task.h) ccflags-y += -DHAVE_SCHED_TASK_H endif # Check if specific function in header exists ccflags-y += $(shell \ grep -qw get_fs_root $(srctree)/include/linux/fs_struct.h 2>/dev/null && \ echo -DHAVE_GET_FS_ROOT) ccflags-y += $(shell \ grep -qw get_task_exe_file $(srctree)/include/linux/mm.h 2>/dev/null && \ echo -DHAVE_GET_TASK_EXE) ccflags-y += $(shell \ grep -qw path_equal $(srctree)/include/linux/path.h 2>/dev/null && \ echo -DHAVE_PATH_EQUAL) ccflags-y += $(shell \ grep -qw rb_first_postorder $(srctree)/include/linux/rbtree.h 2>/dev/null && \ echo -DHAVE_RB_FIRST_POSTORDER) ccflags-y += $(shell \ grep -qw rb_next_postorder $(srctree)/include/linux/rbtree.h 2>/dev/null && \ echo -DHAVE_RB_NEXT_POSTORDER) ccflags-y += $(shell \ if grep -w vfs_fstatat $(srctree)/include/linux/fs.h 2>/dev/null | \ grep -qw "const char __user \*"; then \ echo -DHAVE_VFS_FSTATAT_CONST; \ fi) ccflags-y += $(shell \ if grep "register_trace_" $(srctree)/include/linux/tracepoint.h 2>/dev/null | \ grep -q "void \*data"; then \ echo -DHAVE_TRACEPOINT_PROBE_REGISTER_DATA; \ fi) ccflags-y += $(shell \ if grep -w tracepoint_probe_register $(srctree)/include/linux/tracepoint.h 2>/dev/null | \ grep -qw "struct tracepoint"; then \ echo -DHAVE_TRACEPOINT_PROBE_REGISTER_STRUCT; \ fi) ccflags-y += $(shell \ if grep -A10 "struct cred {" $(srctree)/include/linux/cred.h 2>/dev/null | \ grep -qw "kuid_t"; then \ echo -DHAVE_STRUCT_CRED_KUID; \ fi) ccflags-y += $(shell \ grep -qw wait_event_killable_timeout $(srctree)/include/linux/wait.h 2>/dev/null && \ echo -DHAVE_WAIT_EVENT_KILLABLE_TIMEOUT) ccflags-y += $(shell \ if grep -qw "fdget" $(srctree)/include/linux/file.h 2>/dev/null ; then \ echo -DHAVE_FDGET; \ fi) ccflags-y += $(shell \ if grep -w "vfs_getattr(.*)" $(srctree)/include/linux/fs.h 2>/dev/null | \ grep -qw "struct path" ; \ then \ echo -DHAVE_PATH_IN_VFS_GETATTR; \ fi) ccflags-y += $(shell \ if grep -w dentry_open $(srctree)/include/linux/fs.h 2>/dev/null | \ grep -qw "struct path"; then \ echo -DHAVE_PATH_IN_DENTRY_OPEN; \ fi) ccflags-y += $(shell \ grep -qw get_unused_fd_flags $(srctree)/include/linux/file.h 2>/dev/null && \ echo -DHAVE_UNUSED_FD_FLAGS)
Copyright ©2k19 -
Hexid
|
Tex7ure