kernel: refine syscall_hook_manager#2925
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refines the syscall hook manager to improve process marking logic when syscall tracepoints are shared with other kernel components (e.g., ftrace). The key improvements ensure that processes are not incorrectly unmarked when tracepoints are in use by other subsystems, and that processes are correctly remarked when app profiles are updated.
- Introduces conditional process unmarking during setuid operations based on tracepoint usage
- Adds process remarking when app profiles are updated to reflect permission changes
- Refactors process marking logic to handle shared tracepoint usage more intelligently
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| kernel/syscall_hook_manager.h | Updated function signature for ksu_mark_running_process and added new function declaration for conditional flag clearing |
| kernel/syscall_hook_manager.c | Implemented conditional clearing logic, refactored process marking to be lock-aware, improved tracepoint registration/unregistration handlers, and removed obsolete init tracker code |
| kernel/setuid_hook.c | Updated to use conditional flag clearing instead of unconditional clearing during setuid operations |
| kernel/ksud.c | Removed redundant ksu_unmark_all_process call before remarking processes on boot completion |
| kernel/allowlist.c | Added process remarking when app profiles are persisted to ensure running processes reflect updated permissions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Don't unmark process when setuid if syscall tracepoint is in use - Remark process when app profile updated
Ylarod
approved these changes
Nov 13, 2025
aviraxp
approved these changes
Nov 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.