Skip to content

Instantly share code, notes, and snippets.

@itewqq
itewqq / vscode-for-linux-kernel.md
Created February 19, 2023 14:37
Configure vscode for linux kernel source code
  1. Disable or uninstall the official C/C++ plugin.
  2. Install the clangd plugin.
  3. Build the kernel with clang:
/path/to/kernel_source$ make CC=clang defconfig
/path/to/kernel_source$ make CC=clang -j16
  1. Generate the compile_commands.json:
/path/to/kernel_source$ python ./scripts/clang-tools/gen_compile_commands.py
@pagabuc
pagabuc / extract_offsets.py
Created August 18, 2022 02:07
Find kernel objects containing function pointers
# Written by pagabuc, run with the following:
# gdb --batch --nx -q -x extract_offsets.py ./vmlinux
# This script finds kernel objects that contain function pointers and with size between 1024 and 2048.
# Nested structure types are traversed recursively.
import gdb
import re
struct_regex = re.compile("(struct [a-zA-Z0-9_]*)")
@rickmark
rickmark / FORMATS.md
Created December 10, 2020 08:00
Apple Documentation Project

Apple Formats for Documentation

File Formats

Archives

  • bom
  • pbzx

Mach-O Binary

  • dyld cache
  • AOT rostetta 2

Signature Formats

@icecr4ck
icecr4ck / idapython_cheatsheet.md
Last active April 23, 2024 18:45
Cheatsheet for IDAPython
@odytrice
odytrice / fsharp-tutorial.fs
Last active March 3, 2024 04:32
F# Code Samples
// This sample will guide you through elements of the F# language.
//
// *******************************************************************************************************
// To execute the code in F# Interactive, highlight a section of code and press Alt-Enter in Windows or
// Ctrl-Enter Mac, or right-click and select "Send Selection to F# Interactive".
// You can open the F# Interactive Window from the "View" menu.
// *******************************************************************************************************
// For more about F#, see: