Re: LPC BoF - Linux Kernel Debugging & Drgn

Stephen Brennan <[email protected]>
Newsgroups org.kernel.vger.linux-debuggers
Message-ID <[email protected]>
And for anybody who didn't join, we had this guide as a way to get
started with drgn, using a locally built kernel in virtme-ng:

https://gist.github.com/brenns10/2064f16ea9b18235b47038d78775410d

Stephen Brennan <[email protected]> writes:
> Hi everyone,
>
> Thank you for joining the BoF, by all indication it was quite
> successful, despite my apparent attempts at sabotage by changing the
> room last minute. I took notes as we went (though couldn't cover
> everything), which I've included below.
>
> Thanks,
> Stephen
>
> ---
>
> ​* Drgn within IPython notebooks!  Useful to help people follow & understand debugging sessions. -Shung-Hsi Yu
>
> * What is the criteria for "contrib/" vs "helpers/"? - Sweet Tea Dorminy.
>   -> Unit test cases!
>   -> Converting contrib/ to helpers/ is a valid and good on-ramp to drgn development.
>   -> Though, not all contrib scripts are expected to make it in.
>   -> There is also a "tools/" directory which is actually tested & supported.
>
> * Is there a "rosetta stone" comparison between operations in drgn and crash?
>   -> Not currently!
>   -> I (Stephen) have some which I could move out of an internal wiki into Drgn's wiki.
>
> * Drgn "commands" vs Crash commands. Drgn does not yet have a command structure, it's been discussed.
>
> * What is the status of drgn without debuginfo? https://github.com/osandov/drgn/issues/176
>   -> Symbol tables implemented, kallsyms in review.
>   -> Minimal BTF implementation, has some issues.
>   -> CTF is used in production at Oracle.
>
> * What is the "backend" of drgn? How could you glue kgdb into Drgn?
>   -> The memory reader interface is the main way.
>   -> In addition to implementing memory readers, you'd need a way to communicate the "vmcoreinfo" to drgn. This provides info such as kernel version and kaslr offset.
>   -> We have a way to provide vmcoreinfo manually.
>   -> we're discussing gdbstub options: https://github.com/osandov/drgn/wiki/gdbstub-protocol-proposal:-linux.vmcoreinfo-query-packet
>
> * What's the minimum I need to do with root in drgn?
>   -> just opening /proc/kcore
>
> * Writing to kernel memory! New feature as of yesterday!
>   -> See https://blog.osandov.com/2024/09/17/calling-linux-kernel-functions-from-userspace.html
>
> Please join our Kernel Debuggers Matrix:
>     https://matrix.to/#/#linux-debuggers:matrix.org
> Please join our Kernel Debuggers Mailing List:
>     [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.