-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Multi Module Impl Support #2753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a multi-module system architecture for KernelSU by refactoring the existing codebase into a modular structure. It introduces a metamodule system that allows for pluggable module system implementations while maintaining backward compatibility.
- Creates a new
ksu-core
library containing shared utilities and constants - Introduces a new
ksu-modsys-overlay
implementation that provides the default overlay-based module system - Refactors
ksud
to delegate module operations through a transparent forwarding interface
Reviewed Changes
Copilot reviewed 40 out of 42 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
userspace/ksud/src/utils.rs | Major refactoring to delegate utility functions to ksu-core and remove large functions |
userspace/ksud/src/modsys.rs | New module system interface providing transparent forwarding to selected modsys implementation |
userspace/ksud/src/main.rs | Updated module references to use new modsys interface |
userspace/ksu-core/src/*.rs | New shared library containing common utilities, constants, and system interfaces |
userspace/ksu-modsys-overlay/src/*.rs | New default module system implementation using overlay filesystem |
userspace/Cargo.toml | New workspace configuration organizing the three main components |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
if let Some(caps) = re.captures(s) | ||
&& (caps.get(1), caps.get(2)) != (None, None) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition (caps.get(1), caps.get(2)) != (None, None)
is redundant since captures()
already ensures capture groups exist. This condition will always be true when captures()
succeeds.
if let Some(caps) = re.captures(s) | |
&& (caps.get(1), caps.get(2)) != (None, None) | |
{ | |
if let Some(caps) = re.captures(s) { |
Copilot uses AI. Check for mistakes.
Ok(vec![AtomicStatement { | ||
cmd: CMD_TYPE_CHANGE, | ||
subcmd, | ||
subcmd: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subcmd should differentiate between 'type_change' and 'type_member' operations but is hardcoded to 0, potentially causing incorrect policy handling.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved by Gemini
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
No description provided.