Skip to content

Conversation

@fuqiuluo
Copy link
Owner

This pull request introduces significant refactoring and new functionality to the kernel module, focusing on improved code organization, new DMA buffer support, and enhanced build configuration. The most notable changes include restructuring source files into themed directories, adding DMA buffer creation and export support, updating build flags and the Makefile for better modularity, and improving ARM64 inline hooking logic.

Codebase restructuring and build improvements:

  • Refactored the source tree to organize files into themed directories (e.g., src/core, src/net, src/mm, etc.), updated the Makefile to use the new structure, and added more granular include paths and build flags such as BUILD_NO_CFI.
  • Added support for building the module from both master and dev branches in the CI workflow.

DMA buffer (dma-buf) support:

  • Implemented DMA buffer creation and export functionality via new files src/mm/wuwa_dmabuf.c and src/mm/wuwa_dmabuf.h. This enables zero-copy memory sharing using file descriptors, with proper resource management and user-space mapping. [1] [2]
  • Updated ioctl command structures to use uintptr_t for physical addresses, improving portability and correctness for DMA operations. [1] [2] [3]

ARM64 inline hook enhancements:

  • Moved and extended ARM64 inline hook logic to src/inlinehook/hijack_arm64.c and src/inlinehook/hijack_arm64.h, adding instruction validation to ensure only safe instructions are hijacked and defining constants for hijack size and offsets. [1] [2]
  • Removed the old hijack_arm64.c implementation, consolidating functionality in the new location.

Feature flags and initialization:

  • Added logic to display and patch CFI bypass status during module initialization when BUILD_NO_CFI is enabled.

Documentation:

  • Updated README.md with a link to a kernel driver development kit and improved group join instructions.

@fuqiuluo fuqiuluo merged commit 4c455c0 into master Oct 13, 2025
14 checks passed
@fuqiuluo fuqiuluo deleted the dev branch October 14, 2025 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants