Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2019 16:38:11 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc:        "mms.vanbreukelingen@gmail.com" <mms.vanbreukelingen@gmail.com>, Warner Losh <imp@bsdimp.com>, Hans Petter Selasky <hps@selasky.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: Kernel-Crash when working with ubt0
Message-ID:  <20190827133811.GU71821@kib.kiev.ua>
In-Reply-To: <CAFPOs6o6yHkC4xXnYBTD4QvUJryb=_bBKeJA5YKWG-No6kdtVQ@mail.gmail.com>
References:  <47509401.1440476.1566796167857.ref@mail.yahoo.com> <47509401.1440476.1566796167857@mail.yahoo.com> <5aa8faeb-5e8e-38be-4301-81f3d82c494a@selasky.org> <CANCZdfpJARVFz%2BCyvbAK9sH4E6__DPAunYQz5rxexO-mzuvsuw@mail.gmail.com> <00E772F0-7231-44C4-B314-26730CC7DF21@gmail.com> <20190827071052.GT71821@kib.kiev.ua> <233039408.1857163.1566892977201@mail.yahoo.com> <CAFPOs6o6yHkC4xXnYBTD4QvUJryb=_bBKeJA5YKWG-No6kdtVQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, Aug 27, 2019 at 06:03:46AM -0700, Maksim Yevmenkin wrote:
> > > Hmm... interesting....
> > >
> > > I only took a brief look at it. I suppose I can ensure user space address is wired and then copyout() can be called with mutex held
> >
> > >No, you cannot do this, at least without making the kernel to panic.
> > User might unmap the wired mapping at any time still.
> 
> Kostik,
> 
> i was thinking along the lines of vslock/vsunlock and copyout_nofault.
> basically similar to the sysctl code. do you think this would not
> work?

This would probably work, but at least causes fragmentation of userspace
vm_map entries.  If it is supposed to be used on high-frequency data path,
then it would cause significant blow up of the VM structures used to keep
user data map.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190827133811.GU71821>