シンボルを含む配列へのポインターがあります。
char *myArr = kmalloc(100, GFP_KERNEL); //put message in kernel
for(int i = 0; i < 100; ++i) {
myArr[i] = x30; //put symbols here
}
printk(KERN_INFO "The string is located at virtual address %p, physical address %lx\n", myArr, __pa(myArr));
このモジュールを make でコンパイルし、次のコマンドを使用してこのモジュールをアップロードしました。
sudo insmod ./my_module.ko
このモジュールがカーネルにある場合、この文字列をどのように読み取ることができますか? 特定のプログラムを使用する必要がありますか?