From nobody Sun Jan 7 04:58:51 2024 X-Original-To: freebsd-wireless@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T74jV1YQrz56VbN for ; Sun, 7 Jan 2024 04:59:10 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T74jT0VWnz51S1; Sun, 7 Jan 2024 04:59:09 +0000 (UTC) (envelope-from kob6558@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=EpCKkT0G; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of kob6558@gmail.com designates 2607:f8b0:4864:20::72d as permitted sender) smtp.mailfrom=kob6558@gmail.com Received: by mail-qk1-x72d.google.com with SMTP id af79cd13be357-7831e87ba13so9780885a.0; Sat, 06 Jan 2024 20:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704603548; x=1705208348; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BjtxuIWmFrt+gDz6GSWWc/y/BPRjVLOKG2H0K5mUYMk=; b=EpCKkT0GTI7GqYBgRS6v8RMDkSkgmRbhcRvb1BRS6TjjTGAaZNOMLH2LbAY4pATAo8 16vVvOL+TW5JaaWzYC8gcYnr5+wLcoQzUGB7dxLI2R+wfAfqipoPz8/k8g3CC7++vVBH EJptUIlEWc0aWkfuL1ol17DhVfKwNpSfsrS/lJsIwYTtrVw6QtrFasJl2wq2JbJT3Nf8 cbeGTlssX7ipZ+5Hj7LY9F9hL9eLsbhE9e8HD3zWo+/dpn0Zr96iySGVycdl3tOGXNiP dXn/Sb4MWGZAYbMsqbjhkV111LObOhYnaxj0drcC/qze14eb6f9Qnid5bjzumw1BUFcR jcpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704603548; x=1705208348; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BjtxuIWmFrt+gDz6GSWWc/y/BPRjVLOKG2H0K5mUYMk=; b=GuimFyE0ShIByf/ON3mJlqmBEBz4Y48Nz1r/HXB4elNiJEcQxPmlb4lkzKKYMxa8o2 ZfEgckFFk3rUiJV01wZOcVezkxbyyRtGXieA1Bcms/eZu1jWZHfyeMaQmdiOMW+QBrFs 0N8wVHNheZRDWe9moK9YBmVcSWF392VzyVW1x0+up7782eviWiTcyJcQ7F9EPfOMbYRp VQXWJ7/inl3jEeM4hgBNGowtlhIv1AStK8nO+/SXc2NPveeJ3xYquvgvy9SDPwHXH6LR lTrLe/RpwQP8lo8gZVvsNbGakUveY6TUXIk4lEPqj42RvcU1V8UrVAmU1K3bwHTYS9Rs Ceuw== X-Gm-Message-State: AOJu0YxJ32h3H+Ck3inyxvq8Hqr9uNEs0i5ee9bTJnlWfeGfDihl0ph1 xHZVJoX3I9AtKHCmLv6C7GT9tJjPQWgHpI4mPRCP7olsyJw= X-Google-Smtp-Source: AGHT+IE9EDQbYuLfIAnX11wqUX8uTr3bgeK5vrSv9hXlAsvpPQZlEmCyiFoA8ap2lvTEQIDhezRcegcWE0pkbDWzuHo= X-Received: by 2002:a05:620a:40d2:b0:781:5bfd:5a1b with SMTP id g18-20020a05620a40d200b007815bfd5a1bmr2636827qko.49.1704603547618; Sat, 06 Jan 2024 20:59:07 -0800 (PST) List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org MIME-Version: 1.0 References: <3777q187-4r2q-52s1-1675-8516pnsp5qrq@SerrOFQ.bet> In-Reply-To: <3777q187-4r2q-52s1-1675-8516pnsp5qrq@SerrOFQ.bet> From: Kevin Oberman Date: Sat, 6 Jan 2024 20:58:51 -0800 Message-ID: Subject: Re: Interaction between iwlwifi and drm-515-kmod lkpi? To: "Bjoern A. Zeeb" Cc: FreeBSD Wireless Content-Type: multipart/alternative; boundary="000000000000f0531b060e53f093" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.69 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.994]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FORGED_SENDER(0.30)[rkoberman@gmail.com,kob6558@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MLMMJ_DEST(0.00)[freebsd-wireless@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[rkoberman@gmail.com,kob6558@gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72d:from] X-Rspamd-Queue-Id: 4T74jT0VWnz51S1 --000000000000f0531b060e53f093 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 3, 2024 at 3:47=E2=80=AFAM Bjoern A. Zeeb wrot= e: > On Sat, 30 Dec 2023, Kevin Oberman wrote: > > > On Fri, Dec 22, 2023 at 9:33=E2=80=AFPM Kevin Oberman > wrote: > > > >> After the ssh vulnerability was announced, I updated my kernel. After > >> completing the upgrade, it crashed when the system was booted. All sta= ck > >> dumps showed lots of drm points on hte stack. So, I tried removing the > >> i915kms from the kld_list in rc.conf. The system booted and started th= e > >> wifi without crashing. When I loaded i915kms manually, the system froz= e. > >> > >> I still am wondering if there is some collision in the lkpi when the d= rm > >> driver on Alder Lake is present and the wifi starts. While I failed to > get > >> much saved during the multiple reboots, all showed the crash after > >> wpa_supplcant started. > >> > >> Is this remotely possible or just a coincidence? > >> > >> I have rolled my system back to 06c083f79dd7 (Dec. 2) just to get it > >> running with both graphics and wifi. > >> > > > > I have now booted several times with no graphics kmod loaded (i915kms). > > There have been no failures or panics while booting. One system freeze > when > > loading i915kms. No state messages at all. > > iwlwifi0: WRT: Invalid buffer destination > > iwlwifi0: WFPM_UMAC_PD_NOTIFICATION: 0x20 > > iwlwifi0: WFPM_LMAC2_PD_NOTIFICATION: 0x1f > > iwlwifi0: WFPM_AUTH_KEY_0: 0x90 > > iwlwifi0: CNVI_SCU_SEQ_DATA_DW9: 0x0 > > iwlwifi0: RFIm is deactivated, reason =3D 4 > > wlan0: Ethernet address: 70:a8:d3:df:3c:de > > Created wlan(4) interfaces: wlan0. > > lo0: link state changed to UP > > Starting wpa_supplicant. > > Starting dhclient. > > wlan0: no link .... > > wlan0: link state changed to UP > > got link > > DHCPREQUEST on wlan0 to 255.255.255.255 port 67 > > DHCPACK from 192.168.1.1 > > unknown dhcp option value 0x7d > > bound to 192.168.1.5 -- renewal in 7200 seconds. > > Starting Network: lo0 em0 wlan0. > > > > I should also mention that, when I manually load i915kms, I do see many > > WITNESS reports. Do we still keep a list of known ones? > > > have you at any time tried the other way round: > > load drm-kmod on boot and and NO wireless (possibly blocklist it) and > then try to manually load wireless? > > > While an interaction in LinuxKPI would mean some resources are not > properly save per device most likely (or we get the wrong one), loading > drm-kmod as well probably also changes timing which means you could hit > the net80211/LinuxKPI co-bugs which are triggered by two specifics in > net80211 and then cause assertions in LinuxKPI code (it seems I have > much improvement in a development branch but am still on it after the > New Year to clean things up and track secondary effects of the change). > > /bz > > -- > Bjoern A. Zeeb r15:7 It's taken me a while to get there, but I have done testing. I have now booted three times with the kernel module not loaded. All three were clean, though I did see a bit more verbiage when I loaded it manually. i915kms was loaded via rc.conf. i915kms loaded and worked correctly. I then loaded if_iwlwifi and then started netif and local_unbound. No errors as far as I could tell. Everything works. Here is hte outout of loading and starting: ntel(R) Wireless WiFi based driver for FreeBSD iwlwifi0: mem 0x603d1cc000-0x603d1cffff at device 20.3 on pci0 iwlwifi0: Detected crf-id 0x400410, cnv-id 0x80400 wfpm id 0x80000020 iwlwifi0: PCI dev 51f0/0090, rev=3D0x370, rfid=3D0x2010d000 iwlwifi0: successfully loaded firmware image 'iwlwifi-so-a0-gf-a0-83.ucode' iwlwifi0: api flags index 2 larger than supported by driver iwlwifi0: TLV_FW_FSEQ_VERSION: FSEQ Version: 0.0.2.41 iwlwifi0: loaded firmware version 83.e8f84e98.0 so-a0-gf-a0-83.ucode op_mode iwlmvm iwlwifi0: Detected Intel(R) Wi-Fi 6E AX211 160MHz, REV=3D0x370 iwlwifi0: WRT: Invalid buffer destination Jan 6 20:16:33 ptavv wpa_supplicant[2083]: wlan0: Failed to initialize driver interface iwlwifi0: WFPM_UMAC_PD_NOTIFICATION: 0x20 iwlwifi0: WFPM_LMAC2_PD_NOTIFICATION: 0x1f iwlwifi0: WFPM_AUTH_KEY_0: 0x90 iwlwifi0: CNVI_SCU_SEQ_DATA_DW9: 0x0 iwlwifi0: RFIm is deactivated, reason =3D 4 iwlwifi0: successfully loaded firmware image 'iwlwifi-so-a0-gf-a0.pnvm' iwlwifi0: loaded PNVM version 181407b3 Jan 6 20:16:33 ptavv dhclient[2104]: wlan0: not found Jan 6 20:16:33 ptavv dhclient[2104]: exiting. iwlwifi0: Detected RF GF, rfid=3D0x2010d000 iwlwifi0: base HW address: 70:a8:d3:df:3c:de iwlwifi0: WRT: Invalid buffer destination iwlwifi0: WFPM_UMAC_PD_NOTIFICATION: 0x20 iwlwifi0: WFPM_LMAC2_PD_NOTIFICATION: 0x1f iwlwifi0: WFPM_AUTH_KEY_0: 0x90 iwlwifi0: CNVI_SCU_SEQ_DATA_DW9: 0x0 iwlwifi0: RFIm is deactivated, reason =3D 4 wlan0: Ethernet address: 70:a8:d3:df:3c:de Jan 6 20:17:03 ptavv wpa_supplicant[2187]: ioctl[SIOCS80211, op=3D20, val= =3D0, arg_len=3D7]: Invalid argument wlan0: link state changed to UP Let me know if I can look at anything else. --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --000000000000f0531b060e53f093 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Jan 3, 2024 at 3:47=E2= =80=AFAM Bjoern A. Zeeb <bz@freebsd.or= g> wrote:
On Sat, 30 Dec 2023, Kevin Oberman wrote:

> On Fri, Dec 22, 2023 at 9:33=E2=80=AFPM Kevin Oberman <rkoberman@gmail.com> wr= ote:
>
>> After the ssh vulnerability was announced, I updated my kernel. Af= ter
>> completing the upgrade, it crashed when the system was booted. All= stack
>> dumps showed lots of drm points on hte stack. So, I tried removing= the
>> i915kms from the kld_list in rc.conf. The system booted and starte= d the
>> wifi without crashing. When I loaded i915kms manually, the system = froze.
>>
>> I still am wondering if there is some collision in the lkpi when t= he drm
>> driver on Alder Lake is present and the wifi starts. While I faile= d to get
>> much saved during the multiple reboots, all showed the crash after=
>> wpa_supplcant started.
>>
>> Is this remotely possible or just a coincidence?
>>
>> I have rolled my system back to 06c083f79dd7 (Dec. 2) just to get = it
>> running with both graphics and wifi.
>>
>
> I have now booted several times with no graphics kmod loaded (i915kms)= .
> There have been no failures or panics while booting. One system freeze= when
> loading i915kms. No state messages at all.
> iwlwifi0: WRT: Invalid buffer destination
> iwlwifi0: WFPM_UMAC_PD_NOTIFICATION: 0x20
> iwlwifi0: WFPM_LMAC2_PD_NOTIFICATION: 0x1f
> iwlwifi0: WFPM_AUTH_KEY_0: 0x90
> iwlwifi0: CNVI_SCU_SEQ_DATA_DW9: 0x0
> iwlwifi0: RFIm is deactivated, reason =3D 4
> wlan0: Ethernet address: 70:a8:d3:df:3c:de
> Created wlan(4) interfaces: wlan0.
> lo0: link state changed to UP
> Starting wpa_supplicant.
> Starting dhclient.
> wlan0: no link ....
> wlan0: link state changed to UP
> got link
> DHCPREQUEST on wlan0 to 255.255.255.255 port 67
> DHCPACK from 192.168.1.1
> unknown dhcp option value 0x7d
> bound to 192.168.1.5 -- renewal in 7200 seconds.
> Starting Network: lo0 em0 wlan0.
>
> I should also mention that, when I manually load i915kms, I do see man= y
> WITNESS reports. Do we still keep a list of known ones?


have you at any time tried the other way round:

load drm-kmod on boot and and NO wireless (possibly blocklist it) and
then try to manually load wireless?


While an interaction in LinuxKPI would mean some resources are not
properly save per device most likely (or we get the wrong one), loading
drm-kmod as well probably also changes timing which means you could hit
the net80211/LinuxKPI co-bugs which are triggered by two specifics in
net80211 and then cause assertions in LinuxKPI code (it seems I have
much improvement in a development branch but am still on it after the
New Year to clean things up and track secondary effects of the change).

/bz

--
Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7

It's taken me a while to get there, but= I have done testing. I have now booted three times with the kernel module = not loaded. All three were clean, though I did see a bit more verbiage when= I loaded it manually. i915kms was loaded via rc.conf. i915kms loaded and w= orked correctly. I then loaded if_iwlwifi and then started netif and local_= unbound. No errors as far as I could tell. Everything works. Here is hte ou= tout of loading and starting:
ntel(R) Wireless WiFi based driver for F= reeBSD
iwlwifi0: <iwlwifi> mem 0x603d1cc000-0x603d1cffff at device= 20.3 on pci0
iwlwifi0: Detected crf-id 0x400410, cnv-id 0x80400 wfpm id= 0x80000020
iwlwifi0: PCI dev 51f0/0090, rev=3D0x370, rfid=3D0x2010d000<= br>iwlwifi0: successfully loaded firmware image 'iwlwifi-so-a0-gf-a0-83= .ucode'
iwlwifi0: api flags index 2 larger than supported by driver<= br>iwlwifi0: TLV_FW_FSEQ_VERSION: FSEQ Version: 0.0.2.41
iwlwifi0: loade= d firmware version 83.e8f84e98.0 so-a0-gf-a0-83.ucode op_mode iwlmvm
iwl= wifi0: Detected Intel(R) Wi-Fi 6E AX211 160MHz, REV=3D0x370
iwlwifi0: WR= T: Invalid buffer destination
Jan =C2=A06 20:16:33 ptavv wpa_supplicant[= 2083]: wlan0: Failed to initialize driver interface
iwlwifi0: WFPM_UMAC_= PD_NOTIFICATION: 0x20
iwlwifi0: WFPM_LMAC2_PD_NOTIFICATION: 0x1f
iwlw= ifi0: WFPM_AUTH_KEY_0: 0x90
iwlwifi0: CNVI_SCU_SEQ_DATA_DW9: 0x0
iwlw= ifi0: RFIm is deactivated, reason =3D 4
iwlwifi0: successfully loaded fi= rmware image 'iwlwifi-so-a0-gf-a0.pnvm'
iwlwifi0: loaded PNVM ve= rsion 181407b3
Jan =C2=A06 20:16:33 ptavv dhclient[2104]: wlan0: not fou= nd
Jan =C2=A06 20:16:33 ptavv dhclient[2104]: exiting.
iwlwifi0: Dete= cted RF GF, rfid=3D0x2010d000
iwlwifi0: base HW address: 70:a8:d3:df:3c:= de
iwlwifi0: WRT: Invalid buffer destination
iwlwifi0: WFPM_UMAC_PD_N= OTIFICATION: 0x20
iwlwifi0: WFPM_LMAC2_PD_NOTIFICATION: 0x1f
iwlwifi0= : WFPM_AUTH_KEY_0: 0x90
iwlwifi0: CNVI_SCU_SEQ_DATA_DW9: 0x0
iwlwifi0= : RFIm is deactivated, reason =3D 4
wlan0: Ethernet address: 70:a8:d3:df= :3c:de
Jan =C2=A06 20:17:03 ptavv wpa_supplicant[2187]: ioctl[SIOCS80211= , op=3D20, val=3D0, arg_len=3D7]: Invalid argument
wlan0: link state cha= nged to UP

Let me know if I can look at an= ything else.
--
Kevin Oberman, Par= t time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
--000000000000f0531b060e53f093--