From c9a2f2f4f67adcf5b84e5b1cf1b8ea4500e69c92 Mon Sep 17 00:00:00 2001 From: David P Date: Fri, 20 May 2022 04:29:41 -0400 Subject: updpkg: libre/linux-libre-lts 5.15.41-1 Signed-off-by: David P --- ...ctl-and-CONFIG-to-disallow-unprivileged-C.patch | 30 +- ...IDIA_controllers_to_the_MSI_masking_quirk.patch | 21 + ...ep_dma-unmapping_to_avoid_kernel-flooding.patch | 85 ++ ...x_bdaddress_comparison_with_garbage_value.patch | 57 ++ .../0005-lg-laptop_Recognize_more_models.patch | 36 + .../0006_fix_NFSv4_mount_regression.diff | 243 +++++ libre/linux-libre-lts/PKGBUILD | 66 +- libre/linux-libre-lts/config.armv7h | 1001 +++++++++++------- libre/linux-libre-lts/config.i686 | 1064 ++++++++++++------- libre/linux-libre-lts/config.x86_64 | 1082 +++++++++++++------- 10 files changed, 2581 insertions(+), 1104 deletions(-) create mode 100644 libre/linux-libre-lts/0002-PCI_Add_more_NVIDIA_controllers_to_the_MSI_masking_quirk.patch create mode 100644 libre/linux-libre-lts/0003-iommu_intel_do_deep_dma-unmapping_to_avoid_kernel-flooding.patch create mode 100644 libre/linux-libre-lts/0004-Bluetooth_btintel_Fix_bdaddress_comparison_with_garbage_value.patch create mode 100644 libre/linux-libre-lts/0005-lg-laptop_Recognize_more_models.patch create mode 100644 libre/linux-libre-lts/0006_fix_NFSv4_mount_regression.diff (limited to 'libre') diff --git a/libre/linux-libre-lts/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/libre/linux-libre-lts/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch index 5e275b0c8..ddfbd03b0 100644 --- a/libre/linux-libre-lts/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ b/libre/linux-libre-lts/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -1,4 +1,4 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From 0948f6ce6d898c598f8fe88240954e578fdc8387 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Mon, 16 Sep 2019 04:53:20 +0200 Subject: [PATCH] ZEN: Add sysctl and CONFIG to disallow unprivileged @@ -14,10 +14,10 @@ Our default behavior continues to match the vanilla kernel. 5 files changed, 53 insertions(+) diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h -index 7616c7bf4b24..bdbfcfe5df1e 100644 +index 33a4240e6a6f1..82213f9c4c17f 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h -@@ -109,6 +109,8 @@ void dec_ucount(struct ucounts *ucounts, enum ucount_type type); +@@ -139,6 +139,8 @@ static inline void set_rlimit_ucount_max(struct user_namespace *ns, #ifdef CONFIG_USER_NS @@ -26,7 +26,7 @@ index 7616c7bf4b24..bdbfcfe5df1e 100644 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) { if (ns) -@@ -142,6 +144,8 @@ extern bool current_in_userns(const struct user_namespace *target_ns); +@@ -172,6 +174,8 @@ extern bool current_in_userns(const struct user_namespace *target_ns); struct ns_common *ns_get_owner(struct ns_common *ns); #else @@ -36,10 +36,10 @@ index 7616c7bf4b24..bdbfcfe5df1e 100644 { return &init_user_ns; diff --git a/init/Kconfig b/init/Kconfig -index fc4c9f416fad..3707cc8b4d7b 100644 +index 11f8a845f259d..02b7a0e455a5d 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1172,6 +1172,22 @@ config USER_NS +@@ -1226,6 +1226,22 @@ config USER_NS If unsure, say N. @@ -63,12 +63,12 @@ index fc4c9f416fad..3707cc8b4d7b 100644 bool "PID Namespaces" default y diff --git a/kernel/fork.c b/kernel/fork.c -index 7c044d377926..3c70b2fe5946 100644 +index 10885c649ca42..e0fe98e1afbdb 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -97,6 +97,10 @@ - #include +@@ -98,6 +98,10 @@ #include + #include +#ifdef CONFIG_USER_NS +#include @@ -77,7 +77,7 @@ index 7c044d377926..3c70b2fe5946 100644 #include #include #include -@@ -1871,6 +1875,10 @@ static __latent_entropy struct task_struct *copy_process( +@@ -1950,6 +1954,10 @@ static __latent_entropy struct task_struct *copy_process( if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) return ERR_PTR(-EINVAL); @@ -88,7 +88,7 @@ index 7c044d377926..3c70b2fe5946 100644 /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. -@@ -2936,6 +2944,12 @@ int ksys_unshare(unsigned long unshare_flags) +@@ -3056,6 +3064,12 @@ int ksys_unshare(unsigned long unshare_flags) if (unshare_flags & CLONE_NEWNS) unshare_flags |= CLONE_FS; @@ -102,10 +102,10 @@ index 7c044d377926..3c70b2fe5946 100644 if (err) goto bad_unshare_out; diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index b9306d2bb426..891b250db88e 100644 +index 083be6af29d70..42aa3c7835b96 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c -@@ -103,6 +103,9 @@ +@@ -105,6 +105,9 @@ #ifdef CONFIG_LOCKUP_DETECTOR #include #endif @@ -115,7 +115,7 @@ index b9306d2bb426..891b250db88e 100644 #if defined(CONFIG_SYSCTL) -@@ -1902,6 +1905,15 @@ static struct ctl_table kern_table[] = { +@@ -1949,6 +1952,15 @@ static struct ctl_table kern_table[] = { .proc_handler = proc_dointvec, }, #endif @@ -132,7 +132,7 @@ index b9306d2bb426..891b250db88e 100644 { .procname = "tainted", diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c -index ce396ea4de60..c3a6ef1f10ed 100644 +index 6b2e3ca7ee993..0253002184f1d 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -21,6 +21,13 @@ diff --git a/libre/linux-libre-lts/0002-PCI_Add_more_NVIDIA_controllers_to_the_MSI_masking_quirk.patch b/libre/linux-libre-lts/0002-PCI_Add_more_NVIDIA_controllers_to_the_MSI_masking_quirk.patch new file mode 100644 index 000000000..fa304d649 --- /dev/null +++ b/libre/linux-libre-lts/0002-PCI_Add_more_NVIDIA_controllers_to_the_MSI_masking_quirk.patch @@ -0,0 +1,21 @@ +From 0bb6e4f104167b1e283269b46f3bbd30b2d979a7 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Thu, 18 Nov 2021 22:53:31 +0100 +Subject: [PATCH] PCI: Add more NVIDIA controllers to the MSI masking quirk + +For: https://bugs.archlinux.org/task/72734 +For: https://bugs.archlinux.org/task/72777 +--- + drivers/pci/quirks.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 208fa03acdda0..7fdb7e9c2e12c 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -5802,3 +5802,5 @@ static void nvidia_ion_ahci_fixup(struct pci_dev *pdev) + pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING; + } + DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab9, nvidia_ion_ahci_fixup); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0d88, nvidia_ion_ahci_fixup); diff --git a/libre/linux-libre-lts/0003-iommu_intel_do_deep_dma-unmapping_to_avoid_kernel-flooding.patch b/libre/linux-libre-lts/0003-iommu_intel_do_deep_dma-unmapping_to_avoid_kernel-flooding.patch new file mode 100644 index 000000000..13aa5a09c --- /dev/null +++ b/libre/linux-libre-lts/0003-iommu_intel_do_deep_dma-unmapping_to_avoid_kernel-flooding.patch @@ -0,0 +1,85 @@ +From 32803dc7c2ffc29db15a46034d818f6e6c5775ef Mon Sep 17 00:00:00 2001 +From: Ajay Garg +Date: Tue, 12 Oct 2021 19:26:53 +0530 +Subject: [PATCH] iommu: intel: do deep dma-unmapping, to avoid + kernel-flooding. + +Origins at : +https://lists.linuxfoundation.org/pipermail/iommu/2021-October/thread.html + +=== Changes from v1 => v2 === + +a) +Improved patch-description. + +b) +A more root-level fix, as suggested by + + 1. + Alex Williamson + + 2. + Lu Baolu + +=== Issue === + +Kernel-flooding is seen, when an x86_64 L1 guest (Ubuntu-21) is booted in qemu/kvm +on a x86_64 host (Ubuntu-21), with a host-pci-device attached. + +Following kind of logs, along with the stacktraces, cause the flood : + +...... + DMAR: ERROR: DMA PTE for vPFN 0x428ec already set (to 3f6ec003 not 3f6ec003) + DMAR: ERROR: DMA PTE for vPFN 0x428ed already set (to 3f6ed003 not 3f6ed003) + DMAR: ERROR: DMA PTE for vPFN 0x428ee already set (to 3f6ee003 not 3f6ee003) + DMAR: ERROR: DMA PTE for vPFN 0x428ef already set (to 3f6ef003 not 3f6ef003) + DMAR: ERROR: DMA PTE for vPFN 0x428f0 already set (to 3f6f0003 not 3f6f0003) +...... + +=== Current Behaviour, leading to the issue === + +Currently, when we do a dma-unmapping, we unmap/unlink the mappings, but +the pte-entries are not cleared. + +Thus, following sequencing would flood the kernel-logs : + +i) +A dma-unmapping makes the real/leaf-level pte-slot invalid, but the +pte-content itself is not cleared. + +ii) +Now, during some later dma-mapping procedure, as the pte-slot is about +to hold a new pte-value, the intel-iommu checks if a prior +pte-entry exists in the pte-slot. If it exists, it logs a kernel-error, +along with a corresponding stacktrace. + +iii) +Step ii) runs in abundance, and the kernel-logs run insane. + +=== Fix === + +We ensure that as part of a dma-unmapping, each (unmapped) pte-slot +is also cleared of its value/content (at the leaf-level, where the +real mapping from a iova => pfn mapping is stored). + +This completes a "deep" dma-unmapping. + +Signed-off-by: Ajay Garg +Link: https://lore.kernel.org/linux-iommu/20211012135653.3852-1-ajaygargnsit@gmail.com/ +--- + drivers/iommu/intel/iommu.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c +index 78f8c8e6803e9..d8da48a91ba3b 100644 +--- a/drivers/iommu/intel/iommu.c ++++ b/drivers/iommu/intel/iommu.c +@@ -5092,6 +5092,8 @@ static size_t intel_iommu_unmap(struct iommu_domain *domain, + gather->freelist = domain_unmap(dmar_domain, start_pfn, + last_pfn, gather->freelist); + ++ dma_pte_clear_range(dmar_domain, start_pfn, last_pfn); ++ + if (dmar_domain->max_addr == iova + size) + dmar_domain->max_addr = iova; + diff --git a/libre/linux-libre-lts/0004-Bluetooth_btintel_Fix_bdaddress_comparison_with_garbage_value.patch b/libre/linux-libre-lts/0004-Bluetooth_btintel_Fix_bdaddress_comparison_with_garbage_value.patch new file mode 100644 index 000000000..3697425a2 --- /dev/null +++ b/libre/linux-libre-lts/0004-Bluetooth_btintel_Fix_bdaddress_comparison_with_garbage_value.patch @@ -0,0 +1,57 @@ +From a6d4fb4f5e7fe795d9e3b28b261a0f86f1026d03 Mon Sep 17 00:00:00 2001 +From: Kiran K +Date: Wed, 13 Oct 2021 13:35:11 +0530 +Subject: [PATCH] Bluetooth: btintel: Fix bdaddress comparison with garbage + value + +Intel Read Verision(TLV) data is parsed into a local structure variable +and it contains a field for bd address. Bd address is returned only in +bootloader mode and hence bd address in TLV structure needs to be validated +only if controller is present in boot loader mode. + +Signed-off-by: Kiran K +Reviewed-by: Tedd Ho-Jeong An +--- + drivers/bluetooth/btintel.c | 22 ++++++++++++++-------- + 1 file changed, 14 insertions(+), 8 deletions(-) + +diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c +index f1705b46fc889..b9055a3e61ed7 100644 +--- a/drivers/bluetooth/btintel.c ++++ b/drivers/bluetooth/btintel.c +@@ -2006,14 +2006,16 @@ static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev, + if (ver->img_type == 0x03) { + btintel_clear_flag(hdev, INTEL_BOOTLOADER); + btintel_check_bdaddr(hdev); +- } +- +- /* If the OTP has no valid Bluetooth device address, then there will +- * also be no valid address for the operational firmware. +- */ +- if (!bacmp(&ver->otp_bd_addr, BDADDR_ANY)) { +- bt_dev_info(hdev, "No device address configured"); +- set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks); ++ } else { ++ /* ++ * Check for valid bd address in boot loader mode. Device ++ * will be marked as unconfigured if empty bd address is ++ * found. ++ */ ++ if (!bacmp(&ver->otp_bd_addr, BDADDR_ANY)) { ++ bt_dev_info(hdev, "No device address configured"); ++ set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks); ++ } + } + + btintel_get_fw_name_tlv(ver, fwname, sizeof(fwname), "sfi"); +@@ -2303,6 +2305,10 @@ static int btintel_setup_combined(struct hci_dev *hdev) + goto exit_error; + } + ++ /* memset ver_tlv to start with clean state as few fields are exclusive ++ * to bootloader mode and are not populated in operational mode ++ */ ++ memset(&ver_tlv, 0, sizeof(ver_tlv)); + /* For TLV type device, parse the tlv data */ + err = btintel_parse_version_tlv(hdev, &ver_tlv, skb); + if (err) { diff --git a/libre/linux-libre-lts/0005-lg-laptop_Recognize_more_models.patch b/libre/linux-libre-lts/0005-lg-laptop_Recognize_more_models.patch new file mode 100644 index 000000000..903108550 --- /dev/null +++ b/libre/linux-libre-lts/0005-lg-laptop_Recognize_more_models.patch @@ -0,0 +1,36 @@ +From 72edf8c167268bb68d701f46006ccfdfa5490db8 Mon Sep 17 00:00:00 2001 +From: Matan Ziv-Av +Date: Tue, 23 Nov 2021 22:14:55 +0200 +Subject: [PATCH] lg-laptop: Recognize more models + +LG uses 5 instead of 0 in the third digit (second digit after 2019) of the year string to indicate newer models in the same year. Handle this case as well. + +Signed-off-by: Matan Ziv-Av +For: https://bugs.archlinux.org/task/71772 +--- + drivers/platform/x86/lg-laptop.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c +index 88b551caeaaf4..d6f74d3a7605e 100644 +--- a/drivers/platform/x86/lg-laptop.c ++++ b/drivers/platform/x86/lg-laptop.c +@@ -658,6 +658,18 @@ static int acpi_add(struct acpi_device *device) + if (product && strlen(product) > 4) + switch (product[4]) { + case '5': ++ if (strlen(product) > 5) ++ switch (product[5]) { ++ case 'N': ++ year = 2021; ++ break; ++ case '0': ++ year = 2016; ++ break; ++ default: ++ year = 2022; ++ } ++ break; + case '6': + year = 2016; + break; diff --git a/libre/linux-libre-lts/0006_fix_NFSv4_mount_regression.diff b/libre/linux-libre-lts/0006_fix_NFSv4_mount_regression.diff new file mode 100644 index 000000000..c2f126008 --- /dev/null +++ b/libre/linux-libre-lts/0006_fix_NFSv4_mount_regression.diff @@ -0,0 +1,243 @@ +From 6f2836341d8a39e1e000572b10959347d7e61fd9 Mon Sep 17 00:00:00 2001 +From: Olga Kornievskaia +Date: Wed, 12 Jan 2022 10:27:38 -0500 +Subject: NFSv4.1 query for fs_location attr on a new file system + +[ Upstream commit 1976b2b31462151403c9fc110204fcc2a77bdfd1 ] + +Query the server for other possible trunkable locations for a given +file system on a 4.1+ mount. + +v2: +-- added missing static to nfs4_discover_trunking, +reported by the kernel test robot + +Signed-off-by: Olga Kornievskaia +Signed-off-by: Anna Schumaker +Signed-off-by: Sasha Levin +--- + fs/nfs/client.c | 7 +++++ + fs/nfs/nfs4_fs.h | 9 +++--- + fs/nfs/nfs4proc.c | 76 ++++++++++++++++++++++++++++++++++++++++++------- + fs/nfs/nfs4state.c | 3 +- + include/linux/nfs_xdr.h | 1 + + 5 files changed, 81 insertions(+), 15 deletions(-) + +diff --git a/fs/nfs/client.c b/fs/nfs/client.c +index 551833862171f..090b16890e3d6 100644 +--- a/fs/nfs/client.c ++++ b/fs/nfs/client.c +@@ -860,6 +860,13 @@ int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, struct nfs + server->namelen = pathinfo.max_namelen; + } + ++ if (clp->rpc_ops->discover_trunking != NULL && ++ (server->caps & NFS_CAP_FS_LOCATIONS)) { ++ error = clp->rpc_ops->discover_trunking(server, mntfh); ++ if (error < 0) ++ return error; ++ } ++ + return 0; + } + EXPORT_SYMBOL_GPL(nfs_probe_fsinfo); +diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h +index ba78df4b13d94..1a048ee653a11 100644 +--- a/fs/nfs/nfs4_fs.h ++++ b/fs/nfs/nfs4_fs.h +@@ -261,8 +261,8 @@ struct nfs4_state_maintenance_ops { + }; + + struct nfs4_mig_recovery_ops { +- int (*get_locations)(struct inode *, struct nfs4_fs_locations *, +- struct page *, const struct cred *); ++ int (*get_locations)(struct nfs_server *, struct nfs_fh *, ++ struct nfs4_fs_locations *, struct page *, const struct cred *); + int (*fsid_present)(struct inode *, const struct cred *); + }; + +@@ -303,8 +303,9 @@ extern int nfs4_do_close(struct nfs4_state *state, gfp_t gfp_mask, int wait); + extern int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle); + extern int nfs4_proc_fs_locations(struct rpc_clnt *, struct inode *, const struct qstr *, + struct nfs4_fs_locations *, struct page *); +-extern int nfs4_proc_get_locations(struct inode *, struct nfs4_fs_locations *, +- struct page *page, const struct cred *); ++extern int nfs4_proc_get_locations(struct nfs_server *, struct nfs_fh *, ++ struct nfs4_fs_locations *, ++ struct page *page, const struct cred *); + extern int nfs4_proc_fsid_present(struct inode *, const struct cred *); + extern struct rpc_clnt *nfs4_proc_lookup_mountpoint(struct inode *, + struct dentry *, +diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c +index 367a1b99b7550..389fa72d4ca98 100644 +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -3952,6 +3952,60 @@ int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle) + return err; + } + ++static int _nfs4_discover_trunking(struct nfs_server *server, ++ struct nfs_fh *fhandle) ++{ ++ struct nfs4_fs_locations *locations = NULL; ++ struct page *page; ++ const struct cred *cred; ++ struct nfs_client *clp = server->nfs_client; ++ const struct nfs4_state_maintenance_ops *ops = ++ clp->cl_mvops->state_renewal_ops; ++ int status = -ENOMEM; ++ ++ cred = ops->get_state_renewal_cred(clp); ++ if (cred == NULL) { ++ cred = nfs4_get_clid_cred(clp); ++ if (cred == NULL) ++ return -ENOKEY; ++ } ++ ++ page = alloc_page(GFP_KERNEL); ++ locations = kmalloc(sizeof(struct nfs4_fs_locations), GFP_KERNEL); ++ if (page == NULL || locations == NULL) ++ goto out; ++ ++ status = nfs4_proc_get_locations(server, fhandle, locations, page, ++ cred); ++ if (status) ++ goto out; ++out: ++ if (page) ++ __free_page(page); ++ kfree(locations); ++ return status; ++} ++ ++static int nfs4_discover_trunking(struct nfs_server *server, ++ struct nfs_fh *fhandle) ++{ ++ struct nfs4_exception exception = { ++ .interruptible = true, ++ }; ++ struct nfs_client *clp = server->nfs_client; ++ int err = 0; ++ ++ if (!nfs4_has_session(clp)) ++ goto out; ++ do { ++ err = nfs4_handle_exception(server, ++ _nfs4_discover_trunking(server, fhandle), ++ &exception); ++ } while (exception.retry); ++out: ++ return err; ++} ++ + static int _nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, + struct nfs_fsinfo *info) + { +@@ -7886,18 +7940,18 @@ int nfs4_proc_fs_locations(struct rpc_clnt *client, struct inode *dir, + * appended to this compound to identify the client ID which is + * performing recovery. + */ +-static int _nfs40_proc_get_locations(struct inode *inode, ++static int _nfs40_proc_get_locations(struct nfs_server *server, ++ struct nfs_fh *fhandle, + struct nfs4_fs_locations *locations, + struct page *page, const struct cred *cred) + { +- struct nfs_server *server = NFS_SERVER(inode); + struct rpc_clnt *clnt = server->client; + u32 bitmask[2] = { + [0] = FATTR4_WORD0_FSID | FATTR4_WORD0_FS_LOCATIONS, + }; + struct nfs4_fs_locations_arg args = { + .clientid = server->nfs_client->cl_clientid, +- .fh = NFS_FH(inode), ++ .fh = fhandle, + .page = page, + .bitmask = bitmask, + .migration = 1, /* skip LOOKUP */ +@@ -7943,17 +7997,17 @@ static int _nfs40_proc_get_locations(struct inode *inode, + * When the client supports GETATTR(fs_locations_info), it can + * be plumbed in here. + */ +-static int _nfs41_proc_get_locations(struct inode *inode, ++static int _nfs41_proc_get_locations(struct nfs_server *server, ++ struct nfs_fh *fhandle, + struct nfs4_fs_locations *locations, + struct page *page, const struct cred *cred) + { +- struct nfs_server *server = NFS_SERVER(inode); + struct rpc_clnt *clnt = server->client; + u32 bitmask[2] = { + [0] = FATTR4_WORD0_FSID | FATTR4_WORD0_FS_LOCATIONS, + }; + struct nfs4_fs_locations_arg args = { +- .fh = NFS_FH(inode), ++ .fh = fhandle, + .page = page, + .bitmask = bitmask, + .migration = 1, /* skip LOOKUP */ +@@ -8002,11 +8056,11 @@ static int _nfs41_proc_get_locations(struct inode *inode, + * -NFS4ERR_LEASE_MOVED is returned if the server still has leases + * from this client that require migration recovery. + */ +-int nfs4_proc_get_locations(struct inode *inode, ++int nfs4_proc_get_locations(struct nfs_server *server, ++ struct nfs_fh *fhandle, + struct nfs4_fs_locations *locations, + struct page *page, const struct cred *cred) + { +- struct nfs_server *server = NFS_SERVER(inode); + struct nfs_client *clp = server->nfs_client; + const struct nfs4_mig_recovery_ops *ops = + clp->cl_mvops->mig_recovery_ops; +@@ -8019,10 +8073,11 @@ int nfs4_proc_get_locations(struct inode *inode, + (unsigned long long)server->fsid.major, + (unsigned long long)server->fsid.minor, + clp->cl_hostname); +- nfs_display_fhandle(NFS_FH(inode), __func__); ++ nfs_display_fhandle(fhandle, __func__); + + do { +- status = ops->get_locations(inode, locations, page, cred); ++ status = ops->get_locations(server, fhandle, locations, page, ++ cred); + if (status != -NFS4ERR_DELAY) + break; + nfs4_handle_exception(server, status, &exception); +@@ -10516,6 +10571,7 @@ const struct nfs_rpc_ops nfs_v4_clientops = { + .free_client = nfs4_free_client, + .create_server = nfs4_create_server, + .clone_server = nfs_clone_server, ++ .discover_trunking = nfs4_discover_trunking, + }; + + static const struct xattr_handler nfs4_xattr_nfs4_acl_handler = { +diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c +index acc1cd3e63a48..51f5cb41e87a4 100644 +--- a/fs/nfs/nfs4state.c ++++ b/fs/nfs/nfs4state.c +@@ -2097,7 +2097,8 @@ static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred + } + + inode = d_inode(server->super->s_root); +- result = nfs4_proc_get_locations(inode, locations, page, cred); ++ result = nfs4_proc_get_locations(server, NFS_FH(inode), locations, ++ page, cred); + if (result) { + dprintk("<-- %s: failed to retrieve fs_locations: %d\n", + __func__, result); +diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h +index e9698b6278a52..ecd74cc347974 100644 +--- a/include/linux/nfs_xdr.h ++++ b/include/linux/nfs_xdr.h +@@ -1805,6 +1805,7 @@ struct nfs_rpc_ops { + struct nfs_server *(*create_server)(struct fs_context *); + struct nfs_server *(*clone_server)(struct nfs_server *, struct nfs_fh *, + struct nfs_fattr *, rpc_authflavor_t); ++ int (*discover_trunking)(struct nfs_server *, struct nfs_fh *); + }; + + /* +-- +cgit + diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD index f01cff8ba..ef9cba727 100644 --- a/libre/linux-libre-lts/PKGBUILD +++ b/libre/linux-libre-lts/PKGBUILD @@ -9,30 +9,28 @@ # Based on linux-lts package -# NOTE: Don't build htmldocs due to an error in sphinx (armv7h only) - _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre-lts -pkgver=5.10.89 +pkgver=5.15.41 pkgrel=1 pkgdesc='LTS Linux-libre' -rcnver=5.10.83 -rcnrel=armv7-x58 +rcnver=5.15.32 +rcnrel=armv7-x23-parabola1 url='https://linux-libre.fsfla.org/' arch=(i686 x86_64 armv7h) license=(GPL2) makedepends=( - bc kmod libelf pahole cpio perl tar xz - xmlto python-sphinx python-sphinx_rtd_theme python-six graphviz imagemagick + bc libelf pahole cpio perl tar xz + xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra ) options=('!strip') -_srcname=linux-5.10 +_srcname=linux-5.15 source=( - "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu1/linux-libre-${_srcname##*-}-gnu1.tar.xz"{,.sign} - "https://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu1/patch-${_srcname##*-}-gnu1-$pkgver-gnu1.xz"{,.sign} + "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign} + "https://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu/patch-${_srcname##*-}-gnu-$pkgver-gnu.xz"{,.sign} "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig} config.i686 config.x86_64 config.armv7h # the main kernel config files linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk @@ -46,6 +44,11 @@ source=( 0002-fix-Atmel-maXTouch-touchscreen-support.patch # Arch Linux patches 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch + 0002-PCI_Add_more_NVIDIA_controllers_to_the_MSI_masking_quirk.patch + 0003-iommu_intel_do_deep_dma-unmapping_to_avoid_kernel-flooding.patch + 0004-Bluetooth_btintel_Fix_bdaddress_comparison_with_garbage_value.patch + 0005-lg-laptop_Recognize_more_models.patch + 0006_fix_NFSv4_mount_regression.diff ) source_i686=( # avoid using zstd compression in ultra mode (exhausts virtual memory) @@ -59,9 +62,9 @@ validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. ) -sha512sums=('4bf48611e8a217931c2347f1aa3257da5ba210f263fb35edef43e935fd3fcab5333fc884198fe6ab180cc11ed11dd48b71dff4071b85f18830a6bf9e1c2cf97f' +sha512sums=('3c586054285ea0cb4d1a1ff257757d092db80c2413dcec6e58c63b22490d42b8f2c441cee62839603599d5ad75fbd7560bf51ec6c2f3ab9354adae0c2c7234e5' 'SKIP' - 'c09d808befd38f246c8f3224fee702a389fa6456aff6b8d5ba86f55e3647e1473cba4e43f4095a6d97d98f5474dc791ce5008de58003c9419b12cee517f6cb88' + '1e3c1db11bb929aad451f471a76a9b6b2df57bf9406bc0e9c21843710cf044cd8fc69c188f828170217a59babebc11fb009be6285408c6191c7ba07bb4d99703' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' @@ -69,15 +72,20 @@ sha512sums=('4bf48611e8a217931c2347f1aa3257da5ba210f263fb35edef43e935fd3fcab5333 'SKIP' '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' 'SKIP' - '161302c378c95fe95d8c9f3aae9b673f1555068495eb50e13cec69da023276c08b603a3bec909d70ecc31631bb15ceabc8def654ca2f2b1cad883c6a74306b7d' - '58bf82d41b28741edd5170dfb42a055888834d6a4afe0372f21fc5b233baffc3b0f83fdd44e2b80b900eda87ac89d7703f6a9af7460481f9c947df6d19602907' - '6012fa7b97c15ada82f0c205ea983bebac8b672ca498e22f524d219bdd8715784b24ce7d457803e8221a945c3daff95c4e467f70a420b9c2aa95d627f2d160a9' + '77c635568092ced8298b17ee03dc084ad926b2d9b29b595acacc09df887cbd1d57bff988f095b1b618dcc39e511b044d129de19a45b3b38398c5f432733b9b09' + 'f37400fd78d966e5ac698de2187f8ad1982a7916cd8cf385a27341db49900e1cb8853275a5f768026af5ae92036ee63f6252688ab2c9d5560b923fee113471e8' + 'f3e5a4e1a8f335570427acc08ee16e834312c6df91ef872533d34d299a6ea1ce46dae4151d9e3e1b1728d8c6d0210276c3d6743a92728dc7a6e00db5b8b5640e' '53103bf55b957b657039510527df0df01279dec59cda115a4d6454e4135025d4546167fa30bdc99107f232561c1e096d8328609ab5a876cf7017176f92ad3e0b' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - 'aed7844c51ec705ef1ef5d9f1adf27939073c99d4fcc97051bed2fba1ec161fdde4c57cbe039209fb86c72918493bea55ed26189c1dda3dbea3a3a7019363818') + '71de593fa8673e06b90284ea1fe337dff64f0b49477aa2da35d3026457e566c0e08090ae5412b711037cbd66ebc34d9c656ff6d3bbc8ecfd13956b166d2fe589' + '93b7328fea9046c61f22e4d2a9ac59b5c2181d603ba02024e40cbd2b3970f7c716726f46e789a77185302c10d09fbe35db5333bfc8f20a9f540d49439c6bd69b' + 'c6ce8e2214cd6a2c664e5e28aea29aea5ccdc07cf73239c5f06dec36121c503543a122cf7455ab6932f3d3c4dd97d0d3f03cc12f660c2541efe7a737dd38883a' + '606af0fd746e6a31463bcc561bc24a5595334fdb59cb6658095a9724f2645f53e8c36c6a353f8c46f3731544ea296ceacf093e077499589b49e7765682fd32ff' + '670843b65e762602785f6906d55af47ad4fc04f9a0d229fe59fcd0c9c6fd219e55b484c1be4e0989aaf1efa4e00136a38d4b3f354b5bd1dabe41efbefd9dc6e4' + 'f7c051fb8e334ab5f6aa40a381c8626e1f5dae5ce311c27b4a1737fa75a4b17e05c243833f2af5322cef7e9fe3f3fa46cb91be1cff8ebfc787f5c27444b3d1f4') sha512sums_i686=('3a346ff5e0fdefafd28bc3dd0e4b6cd68e3f0014e59d1611d99f2edb8d074fd32649eeb0894a7e340e4f907b5cfc0e08e0753e0427a68dc113bb22835a892968') -sha512sums_armv7h=('1744202d19e9cc501d80373f734e9c9715ccdb1723d72abd9fa6fb47cfd5d60157fb4ae95d2cbfe38296c4428df304f8ca290ad232a21804744b702b0783cada' +sha512sums_armv7h=('c7f8995a741181de687b96ef959a3d16df06d2892e3d25811f0c8691d5cb168af8a89ad903c1511fe859b1efbf84870b3445a42c805de772ed5bcef8543d960b' 'SKIP') _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") @@ -98,13 +106,17 @@ prepare() { if [ "${_srcname##*-}" != "$pkgver" ]; then echo "Applying upstream patch..." - patch -Np1 < "../patch-${_srcname##*-}-gnu1-$pkgver-gnu1" + patch -Np1 < "../patch-${_srcname##*-}-gnu-$pkgver-gnu" fi echo "Adding freedo as boot logo..." install -m644 -t drivers/video/logo \ ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm} + # fix NFSv4 mounting issue regression - FS#73838 / FS#73860 + # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/patch/?id=6f2836341d8a39e1e000572b10959347d7e61fd9 + patch -Rp1 -i ../0006_fix_NFSv4_mount_regression.diff + echo "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel @@ -144,6 +156,7 @@ prepare() { echo "Setting config..." cp ../config.$CARCH .config make olddefconfig +# diff -u ../config .config || : #return 1 make -s kernelrelease > version echo "Prepared $pkgbase version $(