Comments (4)
i add log on
main.c :: write_range()
for (i = res->start; i <= res->end; i += is) {
DBG("write_range: i = 0x%lx", (long) i);
and get this log
[LiME] write_range: i = 0x1d43e000
[LiME] write_range: i = 0x1d43f000
[LiME] write_range: i = 0x1d440000
[LiME] PAGE_SIZE = 4096, (res->end - i + 1) = 45875200, is = 4096, s = -14
[LiME] Error writing page: vaddr dd440000 ret: -14
i checked vfs_write()
return code -14 means -EFAILT
523 ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)
524 {
525 ssize_t ret;
526
527 if (!(file->f_mode & FMODE_WRITE))
528 return -EBADF;
529 if (!(file->f_mode & FMODE_CAN_WRITE))
530 return -EINVAL;
531 if (unlikely(!access_ok(VERIFY_READ, buf, count)))
532 return -EFAULT;
so, device memory has some read restrict ?
from lime.
I'm experiencing exact same problem. When I insmod the module it does write at least a partial memory dump but it will give out (Bad address) at some point and stop writing. All the memory dumps I've been able to make are the exact same size 375M (392429632) even though the device has a lot more memory available (Samsung Galaxy Note 3 with CM-12.1-userdebug). I've tried to dump at least 5-6 times after different periods of use and every time the dump size is identical despite the usage amount.
root@hltexx:/sdcard/Download # insmod lime-goldfish.ko "path=/sdcard/Download/ram3.lime format=lime"
insmod: init_module 'lime-goldfish.ko' failed (Bad address)
My build environment differs a bit:
- ubuntu 14.04
- 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
KDIR_GOLD := /home/<username>/android/system/out/target/product/hlte/obj/KERNEL_OBJ/
CCPATH := /home/<username>/android/arm-eabi-4.6/bin
$(MAKE) ARCH=arm CROSS_COMPILE=$(CCPATH)/arm-eabi- -C $(KDIR_GOLD) M=$(PWD) modules (<- I've tried this with and without EXTRA_CFLAGS=-fno-pic but didn't notice any difference)
Device and module info:
~$ adb shell uname -a
Linux localhost 3.4.0-g7db381d-dirty #1 SMP PREEMPT Mon Jul 13 02:26:19 EEST 2015 armv7l GNU/Linux
~$ adb shell modinfo /sdcard/Download/lime-goldfish.ko
filename: /sdcard/Download/lime-goldfish.ko
license: GPL
depends:
vermagic: 3.4.0-g7db381d-dirty SMP preempt mod_unload mod versions ARMv7
~$
Funny thing is that when I use volatility I can see that the lime.ko is loaded at least for some time (obviously since it does write a partial dump):
$ python vol.py --profile LinuxGoldfish-3_4_0ARM -f ./ram3.lime linux_lsmod -P
Volatility Foundation Volatility Framework 2.4
bf002000 lime 20213
format=lime
dio=0
path=/sdcard/Download/ram3.lime
Also noticed this one every time i'm trying to insmod (each are from a single insmod attempt):
<6>[165714.469813] insmod (9446): undefined instruction: pc=b6e2abc8
<6>[166004.430517] insmod (9487): undefined instruction: pc=b6e0abc8
<6>[166011.337362] insmod (9489): undefined instruction: pc=b6dc3bc8
<6>[166032.809413] insmod (9492): undefined instruction: pc=b6e62bc8
<6>[166056.799305] insmod (9503): undefined instruction: pc=b6e2fbc8
<6>[166177.938787] insmod (9541): undefined instruction: pc=b6e58bc8
<6>[167271.448792] insmod (9570): undefined instruction: pc=b6e81bc8
<6>[167369.909499] insmod (9582): undefined instruction: pc=b6e66bc8
<6>[167570.530328] insmod (9608): undefined instruction: pc=b6de6bc8
<6>[167625.469710] insmod (9642): undefined instruction: pc=b6e39bc8
from lime.
I've got a fix for this in progress. Hopefully I'll get it out this weekend.
from lime.
This should be fixed in commit 17e7502
from lime.
Related Issues (20)
- Not finding vmlinux
- Error compiling in kali "5.16.0-kali7-amd64" HOT 3
- Error in using make command on oracle linux. HOT 1
- Error in adding module HOT 3
- Device crashes a few seconds after loading LiME HOT 1
- [RISC-V | TEEs] Crashes when memory is protected by PMP. HOT 2
- RHEL 8.4 onwards build issue
- Enable DIO HOT 1
- Raw format warning HOT 1
- Memory dump with lime very slow HOT 1
- Setup Environment on Android 13
- Need Help with "No rule to make target 'modules_prepare'. Stop" Error
- make: *** [Makefile:35: default] Error 2
- Android RAMDUMP crashes after 82MB - TEE?
- insmod: ERROR: could not insert module ./lime-5.15.0-1061-azure.ko: Operation not permitted HOT 1
- insmod: ERROR: could not insert module ./lime-5.11.0-36-generic.ko: Unknown symbol in module
- Loading Lime to obtain ram image comaptible with volatility
- LiME hangs when trying to capture memory on the Amazon Linux with kernel version 5 HOT 2
- Issues compiling LiME for a Android Pixel 2 - Invalid Argument
- Issues compiling LiME for embedded Linux buildroot 4.15.7 kernel (armV71)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lime.