]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Aug 2022 13:26:03 +0000 (15:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Aug 2022 13:26:03 +0000 (15:26 +0200)
added patches:
arm64-set-uxn-on-swapper-page-tables.patch
ata-sata_mv-fixes-expected-number-of-resources-now-irqs-are-gone.patch

queue-5.19/arm64-set-uxn-on-swapper-page-tables.patch [new file with mode: 0644]
queue-5.19/ata-sata_mv-fixes-expected-number-of-resources-now-irqs-are-gone.patch [new file with mode: 0644]
queue-5.19/series

diff --git a/queue-5.19/arm64-set-uxn-on-swapper-page-tables.patch b/queue-5.19/arm64-set-uxn-on-swapper-page-tables.patch
new file mode 100644 (file)
index 0000000..695976a
--- /dev/null
@@ -0,0 +1,59 @@
+From will@kernel.org  Mon Aug  8 15:23:59 2022
+From: Will Deacon <will@kernel.org>
+Date: Mon,  8 Aug 2022 13:53:21 +0100
+Subject: arm64: set UXN on swapper page tables
+To: gregkh@linuxfoundation.org
+Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Collingbourne <pcc@google.com>, stable@vger.kernel.org, Will Deacon <will@kernel.org>, Ard Biesheuvel <ardb@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>
+Message-ID: <20220808125321.32598-1-will@kernel.org>
+
+From: Peter Collingbourne <pcc@google.com>
+
+[ This issue was fixed upstream by accident in c3cee924bd85 ("arm64:
+  head: cover entire kernel image in initial ID map") as part of a
+  large refactoring of the arm64 boot flow. This simple fix is therefore
+  preferred for -stable backporting ]
+
+On a system that implements FEAT_EPAN, read/write access to the idmap
+is denied because UXN is not set on the swapper PTEs. As a result,
+idmap_kpti_install_ng_mappings panics the kernel when accessing
+__idmap_kpti_flag. Fix it by setting UXN on these PTEs.
+
+Fixes: 18107f8a2df6 ("arm64: Support execute-only permissions with Enhanced PAN")
+Cc: <stable@vger.kernel.org> # 5.15
+Link: https://linux-review.googlesource.com/id/Ic452fa4b4f74753e54f71e61027e7222a0fae1b1
+Signed-off-by: Peter Collingbourne <pcc@google.com>
+Acked-by: Will Deacon <will@kernel.org>
+Cc: Ard Biesheuvel <ardb@kernel.org>
+Cc: Catalin Marinas <catalin.marinas@arm.com>
+Link: https://lore.kernel.org/r/20220719234909.1398992-1-pcc@google.com
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/include/asm/kernel-pgtable.h |    4 ++--
+ arch/arm64/kernel/head.S                |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/arm64/include/asm/kernel-pgtable.h
++++ b/arch/arm64/include/asm/kernel-pgtable.h
+@@ -103,8 +103,8 @@
+ /*
+  * Initial memory map attributes.
+  */
+-#define SWAPPER_PTE_FLAGS     (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED)
+-#define SWAPPER_PMD_FLAGS     (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S)
++#define SWAPPER_PTE_FLAGS     (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED | PTE_UXN)
++#define SWAPPER_PMD_FLAGS     (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S | PMD_SECT_UXN)
+ #if ARM64_KERNEL_USES_PMD_MAPS
+ #define SWAPPER_MM_MMUFLAGS   (PMD_ATTRINDX(MT_NORMAL) | SWAPPER_PMD_FLAGS)
+--- a/arch/arm64/kernel/head.S
++++ b/arch/arm64/kernel/head.S
+@@ -285,7 +285,7 @@ SYM_FUNC_START_LOCAL(__create_page_table
+       subs    x1, x1, #64
+       b.ne    1b
+-      mov     x7, SWAPPER_MM_MMUFLAGS
++      mov_q   x7, SWAPPER_MM_MMUFLAGS
+       /*
+        * Create the identity mapping.
diff --git a/queue-5.19/ata-sata_mv-fixes-expected-number-of-resources-now-irqs-are-gone.patch b/queue-5.19/ata-sata_mv-fixes-expected-number-of-resources-now-irqs-are-gone.patch
new file mode 100644 (file)
index 0000000..b56e811
--- /dev/null
@@ -0,0 +1,38 @@
+From b3b2bec9646eb1d3f43c85f6d0d2211d6f8af42b Mon Sep 17 00:00:00 2001
+From: Andrew Lunn <andrew@lunn.ch>
+Date: Sun, 31 Jul 2022 22:49:06 +0200
+Subject: ata: sata_mv: Fixes expected number of resources now IRQs are gone
+
+From: Andrew Lunn <andrew@lunn.ch>
+
+commit b3b2bec9646eb1d3f43c85f6d0d2211d6f8af42b upstream.
+
+The commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ
+resource from DT core") stopped IRQ resources being available as
+platform resources. This broke the sanity check for the expected
+number of resources in the Marvell SATA driver which expected two
+resources, the IO memory and the interrupt.
+
+Change the sanity check to only expect the IO memory.
+
+Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
+Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/ata/sata_mv.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/ata/sata_mv.c
++++ b/drivers/ata/sata_mv.c
+@@ -4057,7 +4057,7 @@ static int mv_platform_probe(struct plat
+       /*
+        * Simple resource validation ..
+        */
+-      if (unlikely(pdev->num_resources != 2)) {
++      if (unlikely(pdev->num_resources != 1)) {
+               dev_err(&pdev->dev, "invalid number of resources\n");
+               return -EINVAL;
+       }
index 6ff405cf3a65c42f76a36b17b41709f3b0d98de5..6b51e90171bdf67bdb4969ea0472491e90c96449 100644 (file)
@@ -4,3 +4,5 @@ acpi-video-force-backlight-native-for-some-tongfang-devices.patch
 acpi-video-shortening-quirk-list-by-identifying-clevo-by-board_name-only.patch
 acpi-apei-better-fix-to-avoid-spamming-the-console-with-old-error-logs.patch
 crypto-arm64-poly1305-fix-a-read-out-of-bound.patch
+ata-sata_mv-fixes-expected-number-of-resources-now-irqs-are-gone.patch
+arm64-set-uxn-on-swapper-page-tables.patch