From mboxrd@z Thu Jan 1 00:00:00 1970 From: mulyadi.santosa@gmail.com (Mulyadi Santosa) Date: Sun, 19 Jun 2011 22:14:10 +0700 Subject: mmap to fixed adr In-Reply-To: <4DFDE569.9060105@openbios.org> References: <4DFDE569.9060105@openbios.org> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Sun, Jun 19, 2011 at 19:02, Volker Poplawski 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