<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/scripts/gdb/linux, branch v6.6-rc5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>revert "scripts/gdb/symbols: add specific ko module load command"</title>
<updated>2023-09-19T20:21:33+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2023-09-12T16:19:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=493d4eecf45d15bb1850832f5f5ece2556308646'/>
<id>493d4eecf45d15bb1850832f5f5ece2556308646</id>
<content type='text'>
Revert 11f956538c07 ("scripts/gdb/symbols: add specific ko module load
command") due to breakage identified by Johannes Berg in [1].

Fixes: 11f956538c07 ("scripts/gdb/symbols: add specific ko module load command")
Reported-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Closes: https://lkml.kernel.org/r/c44b748307a074d0c250002cdcfe209b8cce93c9.camel@sipsolutions.net [1]
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Kieran Bingham &lt;kbingham@kernel.org&gt;
Cc: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revert 11f956538c07 ("scripts/gdb/symbols: add specific ko module load
command") due to breakage identified by Johannes Berg in [1].

Fixes: 11f956538c07 ("scripts/gdb/symbols: add specific ko module load command")
Reported-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Closes: https://lkml.kernel.org/r/c44b748307a074d0c250002cdcfe209b8cce93c9.camel@sipsolutions.net [1]
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Kieran Bingham &lt;kbingham@kernel.org&gt;
Cc: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb/vmalloc: add vmallocinfo support</title>
<updated>2023-08-21T20:46:23+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-08-08T08:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=852622bf3616034e11e20955aa2d8d40c200138e'/>
<id>852622bf3616034e11e20955aa2d8d40c200138e</id>
<content type='text'>
This GDB script shows the vmallocinfo for user to
analyze the vmalloc memory usage.

Example output:
0xffff800008000000-0xffff800008009000      36864 &lt;start_kernel+372&gt; pages=8 vmalloc
0xffff800008009000-0xffff80000800b000       8192 &lt;gicv2m_init_one+400&gt; phys=0x8020000 ioremap
0xffff80000800b000-0xffff80000800d000       8192 &lt;bpf_prog_alloc_no_stats+72&gt; pages=1 vmalloc
0xffff80000800d000-0xffff80000800f000       8192 &lt;bpf_jit_alloc_exec+16&gt; pages=1 vmalloc
0xffff800008010000-0xffff80000ad30000   47316992 &lt;paging_init+452&gt; phys=0x40210000 vmap
0xffff80000ad30000-0xffff80000c1c0000   21561344 &lt;paging_init+556&gt; phys=0x42f30000 vmap
0xffff80000c1c0000-0xffff80000c370000    1769472 &lt;paging_init+592&gt; phys=0x443c0000 vmap
0xffff80000c370000-0xffff80000de90000   28442624 &lt;paging_init+692&gt; phys=0x44570000 vmap
0xffff80000de90000-0xffff80000f4c1000   23269376 &lt;paging_init+788&gt; phys=0x46090000 vmap
0xffff80000f4c1000-0xffff80000f4c3000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc
0xffff80000f4c3000-0xffff80000f4c5000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc
0xffff80000f4c5000-0xffff80000f4c7000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc

Link: https://lkml.kernel.org/r/20230808083020.22254-9-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This GDB script shows the vmallocinfo for user to
analyze the vmalloc memory usage.

Example output:
0xffff800008000000-0xffff800008009000      36864 &lt;start_kernel+372&gt; pages=8 vmalloc
0xffff800008009000-0xffff80000800b000       8192 &lt;gicv2m_init_one+400&gt; phys=0x8020000 ioremap
0xffff80000800b000-0xffff80000800d000       8192 &lt;bpf_prog_alloc_no_stats+72&gt; pages=1 vmalloc
0xffff80000800d000-0xffff80000800f000       8192 &lt;bpf_jit_alloc_exec+16&gt; pages=1 vmalloc
0xffff800008010000-0xffff80000ad30000   47316992 &lt;paging_init+452&gt; phys=0x40210000 vmap
0xffff80000ad30000-0xffff80000c1c0000   21561344 &lt;paging_init+556&gt; phys=0x42f30000 vmap
0xffff80000c1c0000-0xffff80000c370000    1769472 &lt;paging_init+592&gt; phys=0x443c0000 vmap
0xffff80000c370000-0xffff80000de90000   28442624 &lt;paging_init+692&gt; phys=0x44570000 vmap
0xffff80000de90000-0xffff80000f4c1000   23269376 &lt;paging_init+788&gt; phys=0x46090000 vmap
0xffff80000f4c1000-0xffff80000f4c3000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc
0xffff80000f4c3000-0xffff80000f4c5000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc
0xffff80000f4c5000-0xffff80000f4c7000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc

Link: https://lkml.kernel.org/r/20230808083020.22254-9-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb/slab: add slab support</title>
<updated>2023-08-21T20:46:23+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-08-08T08:30:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=79939c4a79bc643d399bd3fdd0f87100ea6b4362'/>
<id>79939c4a79bc643d399bd3fdd0f87100ea6b4362</id>
<content type='text'>
Add 'lx-slabinfo' and 'lx-slabtrace' support.

This GDB scripts print slabinfo and slabtrace for user
to analyze slab memory usage.

Example output like below:
(gdb) lx-slabinfo
     Pointer       |         name         | active_objs  |   num_objs   | objsize  | objperslab  | pagesperslab
------------------ | -------------------- | ------------ | ------------ | -------- | ----------- | -------------
0xffff0000c59df480 | p9_req_t             | 0            | 0            | 280      | 29          | 2
0xffff0000c59df280 | isp1760_qh           | 0            | 0            | 160      | 25          | 1
0xffff0000c59df080 | isp1760_qtd          | 0            | 0            | 184      | 22          | 1
0xffff0000c59dee80 | isp1760_urb_listite  | 0            | 0            | 136      | 30          | 1
0xffff0000c59dec80 | asd_sas_event        | 0            | 0            | 256      | 32          | 2
0xffff0000c59dea80 | sas_task             | 0            | 0            | 448      | 36          | 4
0xffff0000c59de880 | bio-120              | 18           | 21           | 384      | 21          | 2
0xffff0000c59de680 | io_kiocb             | 0            | 0            | 448      | 36          | 4
0xffff0000c59de480 | bfq_io_cq            | 0            | 0            | 1504     | 21          | 8
0xffff0000c59de280 | bfq_queue            | 0            | 0            | 720      | 22          | 4
0xffff0000c59de080 | mqueue_inode_cache   | 1            | 28           | 1152     | 28          | 8
0xffff0000c59dde80 | v9fs_inode_cache     | 0            | 0            | 832      | 39          | 8
...

(gdb) lx-slabtrace --cache_name kmalloc-1k
63 &lt;tty_register_device_attr+508&gt; waste=16632/264 age=46856/46871/46888 pid=1 cpus=6,
   0xffff800008720240 &lt;__kmem_cache_alloc_node+236&gt;:    mov     x22, x0
   0xffff80000862a4fc &lt;kmalloc_trace+64&gt;:       mov     x21, x0
   0xffff8000095d086c &lt;tty_register_device_attr+508&gt;:   mov     x19, x0
   0xffff8000095d0f98 &lt;tty_register_driver+704&gt;:        cmn     x0, #0x1, lsl #12
   0xffff80000c2677e8 &lt;vty_init+620&gt;:   Cannot access memory at address 0xffff80000c2677e8
   0xffff80000c265a10 &lt;tty_init+276&gt;:   Cannot access memory at address 0xffff80000c265a10
   0xffff80000c26d3c4 &lt;chr_dev_init+204&gt;:       Cannot access memory at address 0xffff80000c26d3c4
   0xffff8000080161d4 &lt;do_one_initcall+176&gt;:    mov     w21, w0
   0xffff80000c1c1b58 &lt;kernel_init_freeable+956&gt;:       Cannot access memory at address 0xffff80000c1c1b58
   0xffff80000acf1334 &lt;kernel_init+36&gt;: bl      0xffff8000081ac040 &lt;async_synchronize_full&gt;
   0xffff800008018d00 &lt;ret_from_fork+16&gt;:       mrs     x28, sp_el0

(gdb) lx-slabtrace --cache_name kmalloc-1k --free
428 &lt;not-available&gt; age=4294958600 pid=0 cpus=0,

Link: https://lkml.kernel.org/r/20230808083020.22254-8-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add 'lx-slabinfo' and 'lx-slabtrace' support.

This GDB scripts print slabinfo and slabtrace for user
to analyze slab memory usage.

Example output like below:
(gdb) lx-slabinfo
     Pointer       |         name         | active_objs  |   num_objs   | objsize  | objperslab  | pagesperslab
------------------ | -------------------- | ------------ | ------------ | -------- | ----------- | -------------
0xffff0000c59df480 | p9_req_t             | 0            | 0            | 280      | 29          | 2
0xffff0000c59df280 | isp1760_qh           | 0            | 0            | 160      | 25          | 1
0xffff0000c59df080 | isp1760_qtd          | 0            | 0            | 184      | 22          | 1
0xffff0000c59dee80 | isp1760_urb_listite  | 0            | 0            | 136      | 30          | 1
0xffff0000c59dec80 | asd_sas_event        | 0            | 0            | 256      | 32          | 2
0xffff0000c59dea80 | sas_task             | 0            | 0            | 448      | 36          | 4
0xffff0000c59de880 | bio-120              | 18           | 21           | 384      | 21          | 2
0xffff0000c59de680 | io_kiocb             | 0            | 0            | 448      | 36          | 4
0xffff0000c59de480 | bfq_io_cq            | 0            | 0            | 1504     | 21          | 8
0xffff0000c59de280 | bfq_queue            | 0            | 0            | 720      | 22          | 4
0xffff0000c59de080 | mqueue_inode_cache   | 1            | 28           | 1152     | 28          | 8
0xffff0000c59dde80 | v9fs_inode_cache     | 0            | 0            | 832      | 39          | 8
...

(gdb) lx-slabtrace --cache_name kmalloc-1k
63 &lt;tty_register_device_attr+508&gt; waste=16632/264 age=46856/46871/46888 pid=1 cpus=6,
   0xffff800008720240 &lt;__kmem_cache_alloc_node+236&gt;:    mov     x22, x0
   0xffff80000862a4fc &lt;kmalloc_trace+64&gt;:       mov     x21, x0
   0xffff8000095d086c &lt;tty_register_device_attr+508&gt;:   mov     x19, x0
   0xffff8000095d0f98 &lt;tty_register_driver+704&gt;:        cmn     x0, #0x1, lsl #12
   0xffff80000c2677e8 &lt;vty_init+620&gt;:   Cannot access memory at address 0xffff80000c2677e8
   0xffff80000c265a10 &lt;tty_init+276&gt;:   Cannot access memory at address 0xffff80000c265a10
   0xffff80000c26d3c4 &lt;chr_dev_init+204&gt;:       Cannot access memory at address 0xffff80000c26d3c4
   0xffff8000080161d4 &lt;do_one_initcall+176&gt;:    mov     w21, w0
   0xffff80000c1c1b58 &lt;kernel_init_freeable+956&gt;:       Cannot access memory at address 0xffff80000c1c1b58
   0xffff80000acf1334 &lt;kernel_init+36&gt;: bl      0xffff8000081ac040 &lt;async_synchronize_full&gt;
   0xffff800008018d00 &lt;ret_from_fork+16&gt;:       mrs     x28, sp_el0

(gdb) lx-slabtrace --cache_name kmalloc-1k --free
428 &lt;not-available&gt; age=4294958600 pid=0 cpus=0,

Link: https://lkml.kernel.org/r/20230808083020.22254-8-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb/page_owner: add page owner support</title>
<updated>2023-08-21T20:46:23+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-08-08T08:30:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f060190efcee2781b3ba7cb12a6876b6e024e2d'/>
<id>2f060190efcee2781b3ba7cb12a6876b6e024e2d</id>
<content type='text'>
This GDB script prints page owner information for user to analyze the
memory usage or memory corruption issue.

Example output from an aarch64 system:

(gdb) lx-dump-page-owner --pfn 655360
page_owner tracks the page as allocated
Page last allocated via order 0, gfp_mask: 0x8, pid: 1, tgid: 1 ("swapper/0\000\000\000\000\000\000"), ts 1295948880 ns, free_ts 1011852016 ns
PFN: 655360, Flags: 0x3fffc0000000000
   0xffff8000086ab964 &lt;post_alloc_hook+452&gt;:    ldp     x19, x20, [sp, #16]
   0xffff80000862e4e0 &lt;split_map_pages+344&gt;:    cbnz    w22, 0xffff80000862e57c &lt;split_map_pages+500&gt;
   0xffff8000086370c4 &lt;isolate_freepages_range+556&gt;:    mov     x0, x27
   0xffff8000086bc1cc &lt;alloc_contig_range+808&gt;: mov     x24, x0
   0xffff80000877d6d8 &lt;cma_alloc+772&gt;:  mov     w1, w0
   0xffff8000082c8d18 &lt;dma_alloc_from_contiguous+104&gt;:  ldr     x19, [sp, #16]
   0xffff8000082ce0e8 &lt;atomic_pool_expand+208&gt;: mov     x19, x0
   0xffff80000c1e41b4 &lt;__dma_atomic_pool_init+172&gt;:     Cannot access memory at address 0xffff80000c1e41b4
   0xffff80000c1e4298 &lt;dma_atomic_pool_init+92&gt;:        Cannot access memory at address 0xffff80000c1e4298
   0xffff8000080161d4 &lt;do_one_initcall+176&gt;:    mov     w21, w0
   0xffff80000c1c1b50 &lt;kernel_init_freeable+952&gt;:       Cannot access memory at address 0xffff80000c1c1b50
   0xffff80000acf87dc &lt;kernel_init+36&gt;: bl      0xffff8000081ab100 &lt;async_synchronize_full&gt;
   0xffff800008018d00 &lt;ret_from_fork+16&gt;:       mrs     x28, sp_el0
page last free stack trace:
   0xffff8000086a6e8c &lt;free_unref_page_prepare+796&gt;:    mov     w2, w23
   0xffff8000086aee1c &lt;free_unref_page+96&gt;:     tst     w0, #0xff
   0xffff8000086af3f8 &lt;__free_pages+292&gt;:       ldp     x19, x20, [sp, #16]
   0xffff80000c1f3214 &lt;init_cma_reserved_pageblock+220&gt;:        Cannot access memory at address 0xffff80000c1f3214
   0xffff80000c20363c &lt;cma_init_reserved_areas+1284&gt;:   Cannot access memory at address 0xffff80000c20363c
   0xffff8000080161d4 &lt;do_one_initcall+176&gt;:    mov     w21, w0
   0xffff80000c1c1b50 &lt;kernel_init_freeable+952&gt;:       Cannot access memory at address 0xffff80000c1c1b50
   0xffff80000acf87dc &lt;kernel_init+36&gt;: bl      0xffff8000081ab100 &lt;async_synchronize_full&gt;
   0xffff800008018d00 &lt;ret_from_fork+16&gt;:       mrs     x28, sp_el0

Link: https://lkml.kernel.org/r/20230808083020.22254-7-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This GDB script prints page owner information for user to analyze the
memory usage or memory corruption issue.

Example output from an aarch64 system:

(gdb) lx-dump-page-owner --pfn 655360
page_owner tracks the page as allocated
Page last allocated via order 0, gfp_mask: 0x8, pid: 1, tgid: 1 ("swapper/0\000\000\000\000\000\000"), ts 1295948880 ns, free_ts 1011852016 ns
PFN: 655360, Flags: 0x3fffc0000000000
   0xffff8000086ab964 &lt;post_alloc_hook+452&gt;:    ldp     x19, x20, [sp, #16]
   0xffff80000862e4e0 &lt;split_map_pages+344&gt;:    cbnz    w22, 0xffff80000862e57c &lt;split_map_pages+500&gt;
   0xffff8000086370c4 &lt;isolate_freepages_range+556&gt;:    mov     x0, x27
   0xffff8000086bc1cc &lt;alloc_contig_range+808&gt;: mov     x24, x0
   0xffff80000877d6d8 &lt;cma_alloc+772&gt;:  mov     w1, w0
   0xffff8000082c8d18 &lt;dma_alloc_from_contiguous+104&gt;:  ldr     x19, [sp, #16]
   0xffff8000082ce0e8 &lt;atomic_pool_expand+208&gt;: mov     x19, x0
   0xffff80000c1e41b4 &lt;__dma_atomic_pool_init+172&gt;:     Cannot access memory at address 0xffff80000c1e41b4
   0xffff80000c1e4298 &lt;dma_atomic_pool_init+92&gt;:        Cannot access memory at address 0xffff80000c1e4298
   0xffff8000080161d4 &lt;do_one_initcall+176&gt;:    mov     w21, w0
   0xffff80000c1c1b50 &lt;kernel_init_freeable+952&gt;:       Cannot access memory at address 0xffff80000c1c1b50
   0xffff80000acf87dc &lt;kernel_init+36&gt;: bl      0xffff8000081ab100 &lt;async_synchronize_full&gt;
   0xffff800008018d00 &lt;ret_from_fork+16&gt;:       mrs     x28, sp_el0
page last free stack trace:
   0xffff8000086a6e8c &lt;free_unref_page_prepare+796&gt;:    mov     w2, w23
   0xffff8000086aee1c &lt;free_unref_page+96&gt;:     tst     w0, #0xff
   0xffff8000086af3f8 &lt;__free_pages+292&gt;:       ldp     x19, x20, [sp, #16]
   0xffff80000c1f3214 &lt;init_cma_reserved_pageblock+220&gt;:        Cannot access memory at address 0xffff80000c1f3214
   0xffff80000c20363c &lt;cma_init_reserved_areas+1284&gt;:   Cannot access memory at address 0xffff80000c20363c
   0xffff8000080161d4 &lt;do_one_initcall+176&gt;:    mov     w21, w0
   0xffff80000c1c1b50 &lt;kernel_init_freeable+952&gt;:       Cannot access memory at address 0xffff80000c1c1b50
   0xffff80000acf87dc &lt;kernel_init+36&gt;: bl      0xffff8000081ab100 &lt;async_synchronize_full&gt;
   0xffff800008018d00 &lt;ret_from_fork+16&gt;:       mrs     x28, sp_el0

Link: https://lkml.kernel.org/r/20230808083020.22254-7-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb/stackdepot: add stackdepot support</title>
<updated>2023-08-21T20:46:22+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-08-08T08:30:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0e1b240a4b17484d7d5733f33a9f83980a6988a0'/>
<id>0e1b240a4b17484d7d5733f33a9f83980a6988a0</id>
<content type='text'>
Add support for printing the backtrace of stackdepot handle.

This is the preparation patch for dumping page_owner,
slabtrace usage.

Link: https://lkml.kernel.org/r/20230808083020.22254-6-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for printing the backtrace of stackdepot handle.

This is the preparation patch for dumping page_owner,
slabtrace usage.

Link: https://lkml.kernel.org/r/20230808083020.22254-6-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb/aarch64: add aarch64 page operation helper commands and configs</title>
<updated>2023-08-21T20:46:22+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-08-08T08:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eb985b5dbf9791136700c555fbf964b6c07481ce'/>
<id>eb985b5dbf9791136700c555fbf964b6c07481ce</id>
<content type='text'>
1. Move page table debugging from mm.py to pgtable.py.

2. Add aarch64 kernel config and memory constants value.

3. Add below aarch64 page operation helper commands.
   page_to_pfn, page_to_phys, pfn_to_page, page_address,
   virt_to_phys, sym_to_pfn, pfn_to_kaddr, virt_to_page.

4. Only support CONFIG_SPARSEMEM_VMEMMAP=y now.

Link: https://lkml.kernel.org/r/20230808083020.22254-5-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Move page table debugging from mm.py to pgtable.py.

2. Add aarch64 kernel config and memory constants value.

3. Add below aarch64 page operation helper commands.
   page_to_pfn, page_to_phys, pfn_to_page, page_address,
   virt_to_phys, sym_to_pfn, pfn_to_kaddr, virt_to_page.

4. Only support CONFIG_SPARSEMEM_VMEMMAP=y now.

Link: https://lkml.kernel.org/r/20230808083020.22254-5-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb/utils: add common type usage</title>
<updated>2023-08-21T20:46:22+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-08-08T08:30:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4d040cbca8e4714cc83e17778b6a28c6df41f79c'/>
<id>4d040cbca8e4714cc83e17778b6a28c6df41f79c</id>
<content type='text'>
Since we often use 'unsigned long', 'size_t', 'usigned int'
and 'struct page', we add these common types to utils.

Link: https://lkml.kernel.org/r/20230808083020.22254-4-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we often use 'unsigned long', 'size_t', 'usigned int'
and 'struct page', we add these common types to utils.

Link: https://lkml.kernel.org/r/20230808083020.22254-4-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb/modules: add get module text support</title>
<updated>2023-08-21T20:46:22+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-08-08T08:30:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=82141540c3e01d1929299c81375e97b80b8eaf52'/>
<id>82141540c3e01d1929299c81375e97b80b8eaf52</id>
<content type='text'>
When we get an text address from coredump and we cannot find
this address in vmlinux, it might located in kernel module.

We want to know which kernel module it located in.

This GDB scripts can help us to find the target kernel module.

(gdb) lx-getmod-by-textaddr 0xffff800002d305ac
0xffff800002d305ac is in kasan_test.ko

Link: https://lkml.kernel.org/r/20230808083020.22254-3-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we get an text address from coredump and we cannot find
this address in vmlinux, it might located in kernel module.

We want to know which kernel module it located in.

This GDB scripts can help us to find the target kernel module.

(gdb) lx-getmod-by-textaddr 0xffff800002d305ac
0xffff800002d305ac is in kasan_test.ko

Link: https://lkml.kernel.org/r/20230808083020.22254-3-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb/symbols: add specific ko module load command</title>
<updated>2023-08-21T20:46:21+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-08-08T08:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=11f956538c07e566bb8edf399c30cccb064df5a3'/>
<id>11f956538c07e566bb8edf399c30cccb064df5a3</id>
<content type='text'>
Patch series "Add GDB memory helper commands", v2.

I've created some GDB commands I think useful when I debug some memory
issues and kernel module issue.

For memory issue, we would like to get slabinfo, slabtrace, page_owner and
vmallocinfo to debug the memory issues.

For module issue, we would like to query kernel module name when we get a
module text address and load module symbol by specific path.

Patch 1-2:
 - Add kernel module related command.
Patch 3-5:
 - Prepares for the memory-related command.
Patch 6-8:
 - Add memory-related commands.


This patch (of 8):

Add lx-symbols &lt;ko_path&gt; command to support add specific
ko module.

Example output like below:
(gdb) lx-symbols mm/kasan/kasan_test.ko
loading @0xffff800002d30000: mm/kasan/kasan_test.ko

Link: https://lkml.kernel.org/r/20230808083020.22254-1-Kuan-Ying.Lee@mediatek.com
Link: https://lkml.kernel.org/r/20230808083020.22254-2-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch series "Add GDB memory helper commands", v2.

I've created some GDB commands I think useful when I debug some memory
issues and kernel module issue.

For memory issue, we would like to get slabinfo, slabtrace, page_owner and
vmallocinfo to debug the memory issues.

For module issue, we would like to query kernel module name when we get a
module text address and load module symbol by specific path.

Patch 1-2:
 - Add kernel module related command.
Patch 3-5:
 - Prepares for the memory-related command.
Patch 6-8:
 - Add memory-related commands.


This patch (of 8):

Add lx-symbols &lt;ko_path&gt; command to support add specific
ko module.

Example output like below:
(gdb) lx-symbols mm/kasan/kasan_test.ko
loading @0xffff800002d30000: mm/kasan/kasan_test.ko

Link: https://lkml.kernel.org/r/20230808083020.22254-1-Kuan-Ying.Lee@mediatek.com
Link: https://lkml.kernel.org/r/20230808083020.22254-2-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: fix 'lx-lsmod' show the wrong size</title>
<updated>2023-08-18T17:18:58+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-07-10T09:28:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fb40b0537342e1acd5c2daf2ff6780c1d0d2883c'/>
<id>fb40b0537342e1acd5c2daf2ff6780c1d0d2883c</id>
<content type='text'>
'lsmod' shows total core layout size, so we need to sum up all the
sections in core layout in gdb scripts.

/ # lsmod
kasan_test 200704 0 - Live 0xffff80007f640000

Before patch:
(gdb) lx-lsmod
Address            Module                  Size  Used by
0xffff80007f640000 kasan_test             36864  0

After patch:
(gdb) lx-lsmod
Address            Module                  Size  Used by
0xffff80007f640000 kasan_test            200704  0

Link: https://lkml.kernel.org/r/20230710092852.31049-1-Kuan-Ying.Lee@mediatek.com
Fixes: b4aff7513df3 ("scripts/gdb: use mem instead of core_layout to get the module address")
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Reviewed-by: Pankaj Raghav &lt;p.raghav@samsung.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Kieran Bingham &lt;kbingham@kernel.org&gt;
Cc: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'lsmod' shows total core layout size, so we need to sum up all the
sections in core layout in gdb scripts.

/ # lsmod
kasan_test 200704 0 - Live 0xffff80007f640000

Before patch:
(gdb) lx-lsmod
Address            Module                  Size  Used by
0xffff80007f640000 kasan_test             36864  0

After patch:
(gdb) lx-lsmod
Address            Module                  Size  Used by
0xffff80007f640000 kasan_test            200704  0

Link: https://lkml.kernel.org/r/20230710092852.31049-1-Kuan-Ying.Lee@mediatek.com
Fixes: b4aff7513df3 ("scripts/gdb: use mem instead of core_layout to get the module address")
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Reviewed-by: Pankaj Raghav &lt;p.raghav@samsung.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Kieran Bingham &lt;kbingham@kernel.org&gt;
Cc: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
