On 02/02/23 at 09:47am, Stephen Brennan wrote: ......snip... > > Testing > > *** > > Only did the basic testing on kvm guest, and run below commands to > > access kcore file to do statistics: > > > > makedumpfile --mem-usage /proc/kcore > > Hi Baoquan, > > Sorry I haven't commented with testing info or review on each revision: > I'm not really familiar with the details necessary for review. However, > it looks like this is getting close to ready, so I did another test: That's OK, and your testing is very helpful because I don't know how to create vm_map_ram() area to test the patches, just did basic testing. > > [opc@stepbren-ol8-1 drgn_vmalloc_test]$ sudo insmod drgn_vmalloc_test.ko > [opc@stepbren-ol8-1 drgn_vmalloc_test]$ sudo dmesg | tail -n 5 > [ 20.763310] missing module BTF, cannot register kfuncs > [ 20.840200] missing module BTF, cannot register kfuncs > [ 91.475814] drgn_vmalloc_test: loading out-of-tree module taints kernel. > [ 91.479913] drgn_vmalloc_test: module verification failed: signature and/or required key missing - tainting kernel > [ 91.484926] drgn_vmalloc_test: 0xffffa51ac2d00000 > [opc@stepbren-ol8-1 drgn_vmalloc_test]$ sudo drgn > drgn 0.0.22 (using Python 3.6.8, elfutils 0.186, with libkdumpfile) > For help, type help(drgn). > >>> import drgn > >>> from drgn import NULL, Object, cast, container_of, execscript, offsetof, reinterpret, sizeof > >>> from drgn.helpers.common import * > >>> from drgn.helpers.linux import * > warning: could not get debugging information for: > drgn_vmalloc_test (could not find module in depmod) > >>> prog.read(0xffffa51ac2d00000, 64) > b'\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x08\x00\x00\x00\t\x00\x00\x00\n\x00\x00\x00\x0b\x00\x00\x00\x0c\x00\x00\x00\r\x00\x00\x00\x0e\x00\x00\x00\x0f\x00\x00\x00' > >>> > > So this definitely still resolves the originally reported issue. Feel > free to add, if you want: > > Tested-by: Stephen Brennan <stephen.s.brennan@xxxxxxxxxx> I noticed Andrew had picked this v4 into his mm tree, maybe Andrew can help add this Tested-by tag.