* status of PIE support?
@ 2008-05-08 16:10 Kees Cook
2008-05-08 19:00 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2008-05-08 16:10 UTC (permalink / raw)
To: gdb-patches
Hello! I'm curious what the current status PIE support is? Many distros
have been carrying variations on PIE support patches for several releases
now, and I'd like to help get them into the mainline gdb. As I understand
it, the code was originally from Elena Zannoni and ported by various
people including Jan Kratochvil.
I've trivially ported the patches that are currently in Ubuntu's 6.8
gdb to the current gdb CVS. Since they're large, I'll just link to
them[1][2].
The older PIE CVS branches seem pretty far out of date:
"ezannoni_pie-20030916"
"ezannoni_pie-20040323"
What would be required to get this code in shape for a commit? I'm
currently fairly unfamiliar with gdb internals, but I'm willing to
learn. :)
Thanks,
-Kees
[1] http://outflux.net/gdb/pie-support.patch
gdb/gdb/Makefile.in | 2
gdb/gdb/amd64-tdep.c | 66 ++++++++-
gdb/gdb/auxv.c | 20 +-
gdb/gdb/auxv.h | 4
gdb/gdb/breakpoint.c | 61 ++++++++
gdb/gdb/breakpoint.h | 5
gdb/gdb/dwarf2read.c | 2
gdb/gdb/elfread.c | 2
gdb/gdb/infrun.c | 5
gdb/gdb/objfiles.c | 17 ++
gdb/gdb/solib-svr4.c | 342 ++++++++++++++++++++++++++++++++++++++++++++++----
gdb/gdb/solib.c | 107 +++++++++++----
gdb/gdb/solist.h | 10 +
gdb/gdb/symfile-mem.c | 2
gdb/gdb/symfile.c | 22 ++-
gdb/gdb/varobj.c | 56 ++++++++
gdb/gdb/varobj.h | 2
17 files changed, 644 insertions(+), 81 deletions(-)
[2] http://outflux.net/gdb/pie-testsuite.patch
gdb/gdb/testsuite/configure | 3
gdb/gdb/testsuite/configure.ac | 2
gdb/gdb/testsuite/gdb.pie/Makefile.in | 19
gdb/gdb/testsuite/gdb.pie/attach.c | 20
gdb/gdb/testsuite/gdb.pie/attach.exp | 432 ++++++++++++++
gdb/gdb/testsuite/gdb.pie/attach2.c | 24
gdb/gdb/testsuite/gdb.pie/break.c | 146 ++++
gdb/gdb/testsuite/gdb.pie/break.exp | 973 +++++++++++++++++++++++++++++++++
gdb/gdb/testsuite/gdb.pie/break1.c | 44 +
gdb/gdb/testsuite/gdb.pie/corefile.exp | 243 ++++++++
gdb/gdb/testsuite/gdb.pie/coremaker.c | 142 ++++
11 files changed, 2046 insertions(+), 2 deletions(-)
--
Kees Cook @outflux.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: status of PIE support?
2008-05-08 16:10 status of PIE support? Kees Cook
@ 2008-05-08 19:00 ` Daniel Jacobowitz
2008-05-08 19:50 ` Kees Cook
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-05-08 19:00 UTC (permalink / raw)
To: Kees Cook; +Cc: gdb-patches
On Wed, May 07, 2008 at 10:45:26PM -0700, Kees Cook wrote:
> Hello! I'm curious what the current status PIE support is?
No status that I know of. No one has been working on it for FSF GDB.
Jan may know more since he maintains the Red Hat packaging.
> What would be required to get this code in shape for a commit? I'm
> currently fairly unfamiliar with gdb internals, but I'm willing to
> learn. :)
My general rules for reviewing patches are:
- they must conform to GNU style guidelines and include changelogs.
This can be tedious, but is not hard - especially not if your
editor supports GNU coding style :-)
- large patches should be broken into separate logical units where
reasonable (this is always a judgement call)
- the submitter and any authors must have FSF copyright assignment
- the submitter has to be able to justify any line of the patch that
does not make sense to the reviewer
Unfortunately, while that's not quite as strict as "you must
understand every line", it's closely related: the more of it a
reviewer has to go figure out on his own, the more work it is to
review the patch, and the harder it will be to find someone with the
time to do it. A good way to handle bits you don't understand is
to remove them and see what breaks; often this isn't practical,
but when it is it's a sign of good tests :-)
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: status of PIE support?
2008-05-08 19:00 ` Daniel Jacobowitz
@ 2008-05-08 19:50 ` Kees Cook
2008-05-08 20:22 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2008-05-08 19:50 UTC (permalink / raw)
To: gdb-patches
On Thu, May 08, 2008 at 01:37:20PM -0400, Daniel Jacobowitz wrote:
> On Wed, May 07, 2008 at 10:45:26PM -0700, Kees Cook wrote:
> > Hello! I'm curious what the current status PIE support is?
>
> No status that I know of. No one has been working on it for FSF GDB.
>
> Jan may know more since he maintains the Red Hat packaging.
I'd love to help get it into mainline, but my knowledge of gdb internals
is rather poor currently. I figure I can help perhaps with coordination
and certainly with testing.
Jan, would getting PIE support into mainline gdb be something you would
have time for?
> - the submitter has to be able to justify any line of the patch that
> does not make sense to the reviewer
This is probably where I'd get hung up, shouting "it's magic!" :)
> time to do it. A good way to handle bits you don't understand is
> to remove them and see what breaks; often this isn't practical,
> but when it is it's a sign of good tests :-)
Yeah, I assume that I'll end up learning gdb internals eventually, and be
a bit more helpful then, but that won't be in the near-term. That said,
it's been 5 years since Elena Zannoni's original work, so I'm hoping
some folks will step up and help review the existing patches with me --
they clearly have some merit.
Thanks!
-Kees
--
Kees Cook @outflux.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: status of PIE support?
2008-05-08 19:50 ` Kees Cook
@ 2008-05-08 20:22 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-05-08 20:22 UTC (permalink / raw)
To: Kees Cook; +Cc: gdb-patches
On Thu, May 08, 2008 at 11:19:05AM -0700, Kees Cook wrote:
> > - the submitter has to be able to justify any line of the patch that
> > does not make sense to the reviewer
>
> This is probably where I'd get hung up, shouting "it's magic!" :)
>
> > time to do it. A good way to handle bits you don't understand is
> > to remove them and see what breaks; often this isn't practical,
> > but when it is it's a sign of good tests :-)
>
> Yeah, I assume that I'll end up learning gdb internals eventually, and be
> a bit more helpful then, but that won't be in the near-term. That said,
> it's been 5 years since Elena Zannoni's original work, so I'm hoping
> some folks will step up and help review the existing patches with me --
> they clearly have some merit.
Right. Basically, speaking only for myself (but as the most active
patch reviewer), I have really little time for GDB that isn't
specifically related to my day job. Enough of that job is related
to GDB that this isn't always apparent. So I like helping people
understand the code and I'm glad to answer questions... but I like my
own projects, too, so it takes a really long time to get things nailed
down if you can't find someone besides me to help :-)
Fortunately there's an increasing number of active developers on the
lists over the last year. I'm thrilled by that. So maybe someone
else will be able to step up to help you, or maybe the patches will
be clear enough to me that I can help quickly.
Anyway. The clear place to start is first, make sure the copyright
issue is out of the way if it isn't already. Then see if you can
identify any bits of the patches that stand independently and make
sense to you, and submit those as individual patches. Unfortunately
this isn't a great part of GDB to get your introduction in...
I took a quick look through the patch; I'm not immediately convinced
about some of the design choices (which doesn't mean they're wrong,
but does mean they aren't obviously correct). The amd64 and varobj
parts I do not see the connection to the rest of the patch.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-08 18:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-08 16:10 status of PIE support? Kees Cook
2008-05-08 19:00 ` Daniel Jacobowitz
2008-05-08 19:50 ` Kees Cook
2008-05-08 20:22 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox