/* https://github.com/cirosantilli/linux-kernel-module-cheat#workqueue-from-workqueue */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/workqueue.h> static int i; static struct workqueue_st
Source code:https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git module-init-tools Name of a predecessor set of tools. modprobe Load module under different name to avoid conflicts: sudo modprobe vmhgfs -o vm_hgfs
linux-kernel-module-cheatlo**er 在2025-03-21 17:16:16 上传0 Bytes Python C Assembly C++ Shell Other 这是一个Linux内核模块作弊工具,用于学习和开发Linux内核v5.4.3,以及QEMU、gem5和x86_64、ARMv7和ARMv8用户态和裸机汇编、ANSI C、C和POSIX。
linux-kernel-module-cheat/rootfs_overlay/lkmc/character_device.sh Go to file Cannot retrieve contributors at this time executable file 7 lines (7 sloc) 181 Bytes Raw Blame #!/bin/sh set -e insmod character_device.ko /mknoddev.sh lkmc_character_device [ "$(cat /dev/lkmc_charac...
Non-init process: Shell 1 ./run -d -n Shell 2 ./rungdb-user kernel_module-1.0/user/sleep_forever.out Ctrl + C b main continue Shell 1 /sleep_forever.out This is of least reliable setup as there might be other processes that use the given virtual address.©...
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-ldr-instruction-pseudo-instruction */ #include "common.h" ENTRY /* Mnemonic for a PC relative load: * * ... * ldr r0, [pc, offset] * r0 = myvar * ... */ ldr r0, myvar ASSERT_EQ(r0, 0x12345678) /* Mnemonic...
/* https://cirosantilli.com/linux-kernel-module-cheat#x86-logical-instructions */ #include <lkmc.h> LKMC_PROLOGUE mov $0x00FF, %rax xor $0x0F0F, %ax LKMC_ASSERT_EQ(%rax, $0x0FF0) /* xor to set to zero idiom * * http://stackoverflow.com/questions/1135679/does-using-xor-reg...
/* https://cirosantilli.com/linux-kernel-module-cheat#anonymous-inode */ #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> /* sleep *...
/* https://cirosantilli.com/linux-kernel-module-cheat#irq-ko */ #include <linux/fs.h> #include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/uaccess.h> /* copy_from_user, copy_to_user */ #define NAME "lkmc_irq" #define MAX_IRQS 256...
// https://cirosantilli.com/linux-kernel-module-cheat#cpp-multithreading // // http://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine // // Not affected by taskset: https://stackoverflow.com/questions/1006289/how-to-find-out-the-number-of...