From owner-freebsd-current@freebsd.org  Tue Aug 27 23:39:29 2019
Return-Path: <owner-freebsd-current@freebsd.org>
Delivered-To: freebsd-current@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 486EFCB063
 for <freebsd-current@mailman.nyi.freebsd.org>;
 Tue, 27 Aug 2019 23:39:29 +0000 (UTC)
 (envelope-from mms.vanbreukelingen@gmail.com)
Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com
 [IPv6:2607:f8b0:4864:20::942])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 46J51q74vZz4TtP
 for <freebsd-current@freebsd.org>; Tue, 27 Aug 2019 23:39:27 +0000 (UTC)
 (envelope-from mms.vanbreukelingen@gmail.com)
Received: by mail-ua1-x942.google.com with SMTP id r10so227297uam.1
 for <freebsd-current@freebsd.org>; Tue, 27 Aug 2019 16:39:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=JmyyL2xcAlDgOca7DEAZzmS5XRcgCFn+juqg1+SWmpM=;
 b=iqv2ZSIPse/78jnRFG4Urlg5TW1NeUiL9n0xHYk1Vkh93lSphpwQuD4/0WHhtrTspK
 5BspGMxtOHIOWkppzqzQE1Qtqs1GXC6NYdmGgugcub3cUnKKOSPFd5XC/6ALVFUvDX7F
 qj7uaJ9I2Rczf6/jUkByb6wOt2Vb3ea7+CebTWdCqkbwgPq9EWYVKS3WH5FIwAtNyv5v
 zjr+2tuAvyoeglH+IBKg45k4QRb6M5kHhZ4qGlejSF2MR86f4dtguCVChrBRgtirttta
 FRkdP6kgkqM6nqADl+7l2uNOBMbl6pfmfA/jjBzBqmUOdSoE4j2byQs04owiY3me0Fgb
 GtLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=JmyyL2xcAlDgOca7DEAZzmS5XRcgCFn+juqg1+SWmpM=;
 b=JZbodn6frolYIA7USyOgRMgbxRT1Yk4lTuMtp/OLBI2ZClQzs0N0qNnT77BQHUMO6P
 CUVAlZfo8OtiLIYj6odTK5QaxZhiZdC9/igWxv8e1HorqAJmblW0I0B93P+bi2oiLmLP
 ov/Q6wuQSG7/nxj+NLTpDcGp7L4moijYglR8NhsrEGcqLMfhI5DYcsOOd9+JLdR0V/Ck
 TmozhhLAHir8RE3Anueo9DQcFQ0VL4SQUSkCmXDsF4GkO0zrLKRKK51YMfRSf2gxmTZ7
 zr3vf41YlRl490nnlcczqGEmv6UEvVScGsjJ1vUjMY+cwIHvYWfRi8TFCMnaFtE2rtMg
 zo6A==
X-Gm-Message-State: APjAAAXKKGH6g2BqHAfkdK/H+i9uTAf2T2zJKgqBWrzXY+DJE+kS+GIv
 oP6ZDJNn02yfs32Cr9+SJMuER2pOA4CJQWeYQLk707K11qc=
X-Google-Smtp-Source: APXvYqxghkF9V9ft0kTQoIbO1RTPMHjphW/vJbwDio1GrsQwzuEMTj2hueLB3ZUBTx//3iumhNA4ZdUYUhy7VnpN6TY=
X-Received: by 2002:ab0:911:: with SMTP id w17mr509119uag.20.1566949166760;
 Tue, 27 Aug 2019 16:39:26 -0700 (PDT)
MIME-Version: 1.0
References: <47509401.1440476.1566796167857.ref@mail.yahoo.com>
 <47509401.1440476.1566796167857@mail.yahoo.com>
 <5aa8faeb-5e8e-38be-4301-81f3d82c494a@selasky.org>
 <CANCZdfpJARVFz+CyvbAK9sH4E6__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>
In-Reply-To: <CAFPOs6o6yHkC4xXnYBTD4QvUJryb=_bBKeJA5YKWG-No6kdtVQ@mail.gmail.com>
From: Miranda Maria Sophie Van den Breukelingen <mms.vanbreukelingen@gmail.com>
Date: Wed, 28 Aug 2019 01:39:15 +0200
Message-ID: <CAM94aeqUSDiDsLKLSeYzOtpD22dZjYmdf_yBi=2wdumf4o-CwQ@mail.gmail.com>
Subject: Re: Kernel-Crash when working with ubt0
To: Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc: "kostikbel@gmail.com" <kostikbel@gmail.com>, Warner Losh <imp@bsdimp.com>, 
 Hans Petter Selasky <hps@selasky.org>, 
 "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
X-Rspamd-Queue-Id: 46J51q74vZz4TtP
X-Spamd-Bar: ---
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmail.com header.s=20161025 header.b=iqv2ZSIP;
 dmarc=pass (policy=none) header.from=gmail.com;
 spf=pass (mx1.freebsd.org: domain of mmsvanbreukelingen@gmail.com designates
 2607:f8b0:4864:20::942 as permitted sender)
 smtp.mailfrom=mmsvanbreukelingen@gmail.com
X-Spamd-Result: default: False [-3.99 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[];
 TO_DN_SOME(0.00)[];
 R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36];
 FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_FIVE(0.00)[5];
 DKIM_TRACE(0.00)[gmail.com:+];
 DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
 NEURAL_HAM_SHORT(-0.99)[-0.991,0];
 FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[];
 MIME_TRACE(0.00)[0:+,1:+,2:~];
 FREEMAIL_ENVFROM(0.00)[gmail.com];
 ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
 TAGGED_FROM(0.00)[];
 DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0];
 ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org];
 MIME_GOOD(-0.10)[multipart/alternative,text/plain];
 IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[];
 RCVD_IN_DNSWL_NONE(0.00)[2.4.9.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org
 : 127.0.5.0]; 
 IP_SCORE(0.00)[ip: (2.49), ipnet: 2607:f8b0::/32(-2.86), asn: 15169(-2.33),
 country: US(-0.05)]; FREEMAIL_CC(0.00)[gmail.com];
 RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: freebsd-current@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussions about the use of FreeBSD-current
 <freebsd-current.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/>
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 27 Aug 2019 23:39:29 -0000

I recompiled the kernel with the patch enabled and now we get at 'service
bluetooth start ubt0 (ubt1...)' :



*/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device
ubt0root@freeBSD13:/usr/home/miranda # service bluetooth start
ubt1/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device
ubt1*

Should I recompile with the MTX_SPIN=y option now?

kldstat:
Id Refs Address                Size Name
 1   82 0xffffffff80200000  232ad30 kernel
 2    1 0xffffffff8252b000    96f98 linux64.ko
 3    3 0xffffffff825c2000     b760 linux_common.ko
 4    1 0xffffffff825ce000    b4be8 linux.ko
 5    1 0xffffffff82683000     3170 splash_bmp.ko
* 6    1 0xffffffff826a9000    18c28 ng_l2cap.ko*
 7    4 0xffffffff826c2000     2dc0 ng_bluetooth.ko
 8    6 0xffffffff826c5000    18d50 netgraph.ko
 9    1 0xffffffff826df000    68840 if_em_updated.ko
10    1 0xffffffff82748000     a468 ng_ubt.ko
11    3 0xffffffff82753000    12d10 ng_hci.ko
12    1 0xffffffff82d18000    7b040 i915kms.ko
13    1 0xffffffff82d94000    3d9e8 drm2.ko
14    4 0xffffffff82dd2000     1f40 iicbus.ko
15    1 0xffffffff82dd4000      f70 iic.ko
16    1 0xffffffff82dd5000     1570 iicbb.ko
17    1 0xffffffff82dd7000    15720 if_iwm.ko
18    1 0xffffffff82ded000    e045f iwm3160fw.ko
19    1 0xffffffff82ece000     1840 uhid.ko
20    1 0xffffffff82ed0000     2928 ums.ko
21    1 0xffffffff82ed3000     4570 autofs.ko
22    1 0xffffffff82ed8000    19600 ng_btsocket.ko
23    1 0xffffffff82ef2000      acf mac_ntpd.ko
24    1 0xffffffff82ef3000    19728 ext2fs.ko
25    1 0xffffffff82f0d000     3a8c geom_linux_lvm.ko


6 has to be started via /boot/loader.conf - I can't insert a driver into
the kernel at all: kldload; pE: can't load wlan_xauth.ko: Operation not
permitted (as root, probably some subroutine in permanent use? Is it a
toggle at the startup services?)

but it was good compilation training, svn up had some changes in the main
files, so it was not a mistake upgrading to r351552M now. Fixed my Plasma5
and I added Enlightment as a DM. For my grafic card there's the
drm-legacy-kmod-driver the best and this works, too now - but compositor's
still on XRender as the most common problem is to loose the insights of the
windows after some minutes with OpenGL (2 and 3.1).

Any ideas except /dev/null the whole stuff from the beginnning on?

btw, 'pkg: gstreamer1-plugins-lame has a missing dependency: lame' ... does
this happen to everyone when using pkg install ? there's no dependency lame
and lame means something like 'like a horse that's gone lame.' but freeBSD
isn't, just read UPDATING!

Gonna build some old darwin kernel now, the influence of BSD is magnificant
in comparison to the mach-part - but that's another chapter.

tomorrow,
Miranda


On Tue, 27 Aug 2019 at 15:03, 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?
>
> thanks,
> max
>