mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
20 lines
236 B
Bash
Executable File
20 lines
236 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -ex
|
|
|
|
insmod /seq_file.ko
|
|
cd /sys/kernel/debug
|
|
|
|
cat 'lkmc_seq_file'
|
|
# => 0
|
|
# => 1
|
|
# => 2
|
|
|
|
cat 'lkmc_seq_file'
|
|
# => 3
|
|
# => 4
|
|
# => 5
|
|
|
|
# TODO understand, why does this print nothing?
|
|
dd if='lkmc_seq_file' bs=1 count=2 skip=2
|