Skip to content

Commit bcee618

Browse files
author
CKI KWF Bot
committed
Merge: mm: hugetlb: conditionally disable tlb_remove_table_sync_one() in huge_pmd_unshare()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7655 JIRA: https://issues.redhat.com/browse/RHEL-127602 Upstream status: RHEL-only Depends: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7534 Provide a way to waive-off the mitigation introduced for CVE-2025-38085 as it was reported causing severe performance degradation for some customer workloads. Signed-off-by: Rafael Aquini <raquini@redhat.com> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: Luiz Capitulino <luizcap@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 9f00976 + 4d2480f commit bcee618

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

Documentation/admin-guide/rh-waived-items.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@ The waived items listed in the next session follow the pattern below:
2727
List of Red Hat Waived Items
2828
============================
2929

30+
- CVE-2025-38085
31+
Waiving this mitigation can help with addressing perceived performace
32+
degradation on some workloads utilizing huge-pages [1] at the expense
33+
of re-introducing conditions to allow for the data race that leads to
34+
the enumerated common vulnerability.
35+
[1] https://access.redhat.com/solutions/7132440

include/linux/rh_waived.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define _RH_WAIVED_H
1111

1212
enum rh_waived_items {
13+
CVE_2025_38085,
1314
/* RH_WAIVED_ITEMS must always be the last item in the enum */
1415
RH_WAIVED_ITEMS,
1516
};

kernel/rh_waived.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ struct rh_waived_item {
5353

5454
/* Always use the marco RH_INSERT_WAIVED to insert items to this array. */
5555
struct rh_waived_item rh_waived_list[RH_WAIVED_ITEMS] = {
56+
RH_INSERT_WAIVED_ITEM(CVE_2025_38085, "CVE-2025-38085",
57+
"no-cve-2025-38085", RH_WAIVED_CVE),
5658
};
5759

5860
/*

mm/hugetlb.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include <linux/hugetlb_cgroup.h>
4646
#include <linux/node.h>
4747
#include <linux/page_owner.h>
48+
#include <linux/rh_waived.h>
4849
#include "internal.h"
4950
#include "hugetlb_vmemmap.h"
5051

@@ -7208,8 +7209,14 @@ int huge_pmd_unshare(struct mm_struct *mm, struct vm_area_struct *vma,
72087209
* using this page table as a normal, non-hugetlb page table.
72097210
* Wait for pending gup_fast() in other threads to finish before letting
72107211
* that happen.
7212+
*
7213+
* RHEL-120391: some customers reported severe interference/performance
7214+
* degradation on particular database workloads, thus we are including
7215+
* a waiving flag to allow for disabling this CVE mitigation
72117216
*/
7212-
tlb_remove_table_sync_one();
7217+
if (likely(!is_rh_waived(CVE_2025_38085)))
7218+
tlb_remove_table_sync_one();
7219+
72137220
put_page(virt_to_page(ptep));
72147221
mm_dec_nr_pmds(mm);
72157222
return 1;

0 commit comments

Comments
 (0)