From: Ralf Baechle <ralf@oss.sgi.com>
To: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Cc: linux-mips@oss.sgi.com, linux-mips@fnet.fr
Subject: Re: SysV IPC shared memory and virtual alising
Date: Tue, 14 Aug 2001 10:49:41 +0200 [thread overview]
Message-ID: <20010814104941.F5928@bacchus.dhis.org> (raw)
In-Reply-To: <20010806164452D.nemoto@toshiba-tops.co.jp>; from nemoto@toshiba-tops.co.jp on Mon, Aug 06, 2001 at 04:44:52PM +0900
On Mon, Aug 06, 2001 at 04:44:52PM +0900, Atsushi Nemoto wrote:
> Here is an patch to fix virtual aliasing problem with SysV IPC shared
> memory. I tested this patch on a r4k cpu with 32Kb D-cache.
>
> If D-cache is smaller than PAGE_SIZE this patch is not needed at all,
> but I think it is not so bad unconditionally forcing alignment to
> SHMLBA.
It's wasting huge amounts of address space. That can be prohibitive if
you want to run something such as electric fence. Technically the worst
case of any CPU that's required is 32kb on R4000 / R4400 SC and MC
versions, so I don't want to go beyond that.
What does this patch have to do with SysV shared mem? Shmat(2) does
proper alignment checking and aligning and doesn't call
arch_get_unmapped_area.
We do have an alignment problem with mmap(2); somebody already has a
correct patch for this already pending to be merged by Alan and Linus
as it affects all architectures. I assume your patch was actually
intended to fix this problem; it' doesn't correctly properly deal with
anonymous mappings which have no extra alignment constraints nor
correctly factor in the file offset so with just two mmap calls I can
still create aliases.
Ralf
next prev parent reply other threads:[~2001-08-14 8:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-06 7:44 SysV IPC shared memory and virtual alising Atsushi Nemoto
2001-08-06 8:50 ` Dominic Sweetman
2001-08-14 8:24 ` Ralf Baechle
2001-08-14 8:49 ` Ralf Baechle [this message]
2001-08-16 3:04 ` Atsushi Nemoto
2002-05-07 6:48 ` XSHM/shared-pixmap fix Was: Linux Shared Memory Issue Atsushi Nemoto
-- strict thread matches above, loose matches on Subject: below --
2002-04-24 21:27 Maurice Turcotte
2002-04-24 22:03 ` Jun Sun
2002-04-25 5:25 ` Atsushi Nemoto
2002-04-25 18:46 ` Jun Sun
2002-04-26 3:11 ` Atsushi Nemoto
2002-04-27 21:45 ` XSHM/shared-pixmap fix Was: " Florian Lohoff
2002-05-06 11:04 ` Maciej W. Rozycki
2002-04-25 15:36 ` Florian Lohoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010814104941.F5928@bacchus.dhis.org \
--to=ralf@oss.sgi.com \
--cc=linux-mips@fnet.fr \
--cc=linux-mips@oss.sgi.com \
--cc=nemoto@toshiba-tops.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox