Skip to content

Instantly share code, notes, and snippets.

View MarioHewardt's full-sized avatar

Mario Hewardt MarioHewardt

View GitHub Profile
@MarioHewardt
MarioHewardt / gist:82c81e8ff9a993b763abe95e96419dd5
Created November 30, 2021 22:57
Handle leak tracking in WinDbg Preview
• Launch WinDbg Preview as an Administrator
• File->Attach to Process
• Check ‘Show processes from all users’
• Select <process to attach to>
• Click ‘Attach’
Once the debugger has attached:
• Enter: .symfix
• Enter: .reload
@MarioHewardt
MarioHewardt / enable_ebpf_on_wsl2
Last active April 27, 2024 09:27
Enable EBPF on WSL2
By default, EBPF programs will not run on WSL2 due to required kernel modules missing. The following example error is an
indication of this problem:
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.84-microso
ft-standard/modules.dep.bin'
modprobe: FATAL: Module kheaders not found in directory /lib/modules/4.19.84-microsoft-standard
chdir(/lib/modules/4.19.84-microsoft-standard/build): No such file or directory
To fix this you need to rebuild the WSL2 kernel with the missing kernel modules. The below instructions are for Ubuntu 18.04 WSL2.
1. git clone https://github.com/microsoft/WSL2-Linux-Kernel.git