403Webshell
Server IP : 13.213.54.232  /  Your IP : 216.73.216.72
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/modules/6.8.0-1029-aws/build/scripts/gdb/linux/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/modules/6.8.0-1029-aws/build/scripts/gdb/linux/vfs.py
#
# gdb helper commands and functions for Linux kernel debugging
#
#  VFS tools
#
# Copyright (c) 2023 Glenn Washburn
# Copyright (c) 2016 Linaro Ltd
#
# Authors:
#  Glenn Washburn <development@efficientek.com>
#  Kieran Bingham <kieran.bingham@linaro.org>
#
# This work is licensed under the terms of the GNU GPL version 2.
#

import gdb
from linux import utils


def dentry_name(d):
    parent = d['d_parent']
    if parent == d or parent == 0:
        return ""
    p = dentry_name(d['d_parent']) + "/"
    return p + d['d_iname'].string()

class DentryName(gdb.Function):
    """Return string of the full path of a dentry.

$lx_dentry_name(PTR): Given PTR to a dentry struct, return a string
of the full path of the dentry."""

    def __init__(self):
        super(DentryName, self).__init__("lx_dentry_name")

    def invoke(self, dentry_ptr):
        return dentry_name(dentry_ptr)

DentryName()


dentry_type = utils.CachedType("struct dentry")

class InodeDentry(gdb.Function):
    """Return dentry pointer for inode.

$lx_i_dentry(PTR): Given PTR to an inode struct, return a pointer to
the associated dentry struct, if there is one."""

    def __init__(self):
        super(InodeDentry, self).__init__("lx_i_dentry")

    def invoke(self, inode_ptr):
        d_u = inode_ptr["i_dentry"]["first"]
        if d_u == 0:
            return ""
        return utils.container_of(d_u, dentry_type.get_type().pointer(), "d_u")

InodeDentry()

Youez - 2016 - github.com/yon3zu
LinuXploit