lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-40fba00ffa431c8597ca785ea1cfa4d9f6503390@git.kernel.org>
Date:   Sun, 14 Apr 2019 09:41:21 -0700
From:   tip-bot for Xiaochen Shen <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     xiaochen.shen@...el.com, fenghua.yu@...el.com, tglx@...utronix.de,
        reinette.chatre@...el.com, mingo@...hat.com, tony.luck@...el.com,
        mingo@...nel.org, hpa@...or.com, linux-kernel@...r.kernel.org,
        bp@...e.de, x86@...nel.org
Subject: [tip:x86/urgent] x86/resctrl: Do not repeat rdtgroup mode
 initialization

Commit-ID:  40fba00ffa431c8597ca785ea1cfa4d9f6503390
Gitweb:     https://git.kernel.org/tip/40fba00ffa431c8597ca785ea1cfa4d9f6503390
Author:     Xiaochen Shen <xiaochen.shen@...el.com>
AuthorDate: Wed, 10 Apr 2019 03:53:49 +0800
Committer:  Borislav Petkov <bp@...e.de>
CommitDate: Sun, 14 Apr 2019 18:23:13 +0200

x86/resctrl: Do not repeat rdtgroup mode initialization

When cache allocation is supported and the user creates a new resctrl
resource group, the allocations of the new resource group are
initialized to all regions that it can possibly use. At this time these
regions are all that are shareable by other resource groups as well as
regions that are not currently used. The new resource group's mode is
also initialized to reflect this initialization and set to "shareable".

The new resource group's mode is currently repeatedly initialized within
the loop that configures the hardware with the resource group's default
allocations.

Move the initialization of the resource group's mode outside the
hardware configuration loop. The resource group's mode is now
initialized only once as the final step to reflect that its configured
allocations are "shareable".

Fixes: 95f0b77efa57 ("x86/intel_rdt: Initialize new resource group with sane defaults")
Signed-off-by: Xiaochen Shen <xiaochen.shen@...el.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Reviewed-by: Fenghua Yu <fenghua.yu@...el.com>
Acked-by: Reinette Chatre <reinette.chatre@...el.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: pei.p.jia@...el.com
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Tony Luck <tony.luck@...el.com>
Cc: x86-ml <x86@...nel.org>
Link: https://lkml.kernel.org/r/1554839629-5448-1-git-send-email-xiaochen.shen@intel.com
---
 arch/x86/kernel/cpu/resctrl/rdtgroup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
index 54b9eef3eea9..85212a32b54d 100644
--- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
+++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
@@ -2610,9 +2610,10 @@ static int rdtgroup_init_alloc(struct rdtgroup *rdtgrp)
 			rdt_last_cmd_puts("Failed to initialize allocations\n");
 			return ret;
 		}
-		rdtgrp->mode = RDT_MODE_SHAREABLE;
 	}
 
+	rdtgrp->mode = RDT_MODE_SHAREABLE;
+
 	return 0;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ