mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
9 lines
239 B
Bash
Executable File
9 lines
239 B
Bash
Executable File
#!/bin/sh
|
|
# https://cirosantilli.com/linux-kernel-module-cheat#ioctl
|
|
set -e
|
|
f=/sys/kernel/debug/lkmc_ioctl
|
|
insmod ioctl.ko
|
|
[ "$(./kernel_modules/ioctl.out "$f" 0 1)" = 2 ]
|
|
[ "$(./kernel_modules/ioctl.out "$f" 1 1 1)" = '2 0' ]
|
|
rmmod ioctl
|