Skip to content

Instantly share code, notes, and snippets.

@Utshaw
Last active December 5, 2025 15:56
Show Gist options
  • Select an option

  • Save Utshaw/f568e9040acb6d9f4b7bd2be9e86acac to your computer and use it in GitHub Desktop.

Select an option

Save Utshaw/f568e9040acb6d9f4b7bd2be9e86acac to your computer and use it in GitHub Desktop.
kernel_5_3_1_modification_for_page_migration
sudo dnf install dwarves
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.3.1.tar.xz
tar -xf linux-5.3.1.tar.xz
cd linux-5.3.1
# mm/migrate.c
1486: EXPORT_SYMBOL(migrate_pages);
# mm/vmscan.c
1023: EXPORT_SYMBOL(putback_lru_page);
1822: EXPORT_SYMBOL(isolate_lru_page);
# cert issues
cd certs/
openssl req -new -nodes -utf8 -sha256 -days 36500 -batch \
-x509 -out rhel.pem -keyout rhel.key
cd ..
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y ncurses-devel elfutils-libelf-devel openssl-devel \
bc flex bison dwarves perl gcc-c++ wget
sudo dnf install -y ncurses-devel ncurses
cp /boot/config-$(uname -r) .config
scripts/config --disable CONFIG_DEBUG_INFO_BTF
make olddefconfig
make menuconfig
make -j$(nproc) 2>&1 | tee build.log
grep -n -E "error:|undefined reference|multiple definition|BUILD_BUG_ON|No such file" build.log | head -n 20 # look for error(s)
sudo make modules_install
sudo make install
sudo grubby --info=ALL
sudo grub2-reboot <index>
Inside: # check the Linux kernel’s symbol table — check for the kernel functions and variables, along with their memory addresses and types.
grep -w migrate_pages /proc/kallsyms
grep -w isolate_lru_page /proc/kallsyms
grep -w putback_lru_page /proc/kallsyms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment