This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] [BZ #10283] localedef: align fixed maps to SHMLBA
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: roland at hack dot frob dot com, vapier at gentoo dot org, libc-alpha at sourceware dot org
- Date: Tue, 28 May 2013 16:20:22 -0400
- Subject: Re: [PATCH v2] [BZ #10283] localedef: align fixed maps to SHMLBA
- References: <1369327649-906-1-git-send-email-vapier at gentoo dot org> <1369507293-19498-1-git-send-email-vapier at gentoo dot org> <20130528194042 dot 1EF7B2C074 at topped-with-meat dot com> <20130528 dot 130721 dot 1721261559877509450 dot davem at davemloft dot net>
On 05/28/2013 04:07 PM, David Miller wrote:
> From: Roland McGrath <roland@hack.frob.com>
> Date: Tue, 28 May 2013 12:40:42 -0700 (PDT)
>
>> The fact that SHMLBA is the right size for this is a Linuxism. It should
>> not be used directly in generic libc code. Instead, add a private sysdeps/
>> header to define a macro or function that yields this larger-than-page size
>> and explains what uses need to use this size. If it's then the most
>> sensible thing for a machine-independent linux/ implementation of this
>> header to use SHMLBA, then fine.
>
> Solaris has this restriction, for the same exact reason, too, it's not
> a Linux'ism.
>
> Anyone OS which properly supports avoidance illegal cache aliases (and
> thus, memory corruption) will need to impose this restriction.
>
Then it's a Solaris-ism, and if we had a Solaris port we'd be refactoring
this into the Linux and Solaris OS sysdep directories.
I know it's a little pedantic, but it's not a generic issue, and thus I
agree that it should be a part of the OS/hardware support code.
Unless you're arguing that macro-izing such OS/hardware dependent code
makes the resulting implementation less maintainable?
Cheers,
Carlos.