diff mbox

mmap problem in localedef

Message ID 20170401191023.xpf32zopaecd7dzy@raspberrypi-3.musicnaut.iki.fi (mailing list archive)
State Not Applicable
Headers show

Commit Message

Aaro Koskinen April 1, 2017, 7:10 p.m. UTC
Hi,

On Sat, Apr 01, 2017 at 08:41:05PM +0200, Rolf Eike Beer wrote:
> Aaro Koskinen wrote:
> > On Mon, Dec 05, 2016 at 06:50:57PM -0500, John David Anglin wrote:
> > > On 2016-12-05, at 4:17 PM, John David Anglin wrote:
> > > > I'll post the current Debian patch set for hppa tonight and maybe we can
> > > > consolidate.
> > 
> > [...]
> > 
> > > We still have a change to SHMLBA which affects non standard page sizes.
> > 
> > FWIW, this is the one (local-shmlba.diff) that is needed to get localedef
> > working on PA-RISC. I just tested with glibc 2.25 and Linux 4.10 with 4 KB
> > page size.
> 
> Missing attachment?

It was attached to Dave's original mail. Inlined below:


A.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

John David Anglin April 2, 2017, 2:08 p.m. UTC | #1
On 2017-04-01, at 3:10 PM, Aaro Koskinen wrote:

> Hi,
> 
> On Sat, Apr 01, 2017 at 08:41:05PM +0200, Rolf Eike Beer wrote:
>> Aaro Koskinen wrote:
>>> On Mon, Dec 05, 2016 at 06:50:57PM -0500, John David Anglin wrote:
>>>> On 2016-12-05, at 4:17 PM, John David Anglin wrote:
>>>>> I'll post the current Debian patch set for hppa tonight and maybe we can
>>>>> consolidate.
>>> 
>>> [...]
>>> 
>>>> We still have a change to SHMLBA which affects non standard page sizes.
>>> 
>>> FWIW, this is the one (local-shmlba.diff) that is needed to get localedef
>>> working on PA-RISC. I just tested with glibc 2.25 and Linux 4.10 with 4 KB
>>> page size.
>> 
>> Missing attachment?
> 
> It was attached to Dave's original mail. Inlined below:
> 
> Index: eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h
> ===================================================================
> --- eglibc-2.18.orig/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2013-01-09 19:28:48.000000000 -0500
> +++ eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2014-04-09 21:08:06.516202583 -0400
> @@ -36,7 +36,7 @@
> #define SHM_UNLOCK	12		/* unlock segment (root only) */
> 
> /* Segment low boundary address multiple.  */
> -#define SHMLBA 0x00400000		/* address needs to be 4 Mb aligned */
> +#define SHMLBA		(__getpagesize ())
> 
> /* Type to count number of attaches.  */
> typedef unsigned long int shmatt_t;

This patch goes back to the following discussion:
https://patchwork.kernel.org/patch/3933841/

As far as I can tell, it was not submitted to the glibc list, nor is there a bug report regarding localedef.

Dave
--
John David Anglin	dave.anglin@bell.net



--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Aaro Koskinen April 2, 2017, 7:12 p.m. UTC | #2
Hi,

On Sun, Apr 02, 2017 at 10:08:59AM -0400, John David Anglin wrote:
> On 2017-04-01, at 3:10 PM, Aaro Koskinen wrote:
> > It was attached to Dave's original mail. Inlined below:
> > 
> > Index: eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h
> > ===================================================================
> > --- eglibc-2.18.orig/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2013-01-09 19:28:48.000000000 -0500
> > +++ eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2014-04-09 21:08:06.516202583 -0400
> > @@ -36,7 +36,7 @@
> > #define SHM_UNLOCK	12		/* unlock segment (root only) */
> > 
> > /* Segment low boundary address multiple.  */
> > -#define SHMLBA 0x00400000		/* address needs to be 4 Mb aligned */
> > +#define SHMLBA		(__getpagesize ())
> > 
> > /* Type to count number of attaches.  */
> > typedef unsigned long int shmatt_t;
> 
> This patch goes back to the following discussion:
> https://patchwork.kernel.org/patch/3933841/
> 
> As far as I can tell, it was not submitted to the glibc list, nor is
> there a bug report regarding localedef.

glibc bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=19838

A.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
John David Anglin April 2, 2017, 7:49 p.m. UTC | #3
On 2017-04-02, at 3:12 PM, Aaro Koskinen wrote:

> Hi,
> 
> On Sun, Apr 02, 2017 at 10:08:59AM -0400, John David Anglin wrote:
>> On 2017-04-01, at 3:10 PM, Aaro Koskinen wrote:
>>> It was attached to Dave's original mail. Inlined below:
>>> 
>>> Index: eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h
>>> ===================================================================
>>> --- eglibc-2.18.orig/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2013-01-09 19:28:48.000000000 -0500
>>> +++ eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2014-04-09 21:08:06.516202583 -0400
>>> @@ -36,7 +36,7 @@
>>> #define SHM_UNLOCK	12		/* unlock segment (root only) */
>>> 
>>> /* Segment low boundary address multiple.  */
>>> -#define SHMLBA 0x00400000		/* address needs to be 4 Mb aligned */
>>> +#define SHMLBA		(__getpagesize ())
>>> 
>>> /* Type to count number of attaches.  */
>>> typedef unsigned long int shmatt_t;
>> 
>> This patch goes back to the following discussion:
>> https://patchwork.kernel.org/patch/3933841/
>> 
>> As far as I can tell, it was not submitted to the glibc list, nor is
>> there a bug report regarding localedef.
> 
> glibc bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=19838


Helge, would you send this change to glibc list?  If you already sent it, would you do a ping?

You are in the best position to explain why this value should be page size and not 4MB.  It would be good to note
in BZ where patch is on list.

Dave
--
John David Anglin	dave.anglin@bell.net



--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
John David Anglin April 2, 2017, 8:13 p.m. UTC | #4
On 2017-04-02, at 3:49 PM, John David Anglin wrote:

> You are in the best position to explain why this value should be page size and not 4MB.  It would be good to note
> in BZ where patch is on list.

Just after I wrote this message, I noticed a slew of INEQUIVALENT ALIASES messages on console:

mx3210 login: INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so

They might be from firefox or glibc testsuite.

Dave
--
John David Anglin	dave.anglin@bell.net



--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
John David Anglin April 2, 2017, 8:55 p.m. UTC | #5
On 2017-04-02, at 4:13 PM, John David Anglin wrote:

> INEQUIVALENT ALIASES 0xf8bc0000 and 0x41004000 in file ld-2.24.so
> INEQUIVALENT ALIASES 0xf8bbf000 and 0x41003000 in file ld-2.24.so

Typically, we have following in maps:
f8bbc000-f8bdf000 r-xp 00000000 08:25 33710119                           /lib/hppa-linux-gnu/ld-2.24.so
f8bdf000-f8be3000 rwxp 00023000 08:25 33710119                           /lib/hppa-linux-gnu/ld-2.24.so

Dave
--
John David Anglin	dave.anglin@bell.net



--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
John David Anglin April 2, 2017, 9:45 p.m. UTC | #6
On 2017-04-02, at 3:49 PM, John David Anglin wrote:

> On 2017-04-02, at 3:12 PM, Aaro Koskinen wrote:
> 
>> Hi,
>> 
>> On Sun, Apr 02, 2017 at 10:08:59AM -0400, John David Anglin wrote:
>>> On 2017-04-01, at 3:10 PM, Aaro Koskinen wrote:
>>>> It was attached to Dave's original mail. Inlined below:
>>>> 
>>>> Index: eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h
>>>> ===================================================================
>>>> --- eglibc-2.18.orig/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2013-01-09 19:28:48.000000000 -0500
>>>> +++ eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2014-04-09 21:08:06.516202583 -0400
>>>> @@ -36,7 +36,7 @@
>>>> #define SHM_UNLOCK	12		/* unlock segment (root only) */
>>>> 
>>>> /* Segment low boundary address multiple.  */
>>>> -#define SHMLBA 0x00400000		/* address needs to be 4 Mb aligned */
>>>> +#define SHMLBA		(__getpagesize ())
>>>> 
>>>> /* Type to count number of attaches.  */
>>>> typedef unsigned long int shmatt_t;
>>> 
>>> This patch goes back to the following discussion:
>>> https://patchwork.kernel.org/patch/3933841/
>>> 
>>> As far as I can tell, it was not submitted to the glibc list, nor is
>>> there a bug report regarding localedef.
>> 
>> glibc bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=19838
> 
> 
> Helge, would you send this change to glibc list?  If you already sent it, would you do a ping?

Actually, I see from further research that I'm to blame:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725508

Your bug report was here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741243

> 
> You are in the best position to explain why this value should be page size and not 4MB.  It would be good to note
> in BZ where patch is on list.

Given the inequivalent alias messages which may have come from glibc testsuite, I'm not sure we have this right.
It seems like the kernel is not sharing pages in ld-2.24.so correctly.  The text and data in the file appear correctly
aligned on page boundaries.

Dave
--
John David Anglin	dave.anglin@bell.net



--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h
===================================================================
--- eglibc-2.18.orig/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2013-01-09 19:28:48.000000000 -0500
+++ eglibc-2.18/sysdeps/unix/sysv/linux/hppa/bits/shm.h	2014-04-09 21:08:06.516202583 -0400
@@ -36,7 +36,7 @@ 
 #define SHM_UNLOCK	12		/* unlock segment (root only) */
 
 /* Segment low boundary address multiple.  */
-#define SHMLBA 0x00400000		/* address needs to be 4 Mb aligned */
+#define SHMLBA		(__getpagesize ())
 
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;