Date: Tue, 10 Mar 2009 09:31:33 -0400 From: John Baldwin <jhb@freebsd.org> To: Alexej Sokolov <bsd.quest@googlemail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: wrong data in remapped buffer Message-ID: <200903100931.34071.jhb@freebsd.org> In-Reply-To: <671bb5fc0903100316s16c0ae36ocaac3cdab955584d@mail.gmail.com> References: <671bb5fc0903060813s284673e2t4d3c77b0ed6abc54@mail.gmail.com> <200903091618.32955.jhb@freebsd.org> <671bb5fc0903100316s16c0ae36ocaac3cdab955584d@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 10 March 2009 6:16:27 am Alexej Sokolov wrote: > 2009/3/9 John Baldwin <jhb@freebsd.org> > > > On Monday 09 March 2009 3:38:55 pm Alexej Sokolov wrote: > > > 2009/3/9 John Baldwin <jhb@freebsd.org> > > > > > > > On Friday 06 March 2009 11:13:38 am Alexej Sokolov wrote: > > > > > Hello, > > > > > I try to MALLOC a buffer in kern, then remap it with vm_map_find(), > > to > > > > space > > > > > of user process. > > > > > Some times the remapped buffer in user space contain incorrect data. > > > > > > > > What architecture are you using? On some archs like amd64, small > > mallocs > > > > (<= > > > > PAGE_SIZE) don't use the kmem_map or kmem_object. > > > > > > > > -- > > > > John Baldwin > > > > > > > anyway , the error happens only some times... I think there is other > > reason. > > > My hardware is amd64 > > > % uname -ms > > > FreeBSD i386 > > > > i386 always uses kmem for malloc(9). > > > > -- > > John Baldwin > > ok, > and what should be a reason of inconsistent data after remapping ? I don't know off the top of my head. I'm not really sure your use of vm_map_find() is correct, but I don't know it well enough to comment further. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903100931.34071.jhb>