public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones
@ 2005-07-04 15:36 macro at linux-mips dot org
  2005-07-04 15:36 ` [Bug libc/1048] " macro at linux-mips dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: macro at linux-mips dot org @ 2005-07-04 15:36 UTC (permalink / raw)
  To: glibc-bugs

Complementing the change to support variable page sizes for MIPS, here is
an update to make getpagesize() work correctly for shared objects pulled by
dlopen() from static executables.  As the area used originally for the
auxiliary vector cannot be trusted anymore at this point, the page size is
passed from dlopen() to an auxiliary ld.so initializer explicitly.  For this
to work the RELRO segment needs to be updated, which unfortunately requires
a somewhat complicated sequence of steps to turn on write permission
beforehand and turn it off again afterwards.

 Here are the necessary changes.

2005-07-04  Maciej W. Rozycki  <macro@linux-mips.org>

        * elf/dl-reloc.c (_dl_protect_relro): Expect and handle an
        additional argument specifying protection mode to use.  Update
        error messages accordingly.
        (_dl_relocate_object): Update the call to _dl_protect_relro().
        * elf/rtld.c (dl_main): Likewise.
        * sysdeps/generic/ldsodefs.h (_dl_protect_relro): Update the
        prototype.
        * sysdeps/unix/sysv/linux/mips/dl-static.c: New file to support
        variable page size for MIPS.
	* sysdeps/unix/sysv/linux/mips/ldsodefs.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/Dist: Add dl-static.c.
	* sysdeps/unix/sysv/linux/mips/Makefile: Build dl-static in elf.
	* sysdeps/unix/sysv/linux/mips/Versions: Add _dl_var_init.

 See: "http://sourceware.org/ml/libc-alpha/2003-12/msg00159.html" for an
additional reference.

-- 
           Summary: MIPS page size support for shared objects dlopen()ed
                    from static ones
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: macro at linux-mips dot org
                CC: drow at false dot org,glibc-bugs at sources dot redhat
                    dot com
  GCC host triplet: mipsel-unknown-linux-gnu


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libc/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
@ 2005-07-04 15:36 ` macro at linux-mips dot org
  2006-02-21  2:14 ` [Bug ports/1048] " roland at gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: macro at linux-mips dot org @ 2005-07-04 15:36 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From macro at linux-mips dot org  2005-07-04 15:36 -------
Created an attachment (id=541)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=541&action=view)
glibc-2.3.90-20050704-mips-dl-static.patch


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
  2005-07-04 15:36 ` [Bug libc/1048] " macro at linux-mips dot org
@ 2006-02-21  2:14 ` roland at gnu dot org
  2006-07-24 14:18 ` drow at sources dot redhat dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: roland at gnu dot org @ 2006-02-21  2:14 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From roland at gnu dot org  2006-02-21 02:14 -------
For the trunk, mips has moved to the ports repository.
Daniel should be able to commit his fixes there directly.
Items needing merge in the 2.3 branch can be reassigned to me.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|gotom at debian dot or dot  |drow at false dot org
                   |jp                          |
             Status|NEW                         |ASSIGNED
          Component|libc                        |ports


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
  2005-07-04 15:36 ` [Bug libc/1048] " macro at linux-mips dot org
  2006-02-21  2:14 ` [Bug ports/1048] " roland at gnu dot org
@ 2006-07-24 14:18 ` drow at sources dot redhat dot com
  2006-07-24 14:54 ` macro at linux-mips dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: drow at sources dot redhat dot com @ 2006-07-24 14:18 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drow at sources dot redhat dot com  2006-07-24 14:18 -------
I can't approve this patch; it still touches things in elf/.  The referenced
mailing list discussion doesn't seem to have a conclusion at the end of it as to
whether they were required.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roland at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
                   ` (2 preceding siblings ...)
  2006-07-24 14:18 ` drow at sources dot redhat dot com
@ 2006-07-24 14:54 ` macro at linux-mips dot org
  2006-07-24 14:58 ` drow at false dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: macro at linux-mips dot org @ 2006-07-24 14:54 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From macro at linux-mips dot org  2006-07-24 14:53 -------
 The dl_pagesize variable is in the RELRO segment.  At the point
_dl_static_init() is called this segment has already been write-protected.
Therefore to initialize the variable, the segment has to be made writable
beforehand and then reset to read-only afterwards.  I have chosen to reuse
_dl_protect_relro() for fiddling with the permissions as it already has
all the necessary bits, except from the ability to specify permissions
different to currently hardcoded PROT_READ.

 If you would rather prefer another function, say _dl_unprotect_relro(),
doing the same what _dl_protect_relro() does, except from hardcoding
PROT_READ | PROT_WRITE instead, that is easily doable, but of questionable
gain.

 My understanding is IA64 currently goes away without hitting the problem,
because ld does not create the RELRO segment for this architecture as
COMMONPAGESIZE is unset.  It looks like the intent is to enable the
setting eventually (see emulparams/elf64_ia64.sh for details), which will
result in the same issue that hit me when implementing initialization of
dl_pagesize for MIPS.

 I hope this is clear enough now.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
                   ` (3 preceding siblings ...)
  2006-07-24 14:54 ` macro at linux-mips dot org
@ 2006-07-24 14:58 ` drow at false dot org
  2009-01-05 12:50 ` anemo at mba dot ocn dot ne dot jp
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: drow at false dot org @ 2006-07-24 14:58 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drow at false dot org  2006-07-24 14:58 -------
Subject: Re:  MIPS page size support for shared objects dlopen()ed from static ones

On Mon, Jul 24, 2006 at 02:53:48PM -0000, macro at linux-mips dot org wrote:
>  I hope this is clear enough now.

It's clear enough to me, but I can't commit things to elf/; I'll see
what Roland says.



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
                   ` (4 preceding siblings ...)
  2006-07-24 14:58 ` drow at false dot org
@ 2009-01-05 12:50 ` anemo at mba dot ocn dot ne dot jp
  2009-01-05 12:56 ` anemo at mba dot ocn dot ne dot jp
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: anemo at mba dot ocn dot ne dot jp @ 2009-01-05 12:50 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From anemo at mba dot ocn dot ne dot jp  2009-01-05 12:50 -------
I updated the libc-ports part of the glibc-2.3.90-20050704-mips-dl-static.patch.

See http://sourceware.org/ml/libc-ports/2009-01/msg00004.html for background.



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
                   ` (5 preceding siblings ...)
  2009-01-05 12:50 ` anemo at mba dot ocn dot ne dot jp
@ 2009-01-05 12:56 ` anemo at mba dot ocn dot ne dot jp
  2009-01-05 12:57 ` anemo at mba dot ocn dot ne dot jp
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: anemo at mba dot ocn dot ne dot jp @ 2009-01-05 12:56 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From anemo at mba dot ocn dot ne dot jp  2009-01-05 12:55 -------
Created an attachment (id=3635)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3635&action=view)
replacement of the libc-port part of the mips-dl-static.patch


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
                   ` (6 preceding siblings ...)
  2009-01-05 12:56 ` anemo at mba dot ocn dot ne dot jp
@ 2009-01-05 12:57 ` anemo at mba dot ocn dot ne dot jp
  2009-01-08 15:00 ` anemo at mba dot ocn dot ne dot jp
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: anemo at mba dot ocn dot ne dot jp @ 2009-01-05 12:57 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anemo at mba dot ocn dot ne
                   |                            |dot jp


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
                   ` (7 preceding siblings ...)
  2009-01-05 12:57 ` anemo at mba dot ocn dot ne dot jp
@ 2009-01-08 15:00 ` anemo at mba dot ocn dot ne dot jp
  2009-01-27 15:33 ` cvs-commit at gcc dot gnu dot org
  2009-01-27 16:52 ` drow at sources dot redhat dot com
  10 siblings, 0 replies; 12+ messages in thread
From: anemo at mba dot ocn dot ne dot jp @ 2009-01-08 15:00 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From anemo at mba dot ocn dot ne dot jp  2009-01-08 15:00 -------
Created an attachment (id=3646)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3646&action=view)
updated mips-dl-static.patch which does all things in ports

Looking at original patch closer, I realize that whole thing can be done in
ports.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #3635 is|0                           |1
           obsolete|                            |


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
                   ` (8 preceding siblings ...)
  2009-01-08 15:00 ` anemo at mba dot ocn dot ne dot jp
@ 2009-01-27 15:33 ` cvs-commit at gcc dot gnu dot org
  2009-01-27 16:52 ` drow at sources dot redhat dot com
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2009-01-27 15:33 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-01-27 15:33 -------
Subject: Bug 1048

CVSROOT:	/cvs/glibc
Module name:	ports
Changes by:	drow@sourceware.org	2009-01-27 15:32:55

Modified files:
	.              : ChangeLog.mips 
	sysdeps/unix/sysv/linux/mips: Makefile Versions 
Added files:
	sysdeps/unix/sysv/linux/mips: dl-static.c ldsodefs.h 

Log message:
	PR glibc/1048
	* sysdeps/unix/sysv/linux/mips/dl-static.c: New file to support
	variable page size for MIPS.
	* sysdeps/unix/sysv/linux/mips/ldsodefs.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/Makefile: Build dl-static in elf.
	* sysdeps/unix/sysv/linux/mips/Versions: Add _dl_var_init.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/ports/ChangeLog.mips.diff?cvsroot=glibc&r1=1.69&r2=1.70
http://sourceware.org/cgi-bin/cvsweb.cgi/ports/sysdeps/unix/sysv/linux/mips/dl-static.c.diff?cvsroot=glibc&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/ports/sysdeps/unix/sysv/linux/mips/ldsodefs.h.diff?cvsroot=glibc&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/ports/sysdeps/unix/sysv/linux/mips/Makefile.diff?cvsroot=glibc&r1=1.15&r2=1.16
http://sourceware.org/cgi-bin/cvsweb.cgi/ports/sysdeps/unix/sysv/linux/mips/Versions.diff?cvsroot=glibc&r1=1.9&r2=1.10



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
  2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
                   ` (9 preceding siblings ...)
  2009-01-27 15:33 ` cvs-commit at gcc dot gnu dot org
@ 2009-01-27 16:52 ` drow at sources dot redhat dot com
  10 siblings, 0 replies; 12+ messages in thread
From: drow at sources dot redhat dot com @ 2009-01-27 16:52 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drow at sources dot redhat dot com  2009-01-27 16:52 -------
Patch checked in.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-01-27 16:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-04 15:36 [Bug libc/1048] New: MIPS page size support for shared objects dlopen()ed from static ones macro at linux-mips dot org
2005-07-04 15:36 ` [Bug libc/1048] " macro at linux-mips dot org
2006-02-21  2:14 ` [Bug ports/1048] " roland at gnu dot org
2006-07-24 14:18 ` drow at sources dot redhat dot com
2006-07-24 14:54 ` macro at linux-mips dot org
2006-07-24 14:58 ` drow at false dot org
2009-01-05 12:50 ` anemo at mba dot ocn dot ne dot jp
2009-01-05 12:56 ` anemo at mba dot ocn dot ne dot jp
2009-01-05 12:57 ` anemo at mba dot ocn dot ne dot jp
2009-01-08 15:00 ` anemo at mba dot ocn dot ne dot jp
2009-01-27 15:33 ` cvs-commit at gcc dot gnu dot org
2009-01-27 16:52 ` drow at sources dot redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).