From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] New set auto-load-local-gdbinit + disable it by default
Date: Tue, 17 Jan 2012 16:34:00 -0000 [thread overview]
Message-ID: <20120117162621.GA3883@host2.jankratochvil.net> (raw)
In-Reply-To: <CADPb22Ty_iWAPNifD2zn8RDM13HfHVt0swbRbt+LBua8R5aB4w@mail.gmail.com>
On Tue, 17 Jan 2012 17:11:19 +0100, Doug Evans wrote:
> On Tue, Jan 17, 2012 at 1:55 AM, Jan Kratochvil
> <jan.kratochvil@redhat.com> wrote:
> > Besides security problems the automatic execution is even inconvenient:
> > Â Â Â Â $ gdb testsuite/gdb.base/return
> > Â Â Â Â [...]
> > Â Â Â Â Setting up the environment for debugging gdb.
> > Â Â Â Â Function "internal_error" not defined.
> > Â Â Â Â Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]
> > Â Â Â Â Function "info_command" not defined.
> > Â Â Â Â Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]
> > Â Â Â Â .gdbinit:8: Error in sourced command file:
> > Â Â Â Â Argument required (one or more breakpoint numbers).
> > Â Â Â Â - What had happened? Â Oh, I forgot -nx again!
>
> This only affects gdb developers though.
It affects also gcc, gas, emacs, former Frysk, ReactOS, there will be more
malicious .gdbinit files; not listed non-intrusive .gdbinit files which only
define some new commands.
> Another way to go is to enhance gdb's .gdbinit to check for which
> binary is being debugged and only do those things when it's gdb (and
> if necessary enhance the scripting language to support such a check).
> Seems generally useful, we should add support for it anyway.
<bite> When one wants to debug gdb in gdb the file gdb/.gdbinit is really the
most destructive as all its various commands succeed making the debugging
session completely unusable. </bite>
> One problem I have with -nx is that it also turns off system.gdbinit.
> I've sometimes wanted to turn off everything but system.gdbinit,
> without having to specify the path to system.gdbinit in -x.
I do not use system.gdbinit but I use home.gdbinit sharing the problem.
> Well, there is make (and I'm sure others). E.g.,
> echo "default:; @echo Gotcha." > GNUmakefile && make
> :-)
I was even thinking about make but I do not find it as a valid case.
The primary goal of `make' is to read local Makefile - therefore one cannot be
surprised by it. The primary goal of GDB is to process its arguments.
I would bet some GDB users do not know there exists anything like .gdbinit.
> I don't mind "set auto-load-local-gdbinit", though "set auto-load
> local-gdbinit" feels better, I could do "show auto-load" and see all
> the auto-load settings (assuming we migrate "auto-load-scripts" to
> "auto-load scripts" - though I'm beginning to like plain "scripts" in
> the name less ...).
I sure followed "auto-load-scripts". I can change it (later).
> If you want to default it to "off", I think I'd give several releases
> warning notice,
> e.g., at least a year, to give enough time to change our minds if the
> user community really doesn't want it. :-)
I find it OK that way. Maybe there will be some general disagreement.
I need to know this decision to choose the way fixing next security hole
- "set auto-load-scripts" + libthread_db.so.1 as implemented by Google.
So that the other security options/commands can assume it that way.
Thanks,
Jan
next prev parent reply other threads:[~2012-01-17 16:26 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 10:16 Jan Kratochvil
2012-01-17 12:34 ` Eli Zaretskii
2012-01-17 13:42 ` Joel Brobecker
2012-01-17 14:49 ` [patch 7.4] Deprecate local .gdbinit [Re: [patch] New set auto-load-local-gdbinit + disable it by default] Jan Kratochvil
2012-01-17 16:22 ` Doug Evans
2012-01-17 20:22 ` [patch] New set auto-load-local-gdbinit + disable it by default Tom Tromey
2012-01-17 16:15 ` Doug Evans
2012-01-17 16:34 ` Jan Kratochvil [this message]
2012-01-17 16:48 ` Doug Evans
2012-01-17 17:27 ` Jan Kratochvil
2012-01-17 17:33 ` Doug Evans
2012-01-17 17:55 ` Jan Kratochvil
2012-01-17 18:29 ` Eli Zaretskii
2012-01-17 18:35 ` Jan Kratochvil
2012-01-17 19:54 ` Tom Tromey
2012-01-17 18:31 ` Doug Evans
2012-01-17 18:44 ` Jan Kratochvil
2012-01-17 19:12 ` Doug Evans
2012-01-17 19:20 ` Jan Kratochvil
2012-01-17 19:55 ` Tom Tromey
2012-01-17 20:24 ` Pedro Alves
2012-01-17 20:26 ` Tom Tromey
2012-01-17 20:35 ` Jan Kratochvil
2012-01-17 20:56 ` Pedro Alves
2012-01-17 19:30 ` Matt Rice
2012-01-17 19:37 ` Jan Kratochvil
2012-01-17 20:26 ` Tom Tromey
2012-01-17 18:00 ` Eli Zaretskii
2012-01-17 18:28 ` Jan Kratochvil
2012-01-17 18:43 ` Eli Zaretskii
2012-01-17 19:02 ` Jan Kratochvil
2012-01-17 20:29 ` Tom Tromey
2012-01-17 20:49 ` Jan Kratochvil
2012-01-17 20:54 ` Doug Evans
2012-01-17 21:10 ` Tom Tromey
2012-01-17 21:13 ` Eli Zaretskii
2012-01-17 21:14 ` Tom Tromey
2012-01-18 4:26 ` Joel Brobecker
2012-01-18 19:38 ` Jan Kratochvil
2012-01-18 20:01 ` Doug Evans
2012-01-19 6:30 ` Joel Brobecker
2012-01-19 12:57 ` [commit] rm gdb/testsuite/.gdbinit [Re: [patch] New set auto-load-local-gdbinit + disable it by default] Jan Kratochvil
2012-01-19 21:07 ` [patch] New set auto-load-local-gdbinit + disable it by default Tom Tromey
2012-01-19 21:47 ` Jan Kratochvil
2012-01-19 21:53 ` Doug Evans
2012-01-20 4:11 ` Jan Kratochvil
2012-01-19 21:06 ` Tom Tromey
2012-01-17 22:16 ` Doug Evans
2012-01-18 3:05 ` Tom Tromey
2012-01-17 16:26 ` Matt Rice
2012-01-17 16:57 ` Doug Evans
2012-01-17 20:09 ` Tom Tromey
2012-01-24 0:33 ` Stan Shebs
2012-01-24 15:54 ` Jan Kratochvil
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=20120117162621.GA3883@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/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