Skip to contentSkip to conversation

rtld-audit.7: tfix

PATCH In review Namhyung Kim 2 participants 4 messages Nov 3, 2015 – Dec 3, 2015 2 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtld-audit.7: tfix

---
 man7/rtld-audit.7 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man7/rtld-audit.7 +1 -1
index d0f7563..643bc57 100644
@@ -400,7 +400,7 @@ If different
 invocations for this symbol return different values,
 then the maximum returned value is used.
 The
-.BR la_pltenter ()
+.BR la_pltexit ()
 function is called only if this buffer is
 explicitly set to a suitable value.
 
Signature · 6 lines
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to a message not in the archive

Hello Namhyung Kim,

I need some explanation here. This is not a simple typo fix, I believe. Why do you think the current text is wrong?

Cheers,

Michael

Quoted 19 lines · Namhyung Kim
---
 man7/rtld-audit.7 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man7/rtld-audit.7 +1 -1
index d0f7563..643bc57 100644
@@ -400,7 +400,7 @@ If different
 invocations for this symbol return different values,
 then the maximum returned value is used.
 The
-.BR la_pltenter ()
+.BR la_pltexit ()
 function is called only if this buffer is
 explicitly set to a suitable value.
 
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
In reply to a message not in the archive

Hi Michael,

Quoted 5 lines · Michael Kerrisk (man-pages)

Hello Namhyung Kim,

I need some explanation here. This is not a simple typo fix, I believe. Why do you think the current text is wrong?

Actually la_pltenter() is called regardless of the value of framesizep but la_pltexit() is called only if la_pltenter() returns with non-zero framesizep set. I spent long time to figure out why la_pltexit() is not called at all.

Quoting comments in glibc/sysdeps/x86_64/dl-trampoline.h:

/* There's nothing in the frame size, so there
will be no call to the _dl_call_pltexit. */

and

/* At this point we need to prepare new stack for the function
which has to be called. We copy the original stack to a temporary buffer of the size specified by the 'framesize' returned from _dl_profile_fixup */

I think it's because it needs to preserve 'inregs' to be passed to la_pltexit().

The _dl_profile_fixup() sets the '*framesizep' to maximum value of what la_pltenter() sets. Please see glibc/elf/dl-runtime.c file.

Thanks,
Namhyung

Quoted 7 lines · Namhyung Kim
Quoted 5 lines
---
 man7/rtld-audit.7 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 20 lines
Quoted 14 lines
man7/rtld-audit.7 +1 -1
index d0f7563..643bc57 100644
@@ -400,7 +400,7 @@ If different
 invocations for this symbol return different values,
 then the maximum returned value is used.
 The
-.BR la_pltenter ()
+.BR la_pltexit ()
 function is called only if this buffer is
 explicitly set to a suitable value.
 
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

Hello Namhyung Kim

Quoted 27 lines · Namhyung Kim

Hi Michael,

Quoted 5 lines · Michael Kerrisk (man-pages)

Hello Namhyung Kim,

I need some explanation here. This is not a simple typo fix, I believe. Why do you think the current text is wrong?

Actually la_pltenter() is called regardless of the value of framesizep but la_pltexit() is called only if la_pltenter() returns with non-zero framesizep set. I spent long time to figure out why la_pltexit() is not called at all.

Quoting comments in glibc/sysdeps/x86_64/dl-trampoline.h:

/* There's nothing in the frame size, so there
will be no call to the _dl_call_pltexit. */

and

/* At this point we need to prepare new stack for the function
which has to be called. We copy the original stack to a temporary buffer of the size specified by the 'framesize' returned from _dl_profile_fixup */

Quoted 5 lines

I think it's because it needs to preserve 'inregs' to be passed to la_pltexit().

The _dl_profile_fixup() sets the '*framesizep' to maximum value of what la_pltenter() sets. Please see glibc/elf/dl-runtime.c file.

Thanks -- that's the kind of info I need for the commit message! I've committed your patch, with that text. Thanks for all of the info.

Cheers,

Michael

Quoted 28 lines
Quoted 27 lines · Namhyung Kim
Quoted 19 lines
---
 man7/rtld-audit.7 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man7/rtld-audit.7 +1 -1
index d0f7563..643bc57 100644
@@ -400,7 +400,7 @@ If different
 invocations for this symbol return different values,
 then the maximum returned value is used.
 The
-.BR la_pltenter ()
+.BR la_pltexit ()
 function is called only if this buffer is
 explicitly set to a suitable value.
 
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html