This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] [1/2] auto-loading scripts from .debug_gdb_scripts section


>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Doug> This patch adds support for auto-loading scripts mentioned in
Doug> section .debug_gdb_scripts.

It seems reasonable to me.  I looked through the patch and didn't see
anything I disagreed with.

I'm curious why these new scripts are attached to the program space and
not just the objfile from which the section came.  But, I don't think it
really matters.

I'm somewhat concerned about security.  I don't know why I didn't think
of this before :-(.  The issue is that either approach can result in
random Python code being loaded into gdb.

One idea for a fix would be to check the script file's ownership and
permissions before reading it.  I think we'd need to allow files to be
owned by the current user or by root in order for this to work nicely in
the distro case.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]