我一直在尝试执行在VirtualBox中运行的Ubuntu 16.04的内存获取。我知道LiME是一个选项,但也想使用在我的机器上编译失败的fmem。我知道不建议在调查框中编译fmem,但这只是一个实验室环境。
机器的详细信息
u64@u64-VirtualBox:~/Desktop/f/fmem_1.6-0$ uname -a
Linux u64-VirtualBox 4.10.0-27-generic #30~16.04.2-Ubuntu SMP Thu Jun 29 16:07:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
u64@u64-VirtualBox:~/Desktop/f/fmem_1.6-0$
安装的内核头文件列表
u64@u64-VirtualBox:~/Desktop/f/fmem_1.6-0$ dpkg --list | grep linux-image
ii linux-image-3.16.0-30-generic 3.16.0-30.40~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii linux-image-3.16.0-31-generic 3.16.0-31.43~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii linux-image-3.16.35-031635-generic 3.16.35-031635.201605011734 amd64 Linux kernel image for version 3.16.35 on 64 bit x86 SMP
ii linux-image-4.10.0-27-generic 4.10.0-27.30~16.04.2 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ii linux-image-4.8.0-36-generic 4.8.0-36.36~16.04.1 amd64 Linux kernel image for version 4.8.0 on 64 bit x86 SMP
ii linux-image-extra-4.10.0-27-generic 4.10.0-27.30~16.04.2 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
ii linux-image-extra-4.8.0-36-generic 4.8.0-36.36~16.04.1 amd64 Linux kernel extra modules for version 4.8.0 on 64 bit x86 SMP
ii linux-image-generic-hwe-16.04 4.10.0.27.30 amd64 Generic Linux kernel image
u64@u64-VirtualBox:~/Desktop/f/fmem_1.6-0$
Make Command出现以下错误
u64@u64-VirtualBox:~/Desktop/f/fmem_1.6-0$ make
rm -f *.o *.ko *.mod.c Module.symvers Module.markers modules.order \.*.o.cmd \.*.ko.cmd \.*.o.d
rm -rf \.tmp_versions
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
make[1]: Entering directory '/usr/src/linux-headers-4.10.0-27-generic'
CC [M] /home/u64/Desktop/f/fmem_1.6-0/lkm.o
/home/u64/Desktop/f/fmem_1.6-0/lkm.c: In function ‘memory_lseek’:
/home/u64/Desktop/f/fmem_1.6-0/lkm.c:289:42: error: ‘struct inode’ has no member named ‘i_mutex’
mutex_lock(&file->f_path.dentry->d_inode->i_mutex);
^
/home/u64/Desktop/f/fmem_1.6-0/lkm.c:310:44: error: ‘struct inode’ has no member named ‘i_mutex’
mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);
^
/home/u64/Desktop/f/fmem_1.6-0/lkm.c: In function ‘memory_open’:
/home/u64/Desktop/f/fmem_1.6-0/lkm.c:348:19: error: ‘struct address_space’ has no member named ‘backing_dev_info’
filp->f_mapping->backing_dev_info =
^
/home/u64/Desktop/f/fmem_1.6-0/lkm.c:349:6: error: ‘directly_mappable_cdev_bdi’ undeclared (first use in this function)
&directly_mappable_cdev_bdi;
^
/home/u64/Desktop/f/fmem_1.6-0/lkm.c:349:6: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:294: recipe for target '/home/u64/Desktop/f/fmem_1.6-0/lkm.o' failed
make[2]: *** [/home/u64/Desktop/f/fmem_1.6-0/lkm.o] Error 1
Makefile:1524: recipe for target '_module_/home/u64/Desktop/f/fmem_1.6-0' failed
make[1]: *** [_module_/home/u64/Desktop/f/fmem_1.6-0] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-27-generic'
Makefile:12: recipe for target 'fmem' failed
make: *** [fmem] Error 2
u64@u64-VirtualBox:~/Desktop/f/fmem_1.6-0$