From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 83C55158090 for ; Sun, 15 May 2022 22:08:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9ED1E0905; Sun, 15 May 2022 22:08:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AA4A9E0905 for ; Sun, 15 May 2022 22:08:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BB152341870 for ; Sun, 15 May 2022 22:08:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3CB3F105 for ; Sun, 15 May 2022 22:08:36 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1652652504.3337a2802d989a6811e43d50ac0a3f477b6fa64d.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:5.17 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 0000_README 1007_linux-5.17.8.patch X-VCS-Directories: / X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: 3337a2802d989a6811e43d50ac0a3f477b6fa64d X-VCS-Branch: 5.17 Date: Sun, 15 May 2022 22:08:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 84a2f7db-988e-4adf-bc83-289cea59146f X-Archives-Hash: 37283d00976fc97af9f6ca1e0ba453f1 commit: 3337a2802d989a6811e43d50ac0a3f477b6fa64d Author: Mike Pagano gentoo org> AuthorDate: Sun May 15 22:08:24 2022 +0000 Commit: Mike Pagano gentoo org> CommitDate: Sun May 15 22:08:24 2022 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=3337a280 Linux patch 5.17.8 Signed-off-by: Mike Pagano gentoo.org> 0000_README | 4 + 1007_linux-5.17.8.patch | 246 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 250 insertions(+) diff --git a/0000_README b/0000_README index cf45e5d3..30109237 100644 --- a/0000_README +++ b/0000_README @@ -71,6 +71,10 @@ Patch: 1006_linux-5.17.7.patch From: http://www.kernel.org Desc: Linux 5.17.7 +Patch: 1007_linux-5.17.8.patch +From: http://www.kernel.org +Desc: Linux 5.17.8 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1007_linux-5.17.8.patch b/1007_linux-5.17.8.patch new file mode 100644 index 00000000..1c8ce1ab --- /dev/null +++ b/1007_linux-5.17.8.patch @@ -0,0 +1,246 @@ +diff --git a/Makefile b/Makefile +index ce65b393a2b49..3cf179812f0f9 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 5 + PATCHLEVEL = 17 +-SUBLEVEL = 7 ++SUBLEVEL = 8 + EXTRAVERSION = + NAME = Superb Owl + +diff --git a/fs/udf/namei.c b/fs/udf/namei.c +index 0ed4861b038f6..b3d5f97f16cdb 100644 +--- a/fs/udf/namei.c ++++ b/fs/udf/namei.c +@@ -75,11 +75,11 @@ int udf_write_fi(struct inode *inode, struct fileIdentDesc *cfi, + + if (fileident) { + if (adinicb || (offset + lfi < 0)) { +- memcpy(udf_get_fi_ident(sfi), fileident, lfi); ++ memcpy(sfi->impUse + liu, fileident, lfi); + } else if (offset >= 0) { + memcpy(fibh->ebh->b_data + offset, fileident, lfi); + } else { +- memcpy(udf_get_fi_ident(sfi), fileident, -offset); ++ memcpy(sfi->impUse + liu, fileident, -offset); + memcpy(fibh->ebh->b_data, fileident - offset, + lfi + offset); + } +@@ -88,11 +88,11 @@ int udf_write_fi(struct inode *inode, struct fileIdentDesc *cfi, + offset += lfi; + + if (adinicb || (offset + padlen < 0)) { +- memset(udf_get_fi_ident(sfi) + lfi, 0x00, padlen); ++ memset(sfi->impUse + liu + lfi, 0x00, padlen); + } else if (offset >= 0) { + memset(fibh->ebh->b_data + offset, 0x00, padlen); + } else { +- memset(udf_get_fi_ident(sfi) + lfi, 0x00, -offset); ++ memset(sfi->impUse + liu + lfi, 0x00, -offset); + memset(fibh->ebh->b_data, 0x00, padlen + offset); + } + +diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h +index 36d727f94ac29..131514913430a 100644 +--- a/include/net/bluetooth/hci_core.h ++++ b/include/net/bluetooth/hci_core.h +@@ -36,6 +36,9 @@ + /* HCI priority */ + #define HCI_PRIO_MAX 7 + ++/* HCI maximum id value */ ++#define HCI_MAX_ID 10000 ++ + /* HCI Core structures */ + struct inquiry_data { + bdaddr_t bdaddr; +diff --git a/include/uapi/linux/rfkill.h b/include/uapi/linux/rfkill.h +index 283c5a7b3f2c8..db6c8588c1d0c 100644 +--- a/include/uapi/linux/rfkill.h ++++ b/include/uapi/linux/rfkill.h +@@ -184,7 +184,7 @@ struct rfkill_event_ext { + #define RFKILL_IOC_NOINPUT 1 + #define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT) + #define RFKILL_IOC_MAX_SIZE 2 +-#define RFKILL_IOCTL_MAX_SIZE _IOW(RFKILL_IOC_MAGIC, RFKILL_IOC_EXT_SIZE, __u32) ++#define RFKILL_IOCTL_MAX_SIZE _IOW(RFKILL_IOC_MAGIC, RFKILL_IOC_MAX_SIZE, __u32) + + /* and that's all userspace gets */ + +diff --git a/mm/gup.c b/mm/gup.c +index 7bc1ba9ce4403..41da0bd61bec3 100644 +--- a/mm/gup.c ++++ b/mm/gup.c +@@ -465,7 +465,7 @@ static int follow_pfn_pte(struct vm_area_struct *vma, unsigned long address, + pte_t *pte, unsigned int flags) + { + /* No page to get reference */ +- if (flags & FOLL_GET) ++ if (flags & (FOLL_GET | FOLL_PIN)) + return -EFAULT; + + if (flags & FOLL_TOUCH) { +diff --git a/mm/hugetlb.c b/mm/hugetlb.c +index a1da8757cc9cc..e2dc190c67256 100644 +--- a/mm/hugetlb.c ++++ b/mm/hugetlb.c +@@ -5820,7 +5820,8 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, + *pagep = NULL; + goto out; + } +- folio_copy(page_folio(page), page_folio(*pagep)); ++ copy_user_huge_page(page, *pagep, dst_addr, dst_vma, ++ pages_per_huge_page(h)); + put_page(*pagep); + *pagep = NULL; + } +diff --git a/mm/memory-failure.c b/mm/memory-failure.c +index 15dcedbc17306..682eedb5ea75b 100644 +--- a/mm/memory-failure.c ++++ b/mm/memory-failure.c +@@ -707,8 +707,10 @@ static int kill_accessing_process(struct task_struct *p, unsigned long pfn, + (void *)&priv); + if (ret == 1 && priv.tk.addr) + kill_proc(&priv.tk, pfn, flags); ++ else ++ ret = 0; + mmap_read_unlock(p->mm); +- return ret ? -EFAULT : -EHWPOISON; ++ return ret > 0 ? -EHWPOISON : -EFAULT; + } + + static const char *action_name[] = { +diff --git a/mm/memory.c b/mm/memory.c +index b69afe3dd597a..886925d977592 100644 +--- a/mm/memory.c ++++ b/mm/memory.c +@@ -5475,6 +5475,8 @@ long copy_huge_page_from_user(struct page *dst_page, + if (rc) + break; + ++ flush_dcache_page(subpage); ++ + cond_resched(); + } + return ret_val; +diff --git a/mm/migrate.c b/mm/migrate.c +index 086a366374678..ac7673e43dda6 100644 +--- a/mm/migrate.c ++++ b/mm/migrate.c +@@ -916,9 +916,12 @@ static int move_to_new_page(struct page *newpage, struct page *page, + if (!PageMappingFlags(page)) + page->mapping = NULL; + +- if (likely(!is_zone_device_page(newpage))) +- flush_dcache_page(newpage); ++ if (likely(!is_zone_device_page(newpage))) { ++ int i, nr = compound_nr(newpage); + ++ for (i = 0; i < nr; i++) ++ flush_dcache_page(newpage + i); ++ } + } + out: + return rc; +@@ -3082,18 +3085,21 @@ static int establish_migrate_target(int node, nodemask_t *used, + if (best_distance != -1) { + val = node_distance(node, migration_target); + if (val > best_distance) +- return NUMA_NO_NODE; ++ goto out_clear; + } + + index = nd->nr; + if (WARN_ONCE(index >= DEMOTION_TARGET_NODES, + "Exceeds maximum demotion target nodes\n")) +- return NUMA_NO_NODE; ++ goto out_clear; + + nd->nodes[index] = migration_target; + nd->nr++; + + return migration_target; ++out_clear: ++ node_clear(migration_target, *used); ++ return NUMA_NO_NODE; + } + + /* +diff --git a/mm/mlock.c b/mm/mlock.c +index 37f969ec68fa4..b565b1aac8d49 100644 +--- a/mm/mlock.c ++++ b/mm/mlock.c +@@ -838,6 +838,7 @@ int user_shm_lock(size_t size, struct ucounts *ucounts) + } + if (!get_ucounts(ucounts)) { + dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); ++ allowed = 0; + goto out; + } + allowed = 1; +diff --git a/mm/shmem.c b/mm/shmem.c +index a09b29ec2b45c..7a46419d331d5 100644 +--- a/mm/shmem.c ++++ b/mm/shmem.c +@@ -2357,8 +2357,10 @@ int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, + /* don't free the page */ + goto out_unacct_blocks; + } ++ ++ flush_dcache_page(page); + } else { /* ZEROPAGE */ +- clear_highpage(page); ++ clear_user_highpage(page, dst_addr); + } + } else { + page = *pagep; +diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c +index 885e5adb0168d..7259f96faaa0e 100644 +--- a/mm/userfaultfd.c ++++ b/mm/userfaultfd.c +@@ -153,6 +153,8 @@ static int mcopy_atomic_pte(struct mm_struct *dst_mm, + /* don't free the page */ + goto out; + } ++ ++ flush_dcache_page(page); + } else { + page = *pagep; + *pagep = NULL; +@@ -628,6 +630,7 @@ retry: + err = -EFAULT; + goto out; + } ++ flush_dcache_page(page); + goto retry; + } else + BUG_ON(page); +diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c +index 2882bc7d79d79..9e9713f7ddb84 100644 +--- a/net/bluetooth/hci_core.c ++++ b/net/bluetooth/hci_core.c +@@ -2554,10 +2554,10 @@ int hci_register_dev(struct hci_dev *hdev) + */ + switch (hdev->dev_type) { + case HCI_PRIMARY: +- id = ida_simple_get(&hci_index_ida, 0, 0, GFP_KERNEL); ++ id = ida_simple_get(&hci_index_ida, 0, HCI_MAX_ID, GFP_KERNEL); + break; + case HCI_AMP: +- id = ida_simple_get(&hci_index_ida, 1, 0, GFP_KERNEL); ++ id = ida_simple_get(&hci_index_ida, 1, HCI_MAX_ID, GFP_KERNEL); + break; + default: + return -EINVAL; +@@ -2566,7 +2566,7 @@ int hci_register_dev(struct hci_dev *hdev) + if (id < 0) + return id; + +- sprintf(hdev->name, "hci%d", id); ++ snprintf(hdev->name, sizeof(hdev->name), "hci%d", id); + hdev->id = id; + + BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);