lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190626031804.A0AF42146E@mail.kernel.org>
Date:   Tue, 25 Jun 2019 20:18:03 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Jan Kiszka <jan.kiszka@...mens.com>,
        Kieran Bingham <kbingham@...nel.org>,
        Leonard Crestez <leonard.crestez@....com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] scripts/gdb: add helpers to find and list devices

Quoting Leonard Crestez (2019-06-25 13:05:12)
> Add helper commands and functions for finding pointers to struct device
> by enumerating linux device bus/class infrastructure. This can be used
> to fetch subsystem and driver-specific structs:
> 
> (gdb) p *$container_of($lx_device_find_by_class_name("net", "eth0"), "struct net_device", "dev")
> (gdb) p *$container_of($lx_device_find_by_bus_name("i2c", "0-004b"), "struct i2c_client", "dev")
> (gdb) p *(struct imx_port*)$lx_device_find_by_class_name("tty", "ttymxc1")->parent->driver_data
> 
> Several generic "lx-device-list" functions are included to enumerate
> devices by bus and class:
> 
> (gdb) lx-device-list-bus usb
> (gdb) lx-device-list-class
> (gdb) lx-device-list-tree &platform_bus
> 
> Similar information is available in /sys but pointer values are
> deliberately hidden.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@....com>
> ---

Reviewed-by: Stephen Boyd <sboyd@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ