virt_to_phys improve failed attempte to use kmalloc, but still fails

This commit is contained in:
Ciro Santilli
2017-07-14 13:49:10 +01:00
parent 63d8bbfc89
commit 5ec0858244
3 changed files with 20 additions and 10 deletions

View File

@@ -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