public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Abusing region 0
@ 2005-02-03  1:03 Menyhart, Zoltan
  2005-02-03  2:25 ` Jack Steiner
  2005-02-03  3:52 ` David Mosberger
  0 siblings, 2 replies; 3+ messages in thread
From: Menyhart, Zoltan @ 2005-02-03  1:03 UTC (permalink / raw)
  To: linux-ia64

I am going to do some experiments: I am going to map some of the
virtual address ranges of a process into the address space of another
one. They are real 64 bit processes, i.e. the region 0 is not used.
Can I abuse this region 0 for mapping the addresses of the neighbor
process into this region ? E.g. if process A has got an address at
0x6000000000001000, then I am going to map it for B at address
0x0000000000001000 ? Wont anything break ?

(I need this trick because the source address can correspond to
anything, like initialized data, BSS, anonymous allocation, etc, i.e.
some SHM just wont work.)

Any advice will be appreciated.

Zoltan Menyhart



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

* Re: Abusing region 0
  2005-02-03  1:03 Abusing region 0 Menyhart, Zoltan
@ 2005-02-03  2:25 ` Jack Steiner
  2005-02-03  3:52 ` David Mosberger
  1 sibling, 0 replies; 3+ messages in thread
From: Jack Steiner @ 2005-02-03  2:25 UTC (permalink / raw)
  To: linux-ia64

On Thu, Feb 03, 2005 at 02:03:01AM +0100, Menyhart, Zoltan wrote:
> I am going to do some experiments: I am going to map some of the
> virtual address ranges of a process into the address space of another
> one. They are real 64 bit processes, i.e. the region 0 is not used.
> Can I abuse this region 0 for mapping the addresses of the neighbor
> process into this region ? E.g. if process A has got an address at
> 0x6000000000001000, then I am going to map it for B at address
> 0x0000000000001000 ? Wont anything break ?
> 
> (I need this trick because the source address can correspond to
> anything, like initialized data, BSS, anonymous allocation, etc, i.e.
> some SHM just wont work.)
> 
> Any advice will be appreciated.

FWIW, I have done the same thing that you are trying except that I used
address 0x0000000010000000 instead of 0x0000000000001000. No problems.


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

-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.



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

* Re: Abusing region 0
  2005-02-03  1:03 Abusing region 0 Menyhart, Zoltan
  2005-02-03  2:25 ` Jack Steiner
@ 2005-02-03  3:52 ` David Mosberger
  1 sibling, 0 replies; 3+ messages in thread
From: David Mosberger @ 2005-02-03  3:52 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Thu, 03 Feb 2005 02:03:01 +0100, "Menyhart, Zoltan" <Zoltan.Menyhart@free.fr> said:

  Zoltan> I am going to do some experiments: I am going to map some of
  Zoltan> the virtual address ranges of a process into the address
  Zoltan> space of another one. They are real 64 bit processes,
  Zoltan> i.e. the region 0 is not used.  Can I abuse this region 0
  Zoltan> for mapping the addresses of the neighbor process into this
  Zoltan> region ? E.g. if process A has got an address at
  Zoltan> 0x6000000000001000, then I am going to map it for B at
  Zoltan> address 0x0000000000001000 ? Wont anything break ?

  Zoltan> (I need this trick because the source address can correspond
  Zoltan> to anything, like initialized data, BSS, anonymous
  Zoltan> allocation, etc, i.e.  some SHM just wont work.)

  Zoltan> Any advice will be appreciated.

Yes, you can do this.  There is nothing special about region 0 as far
as the kernel is concerned.  Well, I'm lying: the one thing that's
special is that there is a NaT page mapped at address 0 to catch
speculative accesses through a NULL-pointer.  Because of that, I'd
recommend to use an address greater than 64KB (the largest base
page-size supported by Linux).

	--david

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

end of thread, other threads:[~2005-02-03  3:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-03  1:03 Abusing region 0 Menyhart, Zoltan
2005-02-03  2:25 ` Jack Steiner
2005-02-03  3:52 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox