Skip to content

Conversation

@iansseijelly
Copy link

This PR supports logging and storing the jump label patch for offline binary analysis, including trace decoding.

This commit introduces a new configuration option, JUMP_LABEL_PATCH_LOG_SNAPSHOT, to enable snapshot logging of jump labels for debugging purposes. It includes the implementation of functions to append entries to a log and publish them via debugfs. The changes also modify the jump label transformation logic to utilize the new logging functionality, enhancing the debugging capabilities of the jump label mechanism in the RISC-V architecture.
This change reduces the maximum number of jump label entries from 65536 to 8192, optimizing memory usage for the jump label patch logging feature.
This commit adds export symbols for three new tracepoints: __tracepoint_sched_process_exec, __tracepoint_sched_process_fork, and __tracepoint_sched_switch, enhancing the tracing capabilities for process execution, forking, and context switching in the scheduler.
This commit enhances the RISC-V CPU feature patching function by appending jump label entries to the logging system during the patching process. It includes a loop that captures the new instructions being patched and logs them for debugging purposes, improving traceability and debugging capabilities in the architecture.
This commit modifies the RISC-V CPU feature patching function to ensure that the correct instructions are logged during the patching process. The change involves updating the source of the instruction data from the alternative pointer to the old pointer, enhancing the accuracy of the jump label snapshot logging. Additionally, the call to fix offsets has been moved to maintain proper functionality.
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