Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
Cc: gdb-patches@sourceware.org, Tom Tromey <tom@tromey.com>,
	Tom de Vries <tdevries@suse.de>,
	Andrew Burgess <aburgess@redhat.com>,
	Pedro Alves <pedro@palves.net>
Subject: Re: [RFC PATCH v2] gdb: Add drgn-why-sleeping command
Date: Thu, 1 Oct 2026 15:50:29 -0700	[thread overview]
Message-ID: <20261001154858.0995879d@f44-mesa-1> (raw)
In-Reply-To: <CAJVr-EOsg-Rt=mq4ZV6tfLF9B=oKWjF__A-JTBTPd1=Kcj1QRQ@mail.gmail.com>

On Thu, 1 Oct 2026 11:01:19 +0200
Alexandra Petlanova Hajkova <ahajkova@redhat.com> wrote:

> > Summary: this is a useful idea, and v2 fixes the concrete v1
> > problems.  Before v3, I'd like to see the "does this belong in
> > GDB" question settled with the maintainers.  On the code side, I'd
> > most like to see M1 (PID namespace), M2 (partial debuginfo), M3
> > (unhandled drgn exceptions) and the drgn.internal / sys.executable
> > dependency (M4) fixed.
> 
> thank you very much for the insightful review. I'd love to get more
> feedback
> on  "does this belong in GDB" question.

[earlier reples trimmed somewhat]

I've given it some more thought.  I don't think we should introduce a
drgn-why-sleeping facility into GDB as a "first class citizen", i.e.
something which is part of GDB that gets regular testing.

The requirements / dependencies are onerous:

1. You must have drgn installed; this part is the easiest since it's
   just a 'pip install'.
2. kernel debuginfo - this is pretty big.  When I had it tested on
   Fedora 44, it was a 1.3 GiB download and it takes 5.5 GiB on disk.
   Moreover, the debuginfo must match the currently running kernel.
   New debuginfo would need to be updated every time that the kernel
   is updated.
3. Read access to /proc/kcore is required. Drgn's sudo helper passes
   the descriptor back to GDB so that GDB itself stays unprivileged,
   but the descriptor conveys read access to the whole of kernel
   memory - the same access root would have. Care should, therefore,
   be taken on production systems where kernel-memory secrets must
   not be disclosed.
4. Secure Boot plus lockdown=confidentiality prevents it from working.
   (My AI tells me that Secure Boot enabled with lockdown set to
   'integrity' will work, but this is not something I've tested.)

If we had some sort of user-facing contrib directory, it could be
placed there.  Alternately, as the AI reviewer suggested, it could
go into a contrib directory in the drgn package.

Kevin


  reply	other threads:[~2026-10-01 22:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 19:00 Alexandra Hájková
2026-10-01  3:40 ` Kevin Buettner
2026-10-01  9:01   ` Alexandra Petlanova Hajkova
2026-10-01 22:50     ` Kevin Buettner [this message]
2026-10-02 18:03       ` Tom Tromey
2026-10-04 21:23         ` Alexandra Petlanova Hajkova

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261001154858.0995879d@f44-mesa-1 \
    --to=kevinb@redhat.com \
    --cc=aburgess@redhat.com \
    --cc=ahajkova@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    --cc=tdevries@suse.de \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox