From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id F8U/Bu5AmGr6HR8AWB0awg (envelope-from ) for ; Wed, 02 Sep 2026 11:29:50 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OKl+rJCU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F3B741E033; Wed, 02 Sep 2026 11:29:49 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 245B61E033 for ; Wed, 02 Sep 2026 11:29:49 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 45CD74B9DB55 for ; Wed, 2 Sep 2026 15:29:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45CD74B9DB55 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OKl+rJCU Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 792B54BA900D for ; Wed, 2 Sep 2026 15:29:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 792B54BA900D Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 792B54BA900D Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788362962; cv=none; b=cQPTjFWWI6KNtdZBUnqoTbxvXdufGJ+K7z6Ww4+xOHc9itXrqw4Cz2R1MiPrnD866vN0MayZkMzDtIZP1bHR0/Fq35RBTWASjfMt9u9+G3SfsBHW7k3RCqCyj8BWYEP12uegn40iV+vN+tgEmPn3QhTc4Wbo9vJ+jyCrzD8sgLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788362962; c=relaxed/simple; bh=eGb6ezLGy6ryaqhS8hnwr+3vmqmzNQnjZZBAEM6vEA8=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=jaisMuIvm6SXUvHmZoTDxq1RuF5vpxrj3UMJbf3N64pU5W/yelYHc/8xD977IyPqhScWPfzqqzFMrcdDG49LzWVwaG16sulJs0OjTY3Z/t1TiH/o0D1UsbCl3rFjl7BI90YKXyNaki17FmaOyhSTnYkgfljtXpgBiQkik836JEM= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OKl+rJCU DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 792B54BA900D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788362961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=375hhNEg2y5XLHiq+WAwNMJsfABgMXIfAx3xMesRXc8=; b=OKl+rJCUaFn5ww2Kk00sBg1yRCo0sUQ3w7krhYPg6hhzik0lTDmhfmbCD0uhiF4WJFoCBA ZJRGBbGbmtdxtOsY8sxsE6cAkRqxnpu4oJiF5YM2uNhI9r7CrMW+PNewkwud851ZXY0Ydk KhfCQcybuW13eiqPzcIZfy9QRUNeb08= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-662-g-G625hdPfaDD1OYXUBHSw-1; Wed, 02 Sep 2026 11:29:20 -0400 X-MC-Unique: g-G625hdPfaDD1OYXUBHSw-1 X-Mimecast-MFC-AGG-ID: g-G625hdPfaDD1OYXUBHSw_1788362960 Received: by mail-vs1-f70.google.com with SMTP id ada2fe7eead31-7475c666b20so1184100137.3 for ; Wed, 02 Sep 2026 08:29:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788362960; x=1788967760; h=content-type:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=375hhNEg2y5XLHiq+WAwNMJsfABgMXIfAx3xMesRXc8=; b=kDH1yrkgPqk6UumtlU4CudClYBjKuV/EMqUUPwOoVFy+SY1l7kpb9+PGpzeJjo28G6 t6c3A8Rh5qv59bDTFZ3VIzmRSh4iAb3uT5RMZRKqrXDSgx7j4j6EfOEhjfy/355aXzAP MwlJzCivTRy2x7kiFt/7jqFx2snLK5310V8+8bu+SxxH5Ayzgg0PD8GJXno7c0fxJQyZ 9Ev39HxMPL1Phr9qb34g7crv8SdiKdrU3mJA2IgDQwjNzyWQMLnww2KoaKP5ZA5N4VbA WRFak00fwKYiakkCZ0VajM5hJKWbh1TXTkmgQlPeJpxuPVHgp2zFI+2CsZPnoZZ9sHco a62A== X-Gm-Message-State: AFuF++nTzCz4hAauFZ92DjcGK9U5HQPwZ72sq/vZZljSCLSMYDrg5aQ+ lugdn3CrsdI/X4Nha+7nF7gBAQpSqAOxi+laWNY3EZkLSReXePyUb5eaVGucFkUWjCyuyI1nGA2 gQlXQXDGvwqYguWflhFndNt5npoRB/fPDss0kND5rk6J2NwO0TaseiEhKseWzNXY2flpk0Hjirc ov9bLACv7sZubulOiXV3rHY/dXZ/PUpp5QnZ4Tag== X-Gm-Gg: AYBFou22QGDzRHuei3v8XXZELDLBbLaLBf8ipplf9TBu+Z+9qsjCWJgmYLJvlJ59dji Hcoo6PuH+DJIHfKL2gtb7GoaH+YBiw9gbYDD2PVlm6VhHMmpDKCN4UNFcIZOp+hrXk9tl3eI8NI tdpbxuN8XCHSpNa//qnRDyIZgfnI752bKGpawztHq1TFlwwbBY81KEe+ss X-Received: by 2002:a05:6102:2c03:b0:785:8f76:654d with SMTP id ada2fe7eead31-78a1f4c036amr2154445137.13.1788362959812; Wed, 02 Sep 2026 08:29:19 -0700 (PDT) X-Received: by 2002:a05:6102:2c03:b0:785:8f76:654d with SMTP id ada2fe7eead31-78a1f4c036amr2154415137.13.1788362959333; Wed, 02 Sep 2026 08:29:19 -0700 (PDT) MIME-Version: 1.0 References: <20260831205514.1987454-1-ahajkova@redhat.com> <20260831205514.1987454-2-ahajkova@redhat.com> <87ik4o7w34.fsf@tromey.com> In-Reply-To: <87ik4o7w34.fsf@tromey.com> From: Alexandra Petlanova Hajkova Date: Wed, 2 Sep 2026 17:29:08 +0200 X-Gm-Features: AcwNN1VVWbuELANsCkPgDxMSPvr2XJ8QuvRlIFC0UA27Bn1hsTrKLj7l-0GFlG0 Message-ID: Subject: Re: [PATCH] Add drg_why_sleeping.py To: Tom Tromey Cc: gdb-patches@sourceware.org, ezulian@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: p69eLzaBWHaPbVrWw_eLEVlK9ZZsahv1ybH1XQPHrRc_1788362960 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000ebc077065a81b267" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --000000000000ebc077065a81b267 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 1, 2026 at 6:54=E2=80=AFPM Tom Tromey wrote: > >>>>> "Alexandra" =3D=3D Alexandra H=C3=A1jkov=C3=A1 writes: > > Hi. Thanks for the patch. > > I'm not sure this is really something gdb ought to ship. > > Alexandra> sleep_test.c | 76 > +++++++++++++++++++ > > This file shouldn't be here. > > Alexandra> + (gdb) source > ~/binutils-gdb/gdb/python/lib/gdb/command/drgn_why_sleeping.py > > Normally commands are auto-installed. > Yeah, sorry, I originally didn't specify --data-directory so it ended up no= t sourced for me. > > Alexandra> + (gdb) drgn_why_sleeping > > This isn't a very gdb-ish name. At the very least gdb usually uses "-" > as a separator; I always thought maybe it inherited a Lispy style from > the RMS days. But maybe a prefix command would be better anyhow. > I'm happy to change the name, it was just the first one that came to mind. > > > Extra parens? > > Alexandra> + "Can't read /proc/kcore, %s. Try running > GDB as root. " % str(e) > > We can't ever recommend running gdb as root. > So, you recommend just saying we can't read kcore without saying anything about running GDB as root making things work. Sure, let's make this bit secret. > I don't normally like to make drastic pronouncements like that, but gdb > is nowhere near hardened enough for this kind of thing. In fact it's > more accurate to say that gdb doesn't even try, it's ridiculously > exposed. > So, you recommend just saying we can't read kcore without saying anything about running GDB as root making things work. Sure, let's make this bit secret. > > Tom > > --000000000000ebc077065a81b267 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



=
On Tue, Sep 1, 2026 at 6:54=E2=80=AFPM Tom Tromey <tom@tromey.com> wrote:
>>>>> "Alexand= ra" =3D=3D Alexandra H=C3=A1jkov=C3=A1 <ahajkova@redhat.com> writes:

Hi.=C2=A0 Thanks for the patch.

I'm not sure this is really something gdb ought to ship.

Alexandra>=C2=A0 sleep_test.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 | 76 +++++++++++++++++++

This file shouldn't be here.

Alexandra> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(gdb) source ~/binu= tils-gdb/gdb/python/lib/gdb/command/drgn_why_sleeping.py

Normally commands are auto-installed.
Yeah, sorry, I o= riginally didn't specify --data-directory so it ended up not
= sourced for me.=C2=A0


Extra parens?

Alexandra> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 "Can't read /proc/kcore, %s. Try running GDB as root. &= quot; % str(e)

We can't ever recommend running gdb as root.
So,= =C2=A0 you recommend just saying we can't read kcore without saying
anything about running GDB as root making things work. Sure, let'= ;s
make this bit secret.


I don't normally like to make drastic pronouncements like that, but gdb=
is nowhere near hardened enough for this kind of thing.=C2=A0 In fact it= 9;s
more accurate to say that gdb doesn't even try, it's ridiculously exposed.

So,=C2=A0 you recommend j= ust saying we can't read kcore without saying
anything about = running GDB as root making things work. Sure, let's
make this= bit secret.


=C2=A0

Tom

--000000000000ebc077065a81b267--