[Top] [All Lists]

Re: SysV IPC shared memory and virtual alising

To: Atsushi Nemoto <>
Subject: Re: SysV IPC shared memory and virtual alising
From: Ralf Baechle <>
Date: Tue, 14 Aug 2001 10:49:41 +0200
In-reply-to: <>; from on Mon, Aug 06, 2001 at 04:44:52PM +0900
References: <>
User-agent: Mutt/1.2.5i
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

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

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.


<Prev in Thread] Current Thread [Next in Thread>