From patchwork Thu May 5 21:52:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1627285 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KvS9P0hjWz9sG6 for ; Fri, 6 May 2022 07:52:41 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nmjOj-0003qc-67; Thu, 05 May 2022 21:52:33 +0000 Received: from mail-pl1-f170.google.com ([209.85.214.170]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nmjOh-0003qL-2U for kernel-team@lists.ubuntu.com; Thu, 05 May 2022 21:52:31 +0000 Received: by mail-pl1-f170.google.com with SMTP id x18so5620987plg.6 for ; Thu, 05 May 2022 14:52:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=c/hy4EBssNxSDB3s82/oom/p/tYDVpiDW7w2+FTYRaQ=; b=Ad588/SsB9h45aJ/abtxJUtBV+pTQOmGvT1nH1KVcYPDZQCEO0pIwy1YMGwnnghbgB w/e7wXvGcpO/H0vldEvvQgvq415GVWfevToNoTBCloL/ueMGlJCfNQJVwjH/Oll6zXdE +FpNLdBj7X5v5TxdGfiD4/bwuRgggD1lRIeDJtW6A6bZUKlL6FqxohQWUqzTEmPxKgII ZpWQdp3YE3Bn4yvKHkxCPVjIvbO4KBjDSDR8+O7vFrrqdnTFZMp5MOThUHUZ1Y5IxReg un2MA3/dhatlWDplnHtSuNx7z7RDGs/Ip7MMigFGRrY7qKGcGxnZsbR3L7jNG5VaJXRv 809A== X-Gm-Message-State: AOAM531bsDVs4WF3HUjUD9O+tUBoyMH3yCpisBYe/9Q5YssC6J55NfsM HnqDVBgQ4on1+AzhstqXAmhyL4v/sEw= X-Google-Smtp-Source: ABdhPJwLQD4WCjVc89W2T/ici2fkHKzLuK47U1TIJUwHF4V/7jwrKUzPXO65VPI4tHTcalKSicTRTA== X-Received: by 2002:a17:90a:7c4c:b0:1dc:26a1:b82f with SMTP id e12-20020a17090a7c4c00b001dc26a1b82fmr407223pjl.148.1651787548734; Thu, 05 May 2022 14:52:28 -0700 (PDT) Received: from yewun.. (114-40-220-49.dynamic-ip.hinet.net. [114.40.220.49]) by smtp.gmail.com with ESMTPSA id j8-20020aa783c8000000b0050dc762818asm1839214pfn.100.2022.05.05.14.52.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 14:52:28 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH v3 0/3][kernel-versions] build backport-iwlwifi-dkms as linux-modules-iwlwifi-ABI Date: Fri, 6 May 2022 05:52:22 +0800 Message-Id: <20220505215225.3466285-1-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.170; envelope-from=vicamo@gmail.com; helo=mail-pl1-f170.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "You-Sheng Yang (vicamo)" BugLink: https://bugs.launchpad.net/bugs/1969434 [Impact] Intel AX211 iwlwifi -64 firmware may fail to init under reboot stress, and -67 is immune. FW API -64 supported by oem-5.14, and -67 in v5.16. Not reproducible on every platform with AX211 installed, and the chances of such failures vary from one to another. [Fix] A few solutions were considered. The very first one is to ask Intel to fix -64 firmware directly, and the answer is a solid no claimed -64 is not the planned production version of AX211. It's also possible to backport FW API from v5.16, but while iwlwifi FW API is more or less a black box to us and the new FW APIs also depends on updates on the wireless stack, this is going to be very risky and actually we had regressions before after such backports. The last viable solution is to run backport-iwlwifi-dkms >= rev 8580 on the effected platforms. This means oem-5.14 and its migration target, hwe-5.15 will not be able to drive this piece of hw flawlessly without backport-iwlwifi-dkms installed. However, while we need secureboot to be enabled on these platforms, backport-iwlwifi-dkms must also be signed somehow. There are two possible method to achieve this, too. One, to prebuild this dkms as zfs and v4l2loopback does. However, while backport-iwlwifi-dkms generates kernel modules with exactly the same name as the in-tree ones, when prebuilt, they'll be available directly from the linux-modules package and therefore overrides the in-tree ones always, turning the in-tree driver completely useless and risk the stability of all other generic installations. The second one is to build backport-iwlwifi-dkms as nvidia graphic drivers in the linux-restricted-modules source package. In this way, affected platforms may install the corresponding packages when needed without interfering others. However, l-r-m is for restricted modules that needs special care of redistribution of its binaries, and backport-iwlwifi-dkms is GPL licensed. Here a similar but simpler process in the main kernel tree is re-implemented. Two additional packages, linux-modules-MODULE-PKGVER-ABINUM-FLAVOUR and its meta package linux-modules-MODULE-FLAVOUR (in linux-meta) will be created. [Test Case] Test builds: linux$ ls */*/*iwlwifi* jammy/amd64/linux-modules-iwlwifi-5.15.0-2029-generic_5.15.0-2029.30+lp1969434.3_amd64.deb oem-5.14/amd64/linux-modules-iwlwifi-5.14.0-2035-oem_5.14.0-2035.38+lp1969434.3_amd64.deb oem-5.17/amd64/linux-modules-iwlwifi-5.17.0-2004-oem_5.17.0-2004.4+lp1969434.3_amd64.deb unstable/amd64/linux-modules-iwlwifi-5.18.0-2002-generic_5.18.0-2002.2+lp1969434.3_amd64.deb meta$ ls */*iwlwifi* jammy/linux-modules-iwlwifi-generic_5.15.0.29.32+lp1969434.3_amd64.deb jammy/linux-modules-iwlwifi-generic-hwe-22.04_5.15.0.29.32+lp1969434.3_amd64.deb jammy/linux-modules-iwlwifi-generic-hwe-22.04-edge_5.15.0.29.32+lp1969434.3_amd64.deb jammy/linux-modules-iwlwifi-virtual_5.15.0.29.32+lp1969434.3_amd64.deb jammy/linux-modules-iwlwifi-virtual-hwe-22.04_5.15.0.29.32+lp1969434.3_amd64.deb jammy/linux-modules-iwlwifi-virtual-hwe-22.04-edge_5.15.0.29.32+lp1969434.3_amd64.deb oem-5.14/linux-modules-iwlwifi-oem-20.04_5.14.0.1035.32+lp1969434.3_amd64.deb oem-5.14/linux-modules-iwlwifi-oem-20.04d_5.14.0.1035.32+lp1969434.3_amd64.deb oem-5.17/linux-modules-iwlwifi-oem-22.04_5.17.0.1004.4+lp1969434.3_amd64.deb oem-5.17/linux-modules-iwlwifi-oem-22.04a_5.17.0.1004.4+lp1969434.3_amd64.deb unstable/linux-modules-iwlwifi-generic-wip_5.18.0.2.10+lp1969434.3_amd64.deb unstable/linux-modules-iwlwifi-virtual-wip_5.18.0.2.10+lp1969434.3_amd64.deb [Where problems could occur] Different from nvidia packages built from l-r-m, the generated package names do not carry an additional short version string, e.g. nvidia-410, as there is no such necessity to build multiple versions of iwlwifi. The modules are installed to /lib/modules//ubuntu/iwlwifi, not iwlwifi-9858/. V3: * move meta pacakge generation to linux-meta, and update kernel-versions according to the versions required. * allow %package%, %version%, %module% in debpath parameter, so that no additional work introduced in kernel-versions update-dkms-versions script. Also handle version epoch. * bump versions for unstable only due to build breaks against v5.18-rcX. * fix dkms_exclude/dkms_include. * introduction type= parameter with currently 2 possible values, standalone and built-in (default). * use "any" instead of "__all__" for module architectures. * introduce dkms_foo_subdir that is used to install built-in modules in kernel/ and standalone ones in ubuntu/. * and since dkms-versions of oem-5.14 is tracking that of impish, dkms-versions/impish:main is updated with additional parameters. V2: * extend debian/dkms-versions to carry all the module specific parameters. Also rewrite debian/scripts/control-create a bit to lookup module name automatically. * add arch=foo in debian/dkms-versions. This also removes do_ settings in $DEBIAN/rules.d/.mk. Their initial values will be assigned automatically if not already specified. * add rprovides=foo in debian/dkms-versions. * support dkms_include and dkms_exclude settings. When enlisted, a specified module will become available to the current arch if not explicitly excluded again in dkms_exclude. * rewrite those do__disable as well. * indentation and white spaces. * fix build failure when multiple standalone modules are involved. * bump backport-iwlwifi-dkms version. * remove do_standalone_dkms from V1 as we don't need it. You-Sheng Yang (vicamo) (3): dkms-versions/kinetic:main:zfs-linux: updated from 2.1.4-0ubuntu0.1 to 2.1.4-0ubuntu1 dkms-versions/kinetic:main:v4l2loopback: updated from 0.12.5-1ubuntu5 to 0.12.5-1ubuntu6 dkms-versions/*:main: support standalone dkms module builds dkms-versions/impish:main | 5 +++-- dkms-versions/jammy:main | 5 +++-- dkms-versions/kinetic:main | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-)