mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
virt_to_phys improve failed attempte to use kmalloc, but still fails
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
insmod /virt_to_phys.ko
|
||||
cat /sys/kernel/debug/lkmc_virt_to_phys
|
||||
addr=$(grep virt_to_phys /sys/kernel/debug/lkmc_virt_to_phys | cut -d ' ' -f 2)
|
||||
cd /sys/kernel/debug
|
||||
cat lkmc_virt_to_phys
|
||||
addr=$(grep virt_to_phys lkmc_virt_to_phys | cut -d ' ' -f 2)
|
||||
devmem2 "$addr"
|
||||
devmem2 "$addr" w 0x87654321
|
||||
devmem2 "$addr" w 0x9ABCDEF0
|
||||
cat lkmc_virt_to_phys
|
||||
rmmod virt_to_phys
|
||||
|
||||
Reference in New Issue
Block a user