Skip to content

Instantly share code, notes, and snippets.

View hnorkowski's full-sized avatar

Hendrik Norkowski hnorkowski

View GitHub Profile
@hnorkowski
hnorkowski / rust-proc-macro-notes.md
Last active July 17, 2024 16:20
Rust Proc Macro Programming Notes

Useful crates for creating macros:

Crate Usage
prettyplease print token stream as rust code

print token stream as rust code

Uses bat::PrettyPinter and prettyplease::unparse

fn pretty_print(token_stream: &proc_macro2::TokenStream) {
 let token_stream = token_stream.to_string();
@hnorkowski
hnorkowski / DEBUGGING.md
Last active August 11, 2023 11:26
Kernel Dev

Kernel Module Debugging

Prerequisites

  • 2 VMs - one to run the kernel and one to debug
    • In the following I will call them DEBUG_VM and RUN_VM
    • I used 2 arch-based VMs
  • GDB installed in DEBUG_VM
    • Optional with GEF extension for easier use
  • Needed for automation scripts later
    • Running ssh server on RUN_VM
@hnorkowski
hnorkowski / cli-tools.md
Last active July 10, 2024 13:16
List of useful CLI tools (mostly written in Rust).