]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop broken arm64 patch from 4.9 and 4.14
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 May 2020 11:20:27 +0000 (13:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 May 2020 11:20:27 +0000 (13:20 +0200)
queue-4.14/arm64-hugetlb-avoid-potential-null-dereference.patch [deleted file]
queue-4.14/series
queue-4.9/arm64-hugetlb-avoid-potential-null-dereference.patch [deleted file]
queue-4.9/series

diff --git a/queue-4.14/arm64-hugetlb-avoid-potential-null-dereference.patch b/queue-4.14/arm64-hugetlb-avoid-potential-null-dereference.patch
deleted file mode 100644 (file)
index 5c77d91..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From a9ec0962c069fccbcfb6258b1d0b677e98c58084 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 5 May 2020 13:59:30 +0100
-Subject: arm64: hugetlb: avoid potential NULL dereference
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Mark Rutland <mark.rutland@arm.com>
-
-[ Upstream commit 027d0c7101f50cf03aeea9eebf484afd4920c8d3 ]
-
-The static analyzer in GCC 10 spotted that in huge_pte_alloc() we may
-pass a NULL pmdp into pte_alloc_map() when pmd_alloc() returns NULL:
-
-|   CC      arch/arm64/mm/pageattr.o
-|   CC      arch/arm64/mm/hugetlbpage.o
-|                  from arch/arm64/mm/hugetlbpage.c:10:
-| arch/arm64/mm/hugetlbpage.c: In function ‘huge_pte_alloc’:
-| ./arch/arm64/include/asm/pgtable-types.h:28:24: warning: dereference of NULL ‘pmdp’ [CWE-690] [-Wanalyzer-null-dereference]
-| ./arch/arm64/include/asm/pgtable.h:436:26: note: in expansion of macro ‘pmd_val’
-| arch/arm64/mm/hugetlbpage.c:242:10: note: in expansion of macro ‘pte_alloc_map’
-|     |arch/arm64/mm/hugetlbpage.c:232:10:
-|     |./arch/arm64/include/asm/pgtable-types.h:28:24:
-| ./arch/arm64/include/asm/pgtable.h:436:26: note: in expansion of macro ‘pmd_val’
-| arch/arm64/mm/hugetlbpage.c:242:10: note: in expansion of macro ‘pte_alloc_map’
-
-This can only occur when the kernel cannot allocate a page, and so is
-unlikely to happen in practice before other systems start failing.
-
-We can avoid this by bailing out if pmd_alloc() fails, as we do earlier
-in the function if pud_alloc() fails.
-
-Fixes: 66b3923a1a0f ("arm64: hugetlb: add support for PTE contiguous bit")
-Signed-off-by: Mark Rutland <mark.rutland@arm.com>
-Reported-by: Kyrill Tkachov <kyrylo.tkachov@arm.com>
-Cc: <stable@vger.kernel.org> # 4.5.x-
-Cc: Will Deacon <will@kernel.org>
-Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm64/mm/hugetlbpage.c |    2 ++
- 1 file changed, 2 insertions(+)
-
---- a/arch/arm64/mm/hugetlbpage.c
-+++ b/arch/arm64/mm/hugetlbpage.c
-@@ -220,6 +220,8 @@ pte_t *huge_pte_alloc(struct mm_struct *
-               pte = (pte_t *)pud;
-       } else if (sz == (PAGE_SIZE * CONT_PTES)) {
-               pmd_t *pmd = pmd_alloc(mm, pud, addr);
-+              if (!pmdp)
-+                      return NULL;
-               WARN_ON(addr & (sz - 1));
-               /*
index 3a835aaccab18cc5bb9dd5fe3ce86ebd2674e53a..d76e6792af144012b2e63bb8b141e74d2904cf35 100644 (file)
@@ -45,5 +45,4 @@ f2fs-introduce-read_xattr_block.patch
 f2fs-sanity-check-of-xattr-entry-size.patch
 f2fs-fix-to-avoid-accessing-xattr-across-the-boundary.patch
 f2fs-fix-to-avoid-memory-leakage-in-f2fs_listxattr.patch
-arm64-hugetlb-avoid-potential-null-dereference.patch
 net-stmmac-use-mutex-instead-of-spinlock.patch
diff --git a/queue-4.9/arm64-hugetlb-avoid-potential-null-dereference.patch b/queue-4.9/arm64-hugetlb-avoid-potential-null-dereference.patch
deleted file mode 100644 (file)
index e350fce..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From 57097abe9f98cc9acf2d7a730974069608c165ca Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 5 May 2020 13:59:30 +0100
-Subject: arm64: hugetlb: avoid potential NULL dereference
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Mark Rutland <mark.rutland@arm.com>
-
-[ Upstream commit 027d0c7101f50cf03aeea9eebf484afd4920c8d3 ]
-
-The static analyzer in GCC 10 spotted that in huge_pte_alloc() we may
-pass a NULL pmdp into pte_alloc_map() when pmd_alloc() returns NULL:
-
-|   CC      arch/arm64/mm/pageattr.o
-|   CC      arch/arm64/mm/hugetlbpage.o
-|                  from arch/arm64/mm/hugetlbpage.c:10:
-| arch/arm64/mm/hugetlbpage.c: In function ‘huge_pte_alloc’:
-| ./arch/arm64/include/asm/pgtable-types.h:28:24: warning: dereference of NULL ‘pmdp’ [CWE-690] [-Wanalyzer-null-dereference]
-| ./arch/arm64/include/asm/pgtable.h:436:26: note: in expansion of macro ‘pmd_val’
-| arch/arm64/mm/hugetlbpage.c:242:10: note: in expansion of macro ‘pte_alloc_map’
-|     |arch/arm64/mm/hugetlbpage.c:232:10:
-|     |./arch/arm64/include/asm/pgtable-types.h:28:24:
-| ./arch/arm64/include/asm/pgtable.h:436:26: note: in expansion of macro ‘pmd_val’
-| arch/arm64/mm/hugetlbpage.c:242:10: note: in expansion of macro ‘pte_alloc_map’
-
-This can only occur when the kernel cannot allocate a page, and so is
-unlikely to happen in practice before other systems start failing.
-
-We can avoid this by bailing out if pmd_alloc() fails, as we do earlier
-in the function if pud_alloc() fails.
-
-Fixes: 66b3923a1a0f ("arm64: hugetlb: add support for PTE contiguous bit")
-Signed-off-by: Mark Rutland <mark.rutland@arm.com>
-Reported-by: Kyrill Tkachov <kyrylo.tkachov@arm.com>
-Cc: <stable@vger.kernel.org> # 4.5.x-
-Cc: Will Deacon <will@kernel.org>
-Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm64/mm/hugetlbpage.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
-index 45bec627bae3e..848d13d9a553e 100644
---- a/arch/arm64/mm/hugetlbpage.c
-+++ b/arch/arm64/mm/hugetlbpage.c
-@@ -103,6 +103,8 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
-               pte = (pte_t *)pud;
-       } else if (sz == (PAGE_SIZE * CONT_PTES)) {
-               pmd_t *pmd = pmd_alloc(mm, pud, addr);
-+              if (!pmdp)
-+                      return NULL;
-               WARN_ON(addr & (sz - 1));
-               /*
--- 
-2.20.1
-
index ae2ce29d19aa1c74e9fb1bac153b7cec417af803..397ee184c3a1c9d6a055fcddbaa9965238b060f8 100644 (file)
@@ -23,7 +23,6 @@ batman-adv-fix-refcnt-leak-in-batadv_v_ogm_process.patch
 objtool-fix-stack-offset-tracking-for-indirect-cfas.patch
 scripts-decodecode-fix-trapping-instruction-formatting.patch
 binfmt_elf-do-not-move-brk-for-interp-less-et_exec.patch
-arm64-hugetlb-avoid-potential-null-dereference.patch
 ext4-add-cond_resched-to-ext4_protect_reserved_inode.patch
 net-ipv6-add-net-argument-to-ip6_dst_lookup_flow.patch
 net-ipv6_stub-use-ip6_dst_lookup_flow-instead-of-ip6.patch