Date: Wed, 28 Aug 2019 19:48:06 -0600 From: Warner Losh <imp@bsdimp.com> To: mms.vanbreukelingen@gmail.com Cc: Maksim Yevmenkin <maksim.yevmenkin@gmail.com>, Konstantin Belousov <kostikbel@gmail.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: <CANCZdfr%2B21-L8C61ThW2CQi8bjVGcvBPxxDCNoXyZXN0Bv44pA@mail.gmail.com> In-Reply-To: <1115053193.64543.1567031661382@mail.yahoo.com> References: <1115053193.64543.1567031661382.ref@mail.yahoo.com> <1115053193.64543.1567031661382@mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 28, 2019, 4:34 PM mms.vanbreukelingen@gmail.com < mms.vanbreukelingen@gmail.com> wrote: > @Maksim, I first did a "git apply -R bt.diff" and then > > root@freeBSD13:/usr/src # git apply --stat --check --ignore-whitespace > ng_btsocket_hci_raw.c.diff.txt > error: patch failed: > head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c:1156 > error: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c: patch > does not apply > patch -p1 worked for me to apply it. And it worked just fine for everything once I rebooted. The patch looked fine to my eye. Warner Rebuilding with MTX_SPIN=y (withouth patch)... > On Wed, 28 Aug 2019 at 19:10, Maksim Yevmenkin <maksim.yevmenkin@gmail.com> > 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? > > actually, i dont think i need to hold lock over copyout. attached is > my version of the patch (untested) > > thanks, > max > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr%2B21-L8C61ThW2CQi8bjVGcvBPxxDCNoXyZXN0Bv44pA>
