Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2012 14:42:22 +0000
From:      Eric Saint-Etienne <eric.saintetienne@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: malloc pages map to user space
Message-ID:  <CACJX%2B51Po_RfhUF7Ba1VT0XLfLWQYWFmnRBRcNuDp%2B3nh_AopQ@mail.gmail.com>
In-Reply-To: <CACJX%2B535YeOwWZodE1w8jiECKbDgyBbZgYDd=M31NwyTMTx83g@mail.gmail.com>
References:  <CACJX%2B52DPPYea5k6QxQ6WQ62GEA9YHGr4y=ETUpPArNL83kh5w@mail.gmail.com> <CACJX%2B535YeOwWZodE1w8jiECKbDgyBbZgYDd=M31NwyTMTx83g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> By using kernel_map instead of kmem_map, vm_map_lookup() now always
> return a vm_object. That's a big progress.
> As expected, when this object is kmem_object, the user mapping works
> fine (for smaller or larger mallocs.)
>
> Otherwise that object doesn't match kernel_object. It's an anonymous
> object to me.
> Using that "anonymous" vm_object for mapping into user map (using
> vm_map_find()) doesn't directly fail,
> it does provide a virtual address in the user map. However I read
> zeros at that address, from within the user process.

Actually when using kernel_map, the object returned is NULL! However the
the vm_entry_t it returns seems a valid address, its 'object' field is NULL
too (that's consistent)
That's the reason why I didn't find it in any existing 'puclic' map (such as
kernel_map, buffers_map, kmem_map, exec_map or pipe_map)

But a NULL object isn't good at anything and I'm not sure what to do with
a vm_entry_t only... Any idea how to insert it in the process map?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACJX%2B51Po_RfhUF7Ba1VT0XLfLWQYWFmnRBRcNuDp%2B3nh_AopQ>