kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* mmap to fixed adr
@ 2011-06-19 12:02 Volker Poplawski
  2011-06-19 15:14 ` Mulyadi Santosa
  0 siblings, 1 reply; 2+ messages in thread
From: Volker Poplawski @ 2011-06-19 12:02 UTC (permalink / raw)
  To: kernelnewbies

Hi,

is there a VA range in userspace which is always safe for mmap() with 
fixed adr? (x86_64 mostly)

I.e. a VA range where mmap() or ld will never map memory.

I know I can try particular fixed adr with mmap() and check if the 
mapping succeeds. However this is not what I want. I want mmap() to stay 
clear of certain ranges and map memory there myself.

Regards
.....Volker

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

* mmap to fixed adr
  2011-06-19 12:02 mmap to fixed adr Volker Poplawski
@ 2011-06-19 15:14 ` Mulyadi Santosa
  0 siblings, 0 replies; 2+ messages in thread
From: Mulyadi Santosa @ 2011-06-19 15:14 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Jun 19, 2011 at 19:02, Volker Poplawski <volker@openbios.org> wrote:
> Hi,
>
> is there a VA range in userspace which is always safe for mmap() with
> fixed adr? (x86_64 mostly)
>
> I.e. a VA range where mmap() or ld will never map memory.

likely, you can find it out by yourself using:
cat /proc/self/maps | head

there you can find where kernel maps the very first object. Then, IMO,
all you need to do is preceed that address. Beware, IMHO, don't start
with address 0 as you might screw NULL handler.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

end of thread, other threads:[~2011-06-19 15:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-19 12:02 mmap to fixed adr Volker Poplawski
2011-06-19 15:14 ` Mulyadi Santosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).