]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop ident_map patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2025 11:58:02 +0000 (13:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2025 11:58:02 +0000 (13:58 +0200)
16 files changed:
queue-5.10/series
queue-5.10/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch [deleted file]
queue-5.15/series
queue-5.15/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch [deleted file]
queue-5.4/series
queue-5.4/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch [deleted file]
queue-6.1/series
queue-6.1/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch [deleted file]
queue-6.12/series
queue-6.12/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch [deleted file]
queue-6.13/series
queue-6.13/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch [deleted file]
queue-6.14/series
queue-6.14/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch [deleted file]
queue-6.6/series
queue-6.6/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch [deleted file]

index 4ba6b54584bc6e34009f6d5768fd3f8a70f4266f..1b71efd9e20a8a648c3ebc1ec5181a1c5a54c1bc 100644 (file)
@@ -13,7 +13,6 @@ x86-cpu-don-t-clear-x86_feature_lahf_lm-flag-in-init.patch
 perf-arm_pmu-don-t-disable-counter-in-armpmu_add.patch
 arm64-cputype-add-qcom_cpu_part_kryo_3xx_gold.patch
 xen-mcelog-add-__nonstring-annotations-for-untermina.patch
-x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
 hid-pidff-convert-infinite-length-from-linux-api-to-.patch
 hid-pidff-do-not-send-effect-envelope-if-it-s-empty.patch
 hid-pidff-fix-null-pointer-dereference-in-pidff_find.patch
diff --git a/queue-5.10/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch b/queue-5.10/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
deleted file mode 100644 (file)
index 469f3ff..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From 5b511ca368ba896f40559c7639510ed199bf2a1e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Oct 2024 14:14:55 +0300
-Subject: x86/mm/ident_map: Fix theoretical virtual address overflow to zero
-
-From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-
-[ Upstream commit f666c92090a41ac5524dade63ff96b3adcf8c2ab ]
-
-The current calculation of the 'next' virtual address in the
-page table initialization functions in arch/x86/mm/ident_map.c
-doesn't protect against wrapping to zero.
-
-This is a theoretical issue that cannot happen currently,
-the problematic case is possible only if the user sets a
-high enough x86_mapping_info::offset value - which no
-current code in the upstream kernel does.
-
-( The wrapping to zero only occurs if the top PGD entry is accessed.
-  There are no such users upstream. Only hibernate_64.c uses
-  x86_mapping_info::offset, and it operates on the direct mapping
-  range, which is not the top PGD entry. )
-
-Should such an overflow happen, it can result in page table
-corruption and a hang.
-
-To future-proof this code, replace the manual 'next' calculation
-with p?d_addr_end() which handles wrapping correctly.
-
-[ Backporter's note: there's no need to backport this patch. ]
-
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Reviewed-by: Kai Huang <kai.huang@intel.com>
-Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
-Cc: Andy Lutomirski <luto@kernel.org>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Link: https://lore.kernel.org/r/20241016111458.846228-2-kirill.shutemov@linux.intel.com
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/mm/ident_map.c | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c
-index 968d7005f4a72..2f383e288c430 100644
---- a/arch/x86/mm/ident_map.c
-+++ b/arch/x86/mm/ident_map.c
-@@ -27,9 +27,7 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
-               pud_t *pud = pud_page + pud_index(addr);
-               pmd_t *pmd;
--              next = (addr & PUD_MASK) + PUD_SIZE;
--              if (next > end)
--                      next = end;
-+              next = pud_addr_end(addr, end);
-               if (info->direct_gbpages) {
-                       pud_t pudval;
-@@ -68,10 +66,7 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page,
-               p4d_t *p4d = p4d_page + p4d_index(addr);
-               pud_t *pud;
--              next = (addr & P4D_MASK) + P4D_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = p4d_addr_end(addr, end);
-               if (p4d_present(*p4d)) {
-                       pud = pud_offset(p4d, 0);
-                       result = ident_pud_init(info, pud, addr, next);
-@@ -113,10 +108,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
-               pgd_t *pgd = pgd_page + pgd_index(addr);
-               p4d_t *p4d;
--              next = (addr & PGDIR_MASK) + PGDIR_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = pgd_addr_end(addr, end);
-               if (pgd_present(*pgd)) {
-                       p4d = p4d_offset(pgd, 0);
-                       result = ident_p4d_init(info, p4d, addr, next);
--- 
-2.39.5
-
index dc802b0bdad44ca861655bcd036d1864ebf4d0e4..22c7247eff9603d57814dfff32d5be3130ca8cfd 100644 (file)
@@ -14,7 +14,6 @@ x86-cpu-don-t-clear-x86_feature_lahf_lm-flag-in-init.patch
 perf-arm_pmu-don-t-disable-counter-in-armpmu_add.patch
 arm64-cputype-add-qcom_cpu_part_kryo_3xx_gold.patch
 xen-mcelog-add-__nonstring-annotations-for-untermina.patch
-x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
 hid-pidff-convert-infinite-length-from-linux-api-to-.patch
 hid-pidff-do-not-send-effect-envelope-if-it-s-empty.patch
 hid-pidff-fix-null-pointer-dereference-in-pidff_find.patch
diff --git a/queue-5.15/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch b/queue-5.15/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
deleted file mode 100644 (file)
index 0da43b2..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From f915f4bd41ad619ca5a481a67c0f10b3c63028b2 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Oct 2024 14:14:55 +0300
-Subject: x86/mm/ident_map: Fix theoretical virtual address overflow to zero
-
-From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-
-[ Upstream commit f666c92090a41ac5524dade63ff96b3adcf8c2ab ]
-
-The current calculation of the 'next' virtual address in the
-page table initialization functions in arch/x86/mm/ident_map.c
-doesn't protect against wrapping to zero.
-
-This is a theoretical issue that cannot happen currently,
-the problematic case is possible only if the user sets a
-high enough x86_mapping_info::offset value - which no
-current code in the upstream kernel does.
-
-( The wrapping to zero only occurs if the top PGD entry is accessed.
-  There are no such users upstream. Only hibernate_64.c uses
-  x86_mapping_info::offset, and it operates on the direct mapping
-  range, which is not the top PGD entry. )
-
-Should such an overflow happen, it can result in page table
-corruption and a hang.
-
-To future-proof this code, replace the manual 'next' calculation
-with p?d_addr_end() which handles wrapping correctly.
-
-[ Backporter's note: there's no need to backport this patch. ]
-
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Reviewed-by: Kai Huang <kai.huang@intel.com>
-Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
-Cc: Andy Lutomirski <luto@kernel.org>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Link: https://lore.kernel.org/r/20241016111458.846228-2-kirill.shutemov@linux.intel.com
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/mm/ident_map.c | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c
-index 968d7005f4a72..2f383e288c430 100644
---- a/arch/x86/mm/ident_map.c
-+++ b/arch/x86/mm/ident_map.c
-@@ -27,9 +27,7 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
-               pud_t *pud = pud_page + pud_index(addr);
-               pmd_t *pmd;
--              next = (addr & PUD_MASK) + PUD_SIZE;
--              if (next > end)
--                      next = end;
-+              next = pud_addr_end(addr, end);
-               if (info->direct_gbpages) {
-                       pud_t pudval;
-@@ -68,10 +66,7 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page,
-               p4d_t *p4d = p4d_page + p4d_index(addr);
-               pud_t *pud;
--              next = (addr & P4D_MASK) + P4D_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = p4d_addr_end(addr, end);
-               if (p4d_present(*p4d)) {
-                       pud = pud_offset(p4d, 0);
-                       result = ident_pud_init(info, pud, addr, next);
-@@ -113,10 +108,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
-               pgd_t *pgd = pgd_page + pgd_index(addr);
-               p4d_t *p4d;
--              next = (addr & PGDIR_MASK) + PGDIR_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = pgd_addr_end(addr, end);
-               if (pgd_present(*pgd)) {
-                       p4d = p4d_offset(pgd, 0);
-                       result = ident_p4d_init(info, p4d, addr, next);
--- 
-2.39.5
-
index 68de8876e1d5fe21f71890f774a65afeee6a8325..f343575a1d0491b719d02cc78d9fe38cadeba9e5 100644 (file)
@@ -8,7 +8,6 @@ pm-cpupower-bench-prevent-null-dereference-on-malloc.patch
 x86-cpu-don-t-clear-x86_feature_lahf_lm-flag-in-init.patch
 perf-arm_pmu-don-t-disable-counter-in-armpmu_add.patch
 xen-mcelog-add-__nonstring-annotations-for-untermina.patch
-x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
 hid-pidff-convert-infinite-length-from-linux-api-to-.patch
 hid-pidff-do-not-send-effect-envelope-if-it-s-empty.patch
 hid-pidff-fix-null-pointer-dereference-in-pidff_find.patch
diff --git a/queue-5.4/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch b/queue-5.4/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
deleted file mode 100644 (file)
index a209b5c..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From c838fe3ec8d4e3f10a5e784fb8caad02e6aa9683 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Oct 2024 14:14:55 +0300
-Subject: x86/mm/ident_map: Fix theoretical virtual address overflow to zero
-
-From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-
-[ Upstream commit f666c92090a41ac5524dade63ff96b3adcf8c2ab ]
-
-The current calculation of the 'next' virtual address in the
-page table initialization functions in arch/x86/mm/ident_map.c
-doesn't protect against wrapping to zero.
-
-This is a theoretical issue that cannot happen currently,
-the problematic case is possible only if the user sets a
-high enough x86_mapping_info::offset value - which no
-current code in the upstream kernel does.
-
-( The wrapping to zero only occurs if the top PGD entry is accessed.
-  There are no such users upstream. Only hibernate_64.c uses
-  x86_mapping_info::offset, and it operates on the direct mapping
-  range, which is not the top PGD entry. )
-
-Should such an overflow happen, it can result in page table
-corruption and a hang.
-
-To future-proof this code, replace the manual 'next' calculation
-with p?d_addr_end() which handles wrapping correctly.
-
-[ Backporter's note: there's no need to backport this patch. ]
-
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Reviewed-by: Kai Huang <kai.huang@intel.com>
-Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
-Cc: Andy Lutomirski <luto@kernel.org>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Link: https://lore.kernel.org/r/20241016111458.846228-2-kirill.shutemov@linux.intel.com
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/mm/ident_map.c | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c
-index 968d7005f4a72..2f383e288c430 100644
---- a/arch/x86/mm/ident_map.c
-+++ b/arch/x86/mm/ident_map.c
-@@ -27,9 +27,7 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
-               pud_t *pud = pud_page + pud_index(addr);
-               pmd_t *pmd;
--              next = (addr & PUD_MASK) + PUD_SIZE;
--              if (next > end)
--                      next = end;
-+              next = pud_addr_end(addr, end);
-               if (info->direct_gbpages) {
-                       pud_t pudval;
-@@ -68,10 +66,7 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page,
-               p4d_t *p4d = p4d_page + p4d_index(addr);
-               pud_t *pud;
--              next = (addr & P4D_MASK) + P4D_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = p4d_addr_end(addr, end);
-               if (p4d_present(*p4d)) {
-                       pud = pud_offset(p4d, 0);
-                       result = ident_pud_init(info, pud, addr, next);
-@@ -113,10 +108,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
-               pgd_t *pgd = pgd_page + pgd_index(addr);
-               p4d_t *p4d;
--              next = (addr & PGDIR_MASK) + PGDIR_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = pgd_addr_end(addr, end);
-               if (pgd_present(*pgd)) {
-                       p4d = p4d_offset(pgd, 0);
-                       result = ident_p4d_init(info, p4d, addr, next);
--- 
-2.39.5
-
index a4929294cf0016d46f4f807c8796f2b0b60923d0..3d1b036ceb866735b330eaaaf6b503e0ea470d23 100644 (file)
@@ -23,7 +23,6 @@ x86-cpu-don-t-clear-x86_feature_lahf_lm-flag-in-init.patch
 perf-arm_pmu-don-t-disable-counter-in-armpmu_add.patch
 arm64-cputype-add-qcom_cpu_part_kryo_3xx_gold.patch
 xen-mcelog-add-__nonstring-annotations-for-untermina.patch
-x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
 hid-pidff-convert-infinite-length-from-linux-api-to-.patch
 hid-pidff-do-not-send-effect-envelope-if-it-s-empty.patch
 hid-pidff-fix-null-pointer-dereference-in-pidff_find.patch
diff --git a/queue-6.1/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch b/queue-6.1/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
deleted file mode 100644 (file)
index 5d8c6d2..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From cd3413b149bb9ca0c632f403a6ef0f6ab9e29ad9 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Oct 2024 14:14:55 +0300
-Subject: x86/mm/ident_map: Fix theoretical virtual address overflow to zero
-
-From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-
-[ Upstream commit f666c92090a41ac5524dade63ff96b3adcf8c2ab ]
-
-The current calculation of the 'next' virtual address in the
-page table initialization functions in arch/x86/mm/ident_map.c
-doesn't protect against wrapping to zero.
-
-This is a theoretical issue that cannot happen currently,
-the problematic case is possible only if the user sets a
-high enough x86_mapping_info::offset value - which no
-current code in the upstream kernel does.
-
-( The wrapping to zero only occurs if the top PGD entry is accessed.
-  There are no such users upstream. Only hibernate_64.c uses
-  x86_mapping_info::offset, and it operates on the direct mapping
-  range, which is not the top PGD entry. )
-
-Should such an overflow happen, it can result in page table
-corruption and a hang.
-
-To future-proof this code, replace the manual 'next' calculation
-with p?d_addr_end() which handles wrapping correctly.
-
-[ Backporter's note: there's no need to backport this patch. ]
-
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Reviewed-by: Kai Huang <kai.huang@intel.com>
-Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
-Cc: Andy Lutomirski <luto@kernel.org>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Link: https://lore.kernel.org/r/20241016111458.846228-2-kirill.shutemov@linux.intel.com
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/mm/ident_map.c | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c
-index 968d7005f4a72..2f383e288c430 100644
---- a/arch/x86/mm/ident_map.c
-+++ b/arch/x86/mm/ident_map.c
-@@ -27,9 +27,7 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
-               pud_t *pud = pud_page + pud_index(addr);
-               pmd_t *pmd;
--              next = (addr & PUD_MASK) + PUD_SIZE;
--              if (next > end)
--                      next = end;
-+              next = pud_addr_end(addr, end);
-               if (info->direct_gbpages) {
-                       pud_t pudval;
-@@ -68,10 +66,7 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page,
-               p4d_t *p4d = p4d_page + p4d_index(addr);
-               pud_t *pud;
--              next = (addr & P4D_MASK) + P4D_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = p4d_addr_end(addr, end);
-               if (p4d_present(*p4d)) {
-                       pud = pud_offset(p4d, 0);
-                       result = ident_pud_init(info, pud, addr, next);
-@@ -113,10 +108,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
-               pgd_t *pgd = pgd_page + pgd_index(addr);
-               p4d_t *p4d;
--              next = (addr & PGDIR_MASK) + PGDIR_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = pgd_addr_end(addr, end);
-               if (pgd_present(*pgd)) {
-                       p4d = p4d_offset(pgd, 0);
-                       result = ident_p4d_init(info, p4d, addr, next);
--- 
-2.39.5
-
index 77d24013ff66e64a92c223e892df08c258011a3b..ac40e7771b12c7066a5a5f95e7e58da000cb6ed3 100644 (file)
@@ -55,7 +55,6 @@ pm-hibernate-avoid-deadlock-in-hibernate_compressor_.patch
 flush-console-log-from-kernel_power_off.patch
 arm64-cputype-add-qcom_cpu_part_kryo_3xx_gold.patch
 xen-mcelog-add-__nonstring-annotations-for-untermina.patch
-x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
 zstd-increase-dynamic_bmi2-gcc-version-cutoff-from-4.patch
 platform-chrome-cros_ec_lpc-match-on-framework-acpi-.patch
 asoc-sof-topology-use-krealloc_array-to-replace-krea.patch
diff --git a/queue-6.12/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch b/queue-6.12/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
deleted file mode 100644 (file)
index 81b4f90..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From 8e1fbc0ef68e8d7e62211c000c46c6342d61eee7 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Oct 2024 14:14:55 +0300
-Subject: x86/mm/ident_map: Fix theoretical virtual address overflow to zero
-
-From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-
-[ Upstream commit f666c92090a41ac5524dade63ff96b3adcf8c2ab ]
-
-The current calculation of the 'next' virtual address in the
-page table initialization functions in arch/x86/mm/ident_map.c
-doesn't protect against wrapping to zero.
-
-This is a theoretical issue that cannot happen currently,
-the problematic case is possible only if the user sets a
-high enough x86_mapping_info::offset value - which no
-current code in the upstream kernel does.
-
-( The wrapping to zero only occurs if the top PGD entry is accessed.
-  There are no such users upstream. Only hibernate_64.c uses
-  x86_mapping_info::offset, and it operates on the direct mapping
-  range, which is not the top PGD entry. )
-
-Should such an overflow happen, it can result in page table
-corruption and a hang.
-
-To future-proof this code, replace the manual 'next' calculation
-with p?d_addr_end() which handles wrapping correctly.
-
-[ Backporter's note: there's no need to backport this patch. ]
-
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Reviewed-by: Kai Huang <kai.huang@intel.com>
-Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
-Cc: Andy Lutomirski <luto@kernel.org>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Link: https://lore.kernel.org/r/20241016111458.846228-2-kirill.shutemov@linux.intel.com
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/mm/ident_map.c | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c
-index 5ab7bd2f1983c..bd5d101c5c379 100644
---- a/arch/x86/mm/ident_map.c
-+++ b/arch/x86/mm/ident_map.c
-@@ -101,9 +101,7 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
-               pmd_t *pmd;
-               bool use_gbpage;
--              next = (addr & PUD_MASK) + PUD_SIZE;
--              if (next > end)
--                      next = end;
-+              next = pud_addr_end(addr, end);
-               /* if this is already a gbpage, this portion is already mapped */
-               if (pud_leaf(*pud))
-@@ -154,10 +152,7 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page,
-               p4d_t *p4d = p4d_page + p4d_index(addr);
-               pud_t *pud;
--              next = (addr & P4D_MASK) + P4D_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = p4d_addr_end(addr, end);
-               if (p4d_present(*p4d)) {
-                       pud = pud_offset(p4d, 0);
-                       result = ident_pud_init(info, pud, addr, next);
-@@ -199,10 +194,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
-               pgd_t *pgd = pgd_page + pgd_index(addr);
-               p4d_t *p4d;
--              next = (addr & PGDIR_MASK) + PGDIR_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = pgd_addr_end(addr, end);
-               if (pgd_present(*pgd)) {
-                       p4d = p4d_offset(pgd, 0);
-                       result = ident_p4d_init(info, p4d, addr, next);
--- 
-2.39.5
-
index 45456f086fbad55301c4f2a6da29038c7baaceec..dd4c9ee80411d1c921b7f04756dcf9cea2ddaaea 100644 (file)
@@ -54,7 +54,6 @@ pm-hibernate-avoid-deadlock-in-hibernate_compressor_.patch
 flush-console-log-from-kernel_power_off.patch
 arm64-cputype-add-qcom_cpu_part_kryo_3xx_gold.patch
 xen-mcelog-add-__nonstring-annotations-for-untermina.patch
-x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
 zstd-increase-dynamic_bmi2-gcc-version-cutoff-from-4.patch
 tracing-disable-branch-profiling-in-noinstr-code.patch
 platform-chrome-cros_ec_lpc-match-on-framework-acpi-.patch
diff --git a/queue-6.13/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch b/queue-6.13/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
deleted file mode 100644 (file)
index b520eaa..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From 7128b2f4e41a2b021024562af7b93cfd788d2b46 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Oct 2024 14:14:55 +0300
-Subject: x86/mm/ident_map: Fix theoretical virtual address overflow to zero
-
-From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-
-[ Upstream commit f666c92090a41ac5524dade63ff96b3adcf8c2ab ]
-
-The current calculation of the 'next' virtual address in the
-page table initialization functions in arch/x86/mm/ident_map.c
-doesn't protect against wrapping to zero.
-
-This is a theoretical issue that cannot happen currently,
-the problematic case is possible only if the user sets a
-high enough x86_mapping_info::offset value - which no
-current code in the upstream kernel does.
-
-( The wrapping to zero only occurs if the top PGD entry is accessed.
-  There are no such users upstream. Only hibernate_64.c uses
-  x86_mapping_info::offset, and it operates on the direct mapping
-  range, which is not the top PGD entry. )
-
-Should such an overflow happen, it can result in page table
-corruption and a hang.
-
-To future-proof this code, replace the manual 'next' calculation
-with p?d_addr_end() which handles wrapping correctly.
-
-[ Backporter's note: there's no need to backport this patch. ]
-
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Reviewed-by: Kai Huang <kai.huang@intel.com>
-Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
-Cc: Andy Lutomirski <luto@kernel.org>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Link: https://lore.kernel.org/r/20241016111458.846228-2-kirill.shutemov@linux.intel.com
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/mm/ident_map.c | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c
-index 5ab7bd2f1983c..bd5d101c5c379 100644
---- a/arch/x86/mm/ident_map.c
-+++ b/arch/x86/mm/ident_map.c
-@@ -101,9 +101,7 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
-               pmd_t *pmd;
-               bool use_gbpage;
--              next = (addr & PUD_MASK) + PUD_SIZE;
--              if (next > end)
--                      next = end;
-+              next = pud_addr_end(addr, end);
-               /* if this is already a gbpage, this portion is already mapped */
-               if (pud_leaf(*pud))
-@@ -154,10 +152,7 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page,
-               p4d_t *p4d = p4d_page + p4d_index(addr);
-               pud_t *pud;
--              next = (addr & P4D_MASK) + P4D_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = p4d_addr_end(addr, end);
-               if (p4d_present(*p4d)) {
-                       pud = pud_offset(p4d, 0);
-                       result = ident_pud_init(info, pud, addr, next);
-@@ -199,10 +194,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
-               pgd_t *pgd = pgd_page + pgd_index(addr);
-               p4d_t *p4d;
--              next = (addr & PGDIR_MASK) + PGDIR_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = pgd_addr_end(addr, end);
-               if (pgd_present(*pgd)) {
-                       p4d = p4d_offset(pgd, 0);
-                       result = ident_p4d_init(info, p4d, addr, next);
--- 
-2.39.5
-
index 66503b5f00974917a840230eebbaaaa2e17e59dc..882c25322bb3148f6accdc5a23fe956f7a11a51d 100644 (file)
@@ -63,7 +63,6 @@ flush-console-log-from-kernel_power_off.patch
 cpufreq-amd-pstate-invalidate-cppc_req_cached-during.patch
 arm64-cputype-add-qcom_cpu_part_kryo_3xx_gold.patch
 xen-mcelog-add-__nonstring-annotations-for-untermina.patch
-x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
 zstd-increase-dynamic_bmi2-gcc-version-cutoff-from-4.patch
 tracing-disable-branch-profiling-in-noinstr-code.patch
 platform-chrome-cros_ec_lpc-match-on-framework-acpi-.patch
diff --git a/queue-6.14/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch b/queue-6.14/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
deleted file mode 100644 (file)
index e008bbe..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From 271133a4928763e7abb7c4f3aad1bb3e515e0805 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Oct 2024 14:14:55 +0300
-Subject: x86/mm/ident_map: Fix theoretical virtual address overflow to zero
-
-From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-
-[ Upstream commit f666c92090a41ac5524dade63ff96b3adcf8c2ab ]
-
-The current calculation of the 'next' virtual address in the
-page table initialization functions in arch/x86/mm/ident_map.c
-doesn't protect against wrapping to zero.
-
-This is a theoretical issue that cannot happen currently,
-the problematic case is possible only if the user sets a
-high enough x86_mapping_info::offset value - which no
-current code in the upstream kernel does.
-
-( The wrapping to zero only occurs if the top PGD entry is accessed.
-  There are no such users upstream. Only hibernate_64.c uses
-  x86_mapping_info::offset, and it operates on the direct mapping
-  range, which is not the top PGD entry. )
-
-Should such an overflow happen, it can result in page table
-corruption and a hang.
-
-To future-proof this code, replace the manual 'next' calculation
-with p?d_addr_end() which handles wrapping correctly.
-
-[ Backporter's note: there's no need to backport this patch. ]
-
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Reviewed-by: Kai Huang <kai.huang@intel.com>
-Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
-Cc: Andy Lutomirski <luto@kernel.org>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Link: https://lore.kernel.org/r/20241016111458.846228-2-kirill.shutemov@linux.intel.com
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/mm/ident_map.c | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c
-index 5ab7bd2f1983c..bd5d101c5c379 100644
---- a/arch/x86/mm/ident_map.c
-+++ b/arch/x86/mm/ident_map.c
-@@ -101,9 +101,7 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
-               pmd_t *pmd;
-               bool use_gbpage;
--              next = (addr & PUD_MASK) + PUD_SIZE;
--              if (next > end)
--                      next = end;
-+              next = pud_addr_end(addr, end);
-               /* if this is already a gbpage, this portion is already mapped */
-               if (pud_leaf(*pud))
-@@ -154,10 +152,7 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page,
-               p4d_t *p4d = p4d_page + p4d_index(addr);
-               pud_t *pud;
--              next = (addr & P4D_MASK) + P4D_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = p4d_addr_end(addr, end);
-               if (p4d_present(*p4d)) {
-                       pud = pud_offset(p4d, 0);
-                       result = ident_pud_init(info, pud, addr, next);
-@@ -199,10 +194,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
-               pgd_t *pgd = pgd_page + pgd_index(addr);
-               p4d_t *p4d;
--              next = (addr & PGDIR_MASK) + PGDIR_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = pgd_addr_end(addr, end);
-               if (pgd_present(*pgd)) {
-                       p4d = p4d_offset(pgd, 0);
-                       result = ident_p4d_init(info, p4d, addr, next);
--- 
-2.39.5
-
index 1adc8ab0881b02bd868e542a927e9aac18653586..054cfa782d2c47b7db17387e46af819e362de6fe 100644 (file)
@@ -43,7 +43,6 @@ x86-cpu-don-t-clear-x86_feature_lahf_lm-flag-in-init.patch
 perf-arm_pmu-don-t-disable-counter-in-armpmu_add.patch
 arm64-cputype-add-qcom_cpu_part_kryo_3xx_gold.patch
 xen-mcelog-add-__nonstring-annotations-for-untermina.patch
-x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
 zstd-increase-dynamic_bmi2-gcc-version-cutoff-from-4.patch
 asoc-sof-topology-use-krealloc_array-to-replace-krea.patch
 hid-pidff-convert-infinite-length-from-linux-api-to-.patch
diff --git a/queue-6.6/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch b/queue-6.6/x86-mm-ident_map-fix-theoretical-virtual-address-ove.patch
deleted file mode 100644 (file)
index 68f2330..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From 9a43b0aa210e8eb94b82fac7690a126290d8a755 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Oct 2024 14:14:55 +0300
-Subject: x86/mm/ident_map: Fix theoretical virtual address overflow to zero
-
-From: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-
-[ Upstream commit f666c92090a41ac5524dade63ff96b3adcf8c2ab ]
-
-The current calculation of the 'next' virtual address in the
-page table initialization functions in arch/x86/mm/ident_map.c
-doesn't protect against wrapping to zero.
-
-This is a theoretical issue that cannot happen currently,
-the problematic case is possible only if the user sets a
-high enough x86_mapping_info::offset value - which no
-current code in the upstream kernel does.
-
-( The wrapping to zero only occurs if the top PGD entry is accessed.
-  There are no such users upstream. Only hibernate_64.c uses
-  x86_mapping_info::offset, and it operates on the direct mapping
-  range, which is not the top PGD entry. )
-
-Should such an overflow happen, it can result in page table
-corruption and a hang.
-
-To future-proof this code, replace the manual 'next' calculation
-with p?d_addr_end() which handles wrapping correctly.
-
-[ Backporter's note: there's no need to backport this patch. ]
-
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Reviewed-by: Kai Huang <kai.huang@intel.com>
-Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
-Cc: Andy Lutomirski <luto@kernel.org>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Link: https://lore.kernel.org/r/20241016111458.846228-2-kirill.shutemov@linux.intel.com
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/mm/ident_map.c | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c
-index fe0b2e66ded93..7adf7001473e7 100644
---- a/arch/x86/mm/ident_map.c
-+++ b/arch/x86/mm/ident_map.c
-@@ -28,9 +28,7 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
-               pmd_t *pmd;
-               bool use_gbpage;
--              next = (addr & PUD_MASK) + PUD_SIZE;
--              if (next > end)
--                      next = end;
-+              next = pud_addr_end(addr, end);
-               /* if this is already a gbpage, this portion is already mapped */
-               if (pud_leaf(*pud))
-@@ -81,10 +79,7 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page,
-               p4d_t *p4d = p4d_page + p4d_index(addr);
-               pud_t *pud;
--              next = (addr & P4D_MASK) + P4D_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = p4d_addr_end(addr, end);
-               if (p4d_present(*p4d)) {
-                       pud = pud_offset(p4d, 0);
-                       result = ident_pud_init(info, pud, addr, next);
-@@ -126,10 +121,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
-               pgd_t *pgd = pgd_page + pgd_index(addr);
-               p4d_t *p4d;
--              next = (addr & PGDIR_MASK) + PGDIR_SIZE;
--              if (next > end)
--                      next = end;
--
-+              next = pgd_addr_end(addr, end);
-               if (pgd_present(*pgd)) {
-                       p4d = p4d_offset(pgd, 0);
-                       result = ident_p4d_init(info, p4d, addr, next);
--- 
-2.39.5
-